@learnorama/mozaik-sdk 0.8.2-staging.31.1 → 0.8.3-staging.32.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 (115) hide show
  1. package/dist/api/account.js.map +1 -1
  2. package/dist/api/admin-catalogue.js.map +1 -1
  3. package/dist/api/admin-consumption.js.map +1 -1
  4. package/dist/api/admin-desk.js.map +1 -1
  5. package/dist/api/admin-licenses.js.map +1 -1
  6. package/dist/api/admin-patrons.js.map +1 -1
  7. package/dist/api/admin-reviews.js.map +1 -1
  8. package/dist/api/admin-roles.js.map +1 -1
  9. package/dist/api/admin-support.js.map +1 -1
  10. package/dist/api/admin-tenants.js.map +1 -1
  11. package/dist/api/admin-tutoring.js.map +1 -1
  12. package/dist/api/auth.js.map +1 -1
  13. package/dist/api/biblio-catalogue.js.map +1 -1
  14. package/dist/api/biblio-home.js.map +1 -1
  15. package/dist/api/biblio-library.js.map +1 -1
  16. package/dist/api/biblio-nextory.js.map +1 -1
  17. package/dist/api/biblio-press.js.map +1 -1
  18. package/dist/api/biblio-search.js.map +1 -1
  19. package/dist/api/biblio-telemetry.js.map +1 -1
  20. package/dist/api/consumption.js.map +1 -1
  21. package/dist/api/cvs-app.js.map +1 -1
  22. package/dist/api/cvs-documents.js.map +1 -1
  23. package/dist/api/cvs-favorites.js.map +1 -1
  24. package/dist/api/cvs-ils.js.map +1 -1
  25. package/dist/api/cvs-loans.js.map +1 -1
  26. package/dist/api/cvs-payments.js.map +1 -1
  27. package/dist/api/cvs-streaming.js.map +1 -1
  28. package/dist/api/partner-catalogue.js.map +1 -1
  29. package/dist/api/partner-reader.js.map +1 -1
  30. package/dist/api/profiles.js.map +1 -1
  31. package/dist/api/search.js.map +1 -1
  32. package/dist/api/tutoring-catalogue.js.map +1 -1
  33. package/dist/api/tutoring-chat.js.map +1 -1
  34. package/dist/api/tutoring-dispatch.js.map +1 -1
  35. package/dist/api/tutoring-practitioner.js.map +1 -1
  36. package/dist/api/tutoring-requests.js.map +1 -1
  37. package/dist/chunks/index.d.ts +244 -237
  38. package/dist/index.d.ts +3 -3
  39. package/dist/index.js +3 -3
  40. package/dist/index.js.map +1 -1
  41. package/dist/models.js +4 -1
  42. package/dist/models.js.map +1 -1
  43. package/dist/react/account.js +1 -1
  44. package/dist/react/account.js.map +1 -1
  45. package/dist/react/admin-catalogue.js +1 -1
  46. package/dist/react/admin-catalogue.js.map +1 -1
  47. package/dist/react/admin-consumption.js +1 -1
  48. package/dist/react/admin-consumption.js.map +1 -1
  49. package/dist/react/admin-desk.js +1 -1
  50. package/dist/react/admin-desk.js.map +1 -1
  51. package/dist/react/admin-licenses.js +1 -1
  52. package/dist/react/admin-licenses.js.map +1 -1
  53. package/dist/react/admin-patrons.js +1 -1
  54. package/dist/react/admin-patrons.js.map +1 -1
  55. package/dist/react/admin-reviews.js +1 -1
  56. package/dist/react/admin-reviews.js.map +1 -1
  57. package/dist/react/admin-roles.js +1 -1
  58. package/dist/react/admin-roles.js.map +1 -1
  59. package/dist/react/admin-support.js +1 -1
  60. package/dist/react/admin-support.js.map +1 -1
  61. package/dist/react/admin-tenants.js +1 -1
  62. package/dist/react/admin-tenants.js.map +1 -1
  63. package/dist/react/admin-tutoring.js +1 -1
  64. package/dist/react/admin-tutoring.js.map +1 -1
  65. package/dist/react/auth.js +1 -1
  66. package/dist/react/auth.js.map +1 -1
  67. package/dist/react/biblio-catalogue.js +1 -1
  68. package/dist/react/biblio-catalogue.js.map +1 -1
  69. package/dist/react/biblio-home.js +1 -1
  70. package/dist/react/biblio-home.js.map +1 -1
  71. package/dist/react/biblio-library.js +1 -1
  72. package/dist/react/biblio-library.js.map +1 -1
  73. package/dist/react/biblio-nextory.js +1 -1
  74. package/dist/react/biblio-nextory.js.map +1 -1
  75. package/dist/react/biblio-press.js +1 -1
  76. package/dist/react/biblio-press.js.map +1 -1
  77. package/dist/react/biblio-search.js +1 -1
  78. package/dist/react/biblio-search.js.map +1 -1
  79. package/dist/react/biblio-telemetry.js +1 -1
  80. package/dist/react/biblio-telemetry.js.map +1 -1
  81. package/dist/react/consumption.js +1 -1
  82. package/dist/react/consumption.js.map +1 -1
  83. package/dist/react/cvs-app.js +1 -1
  84. package/dist/react/cvs-app.js.map +1 -1
  85. package/dist/react/cvs-documents.js +1 -1
  86. package/dist/react/cvs-documents.js.map +1 -1
  87. package/dist/react/cvs-favorites.js +1 -1
  88. package/dist/react/cvs-favorites.js.map +1 -1
  89. package/dist/react/cvs-ils.js +1 -1
  90. package/dist/react/cvs-ils.js.map +1 -1
  91. package/dist/react/cvs-loans.js +1 -1
  92. package/dist/react/cvs-loans.js.map +1 -1
  93. package/dist/react/cvs-payments.js +1 -1
  94. package/dist/react/cvs-payments.js.map +1 -1
  95. package/dist/react/cvs-streaming.js +1 -1
  96. package/dist/react/cvs-streaming.js.map +1 -1
  97. package/dist/react/partner-catalogue.js +1 -1
  98. package/dist/react/partner-catalogue.js.map +1 -1
  99. package/dist/react/partner-reader.js +1 -1
  100. package/dist/react/partner-reader.js.map +1 -1
  101. package/dist/react/profiles.js +1 -1
  102. package/dist/react/profiles.js.map +1 -1
  103. package/dist/react/search.js +1 -1
  104. package/dist/react/search.js.map +1 -1
  105. package/dist/react/tutoring-catalogue.js +1 -1
  106. package/dist/react/tutoring-catalogue.js.map +1 -1
  107. package/dist/react/tutoring-chat.js +1 -1
  108. package/dist/react/tutoring-chat.js.map +1 -1
  109. package/dist/react/tutoring-dispatch.js +1 -1
  110. package/dist/react/tutoring-dispatch.js.map +1 -1
  111. package/dist/react/tutoring-practitioner.js +1 -1
  112. package/dist/react/tutoring-practitioner.js.map +1 -1
  113. package/dist/react/tutoring-requests.js +1 -1
  114. package/dist/react/tutoring-requests.js.map +1 -1
  115. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"admin-consumption.js","names":[],"sources":["../../src/react/admin-consumption/admin-consumption.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.8.2\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query';\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query';\n\nimport type {\n HTTPExceptionResponse,\n LeaseCloseWrite,\n LiveLeaseListRead,\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 getListLiveLeasesUrl = () => {\n\n\n\n\n return `/admin/consumption/live`\n}\n\n/**\n * What is open right now, within the caller's tenant scope.\n *\n * Read from the ledger rather than the Redis live set: this is a diagnostic and\n * must show the truth even when the cache is cold, and it runs once when\n * somebody opens a screen rather than on every read.\n *\n * Shares :func:`~app.services.entitlement.is_live` with the two seat counts.\n * An earlier version of this route filtered on ``returned_at`` alone and so\n * listed every lapsed-but-unreaped lease as live — which made the screen look\n * exactly like a stuck reaper even when the reaper was fine.\n * @summary List Live Leases\n */\nexport const listLiveLeases = async ( options?: Parameters<typeof request>[1]): Promise<LiveLeaseListRead> => {\n\n return request<LiveLeaseListRead>(getListLiveLeasesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListLiveLeasesQueryKey = () => {\n return [\n `/admin/consumption/live`\n ] as const;\n }\n\n\nexport const getListLiveLeasesQueryOptions = <TData = Awaited<ReturnType<typeof listLiveLeases>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listLiveLeases>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListLiveLeasesQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listLiveLeases>>> = ({ signal }) => listLiveLeases({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listLiveLeases>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListLiveLeasesQueryResult = NonNullable<Awaited<ReturnType<typeof listLiveLeases>>>\nexport type ListLiveLeasesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListLiveLeases<TData = Awaited<ReturnType<typeof listLiveLeases>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listLiveLeases>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listLiveLeases>>,\n TError,\n Awaited<ReturnType<typeof listLiveLeases>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListLiveLeases<TData = Awaited<ReturnType<typeof listLiveLeases>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listLiveLeases>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listLiveLeases>>,\n TError,\n Awaited<ReturnType<typeof listLiveLeases>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListLiveLeases<TData = Awaited<ReturnType<typeof listLiveLeases>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listLiveLeases>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Live Leases\n */\n\nexport function useListLiveLeases<TData = Awaited<ReturnType<typeof listLiveLeases>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listLiveLeases>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListLiveLeasesQueryOptions(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 getForceCloseLeaseUrl = (eventId: number,) => {\n\n\n\n\n return `/admin/consumption/${eventId}`\n}\n\n/**\n * Force-close somebody else's lease. The legacy's ``FermeSessionAdherent``.\n *\n * Audited, which the legacy's was not: a button that ends a stranger's reading\n * session and leaves no trace is indistinguishable from abuse of the same\n * button. Tenant-scoped like every staff action, so a lease outside the\n * caller's scope is ``404`` rather than ``403``.\n * @summary Force Close Lease\n */\nexport const forceCloseLease = async (eventId: number,\n leaseCloseWrite: LeaseCloseWrite, 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>(getForceCloseLeaseUrl(eventId),\n {\n ...options,\n method: 'DELETE',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(leaseCloseWrite)\n }\n);}\n\n\n\n\n\nexport const getForceCloseLeaseMutationKey = () => ['forceCloseLease'] as const;\n\nexport const getForceCloseLeaseMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof forceCloseLease>>, TError,ForceCloseLeaseMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof forceCloseLease>>, TError,ForceCloseLeaseMutationVariables, TContext> => {\n\nconst mutationKey = getForceCloseLeaseMutationKey();\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 forceCloseLease>>, ForceCloseLeaseMutationVariables> = (props) => {\n const {eventId,data} = props ?? {};\n\n return forceCloseLease(eventId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type ForceCloseLeaseMutationResult = NonNullable<Awaited<ReturnType<typeof forceCloseLease>>>\n export type ForceCloseLeaseMutationBody = BodyType<LeaseCloseWrite>\n export type ForceCloseLeaseMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type ForceCloseLeaseMutationVariables = {eventId: number;data: BodyType<LeaseCloseWrite>}\n\n /**\n * @summary Force Close Lease\n */\nexport const useForceCloseLease = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof forceCloseLease>>, TError,ForceCloseLeaseMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof forceCloseLease>>,\n TError,\n ForceCloseLeaseMutationVariables,\n TContext\n > => {\n return useMutation(getForceCloseLeaseMutationOptions(options), queryClient);\n }\n"],"mappings":";;;;;;;;;;;AAyCA,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,6BAA6B;CAKxC,OAAO;AACT;;;;;;;;;;;;;;AAeA,MAAa,iBAAiB,OAAQ,YAAwE;CAE5G,OAAO,QAA2B,qBAAqB,GACvD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,kCAAkC;CAC3C,OAAO,CACP,yBACA;AACA;AAGJ,MAAa,iCAA2J,YACnK;CAEL,MAAM,EAAC,OAAO,cAAc,SAAS,mBAAkB,WAAW,CAAC;CAEjE,MAAM,WAAY,cAAc,YAAY,0BAA0B;CAIpE,MAAM,WAAsE,EAAE,aAAa,eAAe;EAAE;EAAQ,GAAG;CAAe,CAAC;CAMxI,OAAQ;EAAE;EAAU;EAAS,GAAG;CAAY;AAC/C;;;;AAkCA,SAAgB,kBACd,SACC,aACiF;CAElF,MAAM,eAAe,8BAA8B,OAAO;CAE1D,MAAM,QAAQ,SAAS,cAAc,WA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OAAO,YAAY,kCAAkC,OAAO,GAAG,WAAW;AAC5E"}
1
+ {"version":3,"file":"admin-consumption.js","names":[],"sources":["../../src/react/admin-consumption/admin-consumption.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.8.3\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query';\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query';\n\nimport type {\n HTTPExceptionResponse,\n LeaseCloseWrite,\n LiveLeaseListRead,\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 getListLiveLeasesUrl = () => {\n\n\n\n\n return `/admin/consumption/live`\n}\n\n/**\n * What is open right now, within the caller's tenant scope.\n *\n * Read from the ledger rather than the Redis live set: this is a diagnostic and\n * must show the truth even when the cache is cold, and it runs once when\n * somebody opens a screen rather than on every read.\n *\n * Shares :func:`~app.services.entitlement.is_live` with the two seat counts.\n * An earlier version of this route filtered on ``returned_at`` alone and so\n * listed every lapsed-but-unreaped lease as live — which made the screen look\n * exactly like a stuck reaper even when the reaper was fine.\n * @summary List Live Leases\n */\nexport const listLiveLeases = async ( options?: Parameters<typeof request>[1]): Promise<LiveLeaseListRead> => {\n\n return request<LiveLeaseListRead>(getListLiveLeasesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListLiveLeasesQueryKey = () => {\n return [\n `/admin/consumption/live`\n ] as const;\n }\n\n\nexport const getListLiveLeasesQueryOptions = <TData = Awaited<ReturnType<typeof listLiveLeases>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listLiveLeases>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListLiveLeasesQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listLiveLeases>>> = ({ signal }) => listLiveLeases({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listLiveLeases>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListLiveLeasesQueryResult = NonNullable<Awaited<ReturnType<typeof listLiveLeases>>>\nexport type ListLiveLeasesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListLiveLeases<TData = Awaited<ReturnType<typeof listLiveLeases>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listLiveLeases>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listLiveLeases>>,\n TError,\n Awaited<ReturnType<typeof listLiveLeases>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListLiveLeases<TData = Awaited<ReturnType<typeof listLiveLeases>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listLiveLeases>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listLiveLeases>>,\n TError,\n Awaited<ReturnType<typeof listLiveLeases>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListLiveLeases<TData = Awaited<ReturnType<typeof listLiveLeases>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listLiveLeases>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Live Leases\n */\n\nexport function useListLiveLeases<TData = Awaited<ReturnType<typeof listLiveLeases>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listLiveLeases>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListLiveLeasesQueryOptions(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 getForceCloseLeaseUrl = (eventId: number,) => {\n\n\n\n\n return `/admin/consumption/${eventId}`\n}\n\n/**\n * Force-close somebody else's lease. The legacy's ``FermeSessionAdherent``.\n *\n * Audited, which the legacy's was not: a button that ends a stranger's reading\n * session and leaves no trace is indistinguishable from abuse of the same\n * button. Tenant-scoped like every staff action, so a lease outside the\n * caller's scope is ``404`` rather than ``403``.\n * @summary Force Close Lease\n */\nexport const forceCloseLease = async (eventId: number,\n leaseCloseWrite: LeaseCloseWrite, 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>(getForceCloseLeaseUrl(eventId),\n {\n ...options,\n method: 'DELETE',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(leaseCloseWrite)\n }\n);}\n\n\n\n\n\nexport const getForceCloseLeaseMutationKey = () => ['forceCloseLease'] as const;\n\nexport const getForceCloseLeaseMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof forceCloseLease>>, TError,ForceCloseLeaseMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof forceCloseLease>>, TError,ForceCloseLeaseMutationVariables, TContext> => {\n\nconst mutationKey = getForceCloseLeaseMutationKey();\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 forceCloseLease>>, ForceCloseLeaseMutationVariables> = (props) => {\n const {eventId,data} = props ?? {};\n\n return forceCloseLease(eventId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type ForceCloseLeaseMutationResult = NonNullable<Awaited<ReturnType<typeof forceCloseLease>>>\n export type ForceCloseLeaseMutationBody = BodyType<LeaseCloseWrite>\n export type ForceCloseLeaseMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type ForceCloseLeaseMutationVariables = {eventId: number;data: BodyType<LeaseCloseWrite>}\n\n /**\n * @summary Force Close Lease\n */\nexport const useForceCloseLease = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof forceCloseLease>>, TError,ForceCloseLeaseMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof forceCloseLease>>,\n TError,\n ForceCloseLeaseMutationVariables,\n TContext\n > => {\n return useMutation(getForceCloseLeaseMutationOptions(options), queryClient);\n }\n"],"mappings":";;;;;;;;;;;AAyCA,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,6BAA6B;CAKxC,OAAO;AACT;;;;;;;;;;;;;;AAeA,MAAa,iBAAiB,OAAQ,YAAwE;CAE5G,OAAO,QAA2B,qBAAqB,GACvD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,kCAAkC;CAC3C,OAAO,CACP,yBACA;AACA;AAGJ,MAAa,iCAA2J,YACnK;CAEL,MAAM,EAAC,OAAO,cAAc,SAAS,mBAAkB,WAAW,CAAC;CAEjE,MAAM,WAAY,cAAc,YAAY,0BAA0B;CAIpE,MAAM,WAAsE,EAAE,aAAa,eAAe;EAAE;EAAQ,GAAG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,EAAC,SAAQ,SAAQ,SAAS,CAAC;EAEjC,OAAQ,gBAAgB,SAAQ,MAAK,cAAc;CACrD;CAON,OAAQ;EAAE;EAAY,GAAG;CAAgB;AAAC;;;;AAU5C,MAAa,sBACW,SACrB,gBAKQ;CACL,OAAO,YAAY,kCAAkC,OAAO,GAAG,WAAW;AAC5E"}
@@ -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.8.2
10
+ * OpenAPI spec version: 0.8.3
11
11
  */
12
12
  const withQueryKey = (query, queryKey) => {
13
13
  const result = { queryKey };