@learnorama/mozaik-sdk 0.9.0-staging.35.1 → 0.9.1-staging.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/README.md +107 -0
  2. package/dist/api/account.d.ts +3 -1
  3. package/dist/api/account.js +2 -0
  4. package/dist/api/account.js.map +1 -1
  5. package/dist/api/admin-catalogue.js.map +1 -1
  6. package/dist/api/admin-consumption.d.ts +1 -1
  7. package/dist/api/admin-consumption.js.map +1 -1
  8. package/dist/api/admin-desk.d.ts +1 -1
  9. package/dist/api/admin-desk.js.map +1 -1
  10. package/dist/api/admin-licenses.d.ts +1 -1
  11. package/dist/api/admin-licenses.js.map +1 -1
  12. package/dist/api/admin-patrons.js.map +1 -1
  13. package/dist/api/admin-reviews.js.map +1 -1
  14. package/dist/api/admin-roles.d.ts +1 -1
  15. package/dist/api/admin-roles.js.map +1 -1
  16. package/dist/api/admin-support.d.ts +1 -1
  17. package/dist/api/admin-support.js.map +1 -1
  18. package/dist/api/admin-tenants.js.map +1 -1
  19. package/dist/api/admin-tutoring.d.ts +1 -1
  20. package/dist/api/admin-tutoring.js.map +1 -1
  21. package/dist/api/auth.d.ts +1 -1
  22. package/dist/api/auth.js.map +1 -1
  23. package/dist/api/biblio-catalogue.d.ts +11 -1
  24. package/dist/api/biblio-catalogue.js +23 -1
  25. package/dist/api/biblio-catalogue.js.map +1 -1
  26. package/dist/api/biblio-home.d.ts +6 -1
  27. package/dist/api/biblio-home.js +5 -0
  28. package/dist/api/biblio-home.js.map +1 -1
  29. package/dist/api/biblio-library.d.ts +9 -6
  30. package/dist/api/biblio-library.js +22 -9
  31. package/dist/api/biblio-library.js.map +1 -1
  32. package/dist/api/biblio-nextory.d.ts +1 -1
  33. package/dist/api/biblio-nextory.js.map +1 -1
  34. package/dist/api/biblio-press.d.ts +25 -32
  35. package/dist/api/biblio-press.js +45 -52
  36. package/dist/api/biblio-press.js.map +1 -1
  37. package/dist/api/biblio-search.js.map +1 -1
  38. package/dist/api/biblio-telemetry.d.ts +1 -1
  39. package/dist/api/biblio-telemetry.js.map +1 -1
  40. package/dist/api/consumption.d.ts +1 -1
  41. package/dist/api/consumption.js.map +1 -1
  42. package/dist/api/cvs-app.js.map +1 -1
  43. package/dist/api/cvs-documents.d.ts +1 -1
  44. package/dist/api/cvs-documents.js.map +1 -1
  45. package/dist/api/cvs-favorites.d.ts +1 -1
  46. package/dist/api/cvs-favorites.js.map +1 -1
  47. package/dist/api/cvs-ils.d.ts +1 -1
  48. package/dist/api/cvs-ils.js.map +1 -1
  49. package/dist/api/cvs-loans.d.ts +1 -1
  50. package/dist/api/cvs-loans.js.map +1 -1
  51. package/dist/api/cvs-payments.js.map +1 -1
  52. package/dist/api/cvs-streaming.js.map +1 -1
  53. package/dist/api/index.d.ts +3 -3
  54. package/dist/api/index.js +3 -3
  55. package/dist/api/partner-catalogue.d.ts +1 -1
  56. package/dist/api/partner-catalogue.js.map +1 -1
  57. package/dist/api/partner-reader.d.ts +1 -1
  58. package/dist/api/partner-reader.js.map +1 -1
  59. package/dist/api/profiles.d.ts +1 -1
  60. package/dist/api/profiles.js.map +1 -1
  61. package/dist/api/search.d.ts +1 -1
  62. package/dist/api/search.js.map +1 -1
  63. package/dist/api/tutoring-catalogue.d.ts +1 -1
  64. package/dist/api/tutoring-catalogue.js.map +1 -1
  65. package/dist/api/tutoring-chat.d.ts +1 -1
  66. package/dist/api/tutoring-chat.js.map +1 -1
  67. package/dist/api/tutoring-dispatch.js.map +1 -1
  68. package/dist/api/tutoring-practitioner.js.map +1 -1
  69. package/dist/api/tutoring-requests.d.ts +1 -1
  70. package/dist/api/tutoring-requests.js.map +1 -1
  71. package/dist/chunks/client2.d.ts +1 -1
  72. package/dist/chunks/index.d.ts +340 -321
  73. package/dist/index.d.ts +3 -3
  74. package/dist/index.js +3 -3
  75. package/dist/index.js.map +1 -1
  76. package/dist/models.d.ts +2 -2
  77. package/dist/models.js.map +1 -1
  78. package/dist/react/account.d.ts +3 -1
  79. package/dist/react/account.js +3 -1
  80. package/dist/react/account.js.map +1 -1
  81. package/dist/react/admin-catalogue.d.ts +1 -1
  82. package/dist/react/admin-catalogue.js +1 -1
  83. package/dist/react/admin-catalogue.js.map +1 -1
  84. package/dist/react/admin-consumption.d.ts +1 -1
  85. package/dist/react/admin-consumption.js +1 -1
  86. package/dist/react/admin-consumption.js.map +1 -1
  87. package/dist/react/admin-desk.d.ts +1 -1
  88. package/dist/react/admin-desk.js +1 -1
  89. package/dist/react/admin-desk.js.map +1 -1
  90. package/dist/react/admin-licenses.d.ts +1 -1
  91. package/dist/react/admin-licenses.js +1 -1
  92. package/dist/react/admin-licenses.js.map +1 -1
  93. package/dist/react/admin-patrons.d.ts +1 -1
  94. package/dist/react/admin-patrons.js +1 -1
  95. package/dist/react/admin-patrons.js.map +1 -1
  96. package/dist/react/admin-reviews.d.ts +1 -1
  97. package/dist/react/admin-reviews.js +1 -1
  98. package/dist/react/admin-reviews.js.map +1 -1
  99. package/dist/react/admin-roles.d.ts +1 -1
  100. package/dist/react/admin-roles.js +1 -1
  101. package/dist/react/admin-roles.js.map +1 -1
  102. package/dist/react/admin-support.d.ts +1 -1
  103. package/dist/react/admin-support.js +1 -1
  104. package/dist/react/admin-support.js.map +1 -1
  105. package/dist/react/admin-tenants.d.ts +1 -1
  106. package/dist/react/admin-tenants.js +1 -1
  107. package/dist/react/admin-tenants.js.map +1 -1
  108. package/dist/react/admin-tutoring.d.ts +1 -1
  109. package/dist/react/admin-tutoring.js +1 -1
  110. package/dist/react/admin-tutoring.js.map +1 -1
  111. package/dist/react/auth.d.ts +1 -1
  112. package/dist/react/auth.js +1 -1
  113. package/dist/react/auth.js.map +1 -1
  114. package/dist/react/biblio-catalogue.d.ts +38 -1
  115. package/dist/react/biblio-catalogue.js +48 -2
  116. package/dist/react/biblio-catalogue.js.map +1 -1
  117. package/dist/react/biblio-home.d.ts +6 -1
  118. package/dist/react/biblio-home.js +6 -1
  119. package/dist/react/biblio-home.js.map +1 -1
  120. package/dist/react/biblio-library.d.ts +15 -11
  121. package/dist/react/biblio-library.js +32 -19
  122. package/dist/react/biblio-library.js.map +1 -1
  123. package/dist/react/biblio-nextory.d.ts +1 -1
  124. package/dist/react/biblio-nextory.js +1 -1
  125. package/dist/react/biblio-nextory.js.map +1 -1
  126. package/dist/react/biblio-press.d.ts +82 -89
  127. package/dist/react/biblio-press.js +97 -104
  128. package/dist/react/biblio-press.js.map +1 -1
  129. package/dist/react/biblio-search.d.ts +1 -1
  130. package/dist/react/biblio-search.js +1 -1
  131. package/dist/react/biblio-search.js.map +1 -1
  132. package/dist/react/biblio-telemetry.d.ts +1 -1
  133. package/dist/react/biblio-telemetry.js +1 -1
  134. package/dist/react/biblio-telemetry.js.map +1 -1
  135. package/dist/react/consumption.d.ts +1 -1
  136. package/dist/react/consumption.js +1 -1
  137. package/dist/react/consumption.js.map +1 -1
  138. package/dist/react/cvs-app.d.ts +1 -1
  139. package/dist/react/cvs-app.js +1 -1
  140. package/dist/react/cvs-app.js.map +1 -1
  141. package/dist/react/cvs-documents.d.ts +1 -1
  142. package/dist/react/cvs-documents.js +1 -1
  143. package/dist/react/cvs-documents.js.map +1 -1
  144. package/dist/react/cvs-favorites.d.ts +1 -1
  145. package/dist/react/cvs-favorites.js +1 -1
  146. package/dist/react/cvs-favorites.js.map +1 -1
  147. package/dist/react/cvs-ils.d.ts +1 -1
  148. package/dist/react/cvs-ils.js +1 -1
  149. package/dist/react/cvs-ils.js.map +1 -1
  150. package/dist/react/cvs-loans.d.ts +1 -1
  151. package/dist/react/cvs-loans.js +1 -1
  152. package/dist/react/cvs-loans.js.map +1 -1
  153. package/dist/react/cvs-payments.d.ts +1 -1
  154. package/dist/react/cvs-payments.js +1 -1
  155. package/dist/react/cvs-payments.js.map +1 -1
  156. package/dist/react/cvs-streaming.d.ts +1 -1
  157. package/dist/react/cvs-streaming.js +1 -1
  158. package/dist/react/cvs-streaming.js.map +1 -1
  159. package/dist/react/index.d.ts +3 -3
  160. package/dist/react/index.js +3 -3
  161. package/dist/react/partner-catalogue.d.ts +1 -1
  162. package/dist/react/partner-catalogue.js +1 -1
  163. package/dist/react/partner-catalogue.js.map +1 -1
  164. package/dist/react/partner-reader.d.ts +1 -1
  165. package/dist/react/partner-reader.js +1 -1
  166. package/dist/react/partner-reader.js.map +1 -1
  167. package/dist/react/profiles.d.ts +1 -1
  168. package/dist/react/profiles.js +1 -1
  169. package/dist/react/profiles.js.map +1 -1
  170. package/dist/react/search.d.ts +1 -1
  171. package/dist/react/search.js +1 -1
  172. package/dist/react/search.js.map +1 -1
  173. package/dist/react/tutoring-catalogue.d.ts +1 -1
  174. package/dist/react/tutoring-catalogue.js +1 -1
  175. package/dist/react/tutoring-catalogue.js.map +1 -1
  176. package/dist/react/tutoring-chat.d.ts +1 -1
  177. package/dist/react/tutoring-chat.js +1 -1
  178. package/dist/react/tutoring-chat.js.map +1 -1
  179. package/dist/react/tutoring-dispatch.d.ts +1 -1
  180. package/dist/react/tutoring-dispatch.js +1 -1
  181. package/dist/react/tutoring-dispatch.js.map +1 -1
  182. package/dist/react/tutoring-practitioner.d.ts +1 -1
  183. package/dist/react/tutoring-practitioner.js +1 -1
  184. package/dist/react/tutoring-practitioner.js.map +1 -1
  185. package/dist/react/tutoring-requests.d.ts +1 -1
  186. package/dist/react/tutoring-requests.js +1 -1
  187. package/dist/react/tutoring-requests.js.map +1 -1
  188. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"biblio-library.js","names":[],"sources":["../../src/react/biblio-library/biblio-library.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 CategoryListRead,\n CategoryPreferencesWrite,\n FavoriteAddWrite,\n FavoritePage,\n HTTPExceptionResponse,\n HistoryPage,\n ListBiblioFavoritesParams,\n ListHistoryParams,\n PackListRead,\n PreferencesRead,\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 getListBiblioCategoriesUrl = () => {\n\n\n\n\n return `/biblio/me/categories`\n}\n\n/**\n * The categories this account can reach (E26).\n *\n * Two independent gates, and both have to pass. Entitlement answers \"did the\n * company buy this\"; ``access_level`` answers \"is this person allowed it\" — an\n * ordinal on the account compared against one on the category, which is how a\n * child profile is kept out of the adult catalogue. Neither substitutes for the\n * other.\n * @summary List Biblio Categories\n */\nexport const listBiblioCategories = async ( options?: Parameters<typeof request>[1]): Promise<CategoryListRead> => {\n\n return request<CategoryListRead>(getListBiblioCategoriesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListBiblioCategoriesQueryKey = () => {\n return [\n `/biblio/me/categories`\n ] as const;\n }\n\n\nexport const getListBiblioCategoriesQueryOptions = <TData = Awaited<ReturnType<typeof listBiblioCategories>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListBiblioCategoriesQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listBiblioCategories>>> = ({ signal }) => listBiblioCategories({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListBiblioCategoriesQueryResult = NonNullable<Awaited<ReturnType<typeof listBiblioCategories>>>\nexport type ListBiblioCategoriesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListBiblioCategories<TData = Awaited<ReturnType<typeof listBiblioCategories>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listBiblioCategories>>,\n TError,\n Awaited<ReturnType<typeof listBiblioCategories>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListBiblioCategories<TData = Awaited<ReturnType<typeof listBiblioCategories>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listBiblioCategories>>,\n TError,\n Awaited<ReturnType<typeof listBiblioCategories>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListBiblioCategories<TData = Awaited<ReturnType<typeof listBiblioCategories>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Biblio Categories\n */\n\nexport function useListBiblioCategories<TData = Awaited<ReturnType<typeof listBiblioCategories>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListBiblioCategoriesQueryOptions(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 getListBiblioFavoritesUrl = (params?: ListBiblioFavoritesParams,) => {\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/me/favorites?${stringifiedParams}` : `/biblio/me/favorites`\n}\n\n/**\n * The caller's favourites (E30), newest first.\n * @summary List Biblio Favorites\n */\nexport const listBiblioFavorites = async (params?: ListBiblioFavoritesParams, options?: Parameters<typeof request>[1]): Promise<FavoritePage> => {\n\n return request<FavoritePage>(getListBiblioFavoritesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListBiblioFavoritesQueryKey = (params?: ListBiblioFavoritesParams,) => {\n return [\n `/biblio/me/favorites`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getListBiblioFavoritesQueryOptions = <TData = Awaited<ReturnType<typeof listBiblioFavorites>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListBiblioFavoritesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListBiblioFavoritesQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listBiblioFavorites>>> = ({ signal }) => listBiblioFavorites(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListBiblioFavoritesQueryResult = NonNullable<Awaited<ReturnType<typeof listBiblioFavorites>>>\nexport type ListBiblioFavoritesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListBiblioFavorites<TData = Awaited<ReturnType<typeof listBiblioFavorites>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ListBiblioFavoritesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listBiblioFavorites>>,\n TError,\n Awaited<ReturnType<typeof listBiblioFavorites>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListBiblioFavorites<TData = Awaited<ReturnType<typeof listBiblioFavorites>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListBiblioFavoritesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listBiblioFavorites>>,\n TError,\n Awaited<ReturnType<typeof listBiblioFavorites>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListBiblioFavorites<TData = Awaited<ReturnType<typeof listBiblioFavorites>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListBiblioFavoritesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Biblio Favorites\n */\n\nexport function useListBiblioFavorites<TData = Awaited<ReturnType<typeof listBiblioFavorites>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListBiblioFavoritesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListBiblioFavoritesQueryOptions(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 getRemoveBiblioFavoriteUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/me/favorites/${contentId}`\n}\n\n/**\n * Remove a favourite (E32). Idempotent — absent is already the desired state.\n * @summary Remove Biblio Favorite\n */\nexport const removeBiblioFavorite = async (contentId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRemoveBiblioFavoriteUrl(contentId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n\n\n\nexport const getRemoveBiblioFavoriteMutationKey = () => ['removeBiblioFavorite'] as const;\n\nexport const getRemoveBiblioFavoriteMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeBiblioFavorite>>, TError,RemoveBiblioFavoriteMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof removeBiblioFavorite>>, TError,RemoveBiblioFavoriteMutationVariables, TContext> => {\n\nconst mutationKey = getRemoveBiblioFavoriteMutationKey();\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 removeBiblioFavorite>>, RemoveBiblioFavoriteMutationVariables> = (props) => {\n const {contentId} = props ?? {};\n\n return removeBiblioFavorite(contentId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RemoveBiblioFavoriteMutationResult = NonNullable<Awaited<ReturnType<typeof removeBiblioFavorite>>>\n\n export type RemoveBiblioFavoriteMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type RemoveBiblioFavoriteMutationVariables = {contentId: number}\n\n /**\n * @summary Remove Biblio Favorite\n */\nexport const useRemoveBiblioFavorite = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeBiblioFavorite>>, TError,RemoveBiblioFavoriteMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof removeBiblioFavorite>>,\n TError,\n RemoveBiblioFavoriteMutationVariables,\n TContext\n > => {\n return useMutation(getRemoveBiblioFavoriteMutationOptions(options), queryClient);\n }\n export const getAddBiblioFavoriteUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/me/favorites/${contentId}`\n}\n\n/**\n * Mark content as a favourite (E31). Idempotent.\n *\n * ``PUT`` and :func:`remove_favorite`'s ``DELETE`` replace one\n * ``POST /favorites`` carrying an ``enabled`` boolean — the verb encoded as\n * data. A retry after a timeout reversed the user's intent; a repeated ``PUT``\n * cannot (§4, consequence 3).\n *\n * Favouriting is not consumption, so it is not entitlement-gated: a member may\n * bookmark something their library has not licensed *yet*. Reaching the content\n * is gated, at the point of reaching it.\n * @summary Add Biblio Favorite\n */\nexport const addBiblioFavorite = async (contentId: number,\n favoriteAddWrite: FavoriteAddWrite, 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>(getAddBiblioFavoriteUrl(contentId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(favoriteAddWrite)\n }\n);}\n\n\n\n\n\nexport const getAddBiblioFavoriteMutationKey = () => ['addBiblioFavorite'] as const;\n\nexport const getAddBiblioFavoriteMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addBiblioFavorite>>, TError,AddBiblioFavoriteMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof addBiblioFavorite>>, TError,AddBiblioFavoriteMutationVariables, TContext> => {\n\nconst mutationKey = getAddBiblioFavoriteMutationKey();\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 addBiblioFavorite>>, AddBiblioFavoriteMutationVariables> = (props) => {\n const {contentId,data} = props ?? {};\n\n return addBiblioFavorite(contentId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddBiblioFavoriteMutationResult = NonNullable<Awaited<ReturnType<typeof addBiblioFavorite>>>\n export type AddBiblioFavoriteMutationBody = BodyType<FavoriteAddWrite>\n export type AddBiblioFavoriteMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type AddBiblioFavoriteMutationVariables = {contentId: number;data: BodyType<FavoriteAddWrite>}\n\n /**\n * @summary Add Biblio Favorite\n */\nexport const useAddBiblioFavorite = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addBiblioFavorite>>, TError,AddBiblioFavoriteMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof addBiblioFavorite>>,\n TError,\n AddBiblioFavoriteMutationVariables,\n TContext\n > => {\n return useMutation(getAddBiblioFavoriteMutationOptions(options), queryClient);\n }\n export const getListHistoryUrl = (params?: ListHistoryParams,) => {\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/me/history?${stringifiedParams}` : `/biblio/me/history`\n}\n\n/**\n * What this account has consumed, most recent first (E33).\n *\n * One row per content item, not one per view: the caller wants \"what have I\n * been reading\", and ``consumption_event`` is append-only with a row per act.\n * The last access is therefore a MAX, and progress comes from\n * ``content_progress``, which is LEFT JOINed because an absent row means \"not\n * started\" rather than zero.\n * @summary List History\n */\nexport const listHistory = async (params?: ListHistoryParams, options?: Parameters<typeof request>[1]): Promise<HistoryPage> => {\n\n return request<HistoryPage>(getListHistoryUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListHistoryQueryKey = (params?: ListHistoryParams,) => {\n return [\n `/biblio/me/history`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getListHistoryQueryOptions = <TData = Awaited<ReturnType<typeof listHistory>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListHistoryParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listHistory>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListHistoryQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listHistory>>> = ({ signal }) => listHistory(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listHistory>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListHistoryQueryResult = NonNullable<Awaited<ReturnType<typeof listHistory>>>\nexport type ListHistoryQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListHistory<TData = Awaited<ReturnType<typeof listHistory>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ListHistoryParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listHistory>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listHistory>>,\n TError,\n Awaited<ReturnType<typeof listHistory>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListHistory<TData = Awaited<ReturnType<typeof listHistory>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListHistoryParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listHistory>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listHistory>>,\n TError,\n Awaited<ReturnType<typeof listHistory>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListHistory<TData = Awaited<ReturnType<typeof listHistory>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListHistoryParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listHistory>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List History\n */\n\nexport function useListHistory<TData = Awaited<ReturnType<typeof listHistory>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListHistoryParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listHistory>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListHistoryQueryOptions(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 getListPacksUrl = () => {\n\n\n\n\n return `/biblio/me/packs`\n}\n\n/**\n * The content packs this account can navigate (E25).\n *\n * A pack is a :class:`~app.models.biblio.catalogue.CatalogSection`, and one is\n * reachable when the contract reaches at least one category inside it. Deriving\n * it that way rather than granting packs directly means a pack cannot advertise\n * itself while every category under it is out of contract.\n *\n * Empty is a correct answer, not a broken one: an account whose contract has\n * lapsed reaches nothing.\n * @summary List Packs\n */\nexport const listPacks = async ( options?: Parameters<typeof request>[1]): Promise<PackListRead> => {\n\n return request<PackListRead>(getListPacksUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListPacksQueryKey = () => {\n return [\n `/biblio/me/packs`\n ] as const;\n }\n\n\nexport const getListPacksQueryOptions = <TData = Awaited<ReturnType<typeof listPacks>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPacks>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListPacksQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listPacks>>> = ({ signal }) => listPacks({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listPacks>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListPacksQueryResult = NonNullable<Awaited<ReturnType<typeof listPacks>>>\nexport type ListPacksQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListPacks<TData = Awaited<ReturnType<typeof listPacks>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPacks>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listPacks>>,\n TError,\n Awaited<ReturnType<typeof listPacks>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListPacks<TData = Awaited<ReturnType<typeof listPacks>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPacks>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listPacks>>,\n TError,\n Awaited<ReturnType<typeof listPacks>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListPacks<TData = Awaited<ReturnType<typeof listPacks>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPacks>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Packs\n */\n\nexport function useListPacks<TData = Awaited<ReturnType<typeof listPacks>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPacks>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListPacksQueryOptions(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 getReadPreferencesUrl = () => {\n\n\n\n\n return `/biblio/me/preferences`\n}\n\n/**\n * The caller's own preferences (E28).\n *\n * An object with one key rather than a bare array, so a second preference can\n * be added later without breaking every client.\n * @summary Read Preferences\n */\nexport const readPreferences = async ( options?: Parameters<typeof request>[1]): Promise<PreferencesRead> => {\n\n return request<PreferencesRead>(getReadPreferencesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadPreferencesQueryKey = () => {\n return [\n `/biblio/me/preferences`\n ] as const;\n }\n\n\nexport const getReadPreferencesQueryOptions = <TData = Awaited<ReturnType<typeof readPreferences>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPreferences>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadPreferencesQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readPreferences>>> = ({ signal }) => readPreferences({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readPreferences>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadPreferencesQueryResult = NonNullable<Awaited<ReturnType<typeof readPreferences>>>\nexport type ReadPreferencesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadPreferences<TData = Awaited<ReturnType<typeof readPreferences>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPreferences>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPreferences>>,\n TError,\n Awaited<ReturnType<typeof readPreferences>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPreferences<TData = Awaited<ReturnType<typeof readPreferences>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPreferences>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPreferences>>,\n TError,\n Awaited<ReturnType<typeof readPreferences>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPreferences<TData = Awaited<ReturnType<typeof readPreferences>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPreferences>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Preferences\n */\n\nexport function useReadPreferences<TData = Awaited<ReturnType<typeof readPreferences>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPreferences>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadPreferencesQueryOptions(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 getReplaceCategoryPreferencesUrl = () => {\n\n\n\n\n return `/biblio/me/preferences/categories`\n}\n\n/**\n * Replace the favourite-category set wholesale (E29).\n *\n * ``PUT`` because the legacy handler already replaced the whole set; the verb\n * now says so. An empty array clears the set and is valid input — the legacy\n * left that path uncaught and returned ``500``.\n *\n * A category the account cannot reach is ``422``, listing the offending ids.\n * Silently dropping them would leave the client believing it had saved\n * something it had not.\n * @summary Replace Category Preferences\n */\nexport const replaceCategoryPreferences = async (categoryPreferencesWrite: CategoryPreferencesWrite, 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>(getReplaceCategoryPreferencesUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(categoryPreferencesWrite)\n }\n);}\n\n\n\n\n\nexport const getReplaceCategoryPreferencesMutationKey = () => ['replaceCategoryPreferences'] as const;\n\nexport const getReplaceCategoryPreferencesMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof replaceCategoryPreferences>>, TError,ReplaceCategoryPreferencesMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof replaceCategoryPreferences>>, TError,ReplaceCategoryPreferencesMutationVariables, TContext> => {\n\nconst mutationKey = getReplaceCategoryPreferencesMutationKey();\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 replaceCategoryPreferences>>, ReplaceCategoryPreferencesMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return replaceCategoryPreferences(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type ReplaceCategoryPreferencesMutationResult = NonNullable<Awaited<ReturnType<typeof replaceCategoryPreferences>>>\n export type ReplaceCategoryPreferencesMutationBody = BodyType<CategoryPreferencesWrite>\n export type ReplaceCategoryPreferencesMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type ReplaceCategoryPreferencesMutationVariables = {data: BodyType<CategoryPreferencesWrite>}\n\n /**\n * @summary Replace Category Preferences\n */\nexport const useReplaceCategoryPreferences = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof replaceCategoryPreferences>>, TError,ReplaceCategoryPreferencesMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof replaceCategoryPreferences>>,\n TError,\n ReplaceCategoryPreferencesMutationVariables,\n TContext\n > => {\n return useMutation(getReplaceCategoryPreferencesMutationOptions(options), queryClient);\n }\n"],"mappings":";;;;;;;;;;;AAgDA,MAAM,gBAAqC,OAAU,aAAqC;CACxF,MAAM,SAAS,EAAE,SAAS;CAC1B,KAAK,MAAM,OAAO,OAAO,KAAK,KAAK,GAAG;EAGpC,IAAI,QAAQ,YAAY;EACxB,OAAO,eAAe,QAAQ,KAAK;GACjC,YAAY;GACZ,cAAc;GACd,WAAY,MAAkC;EAChD,CAAC;CACH;CACA,OAAO;AACT;AAEA,MAAa,mCAAmC;CAK9C,OAAO;AACT;;;;;;;;;;;AAYA,MAAa,uBAAuB,OAAQ,YAAuE;CAEjH,OAAO,QAA0B,2BAA2B,GAC5D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,wCAAwC;CACjD,OAAO,CACP,uBACA;AACA;AAGJ,MAAa,uCAAuK,YAC/K;CAEL,MAAM,EAAC,OAAO,cAAc,SAAS,mBAAkB,WAAW,CAAC;CAEjE,MAAM,WAAY,cAAc,YAAY,gCAAgC;CAI1E,MAAM,WAA4E,EAAE,aAAa,qBAAqB;EAAE;EAAQ,GAAG;CAAe,CAAC;CAMpJ,OAAQ;EAAE;EAAU;EAAS,GAAG;CAAY;AAC/C;;;;AAkCA,SAAgB,wBACd,SACC,aACi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W;CAAC,IACzD;EAAC,UAAU,EAAE,YAAa;EAAG,SAAS,KAAA;CAAS;CAKjD,MAAM,cAAqI,UAAU;EACjJ,MAAM,EAAC,SAAQ,SAAS,CAAC;EAEzB,OAAQ,2BAA2B,MAAK,cAAc;CACxD;CAON,OAAQ;EAAE;EAAY,GAAG;CAAgB;AAAC;;;;AAU5C,MAAa,iCACW,SACrB,gBAKQ;CACL,OAAO,YAAY,6CAA6C,OAAO,GAAG,WAAW;AACvF"}
1
+ {"version":3,"file":"biblio-library.js","names":[],"sources":["../../src/react/biblio-library/biblio-library.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.9.1\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query';\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query';\n\nimport type {\n CategoryListRead,\n CategoryPreferencesWrite,\n FavoriteAddWrite,\n FavoritePage,\n HTTPExceptionResponse,\n HistoryPage,\n ListBiblioCategoriesParams,\n ListBiblioFavoritesParams,\n ListHistoryParams,\n PackListRead,\n PreferencesRead,\n RemoveBiblioFavoriteParams,\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 getListBiblioCategoriesUrl = (params?: ListBiblioCategoriesParams,) => {\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/me/categories?${stringifiedParams}` : `/biblio/me/categories`\n}\n\n/**\n * The categories this account can reach (E26).\n *\n * Two independent gates, and both have to pass. Entitlement answers \"did the\n * company buy this\"; ``access_level`` answers \"is this person allowed it\" — an\n * ordinal on the account compared against one on the category, which is how a\n * child profile is kept out of the adult catalogue. Neither substitutes for the\n * other.\n * @summary List Biblio Categories\n */\nexport const listBiblioCategories = async (params?: ListBiblioCategoriesParams, options?: Parameters<typeof request>[1]): Promise<CategoryListRead> => {\n\n return request<CategoryListRead>(getListBiblioCategoriesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListBiblioCategoriesQueryKey = (params?: ListBiblioCategoriesParams,) => {\n return [\n `/biblio/me/categories`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getListBiblioCategoriesQueryOptions = <TData = Awaited<ReturnType<typeof listBiblioCategories>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListBiblioCategoriesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListBiblioCategoriesQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listBiblioCategories>>> = ({ signal }) => listBiblioCategories(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListBiblioCategoriesQueryResult = NonNullable<Awaited<ReturnType<typeof listBiblioCategories>>>\nexport type ListBiblioCategoriesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListBiblioCategories<TData = Awaited<ReturnType<typeof listBiblioCategories>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ListBiblioCategoriesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listBiblioCategories>>,\n TError,\n Awaited<ReturnType<typeof listBiblioCategories>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListBiblioCategories<TData = Awaited<ReturnType<typeof listBiblioCategories>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListBiblioCategoriesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listBiblioCategories>>,\n TError,\n Awaited<ReturnType<typeof listBiblioCategories>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListBiblioCategories<TData = Awaited<ReturnType<typeof listBiblioCategories>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListBiblioCategoriesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Biblio Categories\n */\n\nexport function useListBiblioCategories<TData = Awaited<ReturnType<typeof listBiblioCategories>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListBiblioCategoriesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioCategories>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListBiblioCategoriesQueryOptions(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 getListBiblioFavoritesUrl = (params?: ListBiblioFavoritesParams,) => {\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/me/favorites?${stringifiedParams}` : `/biblio/me/favorites`\n}\n\n/**\n * The caller's favourites (E30), newest first.\n * @summary List Biblio Favorites\n */\nexport const listBiblioFavorites = async (params?: ListBiblioFavoritesParams, options?: Parameters<typeof request>[1]): Promise<FavoritePage> => {\n\n return request<FavoritePage>(getListBiblioFavoritesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListBiblioFavoritesQueryKey = (params?: ListBiblioFavoritesParams,) => {\n return [\n `/biblio/me/favorites`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getListBiblioFavoritesQueryOptions = <TData = Awaited<ReturnType<typeof listBiblioFavorites>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListBiblioFavoritesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListBiblioFavoritesQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listBiblioFavorites>>> = ({ signal }) => listBiblioFavorites(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListBiblioFavoritesQueryResult = NonNullable<Awaited<ReturnType<typeof listBiblioFavorites>>>\nexport type ListBiblioFavoritesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListBiblioFavorites<TData = Awaited<ReturnType<typeof listBiblioFavorites>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ListBiblioFavoritesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listBiblioFavorites>>,\n TError,\n Awaited<ReturnType<typeof listBiblioFavorites>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListBiblioFavorites<TData = Awaited<ReturnType<typeof listBiblioFavorites>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListBiblioFavoritesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listBiblioFavorites>>,\n TError,\n Awaited<ReturnType<typeof listBiblioFavorites>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListBiblioFavorites<TData = Awaited<ReturnType<typeof listBiblioFavorites>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListBiblioFavoritesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Biblio Favorites\n */\n\nexport function useListBiblioFavorites<TData = Awaited<ReturnType<typeof listBiblioFavorites>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListBiblioFavoritesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listBiblioFavorites>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListBiblioFavoritesQueryOptions(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 getRemoveBiblioFavoriteUrl = (contentId: number,\n params?: RemoveBiblioFavoriteParams,) => {\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/me/favorites/${contentId}?${stringifiedParams}` : `/biblio/me/favorites/${contentId}`\n}\n\n/**\n * Remove one mode only; a press selection includes its publication variants.\n *\n * Omitted mode means content. Use ?mode=press_title to unselect a publication.\n * No longer removes both modes sharing an ID. Absent is already the desired state.\n * @summary Remove Biblio Favorite\n */\nexport const removeBiblioFavorite = async (contentId: number,\n params?: RemoveBiblioFavoriteParams, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRemoveBiblioFavoriteUrl(contentId,params),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n\n\n\nexport const getRemoveBiblioFavoriteMutationKey = () => ['removeBiblioFavorite'] as const;\n\nexport const getRemoveBiblioFavoriteMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeBiblioFavorite>>, TError,RemoveBiblioFavoriteMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof removeBiblioFavorite>>, TError,RemoveBiblioFavoriteMutationVariables, TContext> => {\n\nconst mutationKey = getRemoveBiblioFavoriteMutationKey();\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 removeBiblioFavorite>>, RemoveBiblioFavoriteMutationVariables> = (props) => {\n const {contentId,params} = props ?? {};\n\n return removeBiblioFavorite(contentId,params,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RemoveBiblioFavoriteMutationResult = NonNullable<Awaited<ReturnType<typeof removeBiblioFavorite>>>\n\n export type RemoveBiblioFavoriteMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type RemoveBiblioFavoriteMutationVariables = {contentId: number;params?: RemoveBiblioFavoriteParams}\n\n /**\n * @summary Remove Biblio Favorite\n */\nexport const useRemoveBiblioFavorite = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeBiblioFavorite>>, TError,RemoveBiblioFavoriteMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof removeBiblioFavorite>>,\n TError,\n RemoveBiblioFavoriteMutationVariables,\n TContext\n > => {\n return useMutation(getRemoveBiblioFavoriteMutationOptions(options), queryClient);\n }\n export const getAddBiblioFavoriteUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/me/favorites/${contentId}`\n}\n\n/**\n * Mark content as a favourite (E31). Idempotent.\n *\n * ``PUT`` and :func:`remove_favorite`'s ``DELETE`` replace one\n * ``POST /favorites`` carrying an ``enabled`` boolean — the verb encoded as\n * data. A retry after a timeout reversed the user's intent; a repeated ``PUT``\n * cannot (§4, consequence 3).\n *\n * Favouriting is not consumption, so it is not entitlement-gated: a member may\n * bookmark something their library has not licensed *yet*. Reaching the content\n * is gated, at the point of reaching it.\n * @summary Add Biblio Favorite\n */\nexport const addBiblioFavorite = async (contentId: number,\n favoriteAddWrite: FavoriteAddWrite, 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>(getAddBiblioFavoriteUrl(contentId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(favoriteAddWrite)\n }\n);}\n\n\n\n\n\nexport const getAddBiblioFavoriteMutationKey = () => ['addBiblioFavorite'] as const;\n\nexport const getAddBiblioFavoriteMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addBiblioFavorite>>, TError,AddBiblioFavoriteMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof addBiblioFavorite>>, TError,AddBiblioFavoriteMutationVariables, TContext> => {\n\nconst mutationKey = getAddBiblioFavoriteMutationKey();\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 addBiblioFavorite>>, AddBiblioFavoriteMutationVariables> = (props) => {\n const {contentId,data} = props ?? {};\n\n return addBiblioFavorite(contentId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddBiblioFavoriteMutationResult = NonNullable<Awaited<ReturnType<typeof addBiblioFavorite>>>\n export type AddBiblioFavoriteMutationBody = BodyType<FavoriteAddWrite>\n export type AddBiblioFavoriteMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type AddBiblioFavoriteMutationVariables = {contentId: number;data: BodyType<FavoriteAddWrite>}\n\n /**\n * @summary Add Biblio Favorite\n */\nexport const useAddBiblioFavorite = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addBiblioFavorite>>, TError,AddBiblioFavoriteMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof addBiblioFavorite>>,\n TError,\n AddBiblioFavoriteMutationVariables,\n TContext\n > => {\n return useMutation(getAddBiblioFavoriteMutationOptions(options), queryClient);\n }\n export const getListHistoryUrl = (params?: ListHistoryParams,) => {\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/me/history?${stringifiedParams}` : `/biblio/me/history`\n}\n\n/**\n * What this account has consumed, most recent first (E33).\n *\n * One row per content item, not one per view: the caller wants \"what have I\n * been reading\", and ``consumption_event`` is append-only with a row per act.\n * The last access is therefore a MAX, and progress comes from\n * ``content_progress``, which is LEFT JOINed because an absent row means \"not\n * started\" rather than zero.\n * @summary List History\n */\nexport const listHistory = async (params?: ListHistoryParams, options?: Parameters<typeof request>[1]): Promise<HistoryPage> => {\n\n return request<HistoryPage>(getListHistoryUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListHistoryQueryKey = (params?: ListHistoryParams,) => {\n return [\n `/biblio/me/history`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getListHistoryQueryOptions = <TData = Awaited<ReturnType<typeof listHistory>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListHistoryParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listHistory>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListHistoryQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listHistory>>> = ({ signal }) => listHistory(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listHistory>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListHistoryQueryResult = NonNullable<Awaited<ReturnType<typeof listHistory>>>\nexport type ListHistoryQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListHistory<TData = Awaited<ReturnType<typeof listHistory>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ListHistoryParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listHistory>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listHistory>>,\n TError,\n Awaited<ReturnType<typeof listHistory>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListHistory<TData = Awaited<ReturnType<typeof listHistory>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListHistoryParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listHistory>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listHistory>>,\n TError,\n Awaited<ReturnType<typeof listHistory>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListHistory<TData = Awaited<ReturnType<typeof listHistory>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListHistoryParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listHistory>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List History\n */\n\nexport function useListHistory<TData = Awaited<ReturnType<typeof listHistory>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListHistoryParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listHistory>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListHistoryQueryOptions(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 getListPacksUrl = () => {\n\n\n\n\n return `/biblio/me/packs`\n}\n\n/**\n * The content packs this account can navigate (E25).\n *\n * A pack is a :class:`~app.models.biblio.catalogue.CatalogSection`, and one is\n * reachable when the contract reaches at least one category inside it. Deriving\n * it that way rather than granting packs directly means a pack cannot advertise\n * itself while every category under it is out of contract.\n *\n * Empty is a correct answer, not a broken one: an account whose contract has\n * lapsed reaches nothing.\n * @summary List Packs\n */\nexport const listPacks = async ( options?: Parameters<typeof request>[1]): Promise<PackListRead> => {\n\n return request<PackListRead>(getListPacksUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListPacksQueryKey = () => {\n return [\n `/biblio/me/packs`\n ] as const;\n }\n\n\nexport const getListPacksQueryOptions = <TData = Awaited<ReturnType<typeof listPacks>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPacks>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListPacksQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listPacks>>> = ({ signal }) => listPacks({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listPacks>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListPacksQueryResult = NonNullable<Awaited<ReturnType<typeof listPacks>>>\nexport type ListPacksQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListPacks<TData = Awaited<ReturnType<typeof listPacks>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPacks>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listPacks>>,\n TError,\n Awaited<ReturnType<typeof listPacks>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListPacks<TData = Awaited<ReturnType<typeof listPacks>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPacks>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listPacks>>,\n TError,\n Awaited<ReturnType<typeof listPacks>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListPacks<TData = Awaited<ReturnType<typeof listPacks>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPacks>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Packs\n */\n\nexport function useListPacks<TData = Awaited<ReturnType<typeof listPacks>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listPacks>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListPacksQueryOptions(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 getReadPreferencesUrl = () => {\n\n\n\n\n return `/biblio/me/preferences`\n}\n\n/**\n * The caller's own preferences (E28).\n *\n * An object with one key rather than a bare array, so a second preference can\n * be added later without breaking every client.\n * @summary Read Preferences\n */\nexport const readPreferences = async ( options?: Parameters<typeof request>[1]): Promise<PreferencesRead> => {\n\n return request<PreferencesRead>(getReadPreferencesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadPreferencesQueryKey = () => {\n return [\n `/biblio/me/preferences`\n ] as const;\n }\n\n\nexport const getReadPreferencesQueryOptions = <TData = Awaited<ReturnType<typeof readPreferences>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPreferences>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadPreferencesQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readPreferences>>> = ({ signal }) => readPreferences({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readPreferences>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadPreferencesQueryResult = NonNullable<Awaited<ReturnType<typeof readPreferences>>>\nexport type ReadPreferencesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadPreferences<TData = Awaited<ReturnType<typeof readPreferences>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPreferences>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPreferences>>,\n TError,\n Awaited<ReturnType<typeof readPreferences>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPreferences<TData = Awaited<ReturnType<typeof readPreferences>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPreferences>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPreferences>>,\n TError,\n Awaited<ReturnType<typeof readPreferences>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPreferences<TData = Awaited<ReturnType<typeof readPreferences>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPreferences>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Preferences\n */\n\nexport function useReadPreferences<TData = Awaited<ReturnType<typeof readPreferences>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPreferences>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadPreferencesQueryOptions(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 getReplaceCategoryPreferencesUrl = () => {\n\n\n\n\n return `/biblio/me/preferences/categories`\n}\n\n/**\n * Replace the favourite-category set wholesale (E29).\n *\n * ``PUT`` because the legacy handler already replaced the whole set; the verb\n * now says so. An empty array clears the set and is valid input — the legacy\n * left that path uncaught and returned ``500``.\n *\n * A category the account cannot reach is ``422``, listing the offending ids.\n * Silently dropping them would leave the client believing it had saved\n * something it had not.\n * @summary Replace Category Preferences\n */\nexport const replaceCategoryPreferences = async (categoryPreferencesWrite: CategoryPreferencesWrite, 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>(getReplaceCategoryPreferencesUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(categoryPreferencesWrite)\n }\n);}\n\n\n\n\n\nexport const getReplaceCategoryPreferencesMutationKey = () => ['replaceCategoryPreferences'] as const;\n\nexport const getReplaceCategoryPreferencesMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof replaceCategoryPreferences>>, TError,ReplaceCategoryPreferencesMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof replaceCategoryPreferences>>, TError,ReplaceCategoryPreferencesMutationVariables, TContext> => {\n\nconst mutationKey = getReplaceCategoryPreferencesMutationKey();\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 replaceCategoryPreferences>>, ReplaceCategoryPreferencesMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return replaceCategoryPreferences(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type ReplaceCategoryPreferencesMutationResult = NonNullable<Awaited<ReturnType<typeof replaceCategoryPreferences>>>\n export type ReplaceCategoryPreferencesMutationBody = BodyType<CategoryPreferencesWrite>\n export type ReplaceCategoryPreferencesMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type ReplaceCategoryPreferencesMutationVariables = {data: BodyType<CategoryPreferencesWrite>}\n\n /**\n * @summary Replace Category Preferences\n */\nexport const useReplaceCategoryPreferences = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof replaceCategoryPreferences>>, TError,ReplaceCategoryPreferencesMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof replaceCategoryPreferences>>,\n TError,\n ReplaceCategoryPreferencesMutationVariables,\n TContext\n > => {\n return useMutation(getReplaceCategoryPreferencesMutationOptions(options), queryClient);\n }\n"],"mappings":";;;;;;;;;;;AAkDA,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,8BAA8B,WAAyC;CAClF,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,yBAAyB,sBAAsB;AACvF;;;;;;;;;;;AAYA,MAAa,uBAAuB,OAAO,QAAq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as ValidationErrorResponse, ti as HTTPExceptionResponse, xr as LicenseRead } from "../chunks/index.js";
3
3
  import { a as ErrorType, c as request } from "../chunks/client.js";
4
4
  import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, QueryClient, QueryKey, UndefinedInitialDataOptions, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
5
5
  //#region src/react/biblio-nextory/biblio-nextory.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.9.0
10
+ * OpenAPI spec version: 0.9.1
11
11
  */
12
12
  const withQueryKey = (query, queryKey) => {
13
13
  const result = { queryKey };
@@ -1 +1 @@
1
- {"version":3,"file":"biblio-nextory.js","names":[],"sources":["../../src/react/biblio-nextory/biblio-nextory.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 LicenseRead,\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 getDeleteLicenseUrl = () => {\n\n\n\n\n return `/biblio/me/nextory/license`\n}\n\n/**\n * Release this member's seat back to the household pool.\n *\n * Not in the legacy's member surface — releasing was staff-only, so a household\n * at its cap had to call support. The seat stays claimed by this member rather\n * than orphaned, so their next allocation gets the same number back and their\n * reading positions with it.\n *\n * ``204`` whether or not a licence was held: the desired end state is \"no\n * seat\", and reporting ``404`` would only tell a caller something they cannot\n * act on.\n * @summary Delete License\n */\nexport const deleteLicense = async ( options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteLicenseUrl(),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n\n\n\nexport const getDeleteLicenseMutationKey = () => ['deleteLicense'] as const;\n\nexport const getDeleteLicenseMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteLicense>>, TError,void, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteLicense>>, TError,void, TContext> => {\n\nconst mutationKey = getDeleteLicenseMutationKey();\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 deleteLicense>>, void> = () => {\n\n\n return deleteLicense(requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteLicenseMutationResult = NonNullable<Awaited<ReturnType<typeof deleteLicense>>>\n\n export type DeleteLicenseMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\n /**\n * @summary Delete License\n */\nexport const useDeleteLicense = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteLicense>>, TError,void, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof deleteLicense>>,\n TError,\n void,\n TContext\n > => {\n return useMutation(getDeleteLicenseMutationOptions(options), queryClient);\n }\n export const getReadLicenseUrl = () => {\n\n\n\n\n return `/biblio/me/nextory/license`\n}\n\n/**\n * The seat this member holds (E49). ``404`` when they hold none.\n *\n * Safe, and that is the entire point of the endpoint existing separately.\n * @summary Read License\n */\nexport const readLicense = async ( options?: Parameters<typeof request>[1]): Promise<LicenseRead> => {\n\n return request<LicenseRead>(getReadLicenseUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadLicenseQueryKey = () => {\n return [\n `/biblio/me/nextory/license`\n ] as const;\n }\n\n\nexport const getReadLicenseQueryOptions = <TData = Awaited<ReturnType<typeof readLicense>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLicense>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadLicenseQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readLicense>>> = ({ signal }) => readLicense({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readLicense>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadLicenseQueryResult = NonNullable<Awaited<ReturnType<typeof readLicense>>>\nexport type ReadLicenseQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadLicense<TData = Awaited<ReturnType<typeof readLicense>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLicense>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readLicense>>,\n TError,\n Awaited<ReturnType<typeof readLicense>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadLicense<TData = Awaited<ReturnType<typeof readLicense>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLicense>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readLicense>>,\n TError,\n Awaited<ReturnType<typeof readLicense>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadLicense<TData = Awaited<ReturnType<typeof readLicense>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLicense>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read License\n */\n\nexport function useReadLicense<TData = Awaited<ReturnType<typeof readLicense>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLicense>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadLicenseQueryOptions(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 getCreateLicenseUrl = () => {\n\n\n\n\n return `/biblio/me/nextory/license`\n}\n\n/**\n * Allocate or reactivate this member's seat (E50).\n *\n * Idempotent: a member who already holds one gets it back with ``200``, and the\n * call doubles as a repair — a subscription that lapsed at the partner is\n * reopened against the same number, so reading positions survive.\n *\n * Medium assurance: this creates an account for the member at a third party\n * under their identity, which is not something a session established by a\n * partner handing over a static URL key should be able to do.\n * @summary Create License\n */\nexport const createLicense = async ( options?: Parameters<typeof request>[1]): Promise<LicenseRead> => {\n\n return request<LicenseRead>(getCreateLicenseUrl(),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n\n\n\nexport const getCreateLicenseMutationKey = () => ['createLicense'] as const;\n\nexport const getCreateLicenseMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createLicense>>, TError,void, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof createLicense>>, TError,void, TContext> => {\n\nconst mutationKey = getCreateLicenseMutationKey();\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 createLicense>>, void> = () => {\n\n\n return createLicense(requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateLicenseMutationResult = NonNullable<Awaited<ReturnType<typeof createLicense>>>\n\n export type CreateLicenseMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\n /**\n * @summary Create License\n */\nexport const useCreateLicense = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createLicense>>, TError,void, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof createLicense>>,\n TError,\n void,\n TContext\n > => {\n return useMutation(getCreateLicenseMutationOptions(options), queryClient);\n }\n"],"mappings":";;;;;;;;;;;AAwCA,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;;;;;;;;;;;;;;AAeA,MAAa,gBAAgB,OAAQ,YAA2D;CAE9F,OAAO,QAAc,oBAAoB,GACzC;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,oCAAoC,CAAC,eAAe;AAEjE,MAAa,mCACW,YACmE;CAE3F,MAAM,cAAc,4BAA4B;CAChD,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,mBAAsF;EAGxF,OAAQ,cAAc,cAAc;CACtC;CAON,OAAQ;EAAE;EAAY,GAAG;CAAgB;AAAC;;;;AAU5C,MAAa,oBACW,SACrB,gBAKQ;CACL,OAAO,YAAY,gCAAgC,OAAO,GAAG,WAAW;AAC1E;AACA,MAA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AAG,WAAW;AAC1E"}
1
+ {"version":3,"file":"biblio-nextory.js","names":[],"sources":["../../src/react/biblio-nextory/biblio-nextory.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.9.1\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query';\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query';\n\nimport type {\n HTTPExceptionResponse,\n LicenseRead,\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 getDeleteLicenseUrl = () => {\n\n\n\n\n return `/biblio/me/nextory/license`\n}\n\n/**\n * Release this member's seat back to the household pool.\n *\n * Not in the legacy's member surface — releasing was staff-only, so a household\n * at its cap had to call support. The seat stays claimed by this member rather\n * than orphaned, so their next allocation gets the same number back and their\n * reading positions with it.\n *\n * ``204`` whether or not a licence was held: the desired end state is \"no\n * seat\", and reporting ``404`` would only tell a caller something they cannot\n * act on.\n * @summary Delete License\n */\nexport const deleteLicense = async ( options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteLicenseUrl(),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n\n\n\nexport const getDeleteLicenseMutationKey = () => ['deleteLicense'] as const;\n\nexport const getDeleteLicenseMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteLicense>>, TError,void, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteLicense>>, TError,void, TContext> => {\n\nconst mutationKey = getDeleteLicenseMutationKey();\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 deleteLicense>>, void> = () => {\n\n\n return deleteLicense(requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteLicenseMutationResult = NonNullable<Awaited<ReturnType<typeof deleteLicense>>>\n\n export type DeleteLicenseMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\n /**\n * @summary Delete License\n */\nexport const useDeleteLicense = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteLicense>>, TError,void, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof deleteLicense>>,\n TError,\n void,\n TContext\n > => {\n return useMutation(getDeleteLicenseMutationOptions(options), queryClient);\n }\n export const getReadLicenseUrl = () => {\n\n\n\n\n return `/biblio/me/nextory/license`\n}\n\n/**\n * The seat this member holds (E49). ``404`` when they hold none.\n *\n * Safe, and that is the entire point of the endpoint existing separately.\n * @summary Read License\n */\nexport const readLicense = async ( options?: Parameters<typeof request>[1]): Promise<LicenseRead> => {\n\n return request<LicenseRead>(getReadLicenseUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadLicenseQueryKey = () => {\n return [\n `/biblio/me/nextory/license`\n ] as const;\n }\n\n\nexport const getReadLicenseQueryOptions = <TData = Awaited<ReturnType<typeof readLicense>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLicense>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadLicenseQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readLicense>>> = ({ signal }) => readLicense({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readLicense>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadLicenseQueryResult = NonNullable<Awaited<ReturnType<typeof readLicense>>>\nexport type ReadLicenseQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadLicense<TData = Awaited<ReturnType<typeof readLicense>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLicense>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readLicense>>,\n TError,\n Awaited<ReturnType<typeof readLicense>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadLicense<TData = Awaited<ReturnType<typeof readLicense>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLicense>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readLicense>>,\n TError,\n Awaited<ReturnType<typeof readLicense>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadLicense<TData = Awaited<ReturnType<typeof readLicense>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLicense>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read License\n */\n\nexport function useReadLicense<TData = Awaited<ReturnType<typeof readLicense>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLicense>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadLicenseQueryOptions(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 getCreateLicenseUrl = () => {\n\n\n\n\n return `/biblio/me/nextory/license`\n}\n\n/**\n * Allocate or reactivate this member's seat (E50).\n *\n * Idempotent: a member who already holds one gets it back with ``200``, and the\n * call doubles as a repair — a subscription that lapsed at the partner is\n * reopened against the same number, so reading positions survive.\n *\n * Medium assurance: this creates an account for the member at a third party\n * under their identity, which is not something a session established by a\n * partner handing over a static URL key should be able to do.\n * @summary Create License\n */\nexport const createLicense = async ( options?: Parameters<typeof request>[1]): Promise<LicenseRead> => {\n\n return request<LicenseRead>(getCreateLicenseUrl(),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n\n\n\nexport const getCreateLicenseMutationKey = () => ['createLicense'] as const;\n\nexport const getCreateLicenseMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createLicense>>, TError,void, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof createLicense>>, TError,void, TContext> => {\n\nconst mutationKey = getCreateLicenseMutationKey();\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 createLicense>>, void> = () => {\n\n\n return createLicense(requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateLicenseMutationResult = NonNullable<Awaited<ReturnType<typeof createLicense>>>\n\n export type CreateLicenseMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\n /**\n * @summary Create License\n */\nexport const useCreateLicense = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createLicense>>, TError,void, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof createLicense>>,\n TError,\n void,\n TContext\n > => {\n return useMutation(getCreateLicenseMutationOptions(options), queryClient);\n }\n"],"mappings":";;;;;;;;;;;AAwCA,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,M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,aAAa,QAAQ;AAClD;AAOA,MAAa,4BAA4B;CAKvC,OAAO;AACT;;;;;;;;;;;;;AAcA,MAAa,gBAAgB,OAAQ,YAAkE;CAErG,OAAO,QAAqB,oBAAoB,GAChD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,oCAAoC,CAAC,eAAe;AAEjE,MAAa,mCACW,YACmE;CAE3F,MAAM,cAAc,4BAA4B;CAChD,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,mBAAsF;EAGxF,OAAQ,cAAc,cAAc;CACtC;CAON,OAAQ;EAAE;EAAY,GAAG;CAAgB;AAAC;;;;AAU5C,MAAa,oBACW,SACrB,gBAKQ;CACL,OAAO,YAAY,gCAAgC,OAAO,GAAG,WAAW;AAC1E"}
@@ -1,87 +1,123 @@
1
1
 
2
- import { $r as HTTPExceptionResponse, Ht as PressReaderAccessWrite, Kt as PressArticleRead, Ut as PressReaderAccessRead, Wt as PressIssuePage, gt as ReadIssuesParams, li as PressReviewRead, qt as PressArticleListRead, r as ValidationErrorResponse, tr as ListPressArticlesParams, ut as ReadPressReviewParams } from "../chunks/index.js";
2
+ import { Gt as PressReaderAccessWrite, Kt as PressReaderAccessRead, Ut as PressTitleRead, Wt as PressTitlePage, _t as ReadIssuesParams, di as PressFeedRead, dt as ReadPressFeedParams, qt as PressIssuePage, r as ValidationErrorResponse, ti as HTTPExceptionResponse, tr as ListPressTitlesParams } 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/biblio-press/biblio-press.d.ts
6
6
  type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
7
- export declare const getListPressArticlesUrl: (params?: ListPressArticlesParams) => string;
7
+ export declare const getReadPressFeedUrl: (params?: ReadPressFeedParams) => string;
8
8
  /**
9
- * Press articles, filtered (E41).
9
+ * Saved accessible publications first, then discovery by theme.
10
10
  *
11
- * ``theme_id`` unifies the legacy's two separate parameters ``themeId`` and
12
- * ``themePk``, which named the same thing. ``order`` is resolved against a
13
- * whitelist; anything else is ``422`` rather than a surprise ordering.
14
- * @summary List Press Articles
11
+ * Each section carries its first page, pagination metadata and a titlesUrl
12
+ * using the same filters. Unavailable titles never reappear through favourites.
13
+ * @summary Read Press Feed
15
14
  */
16
- export declare const listPressArticles: (params?: ListPressArticlesParams, options?: Parameters<typeof request>[1]) => Promise<PressArticleListRead>;
17
- export declare const getListPressArticlesQueryKey: (params?: ListPressArticlesParams) => readonly ["/biblio/press-articles", ...ListPressArticlesParams[]];
18
- export declare const getListPressArticlesQueryOptions: <TData = Awaited<ReturnType<typeof listPressArticles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListPressArticlesParams, options?: {
19
- query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressArticles>>, TError, TData>>;
15
+ export declare const readPressFeed: (params?: ReadPressFeedParams, options?: Parameters<typeof request>[1]) => Promise<PressFeedRead>;
16
+ export declare const getReadPressFeedQueryKey: (params?: ReadPressFeedParams) => readonly ["/biblio/press-feed", ...ReadPressFeedParams[]];
17
+ export declare const getReadPressFeedQueryOptions: <TData = Awaited<ReturnType<typeof readPressFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadPressFeedParams, options?: {
18
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressFeed>>, TError, TData>>;
20
19
  request?: SecondParameter<typeof request>;
21
- }) => UseQueryOptions<Awaited<ReturnType<typeof listPressArticles>>, TError, TData> & {
20
+ }) => UseQueryOptions<Awaited<ReturnType<typeof readPressFeed>>, TError, TData> & {
22
21
  queryKey: DataTag<QueryKey, TData, TError>;
23
22
  };
24
- export type ListPressArticlesQueryResult = NonNullable<Awaited<ReturnType<typeof listPressArticles>>>;
25
- export type ListPressArticlesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
26
- export declare function useListPressArticles<TData = Awaited<ReturnType<typeof listPressArticles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params: undefined | ListPressArticlesParams, options: {
27
- query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressArticles>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listPressArticles>>, TError, Awaited<ReturnType<typeof listPressArticles>>>, 'initialData'>;
23
+ export type ReadPressFeedQueryResult = NonNullable<Awaited<ReturnType<typeof readPressFeed>>>;
24
+ export type ReadPressFeedQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
25
+ export declare function useReadPressFeed<TData = Awaited<ReturnType<typeof readPressFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params: undefined | ReadPressFeedParams, options: {
26
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressFeed>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof readPressFeed>>, TError, Awaited<ReturnType<typeof readPressFeed>>>, 'initialData'>;
28
27
  request?: SecondParameter<typeof request>;
29
28
  }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
30
29
  queryKey: DataTag<QueryKey, TData, TError>;
31
30
  };
32
- export declare function useListPressArticles<TData = Awaited<ReturnType<typeof listPressArticles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListPressArticlesParams, options?: {
33
- query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressArticles>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listPressArticles>>, TError, Awaited<ReturnType<typeof listPressArticles>>>, 'initialData'>;
31
+ export declare function useReadPressFeed<TData = Awaited<ReturnType<typeof readPressFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadPressFeedParams, options?: {
32
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressFeed>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof readPressFeed>>, TError, Awaited<ReturnType<typeof readPressFeed>>>, 'initialData'>;
34
33
  request?: SecondParameter<typeof request>;
35
34
  }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
36
35
  queryKey: DataTag<QueryKey, TData, TError>;
37
36
  };
38
- export declare function useListPressArticles<TData = Awaited<ReturnType<typeof listPressArticles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListPressArticlesParams, options?: {
39
- query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressArticles>>, TError, TData>>;
37
+ export declare function useReadPressFeed<TData = Awaited<ReturnType<typeof readPressFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadPressFeedParams, options?: {
38
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressFeed>>, TError, TData>>;
40
39
  request?: SecondParameter<typeof request>;
41
40
  }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
42
41
  queryKey: DataTag<QueryKey, TData, TError>;
43
42
  };
44
- export declare const getReadPressArticleUrl: (articleId: number) => string;
43
+ export declare const getListPressTitlesUrl: (params?: ListPressTitlesParams) => string;
45
44
  /**
46
- * One press article (E42). ``404`` when unknown *or* not entitled.
47
- * @summary Read Press Article
45
+ * One accessible catalogue entry per publication, with profile selection.
46
+ *
47
+ * contentId is the key for favourites, details and /issues. publicationId is
48
+ * the separate provider identifier. Search is a case-insensitive literal title
49
+ * substring. Ordering is alphabetical with a contentId tie-break.
50
+ * @summary List Press Titles
48
51
  */
49
- export declare const readPressArticle: (articleId: number, options?: Parameters<typeof request>[1]) => Promise<PressArticleRead>;
50
- export declare const getReadPressArticleQueryKey: (articleId: number) => readonly [`/biblio/press-articles/${number}`];
51
- export declare const getReadPressArticleQueryOptions: <TData = Awaited<ReturnType<typeof readPressArticle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(articleId: number, options?: {
52
- query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressArticle>>, TError, TData>>;
52
+ export declare const listPressTitles: (params?: ListPressTitlesParams, options?: Parameters<typeof request>[1]) => Promise<PressTitlePage>;
53
+ export declare const getListPressTitlesQueryKey: (params?: ListPressTitlesParams) => readonly ["/biblio/press-titles", ...ListPressTitlesParams[]];
54
+ export declare const getListPressTitlesQueryOptions: <TData = Awaited<ReturnType<typeof listPressTitles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListPressTitlesParams, options?: {
55
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressTitles>>, TError, TData>>;
53
56
  request?: SecondParameter<typeof request>;
54
- }) => UseQueryOptions<Awaited<ReturnType<typeof readPressArticle>>, TError, TData> & {
57
+ }) => UseQueryOptions<Awaited<ReturnType<typeof listPressTitles>>, TError, TData> & {
55
58
  queryKey: DataTag<QueryKey, TData, TError>;
56
59
  };
57
- export type ReadPressArticleQueryResult = NonNullable<Awaited<ReturnType<typeof readPressArticle>>>;
58
- export type ReadPressArticleQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
59
- export declare function useReadPressArticle<TData = Awaited<ReturnType<typeof readPressArticle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(articleId: number, options: {
60
- query: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressArticle>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof readPressArticle>>, TError, Awaited<ReturnType<typeof readPressArticle>>>, 'initialData'>;
60
+ export type ListPressTitlesQueryResult = NonNullable<Awaited<ReturnType<typeof listPressTitles>>>;
61
+ export type ListPressTitlesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
62
+ export declare function useListPressTitles<TData = Awaited<ReturnType<typeof listPressTitles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params: undefined | ListPressTitlesParams, options: {
63
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressTitles>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listPressTitles>>, TError, Awaited<ReturnType<typeof listPressTitles>>>, 'initialData'>;
61
64
  request?: SecondParameter<typeof request>;
62
65
  }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
63
66
  queryKey: DataTag<QueryKey, TData, TError>;
64
67
  };
65
- export declare function useReadPressArticle<TData = Awaited<ReturnType<typeof readPressArticle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(articleId: number, options?: {
66
- query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressArticle>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof readPressArticle>>, TError, Awaited<ReturnType<typeof readPressArticle>>>, 'initialData'>;
68
+ export declare function useListPressTitles<TData = Awaited<ReturnType<typeof listPressTitles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListPressTitlesParams, options?: {
69
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressTitles>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listPressTitles>>, TError, Awaited<ReturnType<typeof listPressTitles>>>, 'initialData'>;
67
70
  request?: SecondParameter<typeof request>;
68
71
  }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
69
72
  queryKey: DataTag<QueryKey, TData, TError>;
70
73
  };
71
- export declare function useReadPressArticle<TData = Awaited<ReturnType<typeof readPressArticle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(articleId: number, options?: {
72
- query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressArticle>>, TError, TData>>;
74
+ export declare function useListPressTitles<TData = Awaited<ReturnType<typeof listPressTitles>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListPressTitlesParams, options?: {
75
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPressTitles>>, TError, TData>>;
73
76
  request?: SecondParameter<typeof request>;
74
77
  }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
75
78
  queryKey: DataTag<QueryKey, TData, TError>;
76
79
  };
77
- export declare const getReadIssuesUrl: (articleId: number, params?: ReadIssuesParams) => string;
80
+ export declare const getReadPressTitleUrl: (contentId: number) => string;
81
+ /**
82
+ * Publication metadata; an unavailable or unknown title returns 404.
83
+ * @summary Read Press Title
84
+ */
85
+ export declare const readPressTitle: (contentId: number, options?: Parameters<typeof request>[1]) => Promise<PressTitleRead>;
86
+ export declare const getReadPressTitleQueryKey: (contentId: number) => readonly [`/biblio/press-titles/${number}`];
87
+ export declare const getReadPressTitleQueryOptions: <TData = Awaited<ReturnType<typeof readPressTitle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(contentId: number, options?: {
88
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressTitle>>, TError, TData>>;
89
+ request?: SecondParameter<typeof request>;
90
+ }) => UseQueryOptions<Awaited<ReturnType<typeof readPressTitle>>, TError, TData> & {
91
+ queryKey: DataTag<QueryKey, TData, TError>;
92
+ };
93
+ export type ReadPressTitleQueryResult = NonNullable<Awaited<ReturnType<typeof readPressTitle>>>;
94
+ export type ReadPressTitleQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
95
+ export declare function useReadPressTitle<TData = Awaited<ReturnType<typeof readPressTitle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(contentId: number, options: {
96
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressTitle>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof readPressTitle>>, TError, Awaited<ReturnType<typeof readPressTitle>>>, 'initialData'>;
97
+ request?: SecondParameter<typeof request>;
98
+ }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
99
+ queryKey: DataTag<QueryKey, TData, TError>;
100
+ };
101
+ export declare function useReadPressTitle<TData = Awaited<ReturnType<typeof readPressTitle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(contentId: number, options?: {
102
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressTitle>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof readPressTitle>>, TError, Awaited<ReturnType<typeof readPressTitle>>>, 'initialData'>;
103
+ request?: SecondParameter<typeof request>;
104
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
105
+ queryKey: DataTag<QueryKey, TData, TError>;
106
+ };
107
+ export declare function useReadPressTitle<TData = Awaited<ReturnType<typeof readPressTitle>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(contentId: number, options?: {
108
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressTitle>>, TError, TData>>;
109
+ request?: SecondParameter<typeof request>;
110
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
111
+ queryKey: DataTag<QueryKey, TData, TError>;
112
+ };
113
+ export declare const getReadIssuesUrl: (contentId: number, params?: ReadIssuesParams) => string;
78
114
  /**
79
115
  * Entitled publication editions and covers. Never creates reader access.
80
116
  * @summary Read Issues
81
117
  */
82
- export declare const readIssues: (articleId: number, params?: ReadIssuesParams, options?: Parameters<typeof request>[1]) => Promise<PressIssuePage>;
83
- export declare const getReadIssuesQueryKey: (articleId: number, params?: ReadIssuesParams) => readonly [`/biblio/press-articles/${number}/issues`, ...ReadIssuesParams[]];
84
- export declare const getReadIssuesQueryOptions: <TData = Awaited<ReturnType<typeof readIssues>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(articleId: number, params?: ReadIssuesParams, options?: {
118
+ export declare const readIssues: (contentId: number, params?: ReadIssuesParams, options?: Parameters<typeof request>[1]) => Promise<PressIssuePage>;
119
+ export declare const getReadIssuesQueryKey: (contentId: number, params?: ReadIssuesParams) => readonly [`/biblio/press-titles/${number}/issues`, ...ReadIssuesParams[]];
120
+ export declare const getReadIssuesQueryOptions: <TData = Awaited<ReturnType<typeof readIssues>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(contentId: number, params?: ReadIssuesParams, options?: {
85
121
  query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readIssues>>, TError, TData>>;
86
122
  request?: SecondParameter<typeof request>;
87
123
  }) => UseQueryOptions<Awaited<ReturnType<typeof readIssues>>, TError, TData> & {
@@ -89,25 +125,25 @@ export declare const getReadIssuesQueryOptions: <TData = Awaited<ReturnType<type
89
125
  };
90
126
  export type ReadIssuesQueryResult = NonNullable<Awaited<ReturnType<typeof readIssues>>>;
91
127
  export type ReadIssuesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
92
- export declare function useReadIssues<TData = Awaited<ReturnType<typeof readIssues>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(articleId: number, params: undefined | ReadIssuesParams, options: {
128
+ export declare function useReadIssues<TData = Awaited<ReturnType<typeof readIssues>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(contentId: number, params: undefined | ReadIssuesParams, options: {
93
129
  query: Partial<UseQueryOptions<Awaited<ReturnType<typeof readIssues>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof readIssues>>, TError, Awaited<ReturnType<typeof readIssues>>>, 'initialData'>;
94
130
  request?: SecondParameter<typeof request>;
95
131
  }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
96
132
  queryKey: DataTag<QueryKey, TData, TError>;
97
133
  };
98
- export declare function useReadIssues<TData = Awaited<ReturnType<typeof readIssues>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(articleId: number, params?: ReadIssuesParams, options?: {
134
+ export declare function useReadIssues<TData = Awaited<ReturnType<typeof readIssues>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(contentId: number, params?: ReadIssuesParams, options?: {
99
135
  query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readIssues>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof readIssues>>, TError, Awaited<ReturnType<typeof readIssues>>>, 'initialData'>;
100
136
  request?: SecondParameter<typeof request>;
101
137
  }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
102
138
  queryKey: DataTag<QueryKey, TData, TError>;
103
139
  };
104
- export declare function useReadIssues<TData = Awaited<ReturnType<typeof readIssues>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(articleId: number, params?: ReadIssuesParams, options?: {
140
+ export declare function useReadIssues<TData = Awaited<ReturnType<typeof readIssues>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(contentId: number, params?: ReadIssuesParams, options?: {
105
141
  query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readIssues>>, TError, TData>>;
106
142
  request?: SecondParameter<typeof request>;
107
143
  }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
108
144
  queryKey: DataTag<QueryKey, TData, TError>;
109
145
  };
110
- export declare const getOpenReaderUrl: (articleId: number) => string;
146
+ export declare const getOpenReaderUrl: (contentId: number) => string;
111
147
  /**
112
148
  * Open a PressReader edition under this profile's current content grant.
113
149
  *
@@ -116,7 +152,7 @@ export declare const getOpenReaderUrl: (articleId: number) => string;
116
152
  * The date selects an edition; a missing edition is reported by PressReader.
117
153
  * @summary Open Reader
118
154
  */
119
- export declare const openReader: (articleId: number, pressReaderAccessWrite: PressReaderAccessWrite, options?: Parameters<typeof request>[1]) => Promise<PressReaderAccessRead>;
155
+ export declare const openReader: (contentId: number, pressReaderAccessWrite: PressReaderAccessWrite, options?: Parameters<typeof request>[1]) => Promise<PressReaderAccessRead>;
120
156
  export declare const getOpenReaderMutationKey: () => readonly ['openReader'];
121
157
  export declare const getOpenReaderMutationOptions: <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>, TContext = unknown>(options?: {
122
158
  mutation?: UseMutationOptions<Awaited<ReturnType<typeof openReader>>, TError, OpenReaderMutationVariables, TContext>;
@@ -126,7 +162,7 @@ export type OpenReaderMutationResult = NonNullable<Awaited<ReturnType<typeof ope
126
162
  export type OpenReaderMutationBody = BodyType<PressReaderAccessWrite>;
127
163
  export type OpenReaderMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
128
164
  export type OpenReaderMutationVariables = {
129
- articleId: number;
165
+ contentId: number;
130
166
  data: BodyType<PressReaderAccessWrite>;
131
167
  };
132
168
  /**
@@ -136,48 +172,5 @@ export declare const useOpenReader: <TError = ErrorType<HTTPExceptionResponse |
136
172
  mutation?: UseMutationOptions<Awaited<ReturnType<typeof openReader>>, TError, OpenReaderMutationVariables, TContext>;
137
173
  request?: SecondParameter<typeof request>;
138
174
  }, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof openReader>>, TError, OpenReaderMutationVariables, TContext>;
139
- export declare const getReadPressReviewUrl: (params?: ReadPressReviewParams) => string;
140
- /**
141
- * The curated press review (E43). An explicit aggregate (§5.2).
142
- *
143
- * New as an endpoint; the legacy composed it into two pages and never exposed
144
- * it. There is no curation table, so a section is a theme and its members are
145
- * that theme's most recent entitled articles — which is what the rendered page
146
- * amounted to. When a real curation model appears this is the one place that has
147
- * to change.
148
- *
149
- * A theme with nothing the caller may read is omitted rather than returned
150
- * empty: an empty section is a hole in a page, and the client cannot tell
151
- * "nothing new" from "not licensed".
152
- * @summary Read Press Review
153
- */
154
- export declare const readPressReview: (params?: ReadPressReviewParams, options?: Parameters<typeof request>[1]) => Promise<PressReviewRead>;
155
- export declare const getReadPressReviewQueryKey: (params?: ReadPressReviewParams) => readonly ["/biblio/press-review", ...ReadPressReviewParams[]];
156
- export declare const getReadPressReviewQueryOptions: <TData = Awaited<ReturnType<typeof readPressReview>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadPressReviewParams, options?: {
157
- query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressReview>>, TError, TData>>;
158
- request?: SecondParameter<typeof request>;
159
- }) => UseQueryOptions<Awaited<ReturnType<typeof readPressReview>>, TError, TData> & {
160
- queryKey: DataTag<QueryKey, TData, TError>;
161
- };
162
- export type ReadPressReviewQueryResult = NonNullable<Awaited<ReturnType<typeof readPressReview>>>;
163
- export type ReadPressReviewQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
164
- export declare function useReadPressReview<TData = Awaited<ReturnType<typeof readPressReview>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params: undefined | ReadPressReviewParams, options: {
165
- query: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressReview>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof readPressReview>>, TError, Awaited<ReturnType<typeof readPressReview>>>, 'initialData'>;
166
- request?: SecondParameter<typeof request>;
167
- }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
168
- queryKey: DataTag<QueryKey, TData, TError>;
169
- };
170
- export declare function useReadPressReview<TData = Awaited<ReturnType<typeof readPressReview>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadPressReviewParams, options?: {
171
- query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressReview>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof readPressReview>>, TError, Awaited<ReturnType<typeof readPressReview>>>, 'initialData'>;
172
- request?: SecondParameter<typeof request>;
173
- }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
174
- queryKey: DataTag<QueryKey, TData, TError>;
175
- };
176
- export declare function useReadPressReview<TData = Awaited<ReturnType<typeof readPressReview>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadPressReviewParams, options?: {
177
- query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readPressReview>>, TError, TData>>;
178
- request?: SecondParameter<typeof request>;
179
- }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
180
- queryKey: DataTag<QueryKey, TData, TError>;
181
- };
182
175
  //#endregion
183
176
  //# sourceMappingURL=biblio-press.d.ts.map