@learnorama/mozaik-sdk 0.14.0-staging.50.1 → 0.14.2-staging.52.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/CUSTOMER-ADMIN.md +101 -0
- package/CVS-PLAYBACK.md +135 -0
- package/PRESS.md +208 -0
- package/README.md +36 -4
- package/TV-LOGIN.md +137 -0
- package/dist/api/account.d.ts +1 -1
- package/dist/api/account.js.map +1 -1
- package/dist/api/admin-catalogue.d.ts +88 -1
- package/dist/api/admin-catalogue.js +301 -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 +79 -0
- package/dist/api/admin-customer.js +213 -0
- package/dist/api/admin-customer.js.map +1 -0
- 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.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/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 +1 -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 +13 -1
- package/dist/api/biblio-library.js +25 -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 +107 -1
- package/dist/api/biblio-press.js +246 -1
- package/dist/api/biblio-press.js.map +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/consumption.d.ts +4 -4
- package/dist/api/consumption.js +3 -3
- 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 +33 -1
- package/dist/api/cvs-documents.js +81 -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 +11 -0
- package/dist/api/cvs-streaming.js +19 -1
- package/dist/api/cvs-streaming.js.map +1 -1
- package/dist/api/index.d.ts +7 -6
- package/dist/api/index.js +7 -6
- package/dist/api/partner-catalogue.d.ts +1 -1
- package/dist/api/partner-catalogue.js.map +1 -1
- package/dist/api/partner-reader.d.ts +1 -1
- package/dist/api/partner-reader.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.js.map +1 -1
- package/dist/api/tutoring-requests.d.ts +1 -1
- package/dist/api/tutoring-requests.js.map +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/chunks/client2.d.ts +1 -1
- package/dist/chunks/connection.d.ts +1 -1
- package/dist/chunks/index.d.ts +2091 -593
- 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 +230 -2
- 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 +365 -1
- package/dist/react/admin-catalogue.js +652 -2
- 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 +347 -0
- package/dist/react/admin-customer.js +545 -0
- package/dist/react/admin-customer.js.map +1 -0
- 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/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 +1 -1
- package/dist/react/biblio-catalogue.js +1 -1
- 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 +30 -1
- package/dist/react/biblio-library.js +54 -2
- 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 +427 -1
- package/dist/react/biblio-press.js +609 -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/chat.d.ts +1 -1
- package/dist/react/consumption.d.ts +4 -4
- package/dist/react/consumption.js +4 -4
- 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 +141 -1
- package/dist/react/cvs-documents.js +179 -2
- 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 +39 -1
- package/dist/react/cvs-streaming.js +45 -2
- package/dist/react/cvs-streaming.js.map +1 -1
- package/dist/react/index.d.ts +7 -6
- package/dist/react/index.js +7 -6
- 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.d.ts +1 -1
- package/dist/react/partner-reader.js +1 -1
- package/dist/react/partner-reader.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 +12 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cvs-app.js","names":[],"sources":["../../src/react/cvs-app/cvs-app.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.14.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 ListNotificationsParams,\n NotificationListRead,\n PlaybackReportRead,\n PlaybackReportWrite,\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 getListNotificationsUrl = (params?: ListNotificationsParams,) => {\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 ? `/cvs/notifications?${stringifiedParams}` : `/cvs/notifications`\n}\n\n/**\n * Notifications published to this caller's library.\n *\n * **These are tenant broadcasts, not a per-user inbox.** ``app_notification``\n * has no user column and no read state — ``app_notification_bm`` links a\n * notification to a library and that is the whole model. So ``unread_count`` is\n * always ``0`` here and every notification is returned every time.\n *\n * Giving each member their own read state is a schema change (a\n * ``notification_read`` row per user and notification), not a query change. It\n * is worth doing — a broadcast list that never shrinks is one people stop\n * opening — but it is a decision rather than a port, so it is not made here.\n * @summary List Notifications\n */\nexport const listNotifications = async (params?: ListNotificationsParams, options?: Parameters<typeof request>[1]): Promise<NotificationListRead> => {\n\n return request<NotificationListRead>(getListNotificationsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListNotificationsQueryKey = (params?: ListNotificationsParams,) => {\n return [\n `/cvs/notifications`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getListNotificationsQueryOptions = <TData = Awaited<ReturnType<typeof listNotifications>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListNotificationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listNotifications>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListNotificationsQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listNotifications>>> = ({ signal }) => listNotifications(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listNotifications>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListNotificationsQueryResult = NonNullable<Awaited<ReturnType<typeof listNotifications>>>\nexport type ListNotificationsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListNotifications<TData = Awaited<ReturnType<typeof listNotifications>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ListNotificationsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listNotifications>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listNotifications>>,\n TError,\n Awaited<ReturnType<typeof listNotifications>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListNotifications<TData = Awaited<ReturnType<typeof listNotifications>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListNotificationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listNotifications>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listNotifications>>,\n TError,\n Awaited<ReturnType<typeof listNotifications>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListNotifications<TData = Awaited<ReturnType<typeof listNotifications>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListNotificationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listNotifications>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Notifications\n */\n\nexport function useListNotifications<TData = Awaited<ReturnType<typeof listNotifications>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListNotificationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listNotifications>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListNotificationsQueryOptions(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 getCreateReportUrl = () => {\n\n\n\n\n return `/cvs/reports`\n}\n\n/**\n * Report a playback problem.\n *\n * The identifying fields are taken from the credential, not the body. The\n * legacy took ``adhId``, ``bmId`` and ``bmBibLocaleId`` from the query string\n * and declared no ``Authorization`` at all, so anyone holding the shared\n * ``api_key`` — which every deployed app binary contains — could file a report\n * in any patron's name, at any library. The DTO still carries those three\n * fields, marked transition-only, and this handler ignores every one of them.\n *\n * ``email`` is free text that ends up in a message. Authenticated and\n * rate-limited it is a support channel; unauthenticated it is a spam relay with\n * the library's return address on it.\n * @summary Create Report\n */\nexport const createReport = async (playbackReportWrite: PlaybackReportWrite, options?: Parameters<typeof request>[1]): Promise<PlaybackReportRead> => {\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<PlaybackReportRead>(getCreateReportUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(playbackReportWrite)\n }\n);}\n\n\n\n\n\nexport const getCreateReportMutationKey = () => ['createReport'] as const;\n\nexport const getCreateReportMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createReport>>, TError,CreateReportMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof createReport>>, TError,CreateReportMutationVariables, TContext> => {\n\nconst mutationKey = getCreateReportMutationKey();\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 createReport>>, CreateReportMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return createReport(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateReportMutationResult = NonNullable<Awaited<ReturnType<typeof createReport>>>\n export type CreateReportMutationBody = BodyType<PlaybackReportWrite>\n export type CreateReportMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type CreateReportMutationVariables = {data: BodyType<PlaybackReportWrite>}\n\n /**\n * @summary Create Report\n */\nexport const useCreateReport = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createReport>>, TError,CreateReportMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof createReport>>,\n TError,\n CreateReportMutationVariables,\n TContext\n > => {\n return useMutation(getCreateReportMutationOptions(options), queryClient);\n }\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"cvs-app.js","names":[],"sources":["../../src/react/cvs-app/cvs-app.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.14.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 ListNotificationsParams,\n NotificationListRead,\n PlaybackReportRead,\n PlaybackReportWrite,\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 getListNotificationsUrl = (params?: ListNotificationsParams,) => {\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 ? `/cvs/notifications?${stringifiedParams}` : `/cvs/notifications`\n}\n\n/**\n * Notifications published to this caller's library.\n *\n * **These are tenant broadcasts, not a per-user inbox.** ``app_notification``\n * has no user column and no read state — ``app_notification_bm`` links a\n * notification to a library and that is the whole model. So ``unread_count`` is\n * always ``0`` here and every notification is returned every time.\n *\n * Giving each member their own read state is a schema change (a\n * ``notification_read`` row per user and notification), not a query change. It\n * is worth doing — a broadcast list that never shrinks is one people stop\n * opening — but it is a decision rather than a port, so it is not made here.\n * @summary List Notifications\n */\nexport const listNotifications = async (params?: ListNotificationsParams, options?: Parameters<typeof request>[1]): Promise<NotificationListRead> => {\n\n return request<NotificationListRead>(getListNotificationsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getListNotificationsQueryKey = (params?: ListNotificationsParams,) => {\n return [\n `/cvs/notifications`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getListNotificationsQueryOptions = <TData = Awaited<ReturnType<typeof listNotifications>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListNotificationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listNotifications>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getListNotificationsQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof listNotifications>>> = ({ signal }) => listNotifications(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listNotifications>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type ListNotificationsQueryResult = NonNullable<Awaited<ReturnType<typeof listNotifications>>>\nexport type ListNotificationsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useListNotifications<TData = Awaited<ReturnType<typeof listNotifications>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | ListNotificationsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listNotifications>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof listNotifications>>,\n TError,\n Awaited<ReturnType<typeof listNotifications>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListNotifications<TData = Awaited<ReturnType<typeof listNotifications>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListNotificationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listNotifications>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof listNotifications>>,\n TError,\n Awaited<ReturnType<typeof listNotifications>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useListNotifications<TData = Awaited<ReturnType<typeof listNotifications>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListNotificationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listNotifications>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List Notifications\n */\n\nexport function useListNotifications<TData = Awaited<ReturnType<typeof listNotifications>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: ListNotificationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listNotifications>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getListNotificationsQueryOptions(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 getCreateReportUrl = () => {\n\n\n\n\n return `/cvs/reports`\n}\n\n/**\n * Report a playback problem.\n *\n * The identifying fields are taken from the credential, not the body. The\n * legacy took ``adhId``, ``bmId`` and ``bmBibLocaleId`` from the query string\n * and declared no ``Authorization`` at all, so anyone holding the shared\n * ``api_key`` — which every deployed app binary contains — could file a report\n * in any patron's name, at any library. The DTO still carries those three\n * fields, marked transition-only, and this handler ignores every one of them.\n *\n * ``email`` is free text that ends up in a message. Authenticated and\n * rate-limited it is a support channel; unauthenticated it is a spam relay with\n * the library's return address on it.\n * @summary Create Report\n */\nexport const createReport = async (playbackReportWrite: PlaybackReportWrite, options?: Parameters<typeof request>[1]): Promise<PlaybackReportRead> => {\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<PlaybackReportRead>(getCreateReportUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(playbackReportWrite)\n }\n);}\n\n\n\n\n\nexport const getCreateReportMutationKey = () => ['createReport'] as const;\n\nexport const getCreateReportMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createReport>>, TError,CreateReportMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof createReport>>, TError,CreateReportMutationVariables, TContext> => {\n\nconst mutationKey = getCreateReportMutationKey();\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 createReport>>, CreateReportMutationVariables> = (props) => {\n const {data} = props ?? {};\n\n return createReport(data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateReportMutationResult = NonNullable<Awaited<ReturnType<typeof createReport>>>\n export type CreateReportMutationBody = BodyType<PlaybackReportWrite>\n export type CreateReportMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type CreateReportMutationVariables = {data: BodyType<PlaybackReportWrite>}\n\n /**\n * @summary Create Report\n */\nexport const useCreateReport = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createReport>>, TError,CreateReportMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof createReport>>,\n TError,\n CreateReportMutationVariables,\n TContext\n > => {\n return useMutation(getCreateReportMutationOptions(options), queryClient);\n }\n"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { Ch as CinemaPage, Ft as ReadCinemaHomeParams, Gc as LastPositionWrite, It as ReadCinemaAccessParams, W as SupplierGrantRead, Xi as ListCinemaFilmsParams, a as ValidationErrorResponse, ai as OpenAtSupplierParams, bh as CinemaHomeRead, ct as ReviewRead, hl as HTTPExceptionResponse, kh as CinemaAccessRead, nu as DocumentSearchWrite, ou as DocumentPage, qi as ListCvsSelectionDocumentsParams, ru as DocumentRead, st as ReviewUpdateWrite, zt as RatingUpdateWrite } 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/cvs-documents/cvs-documents.d.ts
|
|
@@ -263,5 +263,145 @@ export declare const useWriteReview: <TError = ErrorType<HTTPExceptionResponse |
|
|
|
263
263
|
mutation?: UseMutationOptions<Awaited<ReturnType<typeof writeReview>>, TError, WriteReviewMutationVariables, TContext>;
|
|
264
264
|
request?: SecondParameter<typeof request>;
|
|
265
265
|
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof writeReview>>, TError, WriteReviewMutationVariables, TContext>;
|
|
266
|
+
export declare const getListCinemaFilmsUrl: (params?: ListCinemaFilmsParams) => string;
|
|
267
|
+
/**
|
|
268
|
+
* Paginated, entitled film inventory without a search term.
|
|
269
|
+
* @summary List Cinema Films
|
|
270
|
+
*/
|
|
271
|
+
export declare const listCinemaFilms: (params?: ListCinemaFilmsParams, options?: Parameters<typeof request>[1]) => Promise<CinemaPage>;
|
|
272
|
+
export declare const getListCinemaFilmsQueryKey: (params?: ListCinemaFilmsParams) => readonly ["/cvs/films", ...ListCinemaFilmsParams[]];
|
|
273
|
+
export declare const getListCinemaFilmsQueryOptions: <TData = Awaited<ReturnType<typeof listCinemaFilms>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListCinemaFilmsParams, options?: {
|
|
274
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listCinemaFilms>>, TError, TData>>;
|
|
275
|
+
request?: SecondParameter<typeof request>;
|
|
276
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof listCinemaFilms>>, TError, TData> & {
|
|
277
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
278
|
+
};
|
|
279
|
+
export type ListCinemaFilmsQueryResult = NonNullable<Awaited<ReturnType<typeof listCinemaFilms>>>;
|
|
280
|
+
export type ListCinemaFilmsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
|
|
281
|
+
export declare function useListCinemaFilms<TData = Awaited<ReturnType<typeof listCinemaFilms>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params: undefined | ListCinemaFilmsParams, options: {
|
|
282
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listCinemaFilms>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listCinemaFilms>>, TError, Awaited<ReturnType<typeof listCinemaFilms>>>, 'initialData'>;
|
|
283
|
+
request?: SecondParameter<typeof request>;
|
|
284
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
285
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
286
|
+
};
|
|
287
|
+
export declare function useListCinemaFilms<TData = Awaited<ReturnType<typeof listCinemaFilms>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListCinemaFilmsParams, options?: {
|
|
288
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listCinemaFilms>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listCinemaFilms>>, TError, Awaited<ReturnType<typeof listCinemaFilms>>>, 'initialData'>;
|
|
289
|
+
request?: SecondParameter<typeof request>;
|
|
290
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
291
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
292
|
+
};
|
|
293
|
+
export declare function useListCinemaFilms<TData = Awaited<ReturnType<typeof listCinemaFilms>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListCinemaFilmsParams, options?: {
|
|
294
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listCinemaFilms>>, TError, TData>>;
|
|
295
|
+
request?: SecondParameter<typeof request>;
|
|
296
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
297
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
298
|
+
};
|
|
299
|
+
export declare const getReadCinemaHomeUrl: (params?: ReadCinemaHomeParams) => string;
|
|
300
|
+
/**
|
|
301
|
+
* Film rows and genre counts from authorized data, without fabricated curation.
|
|
302
|
+
*
|
|
303
|
+
* Popularity counts actual local openings in this tenant over seven days and
|
|
304
|
+
* excludes reported/imported aggregates. Empty rows are omitted. More pages
|
|
305
|
+
* use each section's documentsUrl. No partner requests are made here.
|
|
306
|
+
* @summary Read Cinema Home
|
|
307
|
+
*/
|
|
308
|
+
export declare const readCinemaHome: (params?: ReadCinemaHomeParams, options?: Parameters<typeof request>[1]) => Promise<CinemaHomeRead>;
|
|
309
|
+
export declare const getReadCinemaHomeQueryKey: (params?: ReadCinemaHomeParams) => readonly ["/cvs/home", ...ReadCinemaHomeParams[]];
|
|
310
|
+
export declare const getReadCinemaHomeQueryOptions: <TData = Awaited<ReturnType<typeof readCinemaHome>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadCinemaHomeParams, options?: {
|
|
311
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readCinemaHome>>, TError, TData>>;
|
|
312
|
+
request?: SecondParameter<typeof request>;
|
|
313
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof readCinemaHome>>, TError, TData> & {
|
|
314
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
315
|
+
};
|
|
316
|
+
export type ReadCinemaHomeQueryResult = NonNullable<Awaited<ReturnType<typeof readCinemaHome>>>;
|
|
317
|
+
export type ReadCinemaHomeQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
|
|
318
|
+
export declare function useReadCinemaHome<TData = Awaited<ReturnType<typeof readCinemaHome>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params: undefined | ReadCinemaHomeParams, options: {
|
|
319
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof readCinemaHome>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof readCinemaHome>>, TError, Awaited<ReturnType<typeof readCinemaHome>>>, 'initialData'>;
|
|
320
|
+
request?: SecondParameter<typeof request>;
|
|
321
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
322
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
323
|
+
};
|
|
324
|
+
export declare function useReadCinemaHome<TData = Awaited<ReturnType<typeof readCinemaHome>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadCinemaHomeParams, options?: {
|
|
325
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readCinemaHome>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof readCinemaHome>>, TError, Awaited<ReturnType<typeof readCinemaHome>>>, 'initialData'>;
|
|
326
|
+
request?: SecondParameter<typeof request>;
|
|
327
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
328
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
329
|
+
};
|
|
330
|
+
export declare function useReadCinemaHome<TData = Awaited<ReturnType<typeof readCinemaHome>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadCinemaHomeParams, options?: {
|
|
331
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readCinemaHome>>, TError, TData>>;
|
|
332
|
+
request?: SecondParameter<typeof request>;
|
|
333
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
334
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
335
|
+
};
|
|
336
|
+
export declare const getListCvsSelectionDocumentsUrl: (listId: number, params?: ListCvsSelectionDocumentsParams) => string;
|
|
337
|
+
/**
|
|
338
|
+
* An owned list's accessible documents in its recorded list order.
|
|
339
|
+
* @summary List Cvs Selection Documents
|
|
340
|
+
*/
|
|
341
|
+
export declare const listCvsSelectionDocuments: (listId: number, params?: ListCvsSelectionDocumentsParams, options?: Parameters<typeof request>[1]) => Promise<CinemaPage>;
|
|
342
|
+
export declare const getListCvsSelectionDocumentsQueryKey: (listId: number, params?: ListCvsSelectionDocumentsParams) => readonly [`/cvs/lists/${number}/documents`, ...ListCvsSelectionDocumentsParams[]];
|
|
343
|
+
export declare const getListCvsSelectionDocumentsQueryOptions: <TData = Awaited<ReturnType<typeof listCvsSelectionDocuments>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(listId: number, params?: ListCvsSelectionDocumentsParams, options?: {
|
|
344
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listCvsSelectionDocuments>>, TError, TData>>;
|
|
345
|
+
request?: SecondParameter<typeof request>;
|
|
346
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof listCvsSelectionDocuments>>, TError, TData> & {
|
|
347
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
348
|
+
};
|
|
349
|
+
export type ListCvsSelectionDocumentsQueryResult = NonNullable<Awaited<ReturnType<typeof listCvsSelectionDocuments>>>;
|
|
350
|
+
export type ListCvsSelectionDocumentsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
|
|
351
|
+
export declare function useListCvsSelectionDocuments<TData = Awaited<ReturnType<typeof listCvsSelectionDocuments>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(listId: number, params: undefined | ListCvsSelectionDocumentsParams, options: {
|
|
352
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listCvsSelectionDocuments>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listCvsSelectionDocuments>>, TError, Awaited<ReturnType<typeof listCvsSelectionDocuments>>>, 'initialData'>;
|
|
353
|
+
request?: SecondParameter<typeof request>;
|
|
354
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
355
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
356
|
+
};
|
|
357
|
+
export declare function useListCvsSelectionDocuments<TData = Awaited<ReturnType<typeof listCvsSelectionDocuments>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(listId: number, params?: ListCvsSelectionDocumentsParams, options?: {
|
|
358
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listCvsSelectionDocuments>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listCvsSelectionDocuments>>, TError, Awaited<ReturnType<typeof listCvsSelectionDocuments>>>, 'initialData'>;
|
|
359
|
+
request?: SecondParameter<typeof request>;
|
|
360
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
361
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
362
|
+
};
|
|
363
|
+
export declare function useListCvsSelectionDocuments<TData = Awaited<ReturnType<typeof listCvsSelectionDocuments>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(listId: number, params?: ListCvsSelectionDocumentsParams, options?: {
|
|
364
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listCvsSelectionDocuments>>, TError, TData>>;
|
|
365
|
+
request?: SecondParameter<typeof request>;
|
|
366
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
367
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
368
|
+
};
|
|
369
|
+
export declare const getReadCinemaAccessUrl: (params?: ReadCinemaAccessParams) => string;
|
|
370
|
+
/**
|
|
371
|
+
* Current allowance overview or exact film quote. No debit, loan or DRM call.
|
|
372
|
+
*
|
|
373
|
+
* Multiple balances must not be summed: films may use different grants. Add
|
|
374
|
+
* docId on a film sheet. Refetch after starting a loan or playback. The write
|
|
375
|
+
* rechecks rights and remaining units; this response is an informative snapshot.
|
|
376
|
+
* @summary Read Cinema Access
|
|
377
|
+
*/
|
|
378
|
+
export declare const readCinemaAccess: (params?: ReadCinemaAccessParams, options?: Parameters<typeof request>[1]) => Promise<CinemaAccessRead>;
|
|
379
|
+
export declare const getReadCinemaAccessQueryKey: (params?: ReadCinemaAccessParams) => readonly ["/me/cinema", ...ReadCinemaAccessParams[]];
|
|
380
|
+
export declare const getReadCinemaAccessQueryOptions: <TData = Awaited<ReturnType<typeof readCinemaAccess>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadCinemaAccessParams, options?: {
|
|
381
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readCinemaAccess>>, TError, TData>>;
|
|
382
|
+
request?: SecondParameter<typeof request>;
|
|
383
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof readCinemaAccess>>, TError, TData> & {
|
|
384
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
385
|
+
};
|
|
386
|
+
export type ReadCinemaAccessQueryResult = NonNullable<Awaited<ReturnType<typeof readCinemaAccess>>>;
|
|
387
|
+
export type ReadCinemaAccessQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
|
|
388
|
+
export declare function useReadCinemaAccess<TData = Awaited<ReturnType<typeof readCinemaAccess>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params: undefined | ReadCinemaAccessParams, options: {
|
|
389
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof readCinemaAccess>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof readCinemaAccess>>, TError, Awaited<ReturnType<typeof readCinemaAccess>>>, 'initialData'>;
|
|
390
|
+
request?: SecondParameter<typeof request>;
|
|
391
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
392
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
393
|
+
};
|
|
394
|
+
export declare function useReadCinemaAccess<TData = Awaited<ReturnType<typeof readCinemaAccess>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadCinemaAccessParams, options?: {
|
|
395
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readCinemaAccess>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof readCinemaAccess>>, TError, Awaited<ReturnType<typeof readCinemaAccess>>>, 'initialData'>;
|
|
396
|
+
request?: SecondParameter<typeof request>;
|
|
397
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
398
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
399
|
+
};
|
|
400
|
+
export declare function useReadCinemaAccess<TData = Awaited<ReturnType<typeof readCinemaAccess>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ReadCinemaAccessParams, options?: {
|
|
401
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof readCinemaAccess>>, TError, TData>>;
|
|
402
|
+
request?: SecondParameter<typeof request>;
|
|
403
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
404
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
405
|
+
};
|
|
266
406
|
//#endregion
|
|
267
407
|
//# sourceMappingURL=cvs-documents.d.ts.map
|
|
@@ -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.14.
|
|
10
|
+
* OpenAPI spec version: 0.14.2
|
|
11
11
|
*/
|
|
12
12
|
const withQueryKey = (query, queryKey) => {
|
|
13
13
|
const result = { queryKey };
|
|
@@ -429,7 +429,184 @@ const getWriteReviewMutationOptions = (options) => {
|
|
|
429
429
|
const useWriteReview = (options, queryClient) => {
|
|
430
430
|
return useMutation(getWriteReviewMutationOptions(options), queryClient);
|
|
431
431
|
};
|
|
432
|
+
const getListCinemaFilmsUrl = (params) => {
|
|
433
|
+
const normalizedParams = new URLSearchParams();
|
|
434
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
435
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
436
|
+
});
|
|
437
|
+
const stringifiedParams = normalizedParams.toString();
|
|
438
|
+
return stringifiedParams.length > 0 ? `/cvs/films?${stringifiedParams}` : `/cvs/films`;
|
|
439
|
+
};
|
|
440
|
+
/**
|
|
441
|
+
* Paginated, entitled film inventory without a search term.
|
|
442
|
+
* @summary List Cinema Films
|
|
443
|
+
*/
|
|
444
|
+
const listCinemaFilms = async (params, options) => {
|
|
445
|
+
return request(getListCinemaFilmsUrl(params), {
|
|
446
|
+
...options,
|
|
447
|
+
method: "GET"
|
|
448
|
+
});
|
|
449
|
+
};
|
|
450
|
+
const getListCinemaFilmsQueryKey = (params) => {
|
|
451
|
+
return [`/cvs/films`, ...params ? [params] : []];
|
|
452
|
+
};
|
|
453
|
+
const getListCinemaFilmsQueryOptions = (params, options) => {
|
|
454
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
455
|
+
const queryKey = queryOptions?.queryKey ?? getListCinemaFilmsQueryKey(params);
|
|
456
|
+
const queryFn = ({ signal }) => listCinemaFilms(params, {
|
|
457
|
+
signal,
|
|
458
|
+
...requestOptions
|
|
459
|
+
});
|
|
460
|
+
return {
|
|
461
|
+
queryKey,
|
|
462
|
+
queryFn,
|
|
463
|
+
...queryOptions
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
/**
|
|
467
|
+
* @summary List Cinema Films
|
|
468
|
+
*/
|
|
469
|
+
function useListCinemaFilms(params, options, queryClient) {
|
|
470
|
+
const queryOptions = getListCinemaFilmsQueryOptions(params, options);
|
|
471
|
+
const query = useQuery(queryOptions, queryClient);
|
|
472
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
473
|
+
}
|
|
474
|
+
const getReadCinemaHomeUrl = (params) => {
|
|
475
|
+
const normalizedParams = new URLSearchParams();
|
|
476
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
477
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
478
|
+
});
|
|
479
|
+
const stringifiedParams = normalizedParams.toString();
|
|
480
|
+
return stringifiedParams.length > 0 ? `/cvs/home?${stringifiedParams}` : `/cvs/home`;
|
|
481
|
+
};
|
|
482
|
+
/**
|
|
483
|
+
* Film rows and genre counts from authorized data, without fabricated curation.
|
|
484
|
+
*
|
|
485
|
+
* Popularity counts actual local openings in this tenant over seven days and
|
|
486
|
+
* excludes reported/imported aggregates. Empty rows are omitted. More pages
|
|
487
|
+
* use each section's documentsUrl. No partner requests are made here.
|
|
488
|
+
* @summary Read Cinema Home
|
|
489
|
+
*/
|
|
490
|
+
const readCinemaHome = async (params, options) => {
|
|
491
|
+
return request(getReadCinemaHomeUrl(params), {
|
|
492
|
+
...options,
|
|
493
|
+
method: "GET"
|
|
494
|
+
});
|
|
495
|
+
};
|
|
496
|
+
const getReadCinemaHomeQueryKey = (params) => {
|
|
497
|
+
return [`/cvs/home`, ...params ? [params] : []];
|
|
498
|
+
};
|
|
499
|
+
const getReadCinemaHomeQueryOptions = (params, options) => {
|
|
500
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
501
|
+
const queryKey = queryOptions?.queryKey ?? getReadCinemaHomeQueryKey(params);
|
|
502
|
+
const queryFn = ({ signal }) => readCinemaHome(params, {
|
|
503
|
+
signal,
|
|
504
|
+
...requestOptions
|
|
505
|
+
});
|
|
506
|
+
return {
|
|
507
|
+
queryKey,
|
|
508
|
+
queryFn,
|
|
509
|
+
...queryOptions
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
/**
|
|
513
|
+
* @summary Read Cinema Home
|
|
514
|
+
*/
|
|
515
|
+
function useReadCinemaHome(params, options, queryClient) {
|
|
516
|
+
const queryOptions = getReadCinemaHomeQueryOptions(params, options);
|
|
517
|
+
const query = useQuery(queryOptions, queryClient);
|
|
518
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
519
|
+
}
|
|
520
|
+
const getListCvsSelectionDocumentsUrl = (listId, params) => {
|
|
521
|
+
const normalizedParams = new URLSearchParams();
|
|
522
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
523
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
524
|
+
});
|
|
525
|
+
const stringifiedParams = normalizedParams.toString();
|
|
526
|
+
return stringifiedParams.length > 0 ? `/cvs/lists/${listId}/documents?${stringifiedParams}` : `/cvs/lists/${listId}/documents`;
|
|
527
|
+
};
|
|
528
|
+
/**
|
|
529
|
+
* An owned list's accessible documents in its recorded list order.
|
|
530
|
+
* @summary List Cvs Selection Documents
|
|
531
|
+
*/
|
|
532
|
+
const listCvsSelectionDocuments = async (listId, params, options) => {
|
|
533
|
+
return request(getListCvsSelectionDocumentsUrl(listId, params), {
|
|
534
|
+
...options,
|
|
535
|
+
method: "GET"
|
|
536
|
+
});
|
|
537
|
+
};
|
|
538
|
+
const getListCvsSelectionDocumentsQueryKey = (listId, params) => {
|
|
539
|
+
return [`/cvs/lists/${listId}/documents`, ...params ? [params] : []];
|
|
540
|
+
};
|
|
541
|
+
const getListCvsSelectionDocumentsQueryOptions = (listId, params, options) => {
|
|
542
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
543
|
+
const queryKey = queryOptions?.queryKey ?? getListCvsSelectionDocumentsQueryKey(listId, params);
|
|
544
|
+
const queryFn = ({ signal }) => listCvsSelectionDocuments(listId, params, {
|
|
545
|
+
signal,
|
|
546
|
+
...requestOptions
|
|
547
|
+
});
|
|
548
|
+
return {
|
|
549
|
+
queryKey,
|
|
550
|
+
queryFn,
|
|
551
|
+
enabled: listId !== null && listId !== void 0,
|
|
552
|
+
...queryOptions
|
|
553
|
+
};
|
|
554
|
+
};
|
|
555
|
+
/**
|
|
556
|
+
* @summary List Cvs Selection Documents
|
|
557
|
+
*/
|
|
558
|
+
function useListCvsSelectionDocuments(listId, params, options, queryClient) {
|
|
559
|
+
const queryOptions = getListCvsSelectionDocumentsQueryOptions(listId, params, options);
|
|
560
|
+
const query = useQuery(queryOptions, queryClient);
|
|
561
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
562
|
+
}
|
|
563
|
+
const getReadCinemaAccessUrl = (params) => {
|
|
564
|
+
const normalizedParams = new URLSearchParams();
|
|
565
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
566
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
567
|
+
});
|
|
568
|
+
const stringifiedParams = normalizedParams.toString();
|
|
569
|
+
return stringifiedParams.length > 0 ? `/me/cinema?${stringifiedParams}` : `/me/cinema`;
|
|
570
|
+
};
|
|
571
|
+
/**
|
|
572
|
+
* Current allowance overview or exact film quote. No debit, loan or DRM call.
|
|
573
|
+
*
|
|
574
|
+
* Multiple balances must not be summed: films may use different grants. Add
|
|
575
|
+
* docId on a film sheet. Refetch after starting a loan or playback. The write
|
|
576
|
+
* rechecks rights and remaining units; this response is an informative snapshot.
|
|
577
|
+
* @summary Read Cinema Access
|
|
578
|
+
*/
|
|
579
|
+
const readCinemaAccess = async (params, options) => {
|
|
580
|
+
return request(getReadCinemaAccessUrl(params), {
|
|
581
|
+
...options,
|
|
582
|
+
method: "GET"
|
|
583
|
+
});
|
|
584
|
+
};
|
|
585
|
+
const getReadCinemaAccessQueryKey = (params) => {
|
|
586
|
+
return [`/me/cinema`, ...params ? [params] : []];
|
|
587
|
+
};
|
|
588
|
+
const getReadCinemaAccessQueryOptions = (params, options) => {
|
|
589
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
590
|
+
const queryKey = queryOptions?.queryKey ?? getReadCinemaAccessQueryKey(params);
|
|
591
|
+
const queryFn = ({ signal }) => readCinemaAccess(params, {
|
|
592
|
+
signal,
|
|
593
|
+
...requestOptions
|
|
594
|
+
});
|
|
595
|
+
return {
|
|
596
|
+
queryKey,
|
|
597
|
+
queryFn,
|
|
598
|
+
...queryOptions
|
|
599
|
+
};
|
|
600
|
+
};
|
|
601
|
+
/**
|
|
602
|
+
* @summary Read Cinema Access
|
|
603
|
+
*/
|
|
604
|
+
function useReadCinemaAccess(params, options, queryClient) {
|
|
605
|
+
const queryOptions = getReadCinemaAccessQueryOptions(params, options);
|
|
606
|
+
const query = useQuery(queryOptions, queryClient);
|
|
607
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
608
|
+
}
|
|
432
609
|
//#endregion
|
|
433
|
-
export { getOpenAtSupplierMutationKey, getOpenAtSupplierMutationOptions, getOpenAtSupplierUrl, getRateDocumentMutationKey, getRateDocumentMutationOptions, getRateDocumentUrl, getReadDocumentQueryKey, getReadDocumentQueryOptions, getReadDocumentUrl, getReadLastPositionQueryKey, getReadLastPositionQueryOptions, getReadLastPositionUrl, getSearchDocumentsMutationKey, getSearchDocumentsMutationOptions, getSearchDocumentsUrl, getSetLastPositionMutationKey, getSetLastPositionMutationOptions, getSetLastPositionUrl, getWriteReviewMutationKey, getWriteReviewMutationOptions, getWriteReviewUrl, openAtSupplier, rateDocument, readDocument, readLastPosition, searchDocuments, setLastPosition, useOpenAtSupplier, useRateDocument, useReadDocument, useReadLastPosition, useSearchDocuments, useSetLastPosition, useWriteReview, writeReview };
|
|
610
|
+
export { getListCinemaFilmsQueryKey, getListCinemaFilmsQueryOptions, getListCinemaFilmsUrl, getListCvsSelectionDocumentsQueryKey, getListCvsSelectionDocumentsQueryOptions, getListCvsSelectionDocumentsUrl, getOpenAtSupplierMutationKey, getOpenAtSupplierMutationOptions, getOpenAtSupplierUrl, getRateDocumentMutationKey, getRateDocumentMutationOptions, getRateDocumentUrl, getReadCinemaAccessQueryKey, getReadCinemaAccessQueryOptions, getReadCinemaAccessUrl, getReadCinemaHomeQueryKey, getReadCinemaHomeQueryOptions, getReadCinemaHomeUrl, getReadDocumentQueryKey, getReadDocumentQueryOptions, getReadDocumentUrl, getReadLastPositionQueryKey, getReadLastPositionQueryOptions, getReadLastPositionUrl, getSearchDocumentsMutationKey, getSearchDocumentsMutationOptions, getSearchDocumentsUrl, getSetLastPositionMutationKey, getSetLastPositionMutationOptions, getSetLastPositionUrl, getWriteReviewMutationKey, getWriteReviewMutationOptions, getWriteReviewUrl, listCinemaFilms, listCvsSelectionDocuments, openAtSupplier, rateDocument, readCinemaAccess, readCinemaHome, readDocument, readLastPosition, searchDocuments, setLastPosition, useListCinemaFilms, useListCvsSelectionDocuments, useOpenAtSupplier, useRateDocument, useReadCinemaAccess, useReadCinemaHome, useReadDocument, useReadLastPosition, useSearchDocuments, useSetLastPosition, useWriteReview, writeReview };
|
|
434
611
|
|
|
435
612
|
//# sourceMappingURL=cvs-documents.js.map
|