@learnorama/mozaik-sdk 0.3.2-staging.19.1 → 0.6.0-staging.24.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 (191) hide show
  1. package/README.md +37 -0
  2. package/dist/api/account.d.ts +1 -1
  3. package/dist/api/account.js.map +1 -1
  4. package/dist/api/admin-catalogue.d.ts +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-licenses.d.ts +1 -1
  9. package/dist/api/admin-licenses.js.map +1 -1
  10. package/dist/api/admin-patrons.d.ts +1 -1
  11. package/dist/api/admin-patrons.js.map +1 -1
  12. package/dist/api/admin-reviews.d.ts +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.d.ts +7 -1
  19. package/dist/api/admin-tenants.js +19 -1
  20. package/dist/api/admin-tenants.js.map +1 -1
  21. package/dist/api/admin-tutoring.d.ts +1 -1
  22. package/dist/api/admin-tutoring.js.map +1 -1
  23. package/dist/api/auth.d.ts +7 -3
  24. package/dist/api/auth.js +6 -2
  25. package/dist/api/auth.js.map +1 -1
  26. package/dist/api/biblio-catalogue.d.ts +1 -1
  27. package/dist/api/biblio-catalogue.js.map +1 -1
  28. package/dist/api/biblio-home.d.ts +1 -1
  29. package/dist/api/biblio-home.js.map +1 -1
  30. package/dist/api/biblio-library.d.ts +1 -1
  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 +1 -1
  35. package/dist/api/biblio-press.js.map +1 -1
  36. package/dist/api/biblio-search.d.ts +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.d.ts +1 -1
  43. package/dist/api/cvs-app.js.map +1 -1
  44. package/dist/api/cvs-documents.d.ts +1 -1
  45. package/dist/api/cvs-documents.js.map +1 -1
  46. package/dist/api/cvs-favorites.d.ts +1 -1
  47. package/dist/api/cvs-favorites.js.map +1 -1
  48. package/dist/api/cvs-ils.d.ts +1 -1
  49. package/dist/api/cvs-ils.js.map +1 -1
  50. package/dist/api/cvs-loans.d.ts +1 -1
  51. package/dist/api/cvs-loans.js.map +1 -1
  52. package/dist/api/cvs-payments.d.ts +1 -1
  53. package/dist/api/cvs-payments.js.map +1 -1
  54. package/dist/api/cvs-streaming.d.ts +1 -1
  55. package/dist/api/cvs-streaming.js.map +1 -1
  56. package/dist/api/index.d.ts +2 -2
  57. package/dist/api/index.js +2 -2
  58. package/dist/api/partner-catalogue.d.ts +1 -1
  59. package/dist/api/partner-catalogue.js.map +1 -1
  60. package/dist/api/partner-reader.d.ts +1 -1
  61. package/dist/api/partner-reader.js.map +1 -1
  62. package/dist/api/profiles.d.ts +1 -1
  63. package/dist/api/profiles.js.map +1 -1
  64. package/dist/api/search.d.ts +1 -1
  65. package/dist/api/search.js.map +1 -1
  66. package/dist/api/tutoring-catalogue.d.ts +1 -1
  67. package/dist/api/tutoring-catalogue.js.map +1 -1
  68. package/dist/api/tutoring-chat.d.ts +1 -1
  69. package/dist/api/tutoring-chat.js.map +1 -1
  70. package/dist/api/tutoring-dispatch.d.ts +1 -1
  71. package/dist/api/tutoring-dispatch.js.map +1 -1
  72. package/dist/api/tutoring-practitioner.js.map +1 -1
  73. package/dist/api/tutoring-requests.d.ts +1 -1
  74. package/dist/api/tutoring-requests.js.map +1 -1
  75. package/dist/chunks/client2.d.ts +1 -1
  76. package/dist/chunks/connection.d.ts +1 -1
  77. package/dist/chunks/index.d.ts +184 -156
  78. package/dist/index.d.ts +3 -3
  79. package/dist/index.js +3 -3
  80. package/dist/index.js.map +1 -1
  81. package/dist/models.d.ts +2 -2
  82. package/dist/models.js.map +1 -1
  83. package/dist/react/account.d.ts +1 -1
  84. package/dist/react/account.js +1 -1
  85. package/dist/react/account.js.map +1 -1
  86. package/dist/react/admin-catalogue.d.ts +1 -1
  87. package/dist/react/admin-catalogue.js +1 -1
  88. package/dist/react/admin-catalogue.js.map +1 -1
  89. package/dist/react/admin-consumption.d.ts +1 -1
  90. package/dist/react/admin-consumption.js +1 -1
  91. package/dist/react/admin-consumption.js.map +1 -1
  92. package/dist/react/admin-licenses.d.ts +1 -1
  93. package/dist/react/admin-licenses.js +1 -1
  94. package/dist/react/admin-licenses.js.map +1 -1
  95. package/dist/react/admin-patrons.d.ts +1 -1
  96. package/dist/react/admin-patrons.js +1 -1
  97. package/dist/react/admin-patrons.js.map +1 -1
  98. package/dist/react/admin-reviews.d.ts +1 -1
  99. package/dist/react/admin-reviews.js +1 -1
  100. package/dist/react/admin-reviews.js.map +1 -1
  101. package/dist/react/admin-roles.d.ts +1 -1
  102. package/dist/react/admin-roles.js +1 -1
  103. package/dist/react/admin-roles.js.map +1 -1
  104. package/dist/react/admin-support.d.ts +1 -1
  105. package/dist/react/admin-support.js +1 -1
  106. package/dist/react/admin-support.js.map +1 -1
  107. package/dist/react/admin-tenants.d.ts +34 -1
  108. package/dist/react/admin-tenants.js +44 -2
  109. package/dist/react/admin-tenants.js.map +1 -1
  110. package/dist/react/admin-tutoring.d.ts +1 -1
  111. package/dist/react/admin-tutoring.js +1 -1
  112. package/dist/react/admin-tutoring.js.map +1 -1
  113. package/dist/react/auth.d.ts +7 -3
  114. package/dist/react/auth.js +7 -3
  115. package/dist/react/auth.js.map +1 -1
  116. package/dist/react/biblio-catalogue.d.ts +1 -1
  117. package/dist/react/biblio-catalogue.js +1 -1
  118. package/dist/react/biblio-catalogue.js.map +1 -1
  119. package/dist/react/biblio-home.d.ts +1 -1
  120. package/dist/react/biblio-home.js +1 -1
  121. package/dist/react/biblio-home.js.map +1 -1
  122. package/dist/react/biblio-library.d.ts +1 -1
  123. package/dist/react/biblio-library.js +1 -1
  124. package/dist/react/biblio-library.js.map +1 -1
  125. package/dist/react/biblio-nextory.d.ts +1 -1
  126. package/dist/react/biblio-nextory.js +1 -1
  127. package/dist/react/biblio-nextory.js.map +1 -1
  128. package/dist/react/biblio-press.d.ts +1 -1
  129. package/dist/react/biblio-press.js +1 -1
  130. package/dist/react/biblio-press.js.map +1 -1
  131. package/dist/react/biblio-search.d.ts +1 -1
  132. package/dist/react/biblio-search.js +1 -1
  133. package/dist/react/biblio-search.js.map +1 -1
  134. package/dist/react/biblio-telemetry.d.ts +1 -1
  135. package/dist/react/biblio-telemetry.js +1 -1
  136. package/dist/react/biblio-telemetry.js.map +1 -1
  137. package/dist/react/chat.d.ts +1 -1
  138. package/dist/react/consumption.d.ts +1 -1
  139. package/dist/react/consumption.js +1 -1
  140. package/dist/react/consumption.js.map +1 -1
  141. package/dist/react/cvs-app.d.ts +1 -1
  142. package/dist/react/cvs-app.js +1 -1
  143. package/dist/react/cvs-app.js.map +1 -1
  144. package/dist/react/cvs-documents.d.ts +1 -1
  145. package/dist/react/cvs-documents.js +1 -1
  146. package/dist/react/cvs-documents.js.map +1 -1
  147. package/dist/react/cvs-favorites.d.ts +1 -1
  148. package/dist/react/cvs-favorites.js +1 -1
  149. package/dist/react/cvs-favorites.js.map +1 -1
  150. package/dist/react/cvs-ils.d.ts +1 -1
  151. package/dist/react/cvs-ils.js +1 -1
  152. package/dist/react/cvs-ils.js.map +1 -1
  153. package/dist/react/cvs-loans.d.ts +1 -1
  154. package/dist/react/cvs-loans.js +1 -1
  155. package/dist/react/cvs-loans.js.map +1 -1
  156. package/dist/react/cvs-payments.d.ts +1 -1
  157. package/dist/react/cvs-payments.js +1 -1
  158. package/dist/react/cvs-payments.js.map +1 -1
  159. package/dist/react/cvs-streaming.d.ts +1 -1
  160. package/dist/react/cvs-streaming.js +1 -1
  161. package/dist/react/cvs-streaming.js.map +1 -1
  162. package/dist/react/index.d.ts +2 -2
  163. package/dist/react/index.js +2 -2
  164. package/dist/react/partner-catalogue.d.ts +1 -1
  165. package/dist/react/partner-catalogue.js +1 -1
  166. package/dist/react/partner-catalogue.js.map +1 -1
  167. package/dist/react/partner-reader.d.ts +1 -1
  168. package/dist/react/partner-reader.js +1 -1
  169. package/dist/react/partner-reader.js.map +1 -1
  170. package/dist/react/profiles.d.ts +1 -1
  171. package/dist/react/profiles.js +1 -1
  172. package/dist/react/profiles.js.map +1 -1
  173. package/dist/react/search.d.ts +1 -1
  174. package/dist/react/search.js +1 -1
  175. package/dist/react/search.js.map +1 -1
  176. package/dist/react/tutoring-catalogue.d.ts +1 -1
  177. package/dist/react/tutoring-catalogue.js +1 -1
  178. package/dist/react/tutoring-catalogue.js.map +1 -1
  179. package/dist/react/tutoring-chat.d.ts +1 -1
  180. package/dist/react/tutoring-chat.js +1 -1
  181. package/dist/react/tutoring-chat.js.map +1 -1
  182. package/dist/react/tutoring-dispatch.d.ts +1 -1
  183. package/dist/react/tutoring-dispatch.js +1 -1
  184. package/dist/react/tutoring-dispatch.js.map +1 -1
  185. package/dist/react/tutoring-practitioner.d.ts +1 -1
  186. package/dist/react/tutoring-practitioner.js +1 -1
  187. package/dist/react/tutoring-practitioner.js.map +1 -1
  188. package/dist/react/tutoring-requests.d.ts +1 -1
  189. package/dist/react/tutoring-requests.js +1 -1
  190. package/dist/react/tutoring-requests.js.map +1 -1
  191. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"auth.js","names":[],"sources":["../../src/react/auth/auth.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.3.2\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query';\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query';\n\nimport type {\n AuthorizationParams,\n AuthorizationRead,\n CodeExchangeWrite,\n CredentialsWrite,\n HTTPExceptionResponse,\n LogoutWrite,\n MeRead,\n RefreshWrite,\n SessionRead,\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 getAuthorizationUrl = (params: AuthorizationParams,) => {\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 ? `/auth/authorization?${stringifiedParams}` : `/auth/authorization`\n}\n\n/**\n * Build the Keycloak authorization URL for this client and this tenant.\n *\n * Everything cryptographic belongs to the caller: it generates ``state``, the\n * PKCE verifier and the ``nonce``, and only ever sends the challenge. This\n * endpoint contributes the one thing the caller cannot know — which identity\n * provider to route to — and refuses an unsafe ``redirect_uri``.\n *\n * ``S256`` is hardcoded. ``plain`` is a valid PKCE method and provides no\n * protection, so making it selectable would only ever be used by mistake.\n *\n * A resolved provider is passed as ``kc_idp_hint``. Aliases are case-sensitive\n * at the broker and an unknown one silently falls back to the login form, which\n * is why :func:`_resolve_provider_alias` validates against the registry instead\n * of forwarding whatever arrived.\n * @summary Authorization\n */\nexport const authorization = async (params: AuthorizationParams, options?: Parameters<typeof request>[1]): Promise<AuthorizationRead> => {\n\n return request<AuthorizationRead>(getAuthorizationUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getAuthorizationQueryKey = (params?: AuthorizationParams,) => {\n return [\n `/auth/authorization`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getAuthorizationQueryOptions = <TData = Awaited<ReturnType<typeof authorization>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params: AuthorizationParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof authorization>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getAuthorizationQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof authorization>>> = ({ signal }) => authorization(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof authorization>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type AuthorizationQueryResult = NonNullable<Awaited<ReturnType<typeof authorization>>>\nexport type AuthorizationQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useAuthorization<TData = Awaited<ReturnType<typeof authorization>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: AuthorizationParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof authorization>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof authorization>>,\n TError,\n Awaited<ReturnType<typeof authorization>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useAuthorization<TData = Awaited<ReturnType<typeof authorization>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: AuthorizationParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof authorization>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof authorization>>,\n TError,\n Awaited<ReturnType<typeof authorization>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useAuthorization<TData = Awaited<ReturnType<typeof authorization>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: AuthorizationParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof authorization>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Authorization\n */\n\nexport function useAuthorization<TData = Awaited<ReturnType<typeof authorization>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: AuthorizationParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof authorization>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getAuthorizationQueryOptions(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 getReadMeUrl = () => {\n\n\n\n\n return `/auth/me`\n}\n\n/**\n * Who the bearer of this token is, and what the session may do.\n *\n * No tokens in the response — this endpoint reissues nothing, and a shape with\n * empty token fields would invite a client to store them. It is also the\n * cheapest liveness check a client has: it exercises verification,\n * tenant resolution and the account link in one call, so a 200 here means the\n * whole chain is intact.\n * @summary Read Me\n */\nexport const readMe = async ( options?: Parameters<typeof request>[1]): Promise<MeRead> => {\n\n return request<MeRead>(getReadMeUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadMeQueryKey = () => {\n return [\n `/auth/me`\n ] as const;\n }\n\n\nexport const getReadMeQueryOptions = <TData = Awaited<ReturnType<typeof readMe>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readMe>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadMeQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readMe>>> = ({ signal }) => readMe({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readMe>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadMeQueryResult = NonNullable<Awaited<ReturnType<typeof readMe>>>\nexport type ReadMeQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadMe<TData = Awaited<ReturnType<typeof readMe>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readMe>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readMe>>,\n TError,\n Awaited<ReturnType<typeof readMe>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadMe<TData = Awaited<ReturnType<typeof readMe>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readMe>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readMe>>,\n TError,\n Awaited<ReturnType<typeof readMe>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadMe<TData = Awaited<ReturnType<typeof readMe>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readMe>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Me\n */\n\nexport function useReadMe<TData = Awaited<ReturnType<typeof readMe>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readMe>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadMeQueryOptions(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 getDeleteSessionUrl = () => {\n\n\n\n\n return `/auth/sessions`\n}\n\n/**\n * Sign out, revoking the refresh token at the broker.\n *\n * Always 204. A logout that can fail is a logout users do not trust, and there\n * is nothing useful for the caller to do about an unreachable broker — it is\n * discarding its tokens either way. The failure is logged, not returned.\n *\n * The access token stays valid until it expires. That is inherent to verifying\n * tokens offline, and it is why the realm keeps access-token lifetimes short\n * rather than why this endpoint should pretend otherwise.\n * @summary Delete Session\n */\nexport const deleteSession = async (logoutWrite: LogoutWrite, 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>(getDeleteSessionUrl(),\n {\n ...options,\n method: 'DELETE',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(logoutWrite)\n }\n);}\n\n\n\n\n\nexport const getDeleteSessionMutationKey = () => ['deleteSession'] as const;\n\nexport const getDeleteSessionMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteSession>>, TError,DeleteSessionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteSession>>, TError,DeleteSessionMutationVariables, TContext> => {\n\nconst mutationKey = getDeleteSessionMutationKey();\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 deleteSession>>, DeleteSessionMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return deleteSession(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteSessionMutationResult = NonNullable<Awaited<ReturnType<typeof deleteSession>>>\n export type DeleteSessionMutationBody = BodyType<LogoutWrite>\n export type DeleteSessionMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type DeleteSessionMutationVariables = {data: BodyType<LogoutWrite>}\n\n /**\n * @summary Delete Session\n */\nexport const useDeleteSession = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteSession>>, TError,DeleteSessionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof deleteSession>>,\n TError,\n DeleteSessionMutationVariables,\n TContext\n > => {\n return useMutation(getDeleteSessionMutationOptions(options), queryClient);\n }\n export const getCreateSessionFromCredentialsUrl = () => {\n\n\n\n\n return `/auth/sessions`\n}\n\n/**\n * Log in with a username and password, via the broker's direct grant.\n *\n * Off unless ``AUTH_ALLOW_PASSWORD_GRANT`` says otherwise, and it should stay\n * off wherever the client fleet allows: the grant defeats MFA, cannot reach a\n * brokered partner, and puts the password through this process. It exists for\n * the native apps already in the field.\n *\n * Rate limited on both the submitted username and the client address. Keyed on\n * the lower-cased username so that case variation is not a way around the\n * counter, and on the address so that spraying many usernames is bounded too.\n * @summary Create Session From Credentials\n */\nexport const createSessionFromCredentials = async (credentialsWrite: CredentialsWrite, options?: Parameters<typeof request>[1]): Promise<SessionRead> => {\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<SessionRead>(getCreateSessionFromCredentialsUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(credentialsWrite)\n }\n);}\n\n\n\n\n\nexport const getCreateSessionFromCredentialsMutationKey = () => ['createSessionFromCredentials'] as const;\n\nexport const getCreateSessionFromCredentialsMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createSessionFromCredentials>>, TError,CreateSessionFromCredentialsMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof createSessionFromCredentials>>, TError,CreateSessionFromCredentialsMutationVariables, TContext> => {\n\nconst mutationKey = getCreateSessionFromCredentialsMutationKey();\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 createSessionFromCredentials>>, CreateSessionFromCredentialsMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return createSessionFromCredentials(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateSessionFromCredentialsMutationResult = NonNullable<Awaited<ReturnType<typeof createSessionFromCredentials>>>\n export type CreateSessionFromCredentialsMutationBody = BodyType<CredentialsWrite>\n export type CreateSessionFromCredentialsMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type CreateSessionFromCredentialsMutationVariables = {data: BodyType<CredentialsWrite>}\n\n /**\n * @summary Create Session From Credentials\n */\nexport const useCreateSessionFromCredentials = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createSessionFromCredentials>>, TError,CreateSessionFromCredentialsMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof createSessionFromCredentials>>,\n TError,\n CreateSessionFromCredentialsMutationVariables,\n TContext\n > => {\n return useMutation(getCreateSessionFromCredentialsMutationOptions(options), queryClient);\n }\n export const getRefreshSessionUrl = () => {\n\n\n\n\n return `/auth/sessions`\n}\n\n/**\n * Exchange a refresh token for a new pair.\n *\n * Public: the refresh token *is* the credential, so requiring a valid access\n * token as well would make the endpoint useless at the moment it is needed.\n * Rotation happens at the broker, so the presented token stops working as the\n * new one is issued.\n *\n * Returns the account as well as the tokens. That costs one indexed lookup and\n * means a client resuming from cold storage does not need a second call to\n * discover whether the account is still active — which it checks, because\n * deactivation is a local decision Keycloak knows nothing about.\n * @summary Refresh Session\n */\nexport const refreshSession = async (refreshWrite: RefreshWrite, options?: Parameters<typeof request>[1]): Promise<SessionRead> => {\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<SessionRead>(getRefreshSessionUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(refreshWrite)\n }\n);}\n\n\n\n\n\nexport const getRefreshSessionMutationKey = () => ['refreshSession'] as const;\n\nexport const getRefreshSessionMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof refreshSession>>, TError,RefreshSessionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof refreshSession>>, TError,RefreshSessionMutationVariables, TContext> => {\n\nconst mutationKey = getRefreshSessionMutationKey();\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 refreshSession>>, RefreshSessionMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return refreshSession(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RefreshSessionMutationResult = NonNullable<Awaited<ReturnType<typeof refreshSession>>>\n export type RefreshSessionMutationBody = BodyType<RefreshWrite>\n export type RefreshSessionMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type RefreshSessionMutationVariables = {data: BodyType<RefreshWrite>}\n\n /**\n * @summary Refresh Session\n */\nexport const useRefreshSession = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof refreshSession>>, TError,RefreshSessionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof refreshSession>>,\n TError,\n RefreshSessionMutationVariables,\n TContext\n > => {\n return useMutation(getRefreshSessionMutationOptions(options), queryClient);\n }\n export const getCreateSessionFromCodeUrl = () => {\n\n\n\n\n return `/auth/sessions/code`\n}\n\n/**\n * Finish a brokered login: code plus verifier in, session out.\n *\n * Rate limited on the client address rather than on a user, because at this\n * point there is no user — the code has not been exchanged yet. The limit is\n * what stops a stolen code being brute-forced alongside a guessed verifier.\n * @summary Create Session From Code\n */\nexport const createSessionFromCode = async (codeExchangeWrite: CodeExchangeWrite, options?: Parameters<typeof request>[1]): Promise<SessionRead> => {\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<SessionRead>(getCreateSessionFromCodeUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(codeExchangeWrite)\n }\n);}\n\n\n\n\n\nexport const getCreateSessionFromCodeMutationKey = () => ['createSessionFromCode'] as const;\n\nexport const getCreateSessionFromCodeMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createSessionFromCode>>, TError,CreateSessionFromCodeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof createSessionFromCode>>, TError,CreateSessionFromCodeMutationVariables, TContext> => {\n\nconst mutationKey = getCreateSessionFromCodeMutationKey();\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 createSessionFromCode>>, CreateSessionFromCodeMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return createSessionFromCode(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateSessionFromCodeMutationResult = NonNullable<Awaited<ReturnType<typeof createSessionFromCode>>>\n export type CreateSessionFromCodeMutationBody = BodyType<CodeExchangeWrite>\n export type CreateSessionFromCodeMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type CreateSessionFromCodeMutationVariables = {data: BodyType<CodeExchangeWrite>}\n\n /**\n * @summary Create Session From Code\n */\nexport const useCreateSessionFromCode = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createSessionFromCode>>, TError,CreateSessionFromCodeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof createSessionFromCode>>,\n TError,\n CreateSessionFromCodeMutationVariables,\n TContext\n > => {\n return useMutation(getCreateSessionFromCodeMutationOptions(options), queryClient);\n }\n"],"mappings":";;;;;;;;;;;AA+CA,MAAM,gBAAqC,OAAU,aAAqC;CACxF,MAAM,SAAS,EAAE,SAAS;CAC1B,KAAK,MAAM,OAAO,OAAO,KAAK,KAAK,GAAG;EAGpC,IAAI,QAAQ,YAAY;EACxB,OAAO,eAAe,QAAQ,KAAK;GACjC,YAAY;GACZ,cAAc;GACd,WAAY,MAAkC;EAChD,CAAC;CACH;CACA,OAAO;AACT;AAEA,MAAa,uBAAuB,WAAiC;CACnE,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,uBAAuB,sBAAsB;AACrF;;;;;;;;;;;;;;;;;;AAmBA,MAAa,gBAAgB,OAAO,QAA6B,YAAwE;CAEvI,OAAO,QAA2B,oBAAoB,MAAM,GAC5D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,4BAA4B,WAAkC;CACvE,OAAO,CACP,uBAAuB,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAChD;AACA;AAGJ,MAAa,gCAAwJ,QAA6B,YAC7L;CAEL,MAAM,EAAC,OAAO,cAAc,SAAS,mBAAkB,WAAW,CAAC;CAEjE,MAAM,WAAY,cAAc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QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAqB,4BAA4B,GACtD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,iBAAiB;CACxC,CACF;AAAE;AAMF,MAAa,4CAA4C,CAAC,uBAAuB;AAEjF,MAAa,2CACW,YAC6G;CAErI,MAAM,cAAc,oCAAoC;CACxD,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,cAA2H,UAAU;EACvI,MAAM,EAAC,SAAQ,SAAS,CAAC;EAEzB,OAAQ,sBAAsB,MAAK,cAAc;CACnD;CAON,OAAQ;EAAE;EAAY,GAAG;CAAgB;AAAC;;;;AAU5C,MAAa,4BACW,SACrB,gBAKQ;CACL,OAAO,YAAY,wCAAwC,OAAO,GAAG,WAAW;AAClF"}
1
+ {"version":3,"file":"auth.js","names":[],"sources":["../../src/react/auth/auth.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.6.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 AuthorizationParams,\n AuthorizationRead,\n CodeExchangeWrite,\n CredentialsWrite,\n HTTPExceptionResponse,\n LogoutWrite,\n MeRead,\n RefreshWrite,\n SessionRead,\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 getAuthorizationUrl = (params: AuthorizationParams,) => {\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 ? `/auth/authorization?${stringifiedParams}` : `/auth/authorization`\n}\n\n/**\n * Build the Keycloak authorization URL for this client and this tenant.\n *\n * Everything cryptographic belongs to the caller: it generates ``state``, the\n * PKCE verifier and the ``nonce``, and only ever sends the challenge. This\n * endpoint contributes the one thing the caller cannot know — which identity\n * provider to route to — and refuses an unsafe ``redirect_uri``.\n *\n * ``client_id`` defaults to ``mozaik-web``. Native apps select ``mozaik-mobile``\n * and keep that client ID for code exchange, refresh and logout. Only these\n * public clients are supported; each has its own callback allow-list.\n *\n * ``S256`` is hardcoded. ``plain`` is a valid PKCE method and provides no\n * protection, so making it selectable would only ever be used by mistake.\n *\n * A resolved provider is passed as ``kc_idp_hint``. Aliases are case-sensitive\n * at the broker and an unknown one silently falls back to the login form, which\n * is why :func:`_resolve_provider_alias` validates against the registry instead\n * of forwarding whatever arrived.\n * @summary Authorization\n */\nexport const authorization = async (params: AuthorizationParams, options?: Parameters<typeof request>[1]): Promise<AuthorizationRead> => {\n\n return request<AuthorizationRead>(getAuthorizationUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getAuthorizationQueryKey = (params?: AuthorizationParams,) => {\n return [\n `/auth/authorization`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getAuthorizationQueryOptions = <TData = Awaited<ReturnType<typeof authorization>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params: AuthorizationParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof authorization>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getAuthorizationQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof authorization>>> = ({ signal }) => authorization(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof authorization>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type AuthorizationQueryResult = NonNullable<Awaited<ReturnType<typeof authorization>>>\nexport type AuthorizationQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useAuthorization<TData = Awaited<ReturnType<typeof authorization>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: AuthorizationParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof authorization>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof authorization>>,\n TError,\n Awaited<ReturnType<typeof authorization>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useAuthorization<TData = Awaited<ReturnType<typeof authorization>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: AuthorizationParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof authorization>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof authorization>>,\n TError,\n Awaited<ReturnType<typeof authorization>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useAuthorization<TData = Awaited<ReturnType<typeof authorization>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: AuthorizationParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof authorization>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Authorization\n */\n\nexport function useAuthorization<TData = Awaited<ReturnType<typeof authorization>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: AuthorizationParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof authorization>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getAuthorizationQueryOptions(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 getReadMeUrl = () => {\n\n\n\n\n return `/auth/me`\n}\n\n/**\n * Who the bearer of this token is, and what the session may do.\n *\n * No tokens in the response — this endpoint reissues nothing, and a shape with\n * empty token fields would invite a client to store them. It is also the\n * cheapest liveness check a client has: it exercises verification,\n * tenant resolution and the account link in one call, so a 200 here means the\n * whole chain is intact.\n * @summary Read Me\n */\nexport const readMe = async ( options?: Parameters<typeof request>[1]): Promise<MeRead> => {\n\n return request<MeRead>(getReadMeUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadMeQueryKey = () => {\n return [\n `/auth/me`\n ] as const;\n }\n\n\nexport const getReadMeQueryOptions = <TData = Awaited<ReturnType<typeof readMe>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readMe>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadMeQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readMe>>> = ({ signal }) => readMe({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readMe>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadMeQueryResult = NonNullable<Awaited<ReturnType<typeof readMe>>>\nexport type ReadMeQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadMe<TData = Awaited<ReturnType<typeof readMe>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readMe>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readMe>>,\n TError,\n Awaited<ReturnType<typeof readMe>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadMe<TData = Awaited<ReturnType<typeof readMe>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readMe>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readMe>>,\n TError,\n Awaited<ReturnType<typeof readMe>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadMe<TData = Awaited<ReturnType<typeof readMe>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readMe>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Me\n */\n\nexport function useReadMe<TData = Awaited<ReturnType<typeof readMe>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readMe>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadMeQueryOptions(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 getDeleteSessionUrl = () => {\n\n\n\n\n return `/auth/sessions`\n}\n\n/**\n * Sign out, revoking the refresh token at the broker.\n *\n * For a supported client, always 204. There is nothing useful for the caller\n * to do about an unreachable broker — it is\n * discarding its tokens either way. The failure is logged, not returned.\n *\n * The access token stays valid until it expires. That is inherent to verifying\n * tokens offline, and it is why the realm keeps access-token lifetimes short\n * rather than why this endpoint should pretend otherwise.\n * @summary Delete Session\n */\nexport const deleteSession = async (logoutWrite: LogoutWrite, 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>(getDeleteSessionUrl(),\n {\n ...options,\n method: 'DELETE',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(logoutWrite)\n }\n);}\n\n\n\n\n\nexport const getDeleteSessionMutationKey = () => ['deleteSession'] as const;\n\nexport const getDeleteSessionMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteSession>>, TError,DeleteSessionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteSession>>, TError,DeleteSessionMutationVariables, TContext> => {\n\nconst mutationKey = getDeleteSessionMutationKey();\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 deleteSession>>, DeleteSessionMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return deleteSession(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteSessionMutationResult = NonNullable<Awaited<ReturnType<typeof deleteSession>>>\n export type DeleteSessionMutationBody = BodyType<LogoutWrite>\n export type DeleteSessionMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type DeleteSessionMutationVariables = {data: BodyType<LogoutWrite>}\n\n /**\n * @summary Delete Session\n */\nexport const useDeleteSession = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteSession>>, TError,DeleteSessionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof deleteSession>>,\n TError,\n DeleteSessionMutationVariables,\n TContext\n > => {\n return useMutation(getDeleteSessionMutationOptions(options), queryClient);\n }\n export const getCreateSessionFromCredentialsUrl = () => {\n\n\n\n\n return `/auth/sessions`\n}\n\n/**\n * Log in with a username and password, via the broker's direct grant.\n *\n * Off unless ``AUTH_ALLOW_PASSWORD_GRANT`` says otherwise, and it should stay\n * off wherever the client fleet allows: the grant defeats MFA, cannot reach a\n * brokered partner, and puts the password through this process. It exists for\n * the native apps already in the field.\n *\n * Rate limited on both the submitted username and the client address. Keyed on\n * the lower-cased username so that case variation is not a way around the\n * counter, and on the address so that spraying many usernames is bounded too.\n * @summary Create Session From Credentials\n */\nexport const createSessionFromCredentials = async (credentialsWrite: CredentialsWrite, options?: Parameters<typeof request>[1]): Promise<SessionRead> => {\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<SessionRead>(getCreateSessionFromCredentialsUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(credentialsWrite)\n }\n);}\n\n\n\n\n\nexport const getCreateSessionFromCredentialsMutationKey = () => ['createSessionFromCredentials'] as const;\n\nexport const getCreateSessionFromCredentialsMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createSessionFromCredentials>>, TError,CreateSessionFromCredentialsMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof createSessionFromCredentials>>, TError,CreateSessionFromCredentialsMutationVariables, TContext> => {\n\nconst mutationKey = getCreateSessionFromCredentialsMutationKey();\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 createSessionFromCredentials>>, CreateSessionFromCredentialsMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return createSessionFromCredentials(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateSessionFromCredentialsMutationResult = NonNullable<Awaited<ReturnType<typeof createSessionFromCredentials>>>\n export type CreateSessionFromCredentialsMutationBody = BodyType<CredentialsWrite>\n export type CreateSessionFromCredentialsMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type CreateSessionFromCredentialsMutationVariables = {data: BodyType<CredentialsWrite>}\n\n /**\n * @summary Create Session From Credentials\n */\nexport const useCreateSessionFromCredentials = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createSessionFromCredentials>>, TError,CreateSessionFromCredentialsMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof createSessionFromCredentials>>,\n TError,\n CreateSessionFromCredentialsMutationVariables,\n TContext\n > => {\n return useMutation(getCreateSessionFromCredentialsMutationOptions(options), queryClient);\n }\n export const getRefreshSessionUrl = () => {\n\n\n\n\n return `/auth/sessions`\n}\n\n/**\n * Exchange a refresh token for a new pair.\n *\n * Public: the refresh token *is* the credential, so requiring a valid access\n * token as well would make the endpoint useless at the moment it is needed.\n * Rotation happens at the broker, so the presented token stops working as the\n * new one is issued.\n *\n * Returns the account as well as the tokens. That costs one indexed lookup and\n * means a client resuming from cold storage does not need a second call to\n * discover whether the account is still active — which it checks, because\n * deactivation is a local decision Keycloak knows nothing about.\n * @summary Refresh Session\n */\nexport const refreshSession = async (refreshWrite: RefreshWrite, options?: Parameters<typeof request>[1]): Promise<SessionRead> => {\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<SessionRead>(getRefreshSessionUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(refreshWrite)\n }\n);}\n\n\n\n\n\nexport const getRefreshSessionMutationKey = () => ['refreshSession'] as const;\n\nexport const getRefreshSessionMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof refreshSession>>, TError,RefreshSessionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof refreshSession>>, TError,RefreshSessionMutationVariables, TContext> => {\n\nconst mutationKey = getRefreshSessionMutationKey();\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 refreshSession>>, RefreshSessionMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return refreshSession(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RefreshSessionMutationResult = NonNullable<Awaited<ReturnType<typeof refreshSession>>>\n export type RefreshSessionMutationBody = BodyType<RefreshWrite>\n export type RefreshSessionMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type RefreshSessionMutationVariables = {data: BodyType<RefreshWrite>}\n\n /**\n * @summary Refresh Session\n */\nexport const useRefreshSession = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof refreshSession>>, TError,RefreshSessionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof refreshSession>>,\n TError,\n RefreshSessionMutationVariables,\n TContext\n > => {\n return useMutation(getRefreshSessionMutationOptions(options), queryClient);\n }\n export const getCreateSessionFromCodeUrl = () => {\n\n\n\n\n return `/auth/sessions/code`\n}\n\n/**\n * Finish a brokered login: code plus verifier in, session out.\n *\n * Rate limited on the client address rather than on a user, because at this\n * point there is no user — the code has not been exchanged yet. The limit is\n * what stops a stolen code being brute-forced alongside a guessed verifier.\n * @summary Create Session From Code\n */\nexport const createSessionFromCode = async (codeExchangeWrite: CodeExchangeWrite, options?: Parameters<typeof request>[1]): Promise<SessionRead> => {\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<SessionRead>(getCreateSessionFromCodeUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(codeExchangeWrite)\n }\n);}\n\n\n\n\n\nexport const getCreateSessionFromCodeMutationKey = () => ['createSessionFromCode'] as const;\n\nexport const getCreateSessionFromCodeMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createSessionFromCode>>, TError,CreateSessionFromCodeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof createSessionFromCode>>, TError,CreateSessionFromCodeMutationVariables, TContext> => {\n\nconst mutationKey = getCreateSessionFromCodeMutationKey();\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 createSessionFromCode>>, CreateSessionFromCodeMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return createSessionFromCode(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateSessionFromCodeMutationResult = NonNullable<Awaited<ReturnType<typeof createSessionFromCode>>>\n export type CreateSessionFromCodeMutationBody = BodyType<CodeExchangeWrite>\n export type CreateSessionFromCodeMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type CreateSessionFromCodeMutationVariables = {data: BodyType<CodeExchangeWrite>}\n\n /**\n * @summary Create Session From Code\n */\nexport const useCreateSessionFromCode = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createSessionFromCode>>, TError,CreateSessionFromCodeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof createSessionFromCode>>,\n TError,\n CreateS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AMF,MAAa,4CAA4C,CAAC,uBAAuB;AAEjF,MAAa,2CACW,YAC6G;CAErI,MAAM,cAAc,oCAAoC;CACxD,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,cAA2H,UAAU;EACvI,MAAM,EAAC,SAAQ,SAAS,CAAC;EAEzB,OAAQ,sBAAsB,MAAK,cAAc;CACnD;CAON,OAAQ;EAAE;EAAY,GAAG;CAAgB;AAAC;;;;AAU5C,MAAa,4BACW,SACrB,gBAKQ;CACL,OAAO,YAAY,wCAAwC,OAAO,GAAG,WAAW;AAClF"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { Cr as HTTPExceptionResponse, Gr as EditorDetailRead, Hr as EditorListRead, Rn as ListEditorsParams, Si as CatalogRead, Wn as LikeRead, et as RecommendationsRead, gt as ReadCatalogParams, ht as ReadCatalogThemeParams, it as ReadPackParams, mt as ReadEditorParams, nn as PackDetailRead, si as ContentRead, t as ValidationErrorResponse, tr as LearningPathDetailRead, tt as ReadRecommendationsParams } from "../chunks/index.js";
2
+ import { Ci as CatalogRead, Gn as LikeRead, Kr as EditorDetailRead, Ur as EditorListRead, _t as ReadCatalogParams, at as ReadPackParams, ci as ContentRead, gt as ReadCatalogThemeParams, ht as ReadEditorParams, nr as LearningPathDetailRead, nt as ReadRecommendationsParams, rn as PackDetailRead, t as ValidationErrorResponse, tt as RecommendationsRead, wr as HTTPExceptionResponse, zn as ListEditorsParams } 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-catalogue/biblio-catalogue.d.ts
@@ -7,7 +7,7 @@ import { useMutation, useQuery } from "@tanstack/react-query";
7
7
  * Do not edit manually.
8
8
  * Mozaik backend
9
9
  * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.
10
- * OpenAPI spec version: 0.3.2
10
+ * OpenAPI spec version: 0.6.0
11
11
  */
12
12
  const withQueryKey = (query, queryKey) => {
13
13
  const result = { queryKey };
@@ -1 +1 @@
1
- {"version":3,"file":"biblio-catalogue.js","names":[],"sources":["../../src/react/biblio-catalogue/biblio-catalogue.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.3.2\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query';\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query';\n\nimport type {\n CatalogRead,\n ContentRead,\n EditorDetailRead,\n EditorListRead,\n HTTPExceptionResponse,\n LearningPathDetailRead,\n LikeRead,\n ListEditorsParams,\n PackDetailRead,\n ReadCatalogParams,\n ReadCatalogThemeParams,\n ReadEditorParams,\n ReadPackParams,\n ReadRecommendationsParams,\n RecommendationsRead,\n ValidationErrorResponse\n} from '../../models';\n\nimport { request } from '../../client';\nimport type { ErrorType } from '../../client';\n\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n\n\nconst withQueryKey = <T extends object, K>(query: T, queryKey: K): T & { queryKey: K } => {\n const result = { queryKey } as T & { queryKey: K };\n for (const key of Object.keys(query)) {\n // The explicit queryKey always wins, matching the previous\n // `{ ...query, queryKey }` spread where it was set last.\n if (key === 'queryKey') continue;\n Object.defineProperty(result, key, {\n enumerable: true,\n configurable: true,\n get: () => (query as Record<string, unknown>)[key],\n });\n }\n return result;\n};\n\nexport const getReadContentUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/contents/${contentId}`\n}\n\n/**\n * One content item, with this caller's own state on it (E34).\n *\n * ``liked`` and ``favorited`` are why this is not just the summary shape: they\n * are per-caller and therefore uncacheable across users, which is worth knowing\n * before anyone puts a shared cache in front of it.\n * @summary Read Content\n */\nexport const readContent = async (contentId: number, options?: Parameters<typeof request>[1]): Promise<ContentRead> => {\n\n return request<ContentRead>(getReadContentUrl(contentId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadContentQueryKey = (contentId: number,) => {\n return [\n `/biblio/contents/${contentId}`\n ] as const;\n }\n\n\nexport const getReadContentQueryOptions = <TData = Awaited<ReturnType<typeof readContent>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(contentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadContentQueryKey(contentId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readContent>>> = ({ signal }) => readContent(contentId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: contentId !== null && contentId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadContentQueryResult = NonNullable<Awaited<ReturnType<typeof readContent>>>\nexport type ReadContentQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadContent<TData = Awaited<ReturnType<typeof readContent>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readContent>>,\n TError,\n Awaited<ReturnType<typeof readContent>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadContent<TData = Awaited<ReturnType<typeof readContent>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readContent>>,\n TError,\n Awaited<ReturnType<typeof readContent>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadContent<TData = Awaited<ReturnType<typeof readContent>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Content\n */\n\nexport function useReadContent<TData = Awaited<ReturnType<typeof readContent>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadContentQueryOptions(contentId,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getUnlikeContentUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/contents/${contentId}/like`\n}\n\n/**\n * Withdraw a like (E37). Idempotent — not liked is already the desired state.\n * @summary Unlike Content\n */\nexport const unlikeContent = async (contentId: number, options?: Parameters<typeof request>[1]): Promise<LikeRead> => {\n\n return request<LikeRead>(getUnlikeContentUrl(contentId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n\n\n\nexport const getUnlikeContentMutationKey = () => ['unlikeContent'] as const;\n\nexport const getUnlikeContentMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof unlikeContent>>, TError,UnlikeContentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof unlikeContent>>, TError,UnlikeContentMutationVariables, TContext> => {\n\nconst mutationKey = getUnlikeContentMutationKey();\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n\n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof unlikeContent>>, UnlikeContentMutationVariables> = (props) => {\n const {contentId} = props ?? {};\n\n return unlikeContent(contentId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type UnlikeContentMutationResult = NonNullable<Awaited<ReturnType<typeof unlikeContent>>>\n\n export type UnlikeContentMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type UnlikeContentMutationVariables = {contentId: number}\n\n /**\n * @summary Unlike Content\n */\nexport const useUnlikeContent = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof unlikeContent>>, TError,UnlikeContentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof unlikeContent>>,\n TError,\n UnlikeContentMutationVariables,\n TContext\n > => {\n return useMutation(getUnlikeContentMutationOptions(options), queryClient);\n }\n export const getLikeContentUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/contents/${contentId}/like`\n}\n\n/**\n * Record a like (E36). Idempotent.\n *\n * This and :func:`unlike_content` replace one non-idempotent\n * ``POST /content/{id}/toggle-like``. A retried toggle reverses the user's\n * intent; a repeated ``PUT`` cannot (§4, consequence 3).\n *\n * ``like_count`` is recomputed from ``content_rating`` rather than incremented,\n * because an increment beside an upsert double-counts the second time the same\n * person likes the same thing.\n * @summary Like Content\n */\nexport const likeContent = async (contentId: number, options?: Parameters<typeof request>[1]): Promise<LikeRead> => {\n\n return request<LikeRead>(getLikeContentUrl(contentId),\n {\n ...options,\n method: 'PUT'\n\n\n }\n);}\n\n\n\n\n\nexport const getLikeContentMutationKey = () => ['likeContent'] as const;\n\nexport const getLikeContentMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof likeContent>>, TError,LikeContentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof likeContent>>, TError,LikeContentMutationVariables, TContext> => {\n\nconst mutationKey = getLikeContentMutationKey();\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n\n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof likeContent>>, LikeContentMutationVariables> = (props) => {\n const {contentId} = props ?? {};\n\n return likeContent(contentId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LikeContentMutationResult = NonNullable<Awaited<ReturnType<typeof likeContent>>>\n\n export type LikeContentMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LikeContentMutationVariables = {contentId: number}\n\n /**\n * @summary Like Content\n */\nexport const useLikeContent = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof likeContent>>, TError,LikeContentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof likeContent>>,\n TError,\n LikeContentMutationVariables,\n TContext\n > => {\n return useMutation(getLikeContentMutationOptions(options), queryClient);\n }\n export const getReadRecommendationsUrl = (contentId: number,\n params?: ReadRecommendationsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/contents/${contentId}/recommendations?${stringifiedParams}` : `/biblio/contents/${contentId}/recommendations`\n}\n\n/**\n * Related content the caller can also reach (E35).\n *\n * Recommending something the account cannot open is worse than recommending\n * nothing, so the candidate set is entitlement-filtered before ranking rather\n * than after — filtering afterwards silently shortens the list instead.\n *\n * Keyword overlap for now, over the GIN index on ``content.keywords``.\n * @summary Read Recommendations\n */\nexport const readRecommendations = async (contentId: number,\n params?: ReadRecommendationsParams, options?: Parameters<typeof request>[1]): Promise<RecommendationsRead> => {\n\n return request<RecommendationsRead>(getReadRecommendationsUrl(contentId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadRecommendationsQueryKey = (contentId: number,\n params?: ReadRecommendationsParams,) => {\n return [\n `/biblio/contents/${contentId}/recommendations`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadRecommendationsQueryOptions = <TData = Awaited<ReturnType<typeof readRecommendations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(contentId: number,\n params?: ReadRecommendationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadRecommendationsQueryKey(contentId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readRecommendations>>> = ({ signal }) => readRecommendations(contentId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: contentId !== null && contentId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadRecommendationsQueryResult = NonNullable<Awaited<ReturnType<typeof readRecommendations>>>\nexport type ReadRecommendationsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadRecommendations<TData = Awaited<ReturnType<typeof readRecommendations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number,\n params: undefined | ReadRecommendationsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readRecommendations>>,\n TError,\n Awaited<ReturnType<typeof readRecommendations>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadRecommendations<TData = Awaited<ReturnType<typeof readRecommendations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number,\n params?: ReadRecommendationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readRecommendations>>,\n TError,\n Awaited<ReturnType<typeof readRecommendations>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadRecommendations<TData = Awaited<ReturnType<typeof readRecommendations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number,\n params?: ReadRecommendationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Recommendations\n */\n\nexport function useReadRecommendations<TData = Awaited<ReturnType<typeof readRecommendations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number,\n params?: ReadRecommendationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadRecommendationsQueryOptions(contentId,params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getListEditorsUrl = (params?: ListEditorsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/editors?${stringifiedParams}` : `/biblio/editors`\n}\n\n/**\n * Active editors (E44).\n *\n * ``order`` and ``sort`` are resolved against a whitelist and never\n * interpolated. The legacy passed both straight to the query layer (defect\n * D17); an unrecognised value is ``422`` rather than a surprise ordering.\n *\n * The collection is not wrapped in a single-element array. The legacy\n * ``GET /api/v1/editors/`` was (§2.1).\n *\n * Authenticated even though the answer does not depend on who is asking. Which\n * publishers a platform carries is commercial information, and an endpoint that\n * enumerates them for anyone is a competitor's first request. The sibling\n * ``/editors/{id}`` was already authenticated; this one was not, which is how\n * the inconsistency was found.\n * @summary List Editors\n */\nexport const listEditors = async (params?: ListEditorsParams, options?: Parameters<typeof request>[1]): Promise<EditorListRead> => {\n\n return request<EditorListRead>(getListEditorsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListEditorsQueryKey = (params?: ListEditorsParams,) => {\n return [\n `/biblio/editors`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getListEditorsQueryOptions = <TData = Awaited<ReturnType<typeof listEditors>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListEditorsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListEditorsQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listEditors>>> = ({ signal }) => listEditors(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListEditorsQueryResult = NonNullable<Awaited<ReturnType<typeof listEditors>>>\nexport type ListEditorsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListEditors<TData = Awaited<ReturnType<typeof listEditors>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ListEditorsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listEditors>>,\n TError,\n Awaited<ReturnType<typeof listEditors>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListEditors<TData = Awaited<ReturnType<typeof listEditors>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListEditorsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listEditors>>,\n TError,\n Awaited<ReturnType<typeof listEditors>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListEditors<TData = Awaited<ReturnType<typeof listEditors>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListEditorsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Editors\n */\n\nexport function useListEditors<TData = Awaited<ReturnType<typeof listEditors>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListEditorsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListEditorsQueryOptions(params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getReadEditorUrl = (editorId: number,\n params?: ReadEditorParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/editors/${editorId}?${stringifiedParams}` : `/biblio/editors/${editorId}`\n}\n\n/**\n * One editor and the content of theirs this caller can reach (E45).\n *\n * One endpoint replaces two — a page and a JSON route that used ``pageSize``\n * instead of ``limit`` and wrapped the object in an array. Same entity, two\n * conventions, one codebase (§4, consequence 5).\n * @summary Read Editor\n */\nexport const readEditor = async (editorId: number,\n params?: ReadEditorParams, options?: Parameters<typeof request>[1]): Promise<EditorDetailRead> => {\n\n return request<EditorDetailRead>(getReadEditorUrl(editorId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadEditorQueryKey = (editorId: number,\n params?: ReadEditorParams,) => {\n return [\n `/biblio/editors/${editorId}`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadEditorQueryOptions = <TData = Awaited<ReturnType<typeof readEditor>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(editorId: number,\n params?: ReadEditorParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadEditorQueryKey(editorId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readEditor>>> = ({ signal }) => readEditor(editorId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: editorId !== null && editorId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadEditorQueryResult = NonNullable<Awaited<ReturnType<typeof readEditor>>>\nexport type ReadEditorQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadEditor<TData = Awaited<ReturnType<typeof readEditor>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n editorId: number,\n params: undefined | ReadEditorParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readEditor>>,\n TError,\n Awaited<ReturnType<typeof readEditor>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadEditor<TData = Awaited<ReturnType<typeof readEditor>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n editorId: number,\n params?: ReadEditorParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readEditor>>,\n TError,\n Awaited<ReturnType<typeof readEditor>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadEditor<TData = Awaited<ReturnType<typeof readEditor>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n editorId: number,\n params?: ReadEditorParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Editor\n */\n\nexport function useReadEditor<TData = Awaited<ReturnType<typeof readEditor>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n editorId: number,\n params?: ReadEditorParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadEditorQueryOptions(editorId,params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getReadLearningPathUrl = (learningPathId: number,) => {\n\n\n\n\n return `/biblio/learning-paths/${learningPathId}`\n}\n\n/**\n * A ``parcours`` and the content it walks through, in order.\n *\n * The other end of the ``parcours`` array on a pack, which named paths a client\n * then had no way to open.\n *\n * Steps the caller is not entitled to are **dropped, not hidden behind a\n * padlock**: the same category test every listing uses decides what appears, so\n * a path cannot become a way to learn that an item exists. That does mean a\n * path can come back with fewer steps than the library curated, and with gaps\n * in ``stepOrder`` — which is why the order is a field rather than the array\n * index.\n *\n * An inactive path is ``404`` rather than an empty one: it was withdrawn, and\n * an empty sequence would read as \"we have nothing for you\" instead.\n * @summary Read Learning Path\n */\nexport const readLearningPath = async (learningPathId: number, options?: Parameters<typeof request>[1]): Promise<LearningPathDetailRead> => {\n\n return request<LearningPathDetailRead>(getReadLearningPathUrl(learningPathId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadLearningPathQueryKey = (learningPathId: number,) => {\n return [\n `/biblio/learning-paths/${learningPathId}`\n ] as const;\n }\n\n\nexport const getReadLearningPathQueryOptions = <TData = Awaited<ReturnType<typeof readLearningPath>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(learningPathId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadLearningPathQueryKey(learningPathId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readLearningPath>>> = ({ signal }) => readLearningPath(learningPathId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: learningPathId !== null && learningPathId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadLearningPathQueryResult = NonNullable<Awaited<ReturnType<typeof readLearningPath>>>\nexport type ReadLearningPathQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadLearningPath<TData = Awaited<ReturnType<typeof readLearningPath>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n learningPathId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readLearningPath>>,\n TError,\n Awaited<ReturnType<typeof readLearningPath>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadLearningPath<TData = Awaited<ReturnType<typeof readLearningPath>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n learningPathId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readLearningPath>>,\n TError,\n Awaited<ReturnType<typeof readLearningPath>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadLearningPath<TData = Awaited<ReturnType<typeof readLearningPath>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n learningPathId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Learning Path\n */\n\nexport function useReadLearningPath<TData = Awaited<ReturnType<typeof readLearningPath>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n learningPathId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadLearningPathQueryOptions(learningPathId,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getReadPackUrl = (packId: number,\n params?: ReadPackParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/packs/${packId}?${stringifiedParams}` : `/biblio/packs/${packId}`\n}\n\n/**\n * A pack with its catalogs, latest additions and learning paths (E38).\n *\n * ``canonical`` is how the redirect dies. When a pack resolves to a single\n * catalog the legacy answered ``302``; here the response is ``200`` and\n * ``canonical`` names the resolved catalog, leaving the client to decide whether\n * to follow it (§5.1).\n *\n * A pack the caller has no entitlement to is ``404``. The legacy dereferenced\n * ``null`` and returned ``500`` (defect D12).\n * @summary Read Pack\n */\nexport const readPack = async (packId: number,\n params?: ReadPackParams, options?: Parameters<typeof request>[1]): Promise<PackDetailRead> => {\n\n return request<PackDetailRead>(getReadPackUrl(packId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadPackQueryKey = (packId: number,\n params?: ReadPackParams,) => {\n return [\n `/biblio/packs/${packId}`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadPackQueryOptions = <TData = Awaited<ReturnType<typeof readPack>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(packId: number,\n params?: ReadPackParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadPackQueryKey(packId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readPack>>> = ({ signal }) => readPack(packId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: packId !== null && packId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadPackQueryResult = NonNullable<Awaited<ReturnType<typeof readPack>>>\nexport type ReadPackQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadPack<TData = Awaited<ReturnType<typeof readPack>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n params: undefined | ReadPackParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPack>>,\n TError,\n Awaited<ReturnType<typeof readPack>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPack<TData = Awaited<ReturnType<typeof readPack>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n params?: ReadPackParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPack>>,\n TError,\n Awaited<ReturnType<typeof readPack>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPack<TData = Awaited<ReturnType<typeof readPack>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n params?: ReadPackParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Pack\n */\n\nexport function useReadPack<TData = Awaited<ReturnType<typeof readPack>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n params?: ReadPackParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadPackQueryOptions(packId,params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getReadCatalogUrl = (packId: number,\n catalogId: number,\n params?: ReadCatalogParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/packs/${packId}/catalogs/${catalogId}?${stringifiedParams}` : `/biblio/packs/${packId}/catalogs/${catalogId}`\n}\n\n/**\n * One catalog inside a pack (E39).\n * @summary Read Catalog\n */\nexport const readCatalog = async (packId: number,\n catalogId: number,\n params?: ReadCatalogParams, options?: Parameters<typeof request>[1]): Promise<CatalogRead> => {\n\n return request<CatalogRead>(getReadCatalogUrl(packId,catalogId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadCatalogQueryKey = (packId: number,\n catalogId: number,\n params?: ReadCatalogParams,) => {\n return [\n `/biblio/packs/${packId}/catalogs/${catalogId}`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadCatalogQueryOptions = <TData = Awaited<ReturnType<typeof readCatalog>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(packId: number,\n catalogId: number,\n params?: ReadCatalogParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadCatalogQueryKey(packId,catalogId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readCatalog>>> = ({ signal }) => readCatalog(packId,catalogId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: packId !== null && packId !== undefined && catalogId !== null && catalogId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadCatalogQueryResult = NonNullable<Awaited<ReturnType<typeof readCatalog>>>\nexport type ReadCatalogQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadCatalog<TData = Awaited<ReturnType<typeof readCatalog>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n params: undefined | ReadCatalogParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readCatalog>>,\n TError,\n Awaited<ReturnType<typeof readCatalog>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadCatalog<TData = Awaited<ReturnType<typeof readCatalog>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n params?: ReadCatalogParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readCatalog>>,\n TError,\n Awaited<ReturnType<typeof readCatalog>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadCatalog<TData = Awaited<ReturnType<typeof readCatalog>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n params?: ReadCatalogParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Catalog\n */\n\nexport function useReadCatalog<TData = Awaited<ReturnType<typeof readCatalog>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n params?: ReadCatalogParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadCatalogQueryOptions(packId,catalogId,params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getReadCatalogThemeUrl = (packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/packs/${packId}/catalogs/${catalogId}/themes/${themeId}?${stringifiedParams}` : `/biblio/packs/${packId}/catalogs/${catalogId}/themes/${themeId}`\n}\n\n/**\n * The same catalog, narrowed to one theme (E40).\n * @summary Read Catalog Theme\n */\nexport const readCatalogTheme = async (packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams, options?: Parameters<typeof request>[1]): Promise<CatalogRead> => {\n\n return request<CatalogRead>(getReadCatalogThemeUrl(packId,catalogId,themeId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadCatalogThemeQueryKey = (packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams,) => {\n return [\n `/biblio/packs/${packId}/catalogs/${catalogId}/themes/${themeId}`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadCatalogThemeQueryOptions = <TData = Awaited<ReturnType<typeof readCatalogTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadCatalogThemeQueryKey(packId,catalogId,themeId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readCatalogTheme>>> = ({ signal }) => readCatalogTheme(packId,catalogId,themeId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: packId !== null && packId !== undefined && catalogId !== null && catalogId !== undefined && themeId !== null && themeId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadCatalogThemeQueryResult = NonNullable<Awaited<ReturnType<typeof readCatalogTheme>>>\nexport type ReadCatalogThemeQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadCatalogTheme<TData = Awaited<ReturnType<typeof readCatalogTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n themeId: number,\n params: undefined | ReadCatalogThemeParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readCatalogTheme>>,\n TError,\n Awaited<ReturnType<typeof readCatalogTheme>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadCatalogTheme<TData = Awaited<ReturnType<typeof readCatalogTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readCatalogTheme>>,\n TError,\n Awaited<ReturnType<typeof readCatalogTheme>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadCatalogTheme<TData = Awaited<ReturnType<typeof readCatalogTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Catalog Theme\n */\n\nexport function useReadCatalogTheme<TData = Awaited<ReturnType<typeof readCatalogTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadCatalogThemeQueryOptions(packId,catalogId,themeId,params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\n"],"mappings":";;;;;;;;;;;AAqDA,MAAM,gBAAqC,OAAU,aAAqC;CACxF,MAAM,SAAS,EAAE,SAAS;CAC1B,KAAK,MAAM,OAAO,OAAO,KAAK,KAAK,GAAG;EAGpC,IAAI,QAAQ,YAAY;EACxB,OAAO,eAAe,QAAQ,KAAK;GACjC,YAAY;GACZ,cAAc;GACd,WAAY,MAAkC;EAChD,CAAC;CACH;CACA,OAAO;AACT;AAEA,MAAa,qBAAqB,cAAuB;CAKvD,OAAO,oBAAoB;AAC7B;;;;;;;;;AAUA,MAAa,cAAc,OAAO,WAAmB,YAAkE;CAErH,OAAO,QAAqB,kBAAkB,SAAS,GACvD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,0BAA0B,cAAuB;CAC1D,OAAO,CACP,oBAAoB,WACpB;AACA;AAGJ,MAAa,8BAAoJ,WAAmB,YAC/K;CAEL,MAAM,EAAC,OAAO,cAAc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,mBAAmB,OAAO,QACnC,WACA,SACA,QAAiC,YAAkE;CAErG,OAAO,QAAqB,uBAAuB,QAAO,WAAU,SAAQ,MAAM,GAClF;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,+BAA+B,QACxC,WACA,SACA,WAAqC;CACrC,OAAO,CACP,iBAAiB,OAAO,YAAY,UAAU,UAAU,WAAW,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAC5F;AACA;AAGJ,MAAa,mCAA8J,QACvK,WACA,SACA,QAAiC,YAChC;CAEL,MAAM,EAAC,OAAO,cAAc,SAAS,mBAAkB,WAAW,CAAC;CAEjE,MAAM,WAAY,cAAc,YAAY,4BAA4B,QAAO,WAAU,SAAQ,MAAM;CAIrG,MAAM,WAAwE,EAAE,aAAa,iBAAiB,QAAO,WAAU,SAAQ,QAAQ;EAAE;EAAQ,GAAG;CAAe,CAAC;CAM7K,OAAQ;EAAE;EAAU;EAAS,SAAS,WAAW,QAAQ,WAAW,KAAA,KAAa,cAAc,QAAQ,cAAc,KAAA,KAAa,YAAY,QAAQ,YAAY,KAAA;EAAW,GAAG;CAAY;AAC/L;;;;AA2CA,SAAgB,oBACf,QACG,WACA,SACA,QAAiC,SAClC,aACiF;CAElF,MAAM,eAAe,gCAAgC,QAAO,WAAU,SAAQ,QAAO,OAAO;CAE5F,MAAM,QAAQ,SAAS,cAAc,WAAW;CAEhD,OAAO,aAAa,OAAO,aAAa,QAAQ;AAClD"}
1
+ {"version":3,"file":"biblio-catalogue.js","names":[],"sources":["../../src/react/biblio-catalogue/biblio-catalogue.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.6.0\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query';\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query';\n\nimport type {\n CatalogRead,\n ContentRead,\n EditorDetailRead,\n EditorListRead,\n HTTPExceptionResponse,\n LearningPathDetailRead,\n LikeRead,\n ListEditorsParams,\n PackDetailRead,\n ReadCatalogParams,\n ReadCatalogThemeParams,\n ReadEditorParams,\n ReadPackParams,\n ReadRecommendationsParams,\n RecommendationsRead,\n ValidationErrorResponse\n} from '../../models';\n\nimport { request } from '../../client';\nimport type { ErrorType } from '../../client';\n\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n\n\nconst withQueryKey = <T extends object, K>(query: T, queryKey: K): T & { queryKey: K } => {\n const result = { queryKey } as T & { queryKey: K };\n for (const key of Object.keys(query)) {\n // The explicit queryKey always wins, matching the previous\n // `{ ...query, queryKey }` spread where it was set last.\n if (key === 'queryKey') continue;\n Object.defineProperty(result, key, {\n enumerable: true,\n configurable: true,\n get: () => (query as Record<string, unknown>)[key],\n });\n }\n return result;\n};\n\nexport const getReadContentUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/contents/${contentId}`\n}\n\n/**\n * One content item, with this caller's own state on it (E34).\n *\n * ``liked`` and ``favorited`` are why this is not just the summary shape: they\n * are per-caller and therefore uncacheable across users, which is worth knowing\n * before anyone puts a shared cache in front of it.\n * @summary Read Content\n */\nexport const readContent = async (contentId: number, options?: Parameters<typeof request>[1]): Promise<ContentRead> => {\n\n return request<ContentRead>(getReadContentUrl(contentId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadContentQueryKey = (contentId: number,) => {\n return [\n `/biblio/contents/${contentId}`\n ] as const;\n }\n\n\nexport const getReadContentQueryOptions = <TData = Awaited<ReturnType<typeof readContent>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(contentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadContentQueryKey(contentId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readContent>>> = ({ signal }) => readContent(contentId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: contentId !== null && contentId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadContentQueryResult = NonNullable<Awaited<ReturnType<typeof readContent>>>\nexport type ReadContentQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadContent<TData = Awaited<ReturnType<typeof readContent>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readContent>>,\n TError,\n Awaited<ReturnType<typeof readContent>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadContent<TData = Awaited<ReturnType<typeof readContent>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readContent>>,\n TError,\n Awaited<ReturnType<typeof readContent>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadContent<TData = Awaited<ReturnType<typeof readContent>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Content\n */\n\nexport function useReadContent<TData = Awaited<ReturnType<typeof readContent>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readContent>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadContentQueryOptions(contentId,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getUnlikeContentUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/contents/${contentId}/like`\n}\n\n/**\n * Withdraw a like (E37). Idempotent — not liked is already the desired state.\n * @summary Unlike Content\n */\nexport const unlikeContent = async (contentId: number, options?: Parameters<typeof request>[1]): Promise<LikeRead> => {\n\n return request<LikeRead>(getUnlikeContentUrl(contentId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n\n\n\nexport const getUnlikeContentMutationKey = () => ['unlikeContent'] as const;\n\nexport const getUnlikeContentMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof unlikeContent>>, TError,UnlikeContentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof unlikeContent>>, TError,UnlikeContentMutationVariables, TContext> => {\n\nconst mutationKey = getUnlikeContentMutationKey();\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n\n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof unlikeContent>>, UnlikeContentMutationVariables> = (props) => {\n const {contentId} = props ?? {};\n\n return unlikeContent(contentId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type UnlikeContentMutationResult = NonNullable<Awaited<ReturnType<typeof unlikeContent>>>\n\n export type UnlikeContentMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type UnlikeContentMutationVariables = {contentId: number}\n\n /**\n * @summary Unlike Content\n */\nexport const useUnlikeContent = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof unlikeContent>>, TError,UnlikeContentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof unlikeContent>>,\n TError,\n UnlikeContentMutationVariables,\n TContext\n > => {\n return useMutation(getUnlikeContentMutationOptions(options), queryClient);\n }\n export const getLikeContentUrl = (contentId: number,) => {\n\n\n\n\n return `/biblio/contents/${contentId}/like`\n}\n\n/**\n * Record a like (E36). Idempotent.\n *\n * This and :func:`unlike_content` replace one non-idempotent\n * ``POST /content/{id}/toggle-like``. A retried toggle reverses the user's\n * intent; a repeated ``PUT`` cannot (§4, consequence 3).\n *\n * ``like_count`` is recomputed from ``content_rating`` rather than incremented,\n * because an increment beside an upsert double-counts the second time the same\n * person likes the same thing.\n * @summary Like Content\n */\nexport const likeContent = async (contentId: number, options?: Parameters<typeof request>[1]): Promise<LikeRead> => {\n\n return request<LikeRead>(getLikeContentUrl(contentId),\n {\n ...options,\n method: 'PUT'\n\n\n }\n);}\n\n\n\n\n\nexport const getLikeContentMutationKey = () => ['likeContent'] as const;\n\nexport const getLikeContentMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof likeContent>>, TError,LikeContentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof likeContent>>, TError,LikeContentMutationVariables, TContext> => {\n\nconst mutationKey = getLikeContentMutationKey();\nconst {mutation: mutationOptions, request: requestOptions} = options ?\n options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?\n options\n : {...options, mutation: {...options.mutation, mutationKey}}\n : {mutation: { mutationKey, }, request: undefined};\n\n\n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof likeContent>>, LikeContentMutationVariables> = (props) => {\n const {contentId} = props ?? {};\n\n return likeContent(contentId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LikeContentMutationResult = NonNullable<Awaited<ReturnType<typeof likeContent>>>\n\n export type LikeContentMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LikeContentMutationVariables = {contentId: number}\n\n /**\n * @summary Like Content\n */\nexport const useLikeContent = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof likeContent>>, TError,LikeContentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof likeContent>>,\n TError,\n LikeContentMutationVariables,\n TContext\n > => {\n return useMutation(getLikeContentMutationOptions(options), queryClient);\n }\n export const getReadRecommendationsUrl = (contentId: number,\n params?: ReadRecommendationsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/contents/${contentId}/recommendations?${stringifiedParams}` : `/biblio/contents/${contentId}/recommendations`\n}\n\n/**\n * Related content the caller can also reach (E35).\n *\n * Recommending something the account cannot open is worse than recommending\n * nothing, so the candidate set is entitlement-filtered before ranking rather\n * than after — filtering afterwards silently shortens the list instead.\n *\n * Keyword overlap for now, over the GIN index on ``content.keywords``.\n * @summary Read Recommendations\n */\nexport const readRecommendations = async (contentId: number,\n params?: ReadRecommendationsParams, options?: Parameters<typeof request>[1]): Promise<RecommendationsRead> => {\n\n return request<RecommendationsRead>(getReadRecommendationsUrl(contentId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadRecommendationsQueryKey = (contentId: number,\n params?: ReadRecommendationsParams,) => {\n return [\n `/biblio/contents/${contentId}/recommendations`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadRecommendationsQueryOptions = <TData = Awaited<ReturnType<typeof readRecommendations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(contentId: number,\n params?: ReadRecommendationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadRecommendationsQueryKey(contentId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readRecommendations>>> = ({ signal }) => readRecommendations(contentId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: contentId !== null && contentId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadRecommendationsQueryResult = NonNullable<Awaited<ReturnType<typeof readRecommendations>>>\nexport type ReadRecommendationsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadRecommendations<TData = Awaited<ReturnType<typeof readRecommendations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number,\n params: undefined | ReadRecommendationsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readRecommendations>>,\n TError,\n Awaited<ReturnType<typeof readRecommendations>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadRecommendations<TData = Awaited<ReturnType<typeof readRecommendations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number,\n params?: ReadRecommendationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readRecommendations>>,\n TError,\n Awaited<ReturnType<typeof readRecommendations>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadRecommendations<TData = Awaited<ReturnType<typeof readRecommendations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number,\n params?: ReadRecommendationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Recommendations\n */\n\nexport function useReadRecommendations<TData = Awaited<ReturnType<typeof readRecommendations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n contentId: number,\n params?: ReadRecommendationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readRecommendations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadRecommendationsQueryOptions(contentId,params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getListEditorsUrl = (params?: ListEditorsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/editors?${stringifiedParams}` : `/biblio/editors`\n}\n\n/**\n * Active editors (E44).\n *\n * ``order`` and ``sort`` are resolved against a whitelist and never\n * interpolated. The legacy passed both straight to the query layer (defect\n * D17); an unrecognised value is ``422`` rather than a surprise ordering.\n *\n * The collection is not wrapped in a single-element array. The legacy\n * ``GET /api/v1/editors/`` was (§2.1).\n *\n * Authenticated even though the answer does not depend on who is asking. Which\n * publishers a platform carries is commercial information, and an endpoint that\n * enumerates them for anyone is a competitor's first request. The sibling\n * ``/editors/{id}`` was already authenticated; this one was not, which is how\n * the inconsistency was found.\n * @summary List Editors\n */\nexport const listEditors = async (params?: ListEditorsParams, options?: Parameters<typeof request>[1]): Promise<EditorListRead> => {\n\n return request<EditorListRead>(getListEditorsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListEditorsQueryKey = (params?: ListEditorsParams,) => {\n return [\n `/biblio/editors`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getListEditorsQueryOptions = <TData = Awaited<ReturnType<typeof listEditors>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListEditorsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListEditorsQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listEditors>>> = ({ signal }) => listEditors(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListEditorsQueryResult = NonNullable<Awaited<ReturnType<typeof listEditors>>>\nexport type ListEditorsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListEditors<TData = Awaited<ReturnType<typeof listEditors>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ListEditorsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listEditors>>,\n TError,\n Awaited<ReturnType<typeof listEditors>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListEditors<TData = Awaited<ReturnType<typeof listEditors>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListEditorsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listEditors>>,\n TError,\n Awaited<ReturnType<typeof listEditors>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListEditors<TData = Awaited<ReturnType<typeof listEditors>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListEditorsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Editors\n */\n\nexport function useListEditors<TData = Awaited<ReturnType<typeof listEditors>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListEditorsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEditors>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListEditorsQueryOptions(params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getReadEditorUrl = (editorId: number,\n params?: ReadEditorParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/editors/${editorId}?${stringifiedParams}` : `/biblio/editors/${editorId}`\n}\n\n/**\n * One editor and the content of theirs this caller can reach (E45).\n *\n * One endpoint replaces two — a page and a JSON route that used ``pageSize``\n * instead of ``limit`` and wrapped the object in an array. Same entity, two\n * conventions, one codebase (§4, consequence 5).\n * @summary Read Editor\n */\nexport const readEditor = async (editorId: number,\n params?: ReadEditorParams, options?: Parameters<typeof request>[1]): Promise<EditorDetailRead> => {\n\n return request<EditorDetailRead>(getReadEditorUrl(editorId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadEditorQueryKey = (editorId: number,\n params?: ReadEditorParams,) => {\n return [\n `/biblio/editors/${editorId}`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadEditorQueryOptions = <TData = Awaited<ReturnType<typeof readEditor>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(editorId: number,\n params?: ReadEditorParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadEditorQueryKey(editorId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readEditor>>> = ({ signal }) => readEditor(editorId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: editorId !== null && editorId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadEditorQueryResult = NonNullable<Awaited<ReturnType<typeof readEditor>>>\nexport type ReadEditorQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadEditor<TData = Awaited<ReturnType<typeof readEditor>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n editorId: number,\n params: undefined | ReadEditorParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readEditor>>,\n TError,\n Awaited<ReturnType<typeof readEditor>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadEditor<TData = Awaited<ReturnType<typeof readEditor>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n editorId: number,\n params?: ReadEditorParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readEditor>>,\n TError,\n Awaited<ReturnType<typeof readEditor>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadEditor<TData = Awaited<ReturnType<typeof readEditor>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n editorId: number,\n params?: ReadEditorParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Editor\n */\n\nexport function useReadEditor<TData = Awaited<ReturnType<typeof readEditor>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n editorId: number,\n params?: ReadEditorParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readEditor>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadEditorQueryOptions(editorId,params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getReadLearningPathUrl = (learningPathId: number,) => {\n\n\n\n\n return `/biblio/learning-paths/${learningPathId}`\n}\n\n/**\n * A ``parcours`` and the content it walks through, in order.\n *\n * The other end of the ``parcours`` array on a pack, which named paths a client\n * then had no way to open.\n *\n * Steps the caller is not entitled to are **dropped, not hidden behind a\n * padlock**: the same category test every listing uses decides what appears, so\n * a path cannot become a way to learn that an item exists. That does mean a\n * path can come back with fewer steps than the library curated, and with gaps\n * in ``stepOrder`` — which is why the order is a field rather than the array\n * index.\n *\n * An inactive path is ``404`` rather than an empty one: it was withdrawn, and\n * an empty sequence would read as \"we have nothing for you\" instead.\n * @summary Read Learning Path\n */\nexport const readLearningPath = async (learningPathId: number, options?: Parameters<typeof request>[1]): Promise<LearningPathDetailRead> => {\n\n return request<LearningPathDetailRead>(getReadLearningPathUrl(learningPathId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadLearningPathQueryKey = (learningPathId: number,) => {\n return [\n `/biblio/learning-paths/${learningPathId}`\n ] as const;\n }\n\n\nexport const getReadLearningPathQueryOptions = <TData = Awaited<ReturnType<typeof readLearningPath>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(learningPathId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadLearningPathQueryKey(learningPathId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readLearningPath>>> = ({ signal }) => readLearningPath(learningPathId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: learningPathId !== null && learningPathId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadLearningPathQueryResult = NonNullable<Awaited<ReturnType<typeof readLearningPath>>>\nexport type ReadLearningPathQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadLearningPath<TData = Awaited<ReturnType<typeof readLearningPath>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n learningPathId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readLearningPath>>,\n TError,\n Awaited<ReturnType<typeof readLearningPath>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadLearningPath<TData = Awaited<ReturnType<typeof readLearningPath>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n learningPathId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readLearningPath>>,\n TError,\n Awaited<ReturnType<typeof readLearningPath>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadLearningPath<TData = Awaited<ReturnType<typeof readLearningPath>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n learningPathId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Learning Path\n */\n\nexport function useReadLearningPath<TData = Awaited<ReturnType<typeof readLearningPath>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n learningPathId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readLearningPath>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadLearningPathQueryOptions(learningPathId,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getReadPackUrl = (packId: number,\n params?: ReadPackParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/packs/${packId}?${stringifiedParams}` : `/biblio/packs/${packId}`\n}\n\n/**\n * A pack with its catalogs, latest additions and learning paths (E38).\n *\n * ``canonical`` is how the redirect dies. When a pack resolves to a single\n * catalog the legacy answered ``302``; here the response is ``200`` and\n * ``canonical`` names the resolved catalog, leaving the client to decide whether\n * to follow it (§5.1).\n *\n * A pack the caller has no entitlement to is ``404``. The legacy dereferenced\n * ``null`` and returned ``500`` (defect D12).\n * @summary Read Pack\n */\nexport const readPack = async (packId: number,\n params?: ReadPackParams, options?: Parameters<typeof request>[1]): Promise<PackDetailRead> => {\n\n return request<PackDetailRead>(getReadPackUrl(packId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadPackQueryKey = (packId: number,\n params?: ReadPackParams,) => {\n return [\n `/biblio/packs/${packId}`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadPackQueryOptions = <TData = Awaited<ReturnType<typeof readPack>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(packId: number,\n params?: ReadPackParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadPackQueryKey(packId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readPack>>> = ({ signal }) => readPack(packId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: packId !== null && packId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadPackQueryResult = NonNullable<Awaited<ReturnType<typeof readPack>>>\nexport type ReadPackQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadPack<TData = Awaited<ReturnType<typeof readPack>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n params: undefined | ReadPackParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPack>>,\n TError,\n Awaited<ReturnType<typeof readPack>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPack<TData = Awaited<ReturnType<typeof readPack>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n params?: ReadPackParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readPack>>,\n TError,\n Awaited<ReturnType<typeof readPack>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadPack<TData = Awaited<ReturnType<typeof readPack>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n params?: ReadPackParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Pack\n */\n\nexport function useReadPack<TData = Awaited<ReturnType<typeof readPack>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n params?: ReadPackParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readPack>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadPackQueryOptions(packId,params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getReadCatalogUrl = (packId: number,\n catalogId: number,\n params?: ReadCatalogParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/packs/${packId}/catalogs/${catalogId}?${stringifiedParams}` : `/biblio/packs/${packId}/catalogs/${catalogId}`\n}\n\n/**\n * One catalog inside a pack (E39).\n * @summary Read Catalog\n */\nexport const readCatalog = async (packId: number,\n catalogId: number,\n params?: ReadCatalogParams, options?: Parameters<typeof request>[1]): Promise<CatalogRead> => {\n\n return request<CatalogRead>(getReadCatalogUrl(packId,catalogId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadCatalogQueryKey = (packId: number,\n catalogId: number,\n params?: ReadCatalogParams,) => {\n return [\n `/biblio/packs/${packId}/catalogs/${catalogId}`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadCatalogQueryOptions = <TData = Awaited<ReturnType<typeof readCatalog>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(packId: number,\n catalogId: number,\n params?: ReadCatalogParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadCatalogQueryKey(packId,catalogId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readCatalog>>> = ({ signal }) => readCatalog(packId,catalogId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: packId !== null && packId !== undefined && catalogId !== null && catalogId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadCatalogQueryResult = NonNullable<Awaited<ReturnType<typeof readCatalog>>>\nexport type ReadCatalogQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadCatalog<TData = Awaited<ReturnType<typeof readCatalog>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n params: undefined | ReadCatalogParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readCatalog>>,\n TError,\n Awaited<ReturnType<typeof readCatalog>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadCatalog<TData = Awaited<ReturnType<typeof readCatalog>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n params?: ReadCatalogParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readCatalog>>,\n TError,\n Awaited<ReturnType<typeof readCatalog>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadCatalog<TData = Awaited<ReturnType<typeof readCatalog>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n params?: ReadCatalogParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Catalog\n */\n\nexport function useReadCatalog<TData = Awaited<ReturnType<typeof readCatalog>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n params?: ReadCatalogParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalog>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadCatalogQueryOptions(packId,catalogId,params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\nexport const getReadCatalogThemeUrl = (packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/packs/${packId}/catalogs/${catalogId}/themes/${themeId}?${stringifiedParams}` : `/biblio/packs/${packId}/catalogs/${catalogId}/themes/${themeId}`\n}\n\n/**\n * The same catalog, narrowed to one theme (E40).\n * @summary Read Catalog Theme\n */\nexport const readCatalogTheme = async (packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams, options?: Parameters<typeof request>[1]): Promise<CatalogRead> => {\n\n return request<CatalogRead>(getReadCatalogThemeUrl(packId,catalogId,themeId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadCatalogThemeQueryKey = (packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams,) => {\n return [\n `/biblio/packs/${packId}/catalogs/${catalogId}/themes/${themeId}`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadCatalogThemeQueryOptions = <TData = Awaited<ReturnType<typeof readCatalogTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadCatalogThemeQueryKey(packId,catalogId,themeId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readCatalogTheme>>> = ({ signal }) => readCatalogTheme(packId,catalogId,themeId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: packId !== null && packId !== undefined && catalogId !== null && catalogId !== undefined && themeId !== null && themeId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadCatalogThemeQueryResult = NonNullable<Awaited<ReturnType<typeof readCatalogTheme>>>\nexport type ReadCatalogThemeQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadCatalogTheme<TData = Awaited<ReturnType<typeof readCatalogTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n themeId: number,\n params: undefined | ReadCatalogThemeParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readCatalogTheme>>,\n TError,\n Awaited<ReturnType<typeof readCatalogTheme>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadCatalogTheme<TData = Awaited<ReturnType<typeof readCatalogTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readCatalogTheme>>,\n TError,\n Awaited<ReturnType<typeof readCatalogTheme>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadCatalogTheme<TData = Awaited<ReturnType<typeof readCatalogTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Catalog Theme\n */\n\nexport function useReadCatalogTheme<TData = Awaited<ReturnType<typeof readCatalogTheme>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n packId: number,\n catalogId: number,\n themeId: number,\n params?: ReadCatalogThemeParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readCatalogTheme>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadCatalogThemeQueryOptions(packId,catalogId,themeId,params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\n"],"mappings":";;;;;;;;;;;AAqDA,MAAM,gBAAqC,OAAU,aAAqC;CACxF,M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;;;;AA2CA,SAAgB,oBACf,QACG,WACA,SACA,QAAiC,SAClC,aACiF;CAElF,MAAM,eAAe,gCAAgC,QAAO,WAAU,SAAQ,QAAO,OAAO;CAE5F,MAAM,QAAQ,SAAS,cAAc,WAAW;CAEhD,OAAO,aAAa,OAAO,aAAa,QAAQ;AAClD"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { Cr as HTTPExceptionResponse, ft as ReadHomeFeedParams, t as ValidationErrorResponse, wr as HomeFeedRead } from "../chunks/index.js";
2
+ import { Tr as HomeFeedRead, pt as ReadHomeFeedParams, t as ValidationErrorResponse, wr as HTTPExceptionResponse } from "../chunks/index.js";
3
3
  import { a as ErrorType, c as request } from "../chunks/client.js";
4
4
  import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, QueryClient, QueryKey, UndefinedInitialDataOptions, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
5
5
  //#region src/react/biblio-home/biblio-home.d.ts
@@ -7,7 +7,7 @@ import { useQuery } from "@tanstack/react-query";
7
7
  * Do not edit manually.
8
8
  * Mozaik backend
9
9
  * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.
10
- * OpenAPI spec version: 0.3.2
10
+ * OpenAPI spec version: 0.6.0
11
11
  */
12
12
  const withQueryKey = (query, queryKey) => {
13
13
  const result = { queryKey };
@@ -1 +1 @@
1
- {"version":3,"file":"biblio-home.js","names":[],"sources":["../../src/react/biblio-home/biblio-home.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.3.2\n */\nimport {\n useQuery\n} from '@tanstack/react-query';\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query';\n\nimport type {\n HTTPExceptionResponse,\n HomeFeedRead,\n ReadHomeFeedParams,\n ValidationErrorResponse\n} from '../../models';\n\nimport { request } from '../../client';\nimport type { ErrorType } from '../../client';\n\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n\n\nconst withQueryKey = <T extends object, K>(query: T, queryKey: K): T & { queryKey: K } => {\n const result = { queryKey } as T & { queryKey: K };\n for (const key of Object.keys(query)) {\n // The explicit queryKey always wins, matching the previous\n // `{ ...query, queryKey }` spread where it was set last.\n if (key === 'queryKey') continue;\n Object.defineProperty(result, key, {\n enumerable: true,\n configurable: true,\n get: () => (query as Record<string, unknown>)[key],\n });\n }\n return result;\n};\n\nexport const getReadHomeFeedUrl = (params?: ReadHomeFeedParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/home-feed?${stringifiedParams}` : `/biblio/home-feed`\n}\n\n/**\n * Everything the home screen needs, in one call (E48).\n *\n * Each block is built independently and a block that raises is dropped. The\n * caller can tell the difference — an absent key means the section could not be\n * built, an empty list means there was nothing in it — which is more than the\n * legacy offered, where four carousels were hardcoded to empty and looked\n * identical to \"nothing new\".\n * @summary Read Home Feed\n */\nexport const readHomeFeed = async (params?: ReadHomeFeedParams, options?: Parameters<typeof request>[1]): Promise<HomeFeedRead> => {\n\n return request<HomeFeedRead>(getReadHomeFeedUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadHomeFeedQueryKey = (params?: ReadHomeFeedParams,) => {\n return [\n `/biblio/home-feed`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadHomeFeedQueryOptions = <TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadHomeFeedParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadHomeFeedQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readHomeFeed>>> = ({ signal }) => readHomeFeed(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadHomeFeedQueryResult = NonNullable<Awaited<ReturnType<typeof readHomeFeed>>>\nexport type ReadHomeFeedQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadHomeFeed<TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ReadHomeFeedParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readHomeFeed>>,\n TError,\n Awaited<ReturnType<typeof readHomeFeed>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadHomeFeed<TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ReadHomeFeedParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readHomeFeed>>,\n TError,\n Awaited<ReturnType<typeof readHomeFeed>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadHomeFeed<TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ReadHomeFeedParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Home Feed\n */\n\nexport function useReadHomeFeed<TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ReadHomeFeedParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadHomeFeedQueryOptions(params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\n"],"mappings":";;;;;;;;;;;AAqCA,MAAM,gBAAqC,OAAU,aAAqC;CACxF,MAAM,SAAS,EAAE,SAAS;CAC1B,KAAK,MAAM,OAAO,OAAO,KAAK,KAAK,GAAG;EAGpC,IAAI,QAAQ,YAAY;EACxB,OAAO,eAAe,QAAQ,KAAK;GACjC,YAAY;GACZ,cAAc;GACd,WAAY,MAAkC;EAChD,CAAC;CACH;CACA,OAAO;AACT;AAEA,MAAa,sBAAsB,WAAiC;CAClE,MAAM,mBAAmB,IAAI,gBAAgB;CAE7C,OAAO,QAAQ,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;EAErD,IAAI,UAAU,KAAA,GACZ,iBAAiB,OAAO,KAAK,UAAU,OAAO,SAAS,OAAO,KAAK,CAAC;CAExE,CAAC;CAED,MAAM,oBAAoB,iBAAiB,SAAS;CAEpD,OAAO,kBAAkB,SAAS,IAAI,qBAAqB,sBAAsB;AACnF;;;;;;;;;;;AAYA,MAAa,eAAe,OAAO,QAA6B,YAAmE;CAEjI,OAAO,QAAsB,mBAAmB,MAAM,GACtD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,2BAA2B,WAAiC;CACrE,OAAO,CACP,qBAAqB,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAC9C;AACA;AAGJ,MAAa,+BAAsJ,QAA6B,YAC3L;CAEL,MAAM,EAAC,OAAO,cAAc,SAAS,mBAAkB,WAAW,CAAC;CAEjE,MAAM,WAAY,cAAc,YAAY,wBAAwB,MAAM;CAIxE,MAAM,WAAoE,EAAE,aAAa,aAAa,QAAQ;EAAE;EAAQ,GAAG;CAAe,CAAC;CAM5I,OAAQ;EAAE;EAAU;EAAS,GAAG;CAAY;AAC/C;;;;AAkCA,SAAgB,gBACf,QAA6B,SAC3B,aACiF;CAElF,MAAM,eAAe,4BAA4B,QAAO,OAAO;CAE/D,MAAM,QAAQ,SAAS,cAAc,WAAW;CAEhD,OAAO,aAAa,OAAO,aAAa,QAAQ;AAClD"}
1
+ {"version":3,"file":"biblio-home.js","names":[],"sources":["../../src/react/biblio-home/biblio-home.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.6.0\n */\nimport {\n useQuery\n} from '@tanstack/react-query';\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query';\n\nimport type {\n HTTPExceptionResponse,\n HomeFeedRead,\n ReadHomeFeedParams,\n ValidationErrorResponse\n} from '../../models';\n\nimport { request } from '../../client';\nimport type { ErrorType } from '../../client';\n\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n\n\nconst withQueryKey = <T extends object, K>(query: T, queryKey: K): T & { queryKey: K } => {\n const result = { queryKey } as T & { queryKey: K };\n for (const key of Object.keys(query)) {\n // The explicit queryKey always wins, matching the previous\n // `{ ...query, queryKey }` spread where it was set last.\n if (key === 'queryKey') continue;\n Object.defineProperty(result, key, {\n enumerable: true,\n configurable: true,\n get: () => (query as Record<string, unknown>)[key],\n });\n }\n return result;\n};\n\nexport const getReadHomeFeedUrl = (params?: ReadHomeFeedParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/biblio/home-feed?${stringifiedParams}` : `/biblio/home-feed`\n}\n\n/**\n * Everything the home screen needs, in one call (E48).\n *\n * Each block is built independently and a block that raises is dropped. The\n * caller can tell the difference — an absent key means the section could not be\n * built, an empty list means there was nothing in it — which is more than the\n * legacy offered, where four carousels were hardcoded to empty and looked\n * identical to \"nothing new\".\n * @summary Read Home Feed\n */\nexport const readHomeFeed = async (params?: ReadHomeFeedParams, options?: Parameters<typeof request>[1]): Promise<HomeFeedRead> => {\n\n return request<HomeFeedRead>(getReadHomeFeedUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadHomeFeedQueryKey = (params?: ReadHomeFeedParams,) => {\n return [\n `/biblio/home-feed`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadHomeFeedQueryOptions = <TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadHomeFeedParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadHomeFeedQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readHomeFeed>>> = ({ signal }) => readHomeFeed(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadHomeFeedQueryResult = NonNullable<Awaited<ReturnType<typeof readHomeFeed>>>\nexport type ReadHomeFeedQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadHomeFeed<TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ReadHomeFeedParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readHomeFeed>>,\n TError,\n Awaited<ReturnType<typeof readHomeFeed>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadHomeFeed<TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ReadHomeFeedParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readHomeFeed>>,\n TError,\n Awaited<ReturnType<typeof readHomeFeed>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadHomeFeed<TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ReadHomeFeedParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Home Feed\n */\n\nexport function useReadHomeFeed<TData = Awaited<ReturnType<typeof readHomeFeed>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ReadHomeFeedParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHomeFeed>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadHomeFeedQueryOptions(params,options)\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n return withQueryKey(query, queryOptions.queryKey);\n}\n\n\n\n\n\n\n"],"mappings":";;;;;;;;;;;AAqCA,MAAM,gBAAqC,OAAU,aAAqC;CACxF,MAAM,SAAS,EAAE,SAAS;CAC1B,KAAK,MAAM,OAAO,OAAO,KAAK,KAAK,GAAG;EAGpC,IAAI,QAAQ,YAAY;EACxB,OAAO,eAAe,QAAQ,KAAK;GACjC,YAAY;GACZ,cAAc;GACd,WAAY,MAAkC;EAChD,CAAC;CACH;CACA,OAAO;AACT;AAEA,MAAa,sBAAsB,WAAiC;CAClE,MAAM,mBAAmB,IAAI,gBAAgB;CAE7C,OAAO,QAAQ,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;EAErD,IAAI,UAAU,KAAA,GACZ,iBAAiB,OAAO,KAAK,UAAU,OAAO,SAAS,OAAO,KAAK,CAAC;CAExE,CAAC;CAED,MAAM,oBAAoB,iBAAiB,SAAS;CAEpD,OAAO,kBAAkB,SAAS,IAAI,qBAAqB,sBAAsB;AACnF;;;;;;;;;;;AAYA,MAAa,eAAe,OAAO,QAA6B,YAAmE;CAEjI,OAAO,QAAsB,mBAAmB,MAAM,GACtD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,2BAA2B,WAAiC;CACrE,OAAO,CACP,qBAAqB,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAC9C;AACA;AAGJ,MAAa,+BAAsJ,QAA6B,YAC3L;CAEL,MAAM,EAAC,OAAO,cAAc,SAAS,mBAAkB,WAAW,CAAC;CAEjE,MAAM,WAAY,cAAc,YAAY,wBAAwB,MAAM;CAIxE,MAAM,WAAoE,EAAE,aAAa,aAAa,QAAQ;EAAE;EAAQ,GAAG;CAAe,CAAC;CAM5I,OAAQ;EAAE;EAAU;EAAS,GAAG;CAAY;AAC/C;;;;AAkCA,SAAgB,gBACf,QAA6B,SAC3B,aACiF;CAElF,MAAM,eAAe,4BAA4B,QAAO,OAAO;CAE/D,MAAM,QAAQ,SAAS,cAAc,WAAW;CAEhD,OAAO,aAAa,OAAO,aAAa,QAAQ;AAClD"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { Cr as HTTPExceptionResponse, Lr as FavoriteAddWrite, Mr as FavoritePage, Ot as PreferencesRead, Pn as ListHistoryParams, en as PackListRead, kr as HistoryPage, mi as CategoryListRead, pi as CategoryPreferencesWrite, t as ValidationErrorResponse, zn as ListBiblioFavoritesParams } from "../chunks/index.js";
2
+ import { Ar as HistoryPage, Bn as ListBiblioFavoritesParams, Fn as ListHistoryParams, Nr as FavoritePage, Rr as FavoriteAddWrite, hi as CategoryListRead, kt as PreferencesRead, mi as CategoryPreferencesWrite, t as ValidationErrorResponse, tn as PackListRead, wr as HTTPExceptionResponse } 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-library/biblio-library.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.3.2
10
+ * OpenAPI spec version: 0.6.0
11
11
  */
12
12
  const withQueryKey = (query, queryKey) => {
13
13
  const result = { queryKey };