@learnorama/mozaik-sdk 0.20.0-staging.61.1 → 0.20.2-staging.63.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COURSES.md +18 -1
- package/CVS-PLAYBACK.md +9 -1
- package/OFFLINE.md +14 -2
- package/dist/api/account.d.ts +1 -1
- package/dist/api/account.js.map +1 -1
- package/dist/api/admin-catalogue.d.ts +1 -1
- package/dist/api/admin-catalogue.js.map +1 -1
- package/dist/api/admin-consumption.d.ts +1 -1
- package/dist/api/admin-consumption.js.map +1 -1
- package/dist/api/admin-contracts.d.ts +1 -1
- package/dist/api/admin-contracts.js.map +1 -1
- package/dist/api/admin-customer.d.ts +1 -1
- package/dist/api/admin-customer.js.map +1 -1
- package/dist/api/admin-desk.d.ts +1 -1
- package/dist/api/admin-desk.js.map +1 -1
- package/dist/api/admin-licenses.d.ts +1 -1
- package/dist/api/admin-licenses.js.map +1 -1
- package/dist/api/admin-partner-selections.d.ts +1 -1
- package/dist/api/admin-partner-selections.js.map +1 -1
- package/dist/api/admin-patrons.d.ts +1 -1
- package/dist/api/admin-patrons.js.map +1 -1
- package/dist/api/admin-reviews.d.ts +1 -1
- package/dist/api/admin-reviews.js.map +1 -1
- package/dist/api/admin-roles.d.ts +1 -1
- package/dist/api/admin-roles.js.map +1 -1
- package/dist/api/admin-support.d.ts +1 -1
- package/dist/api/admin-support.js.map +1 -1
- package/dist/api/admin-tenants.d.ts +1 -1
- package/dist/api/admin-tenants.js.map +1 -1
- package/dist/api/admin-tutoring.d.ts +1 -1
- package/dist/api/admin-tutoring.js.map +1 -1
- package/dist/api/admin-vod.d.ts +1 -1
- package/dist/api/admin-vod.js.map +1 -1
- package/dist/api/auth-device.d.ts +1 -1
- package/dist/api/auth-device.js.map +1 -1
- package/dist/api/auth.d.ts +1 -1
- package/dist/api/auth.js.map +1 -1
- package/dist/api/biblio-billing-webhooks.d.ts +1 -1
- package/dist/api/biblio-billing-webhooks.js.map +1 -1
- package/dist/api/biblio-billing.d.ts +1 -1
- package/dist/api/biblio-billing.js.map +1 -1
- package/dist/api/biblio-catalogue.d.ts +7 -1
- package/dist/api/biblio-catalogue.js +14 -1
- package/dist/api/biblio-catalogue.js.map +1 -1
- package/dist/api/biblio-home.d.ts +1 -1
- package/dist/api/biblio-home.js.map +1 -1
- package/dist/api/biblio-learning-author-profiles.d.ts +1 -1
- package/dist/api/biblio-learning-author-profiles.js.map +1 -1
- package/dist/api/biblio-learning-authoring.d.ts +1 -1
- package/dist/api/biblio-learning-authoring.js.map +1 -1
- package/dist/api/biblio-learning-editorial.d.ts +1 -1
- package/dist/api/biblio-learning-editorial.js.map +1 -1
- package/dist/api/biblio-learning-feedback.d.ts +1 -1
- package/dist/api/biblio-learning-feedback.js.map +1 -1
- package/dist/api/biblio-learning-finance.d.ts +1 -1
- package/dist/api/biblio-learning-finance.js.map +1 -1
- package/dist/api/biblio-learning-integrations.d.ts +1 -1
- package/dist/api/biblio-learning-integrations.js.map +1 -1
- package/dist/api/biblio-learning-membership.d.ts +1 -1
- package/dist/api/biblio-learning-membership.js.map +1 -1
- package/dist/api/biblio-learning.d.ts +1 -1
- package/dist/api/biblio-learning.js.map +1 -1
- package/dist/api/biblio-library.d.ts +1 -1
- package/dist/api/biblio-library.js.map +1 -1
- package/dist/api/biblio-nextory.d.ts +1 -1
- package/dist/api/biblio-nextory.js.map +1 -1
- package/dist/api/biblio-press.d.ts +19 -1
- package/dist/api/biblio-press.js +40 -1
- package/dist/api/biblio-press.js.map +1 -1
- package/dist/api/biblio-search.d.ts +1 -1
- package/dist/api/biblio-search.js.map +1 -1
- package/dist/api/biblio-telemetry.d.ts +1 -1
- package/dist/api/biblio-telemetry.js.map +1 -1
- package/dist/api/biblio-youscribe.js.map +1 -1
- package/dist/api/consumption.d.ts +2 -2
- package/dist/api/consumption.js.map +1 -1
- package/dist/api/cvs-app.d.ts +1 -1
- package/dist/api/cvs-app.js.map +1 -1
- package/dist/api/cvs-documents.d.ts +1 -1
- package/dist/api/cvs-documents.js.map +1 -1
- package/dist/api/cvs-favorites.d.ts +1 -1
- package/dist/api/cvs-favorites.js.map +1 -1
- package/dist/api/cvs-ils.d.ts +1 -1
- package/dist/api/cvs-ils.js.map +1 -1
- package/dist/api/cvs-loans.d.ts +1 -1
- package/dist/api/cvs-loans.js.map +1 -1
- package/dist/api/cvs-payments.d.ts +1 -1
- package/dist/api/cvs-payments.js.map +1 -1
- package/dist/api/cvs-streaming.d.ts +1 -1
- package/dist/api/cvs-streaming.js.map +1 -1
- package/dist/api/index.d.ts +3 -3
- package/dist/api/index.js +3 -3
- package/dist/api/partner-catalogue.d.ts +1 -1
- package/dist/api/partner-catalogue.js.map +1 -1
- package/dist/api/partner-reader-nextory.d.ts +1 -1
- package/dist/api/partner-reader-nextory.js.map +1 -1
- package/dist/api/partner-reader-youscribe.d.ts +1 -1
- package/dist/api/partner-reader-youscribe.js.map +1 -1
- package/dist/api/partner-reading.d.ts +1 -1
- package/dist/api/partner-reading.js.map +1 -1
- package/dist/api/profiles.d.ts +1 -1
- package/dist/api/profiles.js.map +1 -1
- package/dist/api/search.d.ts +1 -1
- package/dist/api/search.js.map +1 -1
- package/dist/api/tutoring-catalogue.d.ts +1 -1
- package/dist/api/tutoring-catalogue.js.map +1 -1
- package/dist/api/tutoring-chat.d.ts +1 -1
- package/dist/api/tutoring-chat.js.map +1 -1
- package/dist/api/tutoring-dispatch.d.ts +1 -1
- package/dist/api/tutoring-dispatch.js.map +1 -1
- package/dist/api/tutoring-practitioner.d.ts +1 -1
- package/dist/api/tutoring-practitioner.js.map +1 -1
- package/dist/api/tutoring-requests.d.ts +1 -1
- package/dist/api/tutoring-requests.js.map +1 -1
- package/dist/chunks/client2.d.ts +1 -1
- package/dist/chunks/connection.d.ts +1 -1
- package/dist/chunks/index.d.ts +768 -645
- package/dist/chunks/index2.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +2 -2
- package/dist/models.js +23 -3
- package/dist/models.js.map +1 -1
- package/dist/react/account.d.ts +1 -1
- package/dist/react/account.js +1 -1
- package/dist/react/account.js.map +1 -1
- package/dist/react/admin-catalogue.d.ts +1 -1
- package/dist/react/admin-catalogue.js +1 -1
- package/dist/react/admin-catalogue.js.map +1 -1
- package/dist/react/admin-consumption.d.ts +1 -1
- package/dist/react/admin-consumption.js +1 -1
- package/dist/react/admin-consumption.js.map +1 -1
- package/dist/react/admin-contracts.d.ts +1 -1
- package/dist/react/admin-contracts.js +1 -1
- package/dist/react/admin-contracts.js.map +1 -1
- package/dist/react/admin-customer.d.ts +1 -1
- package/dist/react/admin-customer.js +1 -1
- package/dist/react/admin-customer.js.map +1 -1
- package/dist/react/admin-desk.d.ts +1 -1
- package/dist/react/admin-desk.js +1 -1
- package/dist/react/admin-desk.js.map +1 -1
- package/dist/react/admin-licenses.d.ts +1 -1
- package/dist/react/admin-licenses.js +1 -1
- package/dist/react/admin-licenses.js.map +1 -1
- package/dist/react/admin-partner-selections.d.ts +1 -1
- package/dist/react/admin-partner-selections.js +1 -1
- package/dist/react/admin-partner-selections.js.map +1 -1
- package/dist/react/admin-patrons.d.ts +1 -1
- package/dist/react/admin-patrons.js +1 -1
- package/dist/react/admin-patrons.js.map +1 -1
- package/dist/react/admin-reviews.d.ts +1 -1
- package/dist/react/admin-reviews.js +1 -1
- package/dist/react/admin-reviews.js.map +1 -1
- package/dist/react/admin-roles.d.ts +1 -1
- package/dist/react/admin-roles.js +1 -1
- package/dist/react/admin-roles.js.map +1 -1
- package/dist/react/admin-support.d.ts +1 -1
- package/dist/react/admin-support.js +1 -1
- package/dist/react/admin-support.js.map +1 -1
- package/dist/react/admin-tenants.d.ts +1 -1
- package/dist/react/admin-tenants.js +1 -1
- package/dist/react/admin-tenants.js.map +1 -1
- package/dist/react/admin-tutoring.d.ts +1 -1
- package/dist/react/admin-tutoring.js +1 -1
- package/dist/react/admin-tutoring.js.map +1 -1
- package/dist/react/admin-vod.d.ts +1 -1
- package/dist/react/admin-vod.js +1 -1
- package/dist/react/admin-vod.js.map +1 -1
- package/dist/react/auth-device.d.ts +1 -1
- package/dist/react/auth-device.js +1 -1
- package/dist/react/auth-device.js.map +1 -1
- package/dist/react/auth.d.ts +1 -1
- package/dist/react/auth.js +1 -1
- package/dist/react/auth.js.map +1 -1
- package/dist/react/biblio-billing-webhooks.d.ts +1 -1
- package/dist/react/biblio-billing-webhooks.js +1 -1
- package/dist/react/biblio-billing-webhooks.js.map +1 -1
- package/dist/react/biblio-billing.d.ts +1 -1
- package/dist/react/biblio-billing.js +1 -1
- package/dist/react/biblio-billing.js.map +1 -1
- package/dist/react/biblio-catalogue.d.ts +24 -1
- package/dist/react/biblio-catalogue.js +43 -2
- package/dist/react/biblio-catalogue.js.map +1 -1
- package/dist/react/biblio-home.d.ts +1 -1
- package/dist/react/biblio-home.js +1 -1
- package/dist/react/biblio-home.js.map +1 -1
- package/dist/react/biblio-learning-author-profiles.d.ts +1 -1
- package/dist/react/biblio-learning-author-profiles.js +1 -1
- package/dist/react/biblio-learning-author-profiles.js.map +1 -1
- package/dist/react/biblio-learning-authoring.d.ts +1 -1
- package/dist/react/biblio-learning-authoring.js +1 -1
- package/dist/react/biblio-learning-authoring.js.map +1 -1
- package/dist/react/biblio-learning-editorial.d.ts +1 -1
- package/dist/react/biblio-learning-editorial.js +1 -1
- package/dist/react/biblio-learning-editorial.js.map +1 -1
- package/dist/react/biblio-learning-feedback.d.ts +1 -1
- package/dist/react/biblio-learning-feedback.js +1 -1
- package/dist/react/biblio-learning-feedback.js.map +1 -1
- package/dist/react/biblio-learning-finance.d.ts +1 -1
- package/dist/react/biblio-learning-finance.js +1 -1
- package/dist/react/biblio-learning-finance.js.map +1 -1
- package/dist/react/biblio-learning-integrations.d.ts +1 -1
- package/dist/react/biblio-learning-integrations.js +1 -1
- package/dist/react/biblio-learning-integrations.js.map +1 -1
- package/dist/react/biblio-learning-membership.d.ts +1 -1
- package/dist/react/biblio-learning-membership.js +1 -1
- package/dist/react/biblio-learning-membership.js.map +1 -1
- package/dist/react/biblio-learning.d.ts +1 -1
- package/dist/react/biblio-learning.js +1 -1
- package/dist/react/biblio-learning.js.map +1 -1
- package/dist/react/biblio-library.d.ts +1 -1
- package/dist/react/biblio-library.js +1 -1
- package/dist/react/biblio-library.js.map +1 -1
- package/dist/react/biblio-nextory.d.ts +1 -1
- package/dist/react/biblio-nextory.js +1 -1
- package/dist/react/biblio-nextory.js.map +1 -1
- package/dist/react/biblio-press.d.ts +91 -1
- package/dist/react/biblio-press.js +118 -2
- package/dist/react/biblio-press.js.map +1 -1
- package/dist/react/biblio-search.d.ts +1 -1
- package/dist/react/biblio-search.js +1 -1
- package/dist/react/biblio-search.js.map +1 -1
- package/dist/react/biblio-telemetry.d.ts +1 -1
- package/dist/react/biblio-telemetry.js +1 -1
- package/dist/react/biblio-telemetry.js.map +1 -1
- package/dist/react/biblio-youscribe.d.ts +1 -1
- package/dist/react/biblio-youscribe.js +1 -1
- package/dist/react/biblio-youscribe.js.map +1 -1
- package/dist/react/chat.d.ts +1 -1
- package/dist/react/consumption.d.ts +2 -2
- package/dist/react/consumption.js +1 -1
- package/dist/react/consumption.js.map +1 -1
- package/dist/react/cvs-app.d.ts +1 -1
- package/dist/react/cvs-app.js +1 -1
- package/dist/react/cvs-app.js.map +1 -1
- package/dist/react/cvs-documents.d.ts +1 -1
- package/dist/react/cvs-documents.js +1 -1
- package/dist/react/cvs-documents.js.map +1 -1
- package/dist/react/cvs-favorites.d.ts +1 -1
- package/dist/react/cvs-favorites.js +1 -1
- package/dist/react/cvs-favorites.js.map +1 -1
- package/dist/react/cvs-ils.d.ts +1 -1
- package/dist/react/cvs-ils.js +1 -1
- package/dist/react/cvs-ils.js.map +1 -1
- package/dist/react/cvs-loans.d.ts +1 -1
- package/dist/react/cvs-loans.js +1 -1
- package/dist/react/cvs-loans.js.map +1 -1
- package/dist/react/cvs-payments.d.ts +1 -1
- package/dist/react/cvs-payments.js +1 -1
- package/dist/react/cvs-payments.js.map +1 -1
- package/dist/react/cvs-streaming.d.ts +1 -1
- package/dist/react/cvs-streaming.js +1 -1
- package/dist/react/cvs-streaming.js.map +1 -1
- package/dist/react/index.d.ts +3 -3
- package/dist/react/index.js +3 -3
- package/dist/react/partner-catalogue.d.ts +1 -1
- package/dist/react/partner-catalogue.js +1 -1
- package/dist/react/partner-catalogue.js.map +1 -1
- package/dist/react/partner-reader-nextory.d.ts +1 -1
- package/dist/react/partner-reader-nextory.js +1 -1
- package/dist/react/partner-reader-nextory.js.map +1 -1
- package/dist/react/partner-reader-youscribe.d.ts +1 -1
- package/dist/react/partner-reader-youscribe.js +1 -1
- package/dist/react/partner-reader-youscribe.js.map +1 -1
- package/dist/react/partner-reading.d.ts +1 -1
- package/dist/react/partner-reading.js +1 -1
- package/dist/react/partner-reading.js.map +1 -1
- package/dist/react/profiles.d.ts +1 -1
- package/dist/react/profiles.js +1 -1
- package/dist/react/profiles.js.map +1 -1
- package/dist/react/search.d.ts +1 -1
- package/dist/react/search.js +1 -1
- package/dist/react/search.js.map +1 -1
- package/dist/react/tutoring-catalogue.d.ts +1 -1
- package/dist/react/tutoring-catalogue.js +1 -1
- package/dist/react/tutoring-catalogue.js.map +1 -1
- package/dist/react/tutoring-chat.d.ts +1 -1
- package/dist/react/tutoring-chat.js +1 -1
- package/dist/react/tutoring-chat.js.map +1 -1
- package/dist/react/tutoring-dispatch.d.ts +1 -1
- package/dist/react/tutoring-dispatch.js +1 -1
- package/dist/react/tutoring-dispatch.js.map +1 -1
- package/dist/react/tutoring-practitioner.d.ts +1 -1
- package/dist/react/tutoring-practitioner.js +1 -1
- package/dist/react/tutoring-practitioner.js.map +1 -1
- package/dist/react/tutoring-requests.d.ts +1 -1
- package/dist/react/tutoring-requests.js +1 -1
- package/dist/react/tutoring-requests.js.map +1 -1
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { T as ValidationErrorResponse, cn as ReadHostedPackageParams, fn as ReaderPackageRead, i as YouScribeAuthRead, ma as OfflineVerificationKeyRead, n as YouScribeDownloadRead, nd as HTTPExceptionResponse, t as YouScribeReaderRead } 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/partner-reader-youscribe/partner-reader-youscribe.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.20.
|
|
10
|
+
* OpenAPI spec version: 0.20.2
|
|
11
11
|
*/
|
|
12
12
|
const withQueryKey = (query, queryKey) => {
|
|
13
13
|
const result = { queryKey };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partner-reader-youscribe.js","names":[],"sources":["../../src/react/partner-reader-youscribe/partner-reader-youscribe.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.20.0\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query';\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query';\n\nimport type {\n HTTPExceptionResponse,\n OfflineVerificationKeyRead,\n ReadHostedPackageParams,\n ReaderPackageRead,\n ValidationErrorResponse,\n YouScribeAuthRead,\n YouScribeDownloadRead,\n YouScribeReaderRead\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 getReadYouscribeDownloadVerificationKeyUrl = () => {\n\n\n\n\n return `/partners/youscribe/download-verification-key`\n}\n\n/**\n * Fetch the current public verification key over the authenticated online channel.\n * @summary Read Youscribe Download Verification Key\n */\nexport const readYouscribeDownloadVerificationKey = async ( options?: Parameters<typeof request>[1]): Promise<OfflineVerificationKeyRead> => {\n\n return request<OfflineVerificationKeyRead>(getReadYouscribeDownloadVerificationKeyUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadYouscribeDownloadVerificationKeyQueryKey = () => {\n return [\n `/partners/youscribe/download-verification-key`\n ] as const;\n }\n\n\nexport const getReadYouscribeDownloadVerificationKeyQueryOptions = <TData = Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadYouscribeDownloadVerificationKeyQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>> = ({ signal }) => readYouscribeDownloadVerificationKey({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadYouscribeDownloadVerificationKeyQueryResult = NonNullable<Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>>\nexport type ReadYouscribeDownloadVerificationKeyQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadYouscribeDownloadVerificationKey<TData = Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>,\n TError,\n Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadYouscribeDownloadVerificationKey<TData = Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>,\n TError,\n Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadYouscribeDownloadVerificationKey<TData = Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Youscribe Download Verification Key\n */\n\nexport function useReadYouscribeDownloadVerificationKey<TData = Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadYouscribeDownloadVerificationKeyQueryOptions(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 getAcquireYouscribeDownloadUrl = (mediaId: number,) => {\n\n\n\n\n return `/partners/youscribe/media/${mediaId}/downloads`\n}\n\n/**\n * Authorize SDK acquisition for an existing seat. Creates neither a subscription nor a reading event.\n * @summary Acquire Youscribe Download\n */\nexport const acquireYouscribeDownload = async (mediaId: number, options?: Parameters<typeof request>[1]): Promise<YouScribeDownloadRead> => {\n\n return request<YouScribeDownloadRead>(getAcquireYouscribeDownloadUrl(mediaId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n\n\n\nexport const getAcquireYouscribeDownloadMutationKey = () => ['acquireYouscribeDownload'] as const;\n\nexport const getAcquireYouscribeDownloadMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof acquireYouscribeDownload>>, TError,AcquireYouscribeDownloadMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof acquireYouscribeDownload>>, TError,AcquireYouscribeDownloadMutationVariables, TContext> => {\n\nconst mutationKey = getAcquireYouscribeDownloadMutationKey();\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 acquireYouscribeDownload>>, AcquireYouscribeDownloadMutationVariables> = (props) => {\n const {mediaId} = props ?? {};\n\n return acquireYouscribeDownload(mediaId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AcquireYouscribeDownloadMutationResult = NonNullable<Awaited<ReturnType<typeof acquireYouscribeDownload>>>\n\n export type AcquireYouscribeDownloadMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type AcquireYouscribeDownloadMutationVariables = {mediaId: number}\n\n /**\n * @summary Acquire Youscribe Download\n */\nexport const useAcquireYouscribeDownload = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof acquireYouscribeDownload>>, TError,AcquireYouscribeDownloadMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof acquireYouscribeDownload>>,\n TError,\n AcquireYouscribeDownloadMutationVariables,\n TContext\n > => {\n return useMutation(getAcquireYouscribeDownloadMutationOptions(options), queryClient);\n }\n export const getReadHostedPackageUrl = (mediaId: number,\n params?: ReadHostedPackageParams,) => {\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 ? `/partners/youscribe/media/${mediaId}/package?${stringifiedParams}` : `/partners/youscribe/media/${mediaId}/package`\n}\n\n/**\n * **Deprecated**: the hosted reader's address and a lease. As in 0.13.0.\n *\n * Requires a seat already taken and never takes one: a GET does not buy a\n * subscription.\n * @deprecated\n * @summary Read Hosted Package\n */\nexport const readHostedPackage = async (mediaId: number,\n params?: ReadHostedPackageParams, options?: Parameters<typeof request>[1]): Promise<ReaderPackageRead> => {\n\n return request<ReaderPackageRead>(getReadHostedPackageUrl(mediaId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadHostedPackageQueryKey = (mediaId: number,\n params?: ReadHostedPackageParams,) => {\n return [\n `/partners/youscribe/media/${mediaId}/package`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadHostedPackageQueryOptions = <TData = Awaited<ReturnType<typeof readHostedPackage>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(mediaId: number,\n params?: ReadHostedPackageParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHostedPackage>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadHostedPackageQueryKey(mediaId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readHostedPackage>>> = ({ signal }) => readHostedPackage(mediaId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: mediaId !== null && mediaId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readHostedPackage>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadHostedPackageQueryResult = NonNullable<Awaited<ReturnType<typeof readHostedPackage>>>\nexport type ReadHostedPackageQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadHostedPackage<TData = Awaited<ReturnType<typeof readHostedPackage>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n mediaId: number,\n params: undefined | ReadHostedPackageParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHostedPackage>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readHostedPackage>>,\n TError,\n Awaited<ReturnType<typeof readHostedPackage>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadHostedPackage<TData = Awaited<ReturnType<typeof readHostedPackage>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n mediaId: number,\n params?: ReadHostedPackageParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHostedPackage>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readHostedPackage>>,\n TError,\n Awaited<ReturnType<typeof readHostedPackage>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadHostedPackage<TData = Awaited<ReturnType<typeof readHostedPackage>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n mediaId: number,\n params?: ReadHostedPackageParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHostedPackage>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @deprecated\n * @summary Read Hosted Package\n */\n\nexport function useReadHostedPackage<TData = Awaited<ReturnType<typeof readHostedPackage>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n mediaId: number,\n params?: ReadHostedPackageParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHostedPackage>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadHostedPackageQueryOptions(mediaId,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 getOpenNativeReaderUrl = (mediaId: number,) => {\n\n\n\n\n return `/partners/youscribe/media/${mediaId}/reader-auth`\n}\n\n/**\n * **Deprecated**: ``POST …/reader-access/embedded``, which takes the seat too. As in 0.13.0.\n *\n * Credentials for one title, taking a seat on first use, and the consumption\n * lease that records the opening. Renew ``lease.eventId`` while the reader is\n * open and close it when it exits.\n * @deprecated\n * @summary Open Native Reader\n */\nexport const openNativeReader = async (mediaId: number, options?: Parameters<typeof request>[1]): Promise<YouScribeReaderRead> => {\n\n return request<YouScribeReaderRead>(getOpenNativeReaderUrl(mediaId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n\n\n\nexport const getOpenNativeReaderMutationKey = () => ['openNativeReader'] as const;\n\nexport const getOpenNativeReaderMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof openNativeReader>>, TError,OpenNativeReaderMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof openNativeReader>>, TError,OpenNativeReaderMutationVariables, TContext> => {\n\nconst mutationKey = getOpenNativeReaderMutationKey();\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 openNativeReader>>, OpenNativeReaderMutationVariables> = (props) => {\n const {mediaId} = props ?? {};\n\n return openNativeReader(mediaId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type OpenNativeReaderMutationResult = NonNullable<Awaited<ReturnType<typeof openNativeReader>>>\n\n export type OpenNativeReaderMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type OpenNativeReaderMutationVariables = {mediaId: number}\n\n /**\n * @deprecated\n * @summary Open Native Reader\n */\nexport const useOpenNativeReader = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof openNativeReader>>, TError,OpenNativeReaderMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof openNativeReader>>,\n TError,\n OpenNativeReaderMutationVariables,\n TContext\n > => {\n return useMutation(getOpenNativeReaderMutationOptions(options), queryClient);\n }\n export const getReadNativeAuthUrl = () => {\n\n\n\n\n return `/partners/youscribe/user/auth`\n}\n\n/**\n * YouScribe native SDK credentials for the selected, authorized profile.\n *\n * **Deprecated.** ``POST /partners/youscribe/media/{id}/reader-access/embedded``\n * answers the same credentials with the opening, and records it. This stays\n * while the current mobile app migrates, then goes.\n *\n * The legacy's ``GET /api/v1/{catalog}/user/auth``, and the only YouScribe\n * credentials endpoint — because a YouScribe token is issued **per patron and\n * not per title**, so an authorization keyed by media was answering a question\n * nobody asked. ``POST /media/{id}/reader-auth`` and ``POST /user/auth`` were\n * both this endpoint again: the first added a ``mediaId`` the caller already\n * knew, the second provisioned a seat it no longer provisions.\n *\n * **This is an authentication, not a read.** It exchanges the patron's licence\n * for a session token on YouScribe's REST API, and nothing follows from it: a\n * caller may ask for a token and never open a title. So there is no licence to\n * create and no consumption to record here, not as a policy but because\n * nothing has been consumed.\n *\n * The reading itself happens in the partner's own player — hosted on the web,\n * through their SDK inside the mobile app — and that player reports its\n * consumption to YouScribe. Which is why the opening is recorded by\n * reader-access and not here: it is the one call a client makes on Read.\n *\n * The token is personal: never persist it, log it, or share it between\n * profiles.\n * @deprecated\n * @summary Read Native Auth\n */\nexport const readNativeAuth = async ( options?: Parameters<typeof request>[1]): Promise<YouScribeAuthRead> => {\n\n return request<YouScribeAuthRead>(getReadNativeAuthUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadNativeAuthQueryKey = () => {\n return [\n `/partners/youscribe/user/auth`\n ] as const;\n }\n\n\nexport const getReadNativeAuthQueryOptions = <TData = Awaited<ReturnType<typeof readNativeAuth>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readNativeAuth>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadNativeAuthQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readNativeAuth>>> = ({ signal }) => readNativeAuth({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readNativeAuth>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadNativeAuthQueryResult = NonNullable<Awaited<ReturnType<typeof readNativeAuth>>>\nexport type ReadNativeAuthQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadNativeAuth<TData = Awaited<ReturnType<typeof readNativeAuth>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readNativeAuth>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readNativeAuth>>,\n TError,\n Awaited<ReturnType<typeof readNativeAuth>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadNativeAuth<TData = Awaited<ReturnType<typeof readNativeAuth>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readNativeAuth>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readNativeAuth>>,\n TError,\n Awaited<ReturnType<typeof readNativeAuth>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadNativeAuth<TData = Awaited<ReturnType<typeof readNativeAuth>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readNativeAuth>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @deprecated\n * @summary Read Native Auth\n */\n\nexport function useReadNativeAuth<TData = Awaited<ReturnType<typeof readNativeAuth>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readNativeAuth>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadNativeAuthQueryOptions(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 getOpenNativeAuthUrl = () => {\n\n\n\n\n return `/partners/youscribe/user/auth`\n}\n\n/**\n * **Deprecated**: ``POST …/reader-access/embedded``. As in 0.13.0.\n *\n * Credentials for this profile, taking a seat on first use. Call only on the\n * patron's explicit Read: it can create a paid subscription.\n * @deprecated\n * @summary Open Native Auth\n */\nexport const openNativeAuth = async ( options?: Parameters<typeof request>[1]): Promise<YouScribeAuthRead> => {\n\n return request<YouScribeAuthRead>(getOpenNativeAuthUrl(),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n\n\n\nexport const getOpenNativeAuthMutationKey = () => ['openNativeAuth'] as const;\n\nexport const getOpenNativeAuthMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof openNativeAuth>>, TError,void, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof openNativeAuth>>, TError,void, TContext> => {\n\nconst mutationKey = getOpenNativeAuthMutationKey();\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 openNativeAuth>>, void> = () => {\n\n\n return openNativeAuth(requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type OpenNativeAuthMutationResult = NonNullable<Awaited<ReturnType<typeof openNativeAuth>>>\n\n export type OpenNativeAuthMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\n /**\n * @deprecated\n * @summary Open Native Auth\n */\nexport const useOpenNativeAuth = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof openNativeAuth>>, TError,void, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof openNativeAuth>>,\n TError,\n void,\n TContext\n > => {\n return useMutation(get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V,CACF;AAAE;AAMF,MAAa,kCAAkC;CAC3C,OAAO,CACP,+BACA;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;;;;;AAmCA,SAAgB,kBACd,SACC,aACiF;CAElF,MAAM,eAAe,8BAA8B,OAAO;CAE1D,MAAM,QAAQ,SAAS,cAAc,WAAW;CAEhD,OAAO,aAAa,OAAO,aAAa,QAAQ;AAClD;AAOA,MAAa,6BAA6B;CAKxC,OAAO;AACT;;;;;;;;;AAUA,MAAa,iBAAiB,OAAQ,YAAwE;CAE5G,OAAO,QAA2B,qBAAqB,GACvD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,qCAAqC,CAAC,gBAAgB;AAEnE,MAAa,oCACW,YACoE;CAE5F,MAAM,cAAc,6BAA6B;CACjD,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,mBAAuF;EAGzF,OAAQ,eAAe,cAAc;CACvC;CAON,OAAQ;EAAE;EAAY,GAAG;CAAgB;AAAC;;;;;AAW5C,MAAa,qBACW,SACrB,gBAKQ;CACL,OAAO,YAAY,iCAAiC,OAAO,GAAG,WAAW;AAC3E"}
|
|
1
|
+
{"version":3,"file":"partner-reader-youscribe.js","names":[],"sources":["../../src/react/partner-reader-youscribe/partner-reader-youscribe.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.20.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 OfflineVerificationKeyRead,\n ReadHostedPackageParams,\n ReaderPackageRead,\n ValidationErrorResponse,\n YouScribeAuthRead,\n YouScribeDownloadRead,\n YouScribeReaderRead\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 getReadYouscribeDownloadVerificationKeyUrl = () => {\n\n\n\n\n return `/partners/youscribe/download-verification-key`\n}\n\n/**\n * Fetch the current public verification key over the authenticated online channel.\n * @summary Read Youscribe Download Verification Key\n */\nexport const readYouscribeDownloadVerificationKey = async ( options?: Parameters<typeof request>[1]): Promise<OfflineVerificationKeyRead> => {\n\n return request<OfflineVerificationKeyRead>(getReadYouscribeDownloadVerificationKeyUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadYouscribeDownloadVerificationKeyQueryKey = () => {\n return [\n `/partners/youscribe/download-verification-key`\n ] as const;\n }\n\n\nexport const getReadYouscribeDownloadVerificationKeyQueryOptions = <TData = Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadYouscribeDownloadVerificationKeyQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>> = ({ signal }) => readYouscribeDownloadVerificationKey({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadYouscribeDownloadVerificationKeyQueryResult = NonNullable<Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>>\nexport type ReadYouscribeDownloadVerificationKeyQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadYouscribeDownloadVerificationKey<TData = Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>,\n TError,\n Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadYouscribeDownloadVerificationKey<TData = Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>,\n TError,\n Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadYouscribeDownloadVerificationKey<TData = Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read Youscribe Download Verification Key\n */\n\nexport function useReadYouscribeDownloadVerificationKey<TData = Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readYouscribeDownloadVerificationKey>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadYouscribeDownloadVerificationKeyQueryOptions(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 getAcquireYouscribeDownloadUrl = (mediaId: number,) => {\n\n\n\n\n return `/partners/youscribe/media/${mediaId}/downloads`\n}\n\n/**\n * Authorize SDK acquisition for an existing seat. Creates neither a subscription nor a reading event.\n * @summary Acquire Youscribe Download\n */\nexport const acquireYouscribeDownload = async (mediaId: number, options?: Parameters<typeof request>[1]): Promise<YouScribeDownloadRead> => {\n\n return request<YouScribeDownloadRead>(getAcquireYouscribeDownloadUrl(mediaId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n\n\n\nexport const getAcquireYouscribeDownloadMutationKey = () => ['acquireYouscribeDownload'] as const;\n\nexport const getAcquireYouscribeDownloadMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof acquireYouscribeDownload>>, TError,AcquireYouscribeDownloadMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof acquireYouscribeDownload>>, TError,AcquireYouscribeDownloadMutationVariables, TContext> => {\n\nconst mutationKey = getAcquireYouscribeDownloadMutationKey();\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 acquireYouscribeDownload>>, AcquireYouscribeDownloadMutationVariables> = (props) => {\n const {mediaId} = props ?? {};\n\n return acquireYouscribeDownload(mediaId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AcquireYouscribeDownloadMutationResult = NonNullable<Awaited<ReturnType<typeof acquireYouscribeDownload>>>\n\n export type AcquireYouscribeDownloadMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type AcquireYouscribeDownloadMutationVariables = {mediaId: number}\n\n /**\n * @summary Acquire Youscribe Download\n */\nexport const useAcquireYouscribeDownload = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof acquireYouscribeDownload>>, TError,AcquireYouscribeDownloadMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof acquireYouscribeDownload>>,\n TError,\n AcquireYouscribeDownloadMutationVariables,\n TContext\n > => {\n return useMutation(getAcquireYouscribeDownloadMutationOptions(options), queryClient);\n }\n export const getReadHostedPackageUrl = (mediaId: number,\n params?: ReadHostedPackageParams,) => {\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 ? `/partners/youscribe/media/${mediaId}/package?${stringifiedParams}` : `/partners/youscribe/media/${mediaId}/package`\n}\n\n/**\n * **Deprecated**: the hosted reader's address and a lease. As in 0.13.0.\n *\n * Requires a seat already taken and never takes one: a GET does not buy a\n * subscription.\n * @deprecated\n * @summary Read Hosted Package\n */\nexport const readHostedPackage = async (mediaId: number,\n params?: ReadHostedPackageParams, options?: Parameters<typeof request>[1]): Promise<ReaderPackageRead> => {\n\n return request<ReaderPackageRead>(getReadHostedPackageUrl(mediaId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadHostedPackageQueryKey = (mediaId: number,\n params?: ReadHostedPackageParams,) => {\n return [\n `/partners/youscribe/media/${mediaId}/package`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getReadHostedPackageQueryOptions = <TData = Awaited<ReturnType<typeof readHostedPackage>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(mediaId: number,\n params?: ReadHostedPackageParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHostedPackage>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadHostedPackageQueryKey(mediaId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readHostedPackage>>> = ({ signal }) => readHostedPackage(mediaId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: mediaId !== null && mediaId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readHostedPackage>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadHostedPackageQueryResult = NonNullable<Awaited<ReturnType<typeof readHostedPackage>>>\nexport type ReadHostedPackageQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadHostedPackage<TData = Awaited<ReturnType<typeof readHostedPackage>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n mediaId: number,\n params: undefined | ReadHostedPackageParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHostedPackage>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readHostedPackage>>,\n TError,\n Awaited<ReturnType<typeof readHostedPackage>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadHostedPackage<TData = Awaited<ReturnType<typeof readHostedPackage>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n mediaId: number,\n params?: ReadHostedPackageParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHostedPackage>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readHostedPackage>>,\n TError,\n Awaited<ReturnType<typeof readHostedPackage>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadHostedPackage<TData = Awaited<ReturnType<typeof readHostedPackage>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n mediaId: number,\n params?: ReadHostedPackageParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHostedPackage>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @deprecated\n * @summary Read Hosted Package\n */\n\nexport function useReadHostedPackage<TData = Awaited<ReturnType<typeof readHostedPackage>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n mediaId: number,\n params?: ReadHostedPackageParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readHostedPackage>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadHostedPackageQueryOptions(mediaId,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 getOpenNativeReaderUrl = (mediaId: number,) => {\n\n\n\n\n return `/partners/youscribe/media/${mediaId}/reader-auth`\n}\n\n/**\n * **Deprecated**: ``POST …/reader-access/embedded``, which takes the seat too. As in 0.13.0.\n *\n * Credentials for one title, taking a seat on first use, and the consumption\n * lease that records the opening. Renew ``lease.eventId`` while the reader is\n * open and close it when it exits.\n * @deprecated\n * @summary Open Native Reader\n */\nexport const openNativeReader = async (mediaId: number, options?: Parameters<typeof request>[1]): Promise<YouScribeReaderRead> => {\n\n return request<YouScribeReaderRead>(getOpenNativeReaderUrl(mediaId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n\n\n\nexport const getOpenNativeReaderMutationKey = () => ['openNativeReader'] as const;\n\nexport const getOpenNativeReaderMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof openNativeReader>>, TError,OpenNativeReaderMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof openNativeReader>>, TError,OpenNativeReaderMutationVariables, TContext> => {\n\nconst mutationKey = getOpenNativeReaderMutationKey();\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 openNativeReader>>, OpenNativeReaderMutationVariables> = (props) => {\n const {mediaId} = props ?? {};\n\n return openNativeReader(mediaId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type OpenNativeReaderMutationResult = NonNullable<Awaited<ReturnType<typeof openNativeReader>>>\n\n export type OpenNativeReaderMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type OpenNativeReaderMutationVariables = {mediaId: number}\n\n /**\n * @deprecated\n * @summary Open Native Reader\n */\nexport const useOpenNativeReader = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof openNativeReader>>, TError,OpenNativeReaderMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof openNativeReader>>,\n TError,\n OpenNativeReaderMutationVariables,\n TContext\n > => {\n return useMutation(getOpenNativeReaderMutationOptions(options), queryClient);\n }\n export const getReadNativeAuthUrl = () => {\n\n\n\n\n return `/partners/youscribe/user/auth`\n}\n\n/**\n * YouScribe native SDK credentials for the selected, authorized profile.\n *\n * **Deprecated.** ``POST /partners/youscribe/media/{id}/reader-access/embedded``\n * answers the same credentials with the opening, and records it. This stays\n * while the current mobile app migrates, then goes.\n *\n * The legacy's ``GET /api/v1/{catalog}/user/auth``, and the only YouScribe\n * credentials endpoint — because a YouScribe token is issued **per patron and\n * not per title**, so an authorization keyed by media was answering a question\n * nobody asked. ``POST /media/{id}/reader-auth`` and ``POST /user/auth`` were\n * both this endpoint again: the first added a ``mediaId`` the caller already\n * knew, the second provisioned a seat it no longer provisions.\n *\n * **This is an authentication, not a read.** It exchanges the patron's licence\n * for a session token on YouScribe's REST API, and nothing follows from it: a\n * caller may ask for a token and never open a title. So there is no licence to\n * create and no consumption to record here, not as a policy but because\n * nothing has been consumed.\n *\n * The reading itself happens in the partner's own player — hosted on the web,\n * through their SDK inside the mobile app — and that player reports its\n * consumption to YouScribe. Which is why the opening is recorded by\n * reader-access and not here: it is the one call a client makes on Read.\n *\n * The token is personal: never persist it, log it, or share it between\n * profiles.\n * @deprecated\n * @summary Read Native Auth\n */\nexport const readNativeAuth = async ( options?: Parameters<typeof request>[1]): Promise<YouScribeAuthRead> => {\n\n return request<YouScribeAuthRead>(getReadNativeAuthUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getReadNativeAuthQueryKey = () => {\n return [\n `/partners/youscribe/user/auth`\n ] as const;\n }\n\n\nexport const getReadNativeAuthQueryOptions = <TData = Awaited<ReturnType<typeof readNativeAuth>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readNativeAuth>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getReadNativeAuthQueryKey();\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof readNativeAuth>>> = ({ signal }) => readNativeAuth({ signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof readNativeAuth>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ReadNativeAuthQueryResult = NonNullable<Awaited<ReturnType<typeof readNativeAuth>>>\nexport type ReadNativeAuthQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useReadNativeAuth<TData = Awaited<ReturnType<typeof readNativeAuth>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof readNativeAuth>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof readNativeAuth>>,\n TError,\n Awaited<ReturnType<typeof readNativeAuth>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadNativeAuth<TData = Awaited<ReturnType<typeof readNativeAuth>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readNativeAuth>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof readNativeAuth>>,\n TError,\n Awaited<ReturnType<typeof readNativeAuth>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useReadNativeAuth<TData = Awaited<ReturnType<typeof readNativeAuth>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readNativeAuth>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @deprecated\n * @summary Read Native Auth\n */\n\nexport function useReadNativeAuth<TData = Awaited<ReturnType<typeof readNativeAuth>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof readNativeAuth>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getReadNativeAuthQueryOptions(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 getOpenNativeAuthUrl = () => {\n\n\n\n\n return `/partners/youscribe/user/auth`\n}\n\n/**\n * **Deprecated**: ``POST …/reader-access/embedded``. As in 0.13.0.\n *\n * Credentials for this profile, taking a seat on first use. Call only on the\n * patron's explicit Read: it can create a paid subscription.\n * @deprecated\n * @summary Open Native Auth\n */\nexport const openNativeAuth = async ( options?: Parameters<typeof request>[1]): Promise<YouScribeAuthRead> => {\n\n return request<YouScribeAuthRead>(getOpenNativeAuthUrl(),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n\n\n\nexport const getOpenNativeAuthMutationKey = () => ['openNativeAuth'] as const;\n\nexport const getOpenNativeAuthMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof openNativeAuth>>, TError,void, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof openNativeAuth>>, TError,void, TContext> => {\n\nconst mutationKey = getOpenNativeAuthMutationKey();\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 openNativeAuth>>, void> = () => {\n\n\n return openNativeAuth(requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type OpenNativeAuthMutationResult = NonNullable<Awaited<ReturnType<typeof openNativeAuth>>>\n\n export type OpenNativeAuthMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\n /**\n * @deprecated\n * @summary Open Native Auth\n */\nexport const useOpenNativeAuth = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof openNativeAuth>>, TError,void, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof openNativeAuth>>,\n TError,\n void,\n TContext\n > => {\n return useMutation(getOpenNativeAuthMutationOptions(options), queryClient);\n }\n"],"mappings":";;;;;;;;;;;AA6CA,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,mDAAmD;CAK9D,OAAO;AACT;;;;;AAMA,MAAa,uCAAuC,OAAQ,YAAiF;CAE3I,OAAO,QAAoC,2CAA2C,GACtF;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,wDAAwD;CACjE,OAAO,CACP,+CACA;AACA;AAGJ,MAAa,uDAAuM,YAC/M;CAEL,MAAM,EAAC,OAAO,cAAc,SAAS,mBAAkB,WAAW,CAAC;CAEjE,MAAM,WAAY,cAAc,YAAY,gDAAgD;CAI1F,MAAM,WAA4F,EAAE,aAAa,qCAAqC;EAAE;EAAQ,GAAG;CAAe,CAAC;CAMpL,OAAQ;EAAE;EAAU;EAAS,GAAG;CAAY;AAC/C;;;;AAkCA,SAAgB,wCACd,SACC,aACiF;CAElF,MAAM,eAAe,oDAAoD,OAAO;CAEhF,MAAM,QAAQ,SAAS,cAAc,WAAW;CAEhD,OAAO,aAAa,OAAO,aAAa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AC,UAAU,EAAE,YAAa;EAAG,SAAS,KAAA;CAAS;CAKjD,MAAM,mBAAuF;EAGzF,OAAQ,eAAe,cAAc;CACvC;CAON,OAAQ;EAAE;EAAY,GAAG;CAAgB;AAAC;;;;;AAW5C,MAAa,qBACW,SACrB,gBAKQ;CACL,OAAO,YAAY,iCAAiC,OAAO,GAAG,WAAW;AAC3E"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { Jx as PartnerProvider, Li as PartnerReaderAccessRead, T as ValidationErrorResponse, Td as ReaderMode, nd as HTTPExceptionResponse } from "../chunks/index.js";
|
|
3
3
|
import { a as ErrorType, c as request } from "../chunks/client.js";
|
|
4
4
|
import { QueryClient, UseMutationOptions, UseMutationResult } from "@tanstack/react-query";
|
|
5
5
|
//#region src/react/partner-reading/partner-reading.d.ts
|
|
@@ -7,7 +7,7 @@ import { useMutation } 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.20.
|
|
10
|
+
* OpenAPI spec version: 0.20.2
|
|
11
11
|
*/
|
|
12
12
|
const getOpenReaderAccessUrl = (provider, mediaId, mode) => {
|
|
13
13
|
return `/partners/${provider}/media/${mediaId}/reader-access/${mode}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partner-reading.js","names":[],"sources":["../../src/react/partner-reading/partner-reading.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.20.
|
|
1
|
+
{"version":3,"file":"partner-reading.js","names":[],"sources":["../../src/react/partner-reading/partner-reading.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.20.2\n */\nimport {\n useMutation\n} from '@tanstack/react-query';\nimport type {\n MutationFunction,\n QueryClient,\n UseMutationOptions,\n UseMutationResult\n} from '@tanstack/react-query';\n\nimport type {\n HTTPExceptionResponse,\n PartnerProvider,\n PartnerReaderAccessRead,\n ReaderMode,\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\nexport const getOpenReaderAccessUrl = (provider: PartnerProvider,\n mediaId: number,\n mode: ReaderMode,) => {\n\n\n\n\n return `/partners/${provider}/media/${mediaId}/reader-access/${mode}`\n}\n\n/**\n * Start reading this title in ``mode``: takes a seat if needed, records the opening.\n *\n * ``external`` answers the partner's page to send the patron to.\n * ``embedded`` answers what the client's own reader needs, and ``open.reader``\n * names that reader: switch on ``kind``, then ``reader``. A mode the partner\n * does not offer answers ``403`` ``reader_unavailable``, which ``readerModes``\n * in the capabilities says beforehand.\n *\n * This is the Read click, so a profile holding no seat is given one here —\n * ``409`` with the counts when the household's are all taken, ``403`` when\n * the session's assurance is too low to subscribe the member at a partner.\n * Never on browsing: a seat is a paid subscription. ``POST\n * /biblio/me/{partner}/license`` still takes one on its own, for a client\n * that wants it separately.\n *\n * The order is deliberate. The right is settled first, then the seat and the\n * opening are produced — both cost money at YouScribe, and there is no sense\n * buying either for a refusal — and the lease is written last, once there is\n * something to read. A lease for an opening we could not produce would hold a reading\n * that never began.\n *\n * Re-opening the same title returns the lease already held rather than a\n * second one: \"this member is reading this title\" is true once however many\n * times it is asked, and a page reload must not orphan the first lease.\n * @summary Open Reader Access\n */\nexport const openReaderAccess = async (provider: PartnerProvider,\n mediaId: number,\n mode: ReaderMode, options?: Parameters<typeof request>[1]): Promise<PartnerReaderAccessRead> => {\n\n return request<PartnerReaderAccessRead>(getOpenReaderAccessUrl(provider,mediaId,mode),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n\n\n\nexport const getOpenReaderAccessMutationKey = () => ['openReaderAccess'] as const;\n\nexport const getOpenReaderAccessMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof openReaderAccess>>, TError,OpenReaderAccessMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof openReaderAccess>>, TError,OpenReaderAccessMutationVariables, TContext> => {\n\nconst mutationKey = getOpenReaderAccessMutationKey();\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 openReaderAccess>>, OpenReaderAccessMutationVariables> = (props) => {\n const {provider,mediaId,mode} = props ?? {};\n\n return openReaderAccess(provider,mediaId,mode,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type OpenReaderAccessMutationResult = NonNullable<Awaited<ReturnType<typeof openReaderAccess>>>\n\n export type OpenReaderAccessMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type OpenReaderAccessMutationVariables = {provider: PartnerProvider;mediaId: number;mode: ReaderMode}\n\n /**\n * @summary Open Reader Access\n */\nexport const useOpenReaderAccess = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof openReaderAccess>>, TError,OpenReaderAccessMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof openReaderAccess>>,\n TError,\n OpenReaderAccessMutationVariables,\n TContext\n > => {\n return useMutation(getOpenReaderAccessMutationOptions(options), queryClient);\n }\n"],"mappings":";;;;;;;;;;;AAiCA,MAAa,0BAA0B,UACnC,SACA,SAAsB;CAKxB,OAAO,aAAa,SAAS,SAAS,QAAQ,iBAAiB;AACjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAa,mBAAmB,OAAO,UACnC,SACA,MAAkB,YAA8E;CAElG,OAAO,QAAiC,uBAAuB,UAAS,SAAQ,IAAI,GACpF;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,uCAAuC,CAAC,kBAAkB;AAEvE,MAAa,sCACW,YACmG;CAE3H,MAAM,cAAc,+BAA+B;CACnD,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,cAAiH,UAAU;EAC7H,MAAM,EAAC,UAAS,SAAQ,SAAQ,SAAS,CAAC;EAE1C,OAAQ,iBAAiB,UAAS,SAAQ,MAAK,cAAc;CAC/D;CAON,OAAQ;EAAE;EAAY,GAAG;CAAgB;AAAC;;;;AAU5C,MAAa,uBACW,SACrB,gBAKQ;CACL,OAAO,YAAY,mCAAmC,OAAO,GAAG,WAAW;AAC7E"}
|
package/dist/react/profiles.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { $
|
|
2
|
+
import { $n as ProfileCreateWrite, Gn as ProfileUpdateWrite, Iu as IndependentInvitationWrite, Jd as ExitChildProfileWrite, Sd as GuardianPinResetRead, T as ValidationErrorResponse, Xn as ProfileRead, Yn as ProfileListRead, ad as HouseholdInvitationRead, bd as GuardianPinWrite, cd as HouseholdGuardianWrite, id as HouseholdInvitationListRead, ld as HouseholdGuardianListRead, nd as HTTPExceptionResponse, qn as ProfileSessionRead, rd as HouseholdInvitationWrite, sd as HouseholdInvitationAcceptWrite, ua as OpenChildProfileWrite, xd as GuardianPinResetWrite } 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/profiles/profiles.d.ts
|
package/dist/react/profiles.js
CHANGED
|
@@ -7,7 +7,7 @@ import { useMutation, useQuery } from "@tanstack/react-query";
|
|
|
7
7
|
* Do not edit manually.
|
|
8
8
|
* Mozaik backend
|
|
9
9
|
* Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.
|
|
10
|
-
* OpenAPI spec version: 0.20.
|
|
10
|
+
* OpenAPI spec version: 0.20.2
|
|
11
11
|
*/
|
|
12
12
|
const withQueryKey = (query, queryKey) => {
|
|
13
13
|
const result = { queryKey };
|