@learnorama/mozaik-sdk 0.14.2-staging.52.1 → 0.15.0-staging.53.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/README.md +17 -11
- 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.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 +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 +1 -1
- package/dist/api/biblio-press.js.map +1 -1
- package/dist/api/biblio-search.js.map +1 -1
- package/dist/api/biblio-telemetry.js.map +1 -1
- package/dist/api/biblio-youscribe.d.ts +51 -0
- package/dist/api/biblio-youscribe.js +66 -0
- package/dist/api/biblio-youscribe.js.map +1 -0
- package/dist/api/consumption.d.ts +1 -1
- 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.js.map +1 -1
- package/dist/api/index.d.ts +5 -3
- package/dist/api/index.js +5 -3
- package/dist/api/partner-catalogue.d.ts +21 -1
- package/dist/api/partner-catalogue.js +28 -1
- package/dist/api/partner-catalogue.js.map +1 -1
- package/dist/api/partner-reader-nextory.d.ts +52 -0
- package/dist/api/partner-reader-nextory.js +92 -0
- package/dist/api/partner-reader-nextory.js.map +1 -0
- package/dist/api/partner-reader-youscribe.d.ts +63 -0
- package/dist/api/partner-reader-youscribe.js +97 -0
- package/dist/api/partner-reader-youscribe.js.map +1 -0
- package/dist/api/profiles.d.ts +1 -1
- package/dist/api/profiles.js.map +1 -1
- package/dist/api/search.d.ts +6 -1
- package/dist/api/search.js +10 -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 +542 -508
- 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 +7 -1
- 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/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 +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 +1 -1
- package/dist/react/biblio-press.js +1 -1
- 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 +81 -0
- package/dist/react/biblio-youscribe.js +128 -0
- package/dist/react/biblio-youscribe.js.map +1 -0
- package/dist/react/chat.d.ts +1 -1
- package/dist/react/consumption.d.ts +1 -1
- 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 +5 -3
- package/dist/react/index.js +5 -3
- package/dist/react/partner-catalogue.d.ts +48 -1
- package/dist/react/partner-catalogue.js +54 -2
- package/dist/react/partner-catalogue.js.map +1 -1
- package/dist/react/partner-reader-nextory.d.ts +127 -0
- package/dist/react/partner-reader-nextory.js +190 -0
- package/dist/react/partner-reader-nextory.js.map +1 -0
- package/dist/react/partner-reader-youscribe.d.ts +152 -0
- package/dist/react/partner-reader-youscribe.js +224 -0
- package/dist/react/partner-reader-youscribe.js.map +1 -0
- 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 +6 -1
- package/dist/react/search.js +11 -2
- 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
- package/dist/api/partner-reader.d.ts +0 -96
- package/dist/api/partner-reader.js +0 -164
- package/dist/api/partner-reader.js.map +0 -1
- package/dist/react/partner-reader.d.ts +0 -261
- package/dist/react/partner-reader.js +0 -368
- package/dist/react/partner-reader.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"biblio-learning-finance.js","names":[],"sources":["../../src/react/biblio-learning-finance/biblio-learning-finance.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 LearningAssetRead,\n LearningChannelListRead,\n LearningChannelRead,\n LearningChannelWrite,\n LearningContractChannelWrite,\n LearningListPayeeAllocationsParams,\n LearningListPayeeSettlementsParams,\n LearningListPayeesParams,\n LearningListRoyaltyAllocationsParams,\n LearningListRoyaltyPeriodsParams,\n LearningPayeeDocumentPage,\n LearningPayeeDocumentUploadWrite,\n LearningPayeeDocumentsParams,\n LearningPayeePage,\n LearningPayeeRead,\n LearningPayeeWrite,\n LearningRoyaltyAdjustmentWrite,\n LearningRoyaltyAgreementEndWrite,\n LearningRoyaltyAgreementRead,\n LearningRoyaltyAgreementWrite,\n LearningRoyaltyAllocationPage,\n LearningRoyaltyApprovalWrite,\n LearningRoyaltyBudgetListRead,\n LearningRoyaltyBudgetRead,\n LearningRoyaltyBudgetWrite,\n LearningRoyaltyInvoiceRead,\n LearningRoyaltyInvoiceWrite,\n LearningRoyaltyPaidWrite,\n LearningRoyaltyPeriodPage,\n LearningRoyaltyPeriodRead,\n LearningRoyaltyPeriodWrite,\n LearningRoyaltySettlementPage,\n LearningRoyaltySettlementRead,\n LearningRoyaltySettlementWrite,\n LearningUploadRead,\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 getLearningEndRoyaltyAgreementUrl = (agreementId: number,) => {\n\n\n\n\n return `/learning/finance/agreements/${agreementId}/end`\n}\n\n/**\n * Set the inclusive final month using first-of-month dates. expectedEndsMonth must match the current end unless this exact end is already applied. The change cannot precede the start, overlap other terms, or invalidate approved accounting. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Set an agreement’s final covered month\n */\nexport const learningEndRoyaltyAgreement = async (agreementId: number,\n learningRoyaltyAgreementEndWrite: LearningRoyaltyAgreementEndWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyAgreementRead> => {\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<LearningRoyaltyAgreementRead>(getLearningEndRoyaltyAgreementUrl(agreementId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyAgreementEndWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningEndRoyaltyAgreementMutationKey = () => ['learningEndRoyaltyAgreement'] as const;\n\nexport const getLearningEndRoyaltyAgreementMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningEndRoyaltyAgreement>>, TError,LearningEndRoyaltyAgreementMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningEndRoyaltyAgreement>>, TError,LearningEndRoyaltyAgreementMutationVariables, TContext> => {\n\nconst mutationKey = getLearningEndRoyaltyAgreementMutationKey();\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 learningEndRoyaltyAgreement>>, LearningEndRoyaltyAgreementMutationVariables> = (props) => {\n const {agreementId,data} = props ?? {};\n\n return learningEndRoyaltyAgreement(agreementId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningEndRoyaltyAgreementMutationResult = NonNullable<Awaited<ReturnType<typeof learningEndRoyaltyAgreement>>>\n export type LearningEndRoyaltyAgreementMutationBody = BodyType<LearningRoyaltyAgreementEndWrite>\n export type LearningEndRoyaltyAgreementMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningEndRoyaltyAgreementMutationVariables = {agreementId: number;data: BodyType<LearningRoyaltyAgreementEndWrite>}\n\n /**\n * @summary Set an agreement’s final covered month\n */\nexport const useLearningEndRoyaltyAgreement = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningEndRoyaltyAgreement>>, TError,LearningEndRoyaltyAgreementMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningEndRoyaltyAgreement>>,\n TError,\n LearningEndRoyaltyAgreementMutationVariables,\n TContext\n > => {\n return useMutation(getLearningEndRoyaltyAgreementMutationOptions(options), queryClient);\n }\n export const getLearningListDistributionChannelsUrl = (catalogueId: number,) => {\n\n\n\n\n return `/learning/finance/catalogues/${catalogueId}/channels`\n}\n\n/**\n * List every channel in the catalogue, including inactive channels, ordered by channel ID. Organic identifies the direct distribution pool; a channel does not grant course access. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary List catalogue distribution channels\n */\nexport const learningListDistributionChannels = async (catalogueId: number, options?: Parameters<typeof request>[1]): Promise<LearningChannelListRead> => {\n\n return request<LearningChannelListRead>(getLearningListDistributionChannelsUrl(catalogueId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningListDistributionChannelsQueryKey = (catalogueId: number,) => {\n return [\n `/learning/finance/catalogues/${catalogueId}/channels`\n ] as const;\n }\n\n\nexport const getLearningListDistributionChannelsQueryOptions = <TData = Awaited<ReturnType<typeof learningListDistributionChannels>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(catalogueId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListDistributionChannels>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningListDistributionChannelsQueryKey(catalogueId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningListDistributionChannels>>> = ({ signal }) => learningListDistributionChannels(catalogueId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: catalogueId !== null && catalogueId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningListDistributionChannels>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningListDistributionChannelsQueryResult = NonNullable<Awaited<ReturnType<typeof learningListDistributionChannels>>>\nexport type LearningListDistributionChannelsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningListDistributionChannels<TData = Awaited<ReturnType<typeof learningListDistributionChannels>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n catalogueId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListDistributionChannels>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListDistributionChannels>>,\n TError,\n Awaited<ReturnType<typeof learningListDistributionChannels>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListDistributionChannels<TData = Awaited<ReturnType<typeof learningListDistributionChannels>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n catalogueId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListDistributionChannels>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListDistributionChannels>>,\n TError,\n Awaited<ReturnType<typeof learningListDistributionChannels>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListDistributionChannels<TData = Awaited<ReturnType<typeof learningListDistributionChannels>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n catalogueId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListDistributionChannels>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List catalogue distribution channels\n */\n\nexport function useLearningListDistributionChannels<TData = Awaited<ReturnType<typeof learningListDistributionChannels>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n catalogueId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListDistributionChannels>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningListDistributionChannelsQueryOptions(catalogueId,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 getLearningCreateDistributionChannelUrl = (catalogueId: number,) => {\n\n\n\n\n return `/learning/finance/catalogues/${catalogueId}/channels`\n}\n\n/**\n * Create an active organic or promotional accounting channel. At most one active organic channel is permitted per catalogue. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Create a distribution channel\n */\nexport const learningCreateDistributionChannel = async (catalogueId: number,\n learningChannelWrite: LearningChannelWrite, options?: Parameters<typeof request>[1]): Promise<LearningChannelRead> => {\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<LearningChannelRead>(getLearningCreateDistributionChannelUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningChannelWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningCreateDistributionChannelMutationKey = () => ['learningCreateDistributionChannel'] as const;\n\nexport const getLearningCreateDistributionChannelMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreateDistributionChannel>>, TError,LearningCreateDistributionChannelMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningCreateDistributionChannel>>, TError,LearningCreateDistributionChannelMutationVariables, TContext> => {\n\nconst mutationKey = getLearningCreateDistributionChannelMutationKey();\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 learningCreateDistributionChannel>>, LearningCreateDistributionChannelMutationVariables> = (props) => {\n const {catalogueId,data} = props ?? {};\n\n return learningCreateDistributionChannel(catalogueId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningCreateDistributionChannelMutationResult = NonNullable<Awaited<ReturnType<typeof learningCreateDistributionChannel>>>\n export type LearningCreateDistributionChannelMutationBody = BodyType<LearningChannelWrite>\n export type LearningCreateDistributionChannelMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningCreateDistributionChannelMutationVariables = {catalogueId: number;data: BodyType<LearningChannelWrite>}\n\n /**\n * @summary Create a distribution channel\n */\nexport const useLearningCreateDistributionChannel = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreateDistributionChannel>>, TError,LearningCreateDistributionChannelMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningCreateDistributionChannel>>,\n TError,\n LearningCreateDistributionChannelMutationVariables,\n TContext\n > => {\n return useMutation(getLearningCreateDistributionChannelMutationOptions(options), queryClient);\n }\n export const getLearningCreatePayeeUrl = (catalogueId: number,) => {\n\n\n\n\n return `/learning/finance/catalogues/${catalogueId}/payees`\n}\n\n/**\n * Link an active independent account to one catalogue’s billing profile. The (catalogue, user) pair must be unique. expectedUpdatedAt is ignored on creation; optional legal details may be completed before invoicing. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Create a rightsholder billing profile\n */\nexport const learningCreatePayee = async (catalogueId: number,\n learningPayeeWrite: LearningPayeeWrite, options?: Parameters<typeof request>[1]): Promise<LearningPayeeRead> => {\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<LearningPayeeRead>(getLearningCreatePayeeUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPayeeWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningCreatePayeeMutationKey = () => ['learningCreatePayee'] as const;\n\nexport const getLearningCreatePayeeMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreatePayee>>, TError,LearningCreatePayeeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningCreatePayee>>, TError,LearningCreatePayeeMutationVariables, TContext> => {\n\nconst mutationKey = getLearningCreatePayeeMutationKey();\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 learningCreatePayee>>, LearningCreatePayeeMutationVariables> = (props) => {\n const {catalogueId,data} = props ?? {};\n\n return learningCreatePayee(catalogueId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningCreatePayeeMutationResult = NonNullable<Awaited<ReturnType<typeof learningCreatePayee>>>\n export type LearningCreatePayeeMutationBody = BodyType<LearningPayeeWrite>\n export type LearningCreatePayeeMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningCreatePayeeMutationVariables = {catalogueId: number;data: BodyType<LearningPayeeWrite>}\n\n /**\n * @summary Create a rightsholder billing profile\n */\nexport const useLearningCreatePayee = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreatePayee>>, TError,LearningCreatePayeeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningCreatePayee>>,\n TError,\n LearningCreatePayeeMutationVariables,\n TContext\n > => {\n return useMutation(getLearningCreatePayeeMutationOptions(options), queryClient);\n }\n export const getLearningListRoyaltyPeriodsUrl = (catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams,) => {\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 ? `/learning/finance/catalogues/${catalogueId}/periods?${stringifiedParams}` : `/learning/finance/catalogues/${catalogueId}/periods`\n}\n\n/**\n * List accounting periods for the catalogue, newest month then ID first. State and generation identify which inputs/results are current; historical accounting remains readable even when a catalogue closes. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary List catalogue accounting months\n */\nexport const learningListRoyaltyPeriods = async (catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodPage> => {\n\n return request<LearningRoyaltyPeriodPage>(getLearningListRoyaltyPeriodsUrl(catalogueId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningListRoyaltyPeriodsQueryKey = (catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams,) => {\n return [\n `/learning/finance/catalogues/${catalogueId}/periods`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getLearningListRoyaltyPeriodsQueryOptions = <TData = Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningListRoyaltyPeriodsQueryKey(catalogueId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningListRoyaltyPeriods>>> = ({ signal }) => learningListRoyaltyPeriods(catalogueId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: catalogueId !== null && catalogueId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningListRoyaltyPeriodsQueryResult = NonNullable<Awaited<ReturnType<typeof learningListRoyaltyPeriods>>>\nexport type LearningListRoyaltyPeriodsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningListRoyaltyPeriods<TData = Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n catalogueId: number,\n params: undefined | LearningListRoyaltyPeriodsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListRoyaltyPeriods>>,\n TError,\n Awaited<ReturnType<typeof learningListRoyaltyPeriods>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListRoyaltyPeriods<TData = Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListRoyaltyPeriods>>,\n TError,\n Awaited<ReturnType<typeof learningListRoyaltyPeriods>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListRoyaltyPeriods<TData = Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List catalogue accounting months\n */\n\nexport function useLearningListRoyaltyPeriods<TData = Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningListRoyaltyPeriodsQueryOptions(catalogueId,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 getLearningCreateRoyaltyPeriodUrl = (catalogueId: number,) => {\n\n\n\n\n return `/learning/finance/catalogues/${catalogueId}/periods`\n}\n\n/**\n * Create a draft period for one catalogue, calendar month and currency. month must be the first day; currency is three uppercase letters. A period may be opened before the month closes, but calculation must wait for its Europe/Paris month boundary. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Open a monthly royalty period\n */\nexport const learningCreateRoyaltyPeriod = async (catalogueId: number,\n learningRoyaltyPeriodWrite: LearningRoyaltyPeriodWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\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<LearningRoyaltyPeriodRead>(getLearningCreateRoyaltyPeriodUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyPeriodWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningCreateRoyaltyPeriodMutationKey = () => ['learningCreateRoyaltyPeriod'] as const;\n\nexport const getLearningCreateRoyaltyPeriodMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreateRoyaltyPeriod>>, TError,LearningCreateRoyaltyPeriodMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningCreateRoyaltyPeriod>>, TError,LearningCreateRoyaltyPeriodMutationVariables, TContext> => {\n\nconst mutationKey = getLearningCreateRoyaltyPeriodMutationKey();\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 learningCreateRoyaltyPeriod>>, LearningCreateRoyaltyPeriodMutationVariables> = (props) => {\n const {catalogueId,data} = props ?? {};\n\n return learningCreateRoyaltyPeriod(catalogueId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningCreateRoyaltyPeriodMutationResult = NonNullable<Awaited<ReturnType<typeof learningCreateRoyaltyPeriod>>>\n export type LearningCreateRoyaltyPeriodMutationBody = BodyType<LearningRoyaltyPeriodWrite>\n export type LearningCreateRoyaltyPeriodMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningCreateRoyaltyPeriodMutationVariables = {catalogueId: number;data: BodyType<LearningRoyaltyPeriodWrite>}\n\n /**\n * @summary Open a monthly royalty period\n */\nexport const useLearningCreateRoyaltyPeriod = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreateRoyaltyPeriod>>, TError,LearningCreateRoyaltyPeriodMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningCreateRoyaltyPeriod>>,\n TError,\n LearningCreateRoyaltyPeriodMutationVariables,\n TContext\n > => {\n return useMutation(getLearningCreateRoyaltyPeriodMutationOptions(options), queryClient);\n }\n export const getLearningSetContractChannelUrl = (contractId: number,) => {\n\n\n\n\n return `/learning/finance/contracts/${contractId}/channel`\n}\n\n/**\n * Replace the contract’s distribution mapping and eligibility flag. The channel must be active; this mapping controls royalty attribution and does not grant reader access. Global commercial authority is required in addition to the channel catalogue scope. Success returns no body. Mutations require high authentication assurance.\n * @summary Assign a contract’s royalty channel\n */\nexport const learningSetContractChannel = async (contractId: number,\n learningContractChannelWrite: LearningContractChannelWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getLearningSetContractChannelUrl(contractId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningContractChannelWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningSetContractChannelMutationKey = () => ['learningSetContractChannel'] as const;\n\nexport const getLearningSetContractChannelMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningSetContractChannel>>, TError,LearningSetContractChannelMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningSetContractChannel>>, TError,LearningSetContractChannelMutationVariables, TContext> => {\n\nconst mutationKey = getLearningSetContractChannelMutationKey();\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 learningSetContractChannel>>, LearningSetContractChannelMutationVariables> = (props) => {\n const {contractId,data} = props ?? {};\n\n return learningSetContractChannel(contractId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningSetContractChannelMutationResult = NonNullable<Awaited<ReturnType<typeof learningSetContractChannel>>>\n export type LearningSetContractChannelMutationBody = BodyType<LearningContractChannelWrite>\n export type LearningSetContractChannelMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningSetContractChannelMutationVariables = {contractId: number;data: BodyType<LearningContractChannelWrite>}\n\n /**\n * @summary Assign a contract’s royalty channel\n */\nexport const useLearningSetContractChannel = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningSetContractChannel>>, TError,LearningSetContractChannelMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningSetContractChannel>>,\n TError,\n LearningSetContractChannelMutationVariables,\n TContext\n > => {\n return useMutation(getLearningSetContractChannelMutationOptions(options), queryClient);\n }\n export const getLearningCreateRoyaltyAgreementUrl = (courseId: number,) => {\n\n\n\n\n return `/learning/finance/courses/${courseId}/agreements`\n}\n\n/**\n * Create terms for an active rightsholder in the course’s financial catalogue. First-of-month bounds are inclusive; null endsMonth leaves the agreement open. Overlapping terms for the same course/payee are refused. share is a fraction; coefficients are negotiated multipliers. Calculation requires the course’s applicable shares to sum to one. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Create monthly rightsholder terms\n */\nexport const learningCreateRoyaltyAgreement = async (courseId: number,\n learningRoyaltyAgreementWrite: LearningRoyaltyAgreementWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyAgreementRead> => {\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<LearningRoyaltyAgreementRead>(getLearningCreateRoyaltyAgreementUrl(courseId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyAgreementWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningCreateRoyaltyAgreementMutationKey = () => ['learningCreateRoyaltyAgreement'] as const;\n\nexport const getLearningCreateRoyaltyAgreementMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreateRoyaltyAgreement>>, TError,LearningCreateRoyaltyAgreementMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningCreateRoyaltyAgreement>>, TError,LearningCreateRoyaltyAgreementMutationVariables, TContext> => {\n\nconst mutationKey = getLearningCreateRoyaltyAgreementMutationKey();\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 learningCreateRoyaltyAgreement>>, LearningCreateRoyaltyAgreementMutationVariables> = (props) => {\n const {courseId,data} = props ?? {};\n\n return learningCreateRoyaltyAgreement(courseId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningCreateRoyaltyAgreementMutationResult = NonNullable<Awaited<ReturnType<typeof learningCreateRoyaltyAgreement>>>\n export type LearningCreateRoyaltyAgreementMutationBody = BodyType<LearningRoyaltyAgreementWrite>\n export type LearningCreateRoyaltyAgreementMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningCreateRoyaltyAgreementMutationVariables = {courseId: number;data: BodyType<LearningRoyaltyAgreementWrite>}\n\n /**\n * @summary Create monthly rightsholder terms\n */\nexport const useLearningCreateRoyaltyAgreement = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreateRoyaltyAgreement>>, TError,LearningCreateRoyaltyAgreementMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningCreateRoyaltyAgreement>>,\n TError,\n LearningCreateRoyaltyAgreementMutationVariables,\n TContext\n > => {\n return useMutation(getLearningCreateRoyaltyAgreementMutationOptions(options), queryClient);\n }\n export const getLearningReadRoyaltyInvoiceUrl = (invoiceId: number,) => {\n\n\n\n\n return `/learning/finance/invoices/${invoiceId}`\n}\n\n/**\n * Read immutable issuance facts and the authenticated document endpoint. number is the native sequence; sourceNumber preserves an imported reference. Historical missing net/tax facts stay null and must not be reconstructed from current legal details. A source invoice without a settlement requires catalogue finance authority. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Read native or source invoice facts\n */\nexport const learningReadRoyaltyInvoice = async (invoiceId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyInvoiceRead> => {\n\n return request<LearningRoyaltyInvoiceRead>(getLearningReadRoyaltyInvoiceUrl(invoiceId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningReadRoyaltyInvoiceQueryKey = (invoiceId: number,) => {\n return [\n `/learning/finance/invoices/${invoiceId}`\n ] as const;\n }\n\n\nexport const getLearningReadRoyaltyInvoiceQueryOptions = <TData = Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(invoiceId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningReadRoyaltyInvoiceQueryKey(invoiceId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>> = ({ signal }) => learningReadRoyaltyInvoice(invoiceId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: invoiceId !== null && invoiceId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningReadRoyaltyInvoiceQueryResult = NonNullable<Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>>\nexport type LearningReadRoyaltyInvoiceQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningReadRoyaltyInvoice<TData = Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n invoiceId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>,\n TError,\n Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningReadRoyaltyInvoice<TData = Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n invoiceId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>,\n TError,\n Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningReadRoyaltyInvoice<TData = Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n invoiceId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read native or source invoice facts\n */\n\nexport function useLearningReadRoyaltyInvoice<TData = Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n invoiceId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningReadRoyaltyInvoiceQueryOptions(invoiceId,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 getLearningDownloadRoyaltyInvoiceUrl = (invoiceId: number,) => {\n\n\n\n\n return `/learning/finance/invoices/${invoiceId}/document`\n}\n\n/**\n * Render the stored issuance snapshots as binary application/pdf. Returns Cache-Control: private, no-store and an attachment filename invoice-{invoice_id}.pdf. Missing original parties, amount, tax rate or supported layout prevents rendering; current billing details are never substituted into old invoices. A source invoice without a settlement requires catalogue finance authority. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Download a private invoice PDF\n */\nexport const learningDownloadRoyaltyInvoice = async (invoiceId: number, options?: Parameters<typeof request>[1]): Promise<Blob> => {\n\n return request<Blob>(getLearningDownloadRoyaltyInvoiceUrl(invoiceId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningDownloadRoyaltyInvoiceQueryKey = (invoiceId: number,) => {\n return [\n `/learning/finance/invoices/${invoiceId}/document`\n ] as const;\n }\n\n\nexport const getLearningDownloadRoyaltyInvoiceQueryOptions = <TData = Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(invoiceId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningDownloadRoyaltyInvoiceQueryKey(invoiceId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>> = ({ signal }) => learningDownloadRoyaltyInvoice(invoiceId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: invoiceId !== null && invoiceId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningDownloadRoyaltyInvoiceQueryResult = NonNullable<Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>>\nexport type LearningDownloadRoyaltyInvoiceQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningDownloadRoyaltyInvoice<TData = Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n invoiceId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>,\n TError,\n Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningDownloadRoyaltyInvoice<TData = Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n invoiceId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>,\n TError,\n Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningDownloadRoyaltyInvoice<TData = Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n invoiceId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Download a private invoice PDF\n */\n\nexport function useLearningDownloadRoyaltyInvoice<TData = Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n invoiceId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningDownloadRoyaltyInvoiceQueryOptions(invoiceId,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 getLearningListPayeesUrl = (params?: LearningListPayeesParams,) => {\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 ? `/learning/finance/payees?${stringifiedParams}` : `/learning/finance/payees`\n}\n\n/**\n * List the caller’s linked rightsholders plus profiles in catalogues where they hold a finance grant; global commercial operators see all. Includes inactive and historical rows, ordered by ID. Public author attribution alone grants no finance access. Dependent profiles and support impersonation are refused.\n * @summary List accessible rightsholder billing profiles\n */\nexport const learningListPayees = async (params?: LearningListPayeesParams, options?: Parameters<typeof request>[1]): Promise<LearningPayeePage> => {\n\n return request<LearningPayeePage>(getLearningListPayeesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningListPayeesQueryKey = (params?: LearningListPayeesParams,) => {\n return [\n `/learning/finance/payees`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getLearningListPayeesQueryOptions = <TData = Awaited<ReturnType<typeof learningListPayees>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: LearningListPayeesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayees>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningListPayeesQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningListPayees>>> = ({ signal }) => learningListPayees(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningListPayees>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningListPayeesQueryResult = NonNullable<Awaited<ReturnType<typeof learningListPayees>>>\nexport type LearningListPayeesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningListPayees<TData = Awaited<ReturnType<typeof learningListPayees>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | LearningListPayeesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayees>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListPayees>>,\n TError,\n Awaited<ReturnType<typeof learningListPayees>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListPayees<TData = Awaited<ReturnType<typeof learningListPayees>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: LearningListPayeesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayees>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListPayees>>,\n TError,\n Awaited<ReturnType<typeof learningListPayees>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListPayees<TData = Awaited<ReturnType<typeof learningListPayees>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: LearningListPayeesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayees>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List accessible rightsholder billing profiles\n */\n\nexport function useLearningListPayees<TData = Awaited<ReturnType<typeof learningListPayees>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: LearningListPayeesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayees>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningListPayeesQueryOptions(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 getLearningReadPayeeUrl = (payeeId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}`\n}\n\n/**\n * Read current legal details and the updatedAt concurrency value needed for replacement. Historical null values remain unknown. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Read a rightsholder billing profile\n */\nexport const learningReadPayee = async (payeeId: number, options?: Parameters<typeof request>[1]): Promise<LearningPayeeRead> => {\n\n return request<LearningPayeeRead>(getLearningReadPayeeUrl(payeeId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningReadPayeeQueryKey = (payeeId: number,) => {\n return [\n `/learning/finance/payees/${payeeId}`\n ] as const;\n }\n\n\nexport const getLearningReadPayeeQueryOptions = <TData = Awaited<ReturnType<typeof learningReadPayee>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(payeeId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadPayee>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningReadPayeeQueryKey(payeeId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningReadPayee>>> = ({ signal }) => learningReadPayee(payeeId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: payeeId !== null && payeeId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningReadPayee>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningReadPayeeQueryResult = NonNullable<Awaited<ReturnType<typeof learningReadPayee>>>\nexport type LearningReadPayeeQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningReadPayee<TData = Awaited<ReturnType<typeof learningReadPayee>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadPayee>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningReadPayee>>,\n TError,\n Awaited<ReturnType<typeof learningReadPayee>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningReadPayee<TData = Awaited<ReturnType<typeof learningReadPayee>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadPayee>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningReadPayee>>,\n TError,\n Awaited<ReturnType<typeof learningReadPayee>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningReadPayee<TData = Awaited<ReturnType<typeof learningReadPayee>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadPayee>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read a rightsholder billing profile\n */\n\nexport function useLearningReadPayee<TData = Awaited<ReturnType<typeof learningReadPayee>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadPayee>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningReadPayeeQueryOptions(payeeId,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 getLearningUpdatePayeeUrl = (payeeId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}`\n}\n\n/**\n * Replace all editable billing fields; omitted optional fields become null. Send the current updatedAt as expectedUpdatedAt and keep userId unchanged. Returns the new concurrency timestamp. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Replace a rightsholder’s legal details\n */\nexport const learningUpdatePayee = async (payeeId: number,\n learningPayeeWrite: LearningPayeeWrite, options?: Parameters<typeof request>[1]): Promise<LearningPayeeRead> => {\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<LearningPayeeRead>(getLearningUpdatePayeeUrl(payeeId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPayeeWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningUpdatePayeeMutationKey = () => ['learningUpdatePayee'] as const;\n\nexport const getLearningUpdatePayeeMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningUpdatePayee>>, TError,LearningUpdatePayeeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningUpdatePayee>>, TError,LearningUpdatePayeeMutationVariables, TContext> => {\n\nconst mutationKey = getLearningUpdatePayeeMutationKey();\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 learningUpdatePayee>>, LearningUpdatePayeeMutationVariables> = (props) => {\n const {payeeId,data} = props ?? {};\n\n return learningUpdatePayee(payeeId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningUpdatePayeeMutationResult = NonNullable<Awaited<ReturnType<typeof learningUpdatePayee>>>\n export type LearningUpdatePayeeMutationBody = BodyType<LearningPayeeWrite>\n export type LearningUpdatePayeeMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningUpdatePayeeMutationVariables = {payeeId: number;data: BodyType<LearningPayeeWrite>}\n\n /**\n * @summary Replace a rightsholder’s legal details\n */\nexport const useLearningUpdatePayee = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningUpdatePayee>>, TError,LearningUpdatePayeeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningUpdatePayee>>,\n TError,\n LearningUpdatePayeeMutationVariables,\n TContext\n > => {\n return useMutation(getLearningUpdatePayeeMutationOptions(options), queryClient);\n }\n export const getLearningListPayeeAllocationsUrl = (payeeId: number,\n params?: LearningListPayeeAllocationsParams,) => {\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 ? `/learning/finance/payees/${payeeId}/allocations?${stringifiedParams}` : `/learning/finance/payees/${payeeId}/allocations`\n}\n\n/**\n * Page only this rightsholder’s allocations from approved months and each month’s current generation, newest month then allocation ID. Unapproved calculation output stays in the catalogue finance review endpoint. Amounts are decimal major currency units, not integer cents. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary List approved rightsholder allocations\n */\nexport const learningListPayeeAllocations = async (payeeId: number,\n params?: LearningListPayeeAllocationsParams, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyAllocationPage> => {\n\n return request<LearningRoyaltyAllocationPage>(getLearningListPayeeAllocationsUrl(payeeId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningListPayeeAllocationsQueryKey = (payeeId: number,\n params?: LearningListPayeeAllocationsParams,) => {\n return [\n `/learning/finance/payees/${payeeId}/allocations`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getLearningListPayeeAllocationsQueryOptions = <TData = Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(payeeId: number,\n params?: LearningListPayeeAllocationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningListPayeeAllocationsQueryKey(payeeId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningListPayeeAllocations>>> = ({ signal }) => learningListPayeeAllocations(payeeId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: payeeId !== null && payeeId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningListPayeeAllocationsQueryResult = NonNullable<Awaited<ReturnType<typeof learningListPayeeAllocations>>>\nexport type LearningListPayeeAllocationsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningListPayeeAllocations<TData = Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params: undefined | LearningListPayeeAllocationsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListPayeeAllocations>>,\n TError,\n Awaited<ReturnType<typeof learningListPayeeAllocations>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListPayeeAllocations<TData = Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningListPayeeAllocationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListPayeeAllocations>>,\n TError,\n Awaited<ReturnType<typeof learningListPayeeAllocations>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListPayeeAllocations<TData = Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningListPayeeAllocationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List approved rightsholder allocations\n */\n\nexport function useLearningListPayeeAllocations<TData = Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningListPayeeAllocationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningListPayeeAllocationsQueryOptions(payeeId,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 getLearningReservePayeeDocumentUrl = (payeeId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}/document-uploads`\n}\n\n/**\n * Reserve legal evidence, then PUT exactly sizeBytes raw bytes to uploadUrl with the declared Content-Type. For this purpose only PDF, JPEG and PNG are accepted, with a 10 MiB (10,485,760 byte) maximum despite the broader shared upload schema. Reservation alone does not create a completed legal document; completion validates the bytes. At most ten unexpired pending uploads are allowed per profile. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Reserve a private rightsholder document upload\n */\nexport const learningReservePayeeDocument = async (payeeId: number,\n learningPayeeDocumentUploadWrite: LearningPayeeDocumentUploadWrite, options?: Parameters<typeof request>[1]): Promise<LearningUploadRead> => {\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<LearningUploadRead>(getLearningReservePayeeDocumentUrl(payeeId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPayeeDocumentUploadWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningReservePayeeDocumentMutationKey = () => ['learningReservePayeeDocument'] as const;\n\nexport const getLearningReservePayeeDocumentMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningReservePayeeDocument>>, TError,LearningReservePayeeDocumentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningReservePayeeDocument>>, TError,LearningReservePayeeDocumentMutationVariables, TContext> => {\n\nconst mutationKey = getLearningReservePayeeDocumentMutationKey();\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 learningReservePayeeDocument>>, LearningReservePayeeDocumentMutationVariables> = (props) => {\n const {payeeId,data} = props ?? {};\n\n return learningReservePayeeDocument(payeeId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningReservePayeeDocumentMutationResult = NonNullable<Awaited<ReturnType<typeof learningReservePayeeDocument>>>\n export type LearningReservePayeeDocumentMutationBody = BodyType<LearningPayeeDocumentUploadWrite>\n export type LearningReservePayeeDocumentMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningReservePayeeDocumentMutationVariables = {payeeId: number;data: BodyType<LearningPayeeDocumentUploadWrite>}\n\n /**\n * @summary Reserve a private rightsholder document upload\n */\nexport const useLearningReservePayeeDocument = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningReservePayeeDocument>>, TError,LearningReservePayeeDocumentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningReservePayeeDocument>>,\n TError,\n LearningReservePayeeDocumentMutationVariables,\n TContext\n > => {\n return useMutation(getLearningReservePayeeDocumentMutationOptions(options), queryClient);\n }\n export const getLearningPayeeDocumentsUrl = (payeeId: number,\n params?: LearningPayeeDocumentsParams,) => {\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 ? `/learning/finance/payees/${payeeId}/documents?${stringifiedParams}` : `/learning/finance/payees/${payeeId}/documents`\n}\n\n/**\n * List completed document metadata, newest ID first. No file bytes or storage keys appear here; use the scoped document endpoint for delivery. Source creation dates may be unknown. This read also requires high authentication assurance. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary List private rightsholder legal documents\n */\nexport const learningPayeeDocuments = async (payeeId: number,\n params?: LearningPayeeDocumentsParams, options?: Parameters<typeof request>[1]): Promise<LearningPayeeDocumentPage> => {\n\n return request<LearningPayeeDocumentPage>(getLearningPayeeDocumentsUrl(payeeId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningPayeeDocumentsQueryKey = (payeeId: number,\n params?: LearningPayeeDocumentsParams,) => {\n return [\n `/learning/finance/payees/${payeeId}/documents`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getLearningPayeeDocumentsQueryOptions = <TData = Awaited<ReturnType<typeof learningPayeeDocuments>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(payeeId: number,\n params?: LearningPayeeDocumentsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningPayeeDocuments>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningPayeeDocumentsQueryKey(payeeId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningPayeeDocuments>>> = ({ signal }) => learningPayeeDocuments(payeeId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: payeeId !== null && payeeId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningPayeeDocuments>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningPayeeDocumentsQueryResult = NonNullable<Awaited<ReturnType<typeof learningPayeeDocuments>>>\nexport type LearningPayeeDocumentsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningPayeeDocuments<TData = Awaited<ReturnType<typeof learningPayeeDocuments>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params: undefined | LearningPayeeDocumentsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningPayeeDocuments>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningPayeeDocuments>>,\n TError,\n Awaited<ReturnType<typeof learningPayeeDocuments>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningPayeeDocuments<TData = Awaited<ReturnType<typeof learningPayeeDocuments>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningPayeeDocumentsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningPayeeDocuments>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningPayeeDocuments>>,\n TError,\n Awaited<ReturnType<typeof learningPayeeDocuments>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningPayeeDocuments<TData = Awaited<ReturnType<typeof learningPayeeDocuments>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningPayeeDocumentsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningPayeeDocuments>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List private rightsholder legal documents\n */\n\nexport function useLearningPayeeDocuments<TData = Awaited<ReturnType<typeof learningPayeeDocuments>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningPayeeDocumentsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningPayeeDocuments>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningPayeeDocumentsQueryOptions(payeeId,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 getLearningDownloadPayeeDocumentUrl = (payeeId: number,\n documentId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}/documents/${documentId}`\n}\n\n/**\n * Authorize both the payee and its document, then return a JSON asset descriptor. Follow its url to retrieve PDF/image bytes; this operation itself does not return a binary file. Treat temporary signed delivery URLs as private capabilities. This read requires high authentication assurance. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Get delivery for a private legal document\n */\nexport const learningDownloadPayeeDocument = async (payeeId: number,\n documentId: number, options?: Parameters<typeof request>[1]): Promise<LearningAssetRead> => {\n\n return request<LearningAssetRead>(getLearningDownloadPayeeDocumentUrl(payeeId,documentId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningDownloadPayeeDocumentQueryKey = (payeeId: number,\n documentId: number,) => {\n return [\n `/learning/finance/payees/${payeeId}/documents/${documentId}`\n ] as const;\n }\n\n\nexport const getLearningDownloadPayeeDocumentQueryOptions = <TData = Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(payeeId: number,\n documentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningDownloadPayeeDocumentQueryKey(payeeId,documentId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningDownloadPayeeDocument>>> = ({ signal }) => learningDownloadPayeeDocument(payeeId,documentId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: payeeId !== null && payeeId !== undefined && documentId !== null && documentId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningDownloadPayeeDocumentQueryResult = NonNullable<Awaited<ReturnType<typeof learningDownloadPayeeDocument>>>\nexport type LearningDownloadPayeeDocumentQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningDownloadPayeeDocument<TData = Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n documentId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningDownloadPayeeDocument>>,\n TError,\n Awaited<ReturnType<typeof learningDownloadPayeeDocument>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningDownloadPayeeDocument<TData = Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n documentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningDownloadPayeeDocument>>,\n TError,\n Awaited<ReturnType<typeof learningDownloadPayeeDocument>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningDownloadPayeeDocument<TData = Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n documentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Get delivery for a private legal document\n */\n\nexport function useLearningDownloadPayeeDocument<TData = Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n documentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningDownloadPayeeDocumentQueryOptions(payeeId,documentId,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 getLearningListPayeeSettlementsUrl = (payeeId: number,\n params?: LearningListPayeeSettlementsParams,) => {\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 ? `/learning/finance/payees/${payeeId}/settlements?${stringifiedParams}` : `/learning/finance/payees/${payeeId}/settlements`\n}\n\n/**\n * Page all settlements for this rightsholder, newest year/period/ID first. Each period covers two calendar months. Source component nulls remain unknown even when the displayed payable total applies zero-for-missing arithmetic; an unpaid flag alone is not complete source payment evidence. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary List a rightsholder’s settlements\n */\nexport const learningListPayeeSettlements = async (payeeId: number,\n params?: LearningListPayeeSettlementsParams, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltySettlementPage> => {\n\n return request<LearningRoyaltySettlementPage>(getLearningListPayeeSettlementsUrl(payeeId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningListPayeeSettlementsQueryKey = (payeeId: number,\n params?: LearningListPayeeSettlementsParams,) => {\n return [\n `/learning/finance/payees/${payeeId}/settlements`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getLearningListPayeeSettlementsQueryOptions = <TData = Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(payeeId: number,\n params?: LearningListPayeeSettlementsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningListPayeeSettlementsQueryKey(payeeId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningListPayeeSettlements>>> = ({ signal }) => learningListPayeeSettlements(payeeId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: payeeId !== null && payeeId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningListPayeeSettlementsQueryResult = NonNullable<Awaited<ReturnType<typeof learningListPayeeSettlements>>>\nexport type LearningListPayeeSettlementsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningListPayeeSettlements<TData = Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params: undefined | LearningListPayeeSettlementsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListPayeeSettlements>>,\n TError,\n Awaited<ReturnType<typeof learningListPayeeSettlements>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListPayeeSettlements<TData = Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningListPayeeSettlementsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListPayeeSettlements>>,\n TError,\n Awaited<ReturnType<typeof learningListPayeeSettlements>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListPayeeSettlements<TData = Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningListPayeeSettlementsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List a rightsholder’s settlements\n */\n\nexport function useLearningListPayeeSettlements<TData = Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningListPayeeSettlementsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningListPayeeSettlementsQueryOptions(payeeId,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 getLearningCreatePayeeSettlementUrl = (payeeId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}/settlements`\n}\n\n/**\n * Require both monthly periods in the same currency to be approved. period 1 means January–February and period 5 means September–October. Organic totals include slices, sales and bonuses; promotional totals include slices. Payable is max(0, organic + promotional + affiliate - advance), rounded half up to two decimals. Matching retries return the existing native settlement; source or conflicting settlements require review. Creation records accounting and initiates no transfer. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Create a two-month rightsholder settlement\n */\nexport const learningCreatePayeeSettlement = async (payeeId: number,\n learningRoyaltySettlementWrite: LearningRoyaltySettlementWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltySettlementRead> => {\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<LearningRoyaltySettlementRead>(getLearningCreatePayeeSettlementUrl(payeeId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltySettlementWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningCreatePayeeSettlementMutationKey = () => ['learningCreatePayeeSettlement'] as const;\n\nexport const getLearningCreatePayeeSettlementMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreatePayeeSettlement>>, TError,LearningCreatePayeeSettlementMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningCreatePayeeSettlement>>, TError,LearningCreatePayeeSettlementMutationVariables, TContext> => {\n\nconst mutationKey = getLearningCreatePayeeSettlementMutationKey();\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 learningCreatePayeeSettlement>>, LearningCreatePayeeSettlementMutationVariables> = (props) => {\n const {payeeId,data} = props ?? {};\n\n return learningCreatePayeeSettlement(payeeId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningCreatePayeeSettlementMutationResult = NonNullable<Awaited<ReturnType<typeof learningCreatePayeeSettlement>>>\n export type LearningCreatePayeeSettlementMutationBody = BodyType<LearningRoyaltySettlementWrite>\n export type LearningCreatePayeeSettlementMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningCreatePayeeSettlementMutationVariables = {payeeId: number;data: BodyType<LearningRoyaltySettlementWrite>}\n\n /**\n * @summary Create a two-month rightsholder settlement\n */\nexport const useLearningCreatePayeeSettlement = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreatePayeeSettlement>>, TError,LearningCreatePayeeSettlementMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningCreatePayeeSettlement>>,\n TError,\n LearningCreatePayeeSettlementMutationVariables,\n TContext\n > => {\n return useMutation(getLearningCreatePayeeSettlementMutationOptions(options), queryClient);\n }\n export const getLearningReadRoyaltyPeriodUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}`\n}\n\n/**\n * Poll state, inputState and generation after requesting calculation. draft → calculating → calculated → approved; failed input preparation is reported by inputState and inputErrorCode. Read channel budgets for channel-specific failures. Approval requires complete inputs and all current budgets. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary Read calculation and approval state\n */\nexport const learningReadRoyaltyPeriod = async (periodId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\n\n return request<LearningRoyaltyPeriodRead>(getLearningReadRoyaltyPeriodUrl(periodId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningReadRoyaltyPeriodQueryKey = (periodId: number,) => {\n return [\n `/learning/finance/periods/${periodId}`\n ] as const;\n }\n\n\nexport const getLearningReadRoyaltyPeriodQueryOptions = <TData = Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(periodId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningReadRoyaltyPeriodQueryKey(periodId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>> = ({ signal }) => learningReadRoyaltyPeriod(periodId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: periodId !== null && periodId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningReadRoyaltyPeriodQueryResult = NonNullable<Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>>\nexport type LearningReadRoyaltyPeriodQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningReadRoyaltyPeriod<TData = Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>,\n TError,\n Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningReadRoyaltyPeriod<TData = Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>,\n TError,\n Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningReadRoyaltyPeriod<TData = Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read calculation and approval state\n */\n\nexport function useLearningReadRoyaltyPeriod<TData = Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningReadRoyaltyPeriodQueryOptions(periodId,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 getLearningSetRoyaltyAdjustmentUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/adjustments`\n}\n\n/**\n * Replace the signed sale and bonus amounts for one course/payee in this period’s catalogue. Adjustments are attached only to the organic channel during calculation, which requires exactly one organic budget when adjustments exist. Historical, approved and running calculations cannot be edited. Success returns no body. Amounts are decimal major currency units, not integer cents. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Set monthly sales and bonus adjustments\n */\nexport const learningSetRoyaltyAdjustment = async (periodId: number,\n learningRoyaltyAdjustmentWrite: LearningRoyaltyAdjustmentWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getLearningSetRoyaltyAdjustmentUrl(periodId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyAdjustmentWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningSetRoyaltyAdjustmentMutationKey = () => ['learningSetRoyaltyAdjustment'] as const;\n\nexport const getLearningSetRoyaltyAdjustmentMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningSetRoyaltyAdjustment>>, TError,LearningSetRoyaltyAdjustmentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningSetRoyaltyAdjustment>>, TError,LearningSetRoyaltyAdjustmentMutationVariables, TContext> => {\n\nconst mutationKey = getLearningSetRoyaltyAdjustmentMutationKey();\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 learningSetRoyaltyAdjustment>>, LearningSetRoyaltyAdjustmentMutationVariables> = (props) => {\n const {periodId,data} = props ?? {};\n\n return learningSetRoyaltyAdjustment(periodId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningSetRoyaltyAdjustmentMutationResult = NonNullable<Awaited<ReturnType<typeof learningSetRoyaltyAdjustment>>>\n export type LearningSetRoyaltyAdjustmentMutationBody = BodyType<LearningRoyaltyAdjustmentWrite>\n export type LearningSetRoyaltyAdjustmentMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningSetRoyaltyAdjustmentMutationVariables = {periodId: number;data: BodyType<LearningRoyaltyAdjustmentWrite>}\n\n /**\n * @summary Set monthly sales and bonus adjustments\n */\nexport const useLearningSetRoyaltyAdjustment = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningSetRoyaltyAdjustment>>, TError,LearningSetRoyaltyAdjustmentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningSetRoyaltyAdjustment>>,\n TError,\n LearningSetRoyaltyAdjustmentMutationVariables,\n TContext\n > => {\n return useMutation(getLearningSetRoyaltyAdjustmentMutationOptions(options), queryClient);\n }\n export const getLearningListRoyaltyAllocationsUrl = (periodId: number,\n params?: LearningListRoyaltyAllocationsParams,) => {\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 ? `/learning/finance/periods/${periodId}/allocations?${stringifiedParams}` : `/learning/finance/periods/${periodId}/allocations`\n}\n\n/**\n * Page allocations for the period’s current generation, ordered by allocation ID, including unapproved calculation output for review. Within a channel, each subject contributes one unit split across courses in proportion to eligible seconds; course weight sums those fractions. Native percentage is that weight divided by the budget’s subject count times 100. sliceAmount additionally applies rightsholder share and channel coefficient; sales/bonuses are separate organic adjustments. Imported unknown percentages remain null. Amounts are decimal major currency units, not integer cents. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary Inspect the month’s current allocations\n */\nexport const learningListRoyaltyAllocations = async (periodId: number,\n params?: LearningListRoyaltyAllocationsParams, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyAllocationPage> => {\n\n return request<LearningRoyaltyAllocationPage>(getLearningListRoyaltyAllocationsUrl(periodId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningListRoyaltyAllocationsQueryKey = (periodId: number,\n params?: LearningListRoyaltyAllocationsParams,) => {\n return [\n `/learning/finance/periods/${periodId}/allocations`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getLearningListRoyaltyAllocationsQueryOptions = <TData = Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(periodId: number,\n params?: LearningListRoyaltyAllocationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningListRoyaltyAllocationsQueryKey(periodId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningListRoyaltyAllocations>>> = ({ signal }) => learningListRoyaltyAllocations(periodId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: periodId !== null && periodId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningListRoyaltyAllocationsQueryResult = NonNullable<Awaited<ReturnType<typeof learningListRoyaltyAllocations>>>\nexport type LearningListRoyaltyAllocationsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningListRoyaltyAllocations<TData = Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number,\n params: undefined | LearningListRoyaltyAllocationsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListRoyaltyAllocations>>,\n TError,\n Awaited<ReturnType<typeof learningListRoyaltyAllocations>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListRoyaltyAllocations<TData = Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number,\n params?: LearningListRoyaltyAllocationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListRoyaltyAllocations>>,\n TError,\n Awaited<ReturnType<typeof learningListRoyaltyAllocations>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListRoyaltyAllocations<TData = Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number,\n params?: LearningListRoyaltyAllocationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Inspect the month’s current allocations\n */\n\nexport function useLearningListRoyaltyAllocations<TData = Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number,\n params?: LearningListRoyaltyAllocationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningListRoyaltyAllocationsQueryOptions(periodId,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 getLearningApproveRoyaltyCalculationUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/approve`\n}\n\n/**\n * Make a native month immutable after the input snapshot and every channel budget complete in expectedGeneration. Repeating approval of that same generation returns its approved state. Only approved allocations are visible through payee allocation history and eligible for settlement. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Approve a completed royalty generation\n */\nexport const learningApproveRoyaltyCalculation = async (periodId: number,\n learningRoyaltyApprovalWrite: LearningRoyaltyApprovalWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\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<LearningRoyaltyPeriodRead>(getLearningApproveRoyaltyCalculationUrl(periodId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyApprovalWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningApproveRoyaltyCalculationMutationKey = () => ['learningApproveRoyaltyCalculation'] as const;\n\nexport const getLearningApproveRoyaltyCalculationMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningApproveRoyaltyCalculation>>, TError,LearningApproveRoyaltyCalculationMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningApproveRoyaltyCalculation>>, TError,LearningApproveRoyaltyCalculationMutationVariables, TContext> => {\n\nconst mutationKey = getLearningApproveRoyaltyCalculationMutationKey();\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 learningApproveRoyaltyCalculation>>, LearningApproveRoyaltyCalculationMutationVariables> = (props) => {\n const {periodId,data} = props ?? {};\n\n return learningApproveRoyaltyCalculation(periodId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningApproveRoyaltyCalculationMutationResult = NonNullable<Awaited<ReturnType<typeof learningApproveRoyaltyCalculation>>>\n export type LearningApproveRoyaltyCalculationMutationBody = BodyType<LearningRoyaltyApprovalWrite>\n export type LearningApproveRoyaltyCalculationMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningApproveRoyaltyCalculationMutationVariables = {periodId: number;data: BodyType<LearningRoyaltyApprovalWrite>}\n\n /**\n * @summary Approve a completed royalty generation\n */\nexport const useLearningApproveRoyaltyCalculation = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningApproveRoyaltyCalculation>>, TError,LearningApproveRoyaltyCalculationMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningApproveRoyaltyCalculation>>,\n TError,\n LearningApproveRoyaltyCalculationMutationVariables,\n TContext\n > => {\n return useMutation(getLearningApproveRoyaltyCalculationMutationOptions(options), queryClient);\n }\n export const getLearningListRoyaltyBudgetsUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/budgets`\n}\n\n/**\n * List every budget for the month, ordered by ID. Compare each budget generation with its period before reviewing results. inputSubjectCount is the distinct subject denominator of the frozen activity population, not minutes or lesson counts. Amounts are decimal major currency units, not integer cents. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary List channel budgets and calculation results\n */\nexport const learningListRoyaltyBudgets = async (periodId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyBudgetListRead> => {\n\n return request<LearningRoyaltyBudgetListRead>(getLearningListRoyaltyBudgetsUrl(periodId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningListRoyaltyBudgetsQueryKey = (periodId: number,) => {\n return [\n `/learning/finance/periods/${periodId}/budgets`\n ] as const;\n }\n\n\nexport const getLearningListRoyaltyBudgetsQueryOptions = <TData = Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(periodId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningListRoyaltyBudgetsQueryKey(periodId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningListRoyaltyBudgets>>> = ({ signal }) => learningListRoyaltyBudgets(periodId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: periodId !== null && periodId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningListRoyaltyBudgetsQueryResult = NonNullable<Awaited<ReturnType<typeof learningListRoyaltyBudgets>>>\nexport type LearningListRoyaltyBudgetsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningListRoyaltyBudgets<TData = Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListRoyaltyBudgets>>,\n TError,\n Awaited<ReturnType<typeof learningListRoyaltyBudgets>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListRoyaltyBudgets<TData = Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListRoyaltyBudgets>>,\n TError,\n Awaited<ReturnType<typeof learningListRoyaltyBudgets>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListRoyaltyBudgets<TData = Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List channel budgets and calculation results\n */\n\nexport function useLearningListRoyaltyBudgets<TData = Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningListRoyaltyBudgetsQueryOptions(periodId,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 getLearningSetRoyaltyBudgetUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/budgets`\n}\n\n/**\n * Create or replace the channel budget for an editable period. amount is nonnegative with at most eight decimal places and 24 total digits, in the period’s currency. Editing calculated inputs advances the period generation and returns it to draft; historical, approved and running calculations cannot be edited. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Set a channel’s monthly royalty pool\n */\nexport const learningSetRoyaltyBudget = async (periodId: number,\n learningRoyaltyBudgetWrite: LearningRoyaltyBudgetWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyBudgetRead> => {\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<LearningRoyaltyBudgetRead>(getLearningSetRoyaltyBudgetUrl(periodId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyBudgetWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningSetRoyaltyBudgetMutationKey = () => ['learningSetRoyaltyBudget'] as const;\n\nexport const getLearningSetRoyaltyBudgetMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningSetRoyaltyBudget>>, TError,LearningSetRoyaltyBudgetMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningSetRoyaltyBudget>>, TError,LearningSetRoyaltyBudgetMutationVariables, TContext> => {\n\nconst mutationKey = getLearningSetRoyaltyBudgetMutationKey();\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 learningSetRoyaltyBudget>>, LearningSetRoyaltyBudgetMutationVariables> = (props) => {\n const {periodId,data} = props ?? {};\n\n return learningSetRoyaltyBudget(periodId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningSetRoyaltyBudgetMutationResult = NonNullable<Awaited<ReturnType<typeof learningSetRoyaltyBudget>>>\n export type LearningSetRoyaltyBudgetMutationBody = BodyType<LearningRoyaltyBudgetWrite>\n export type LearningSetRoyaltyBudgetMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningSetRoyaltyBudgetMutationVariables = {periodId: number;data: BodyType<LearningRoyaltyBudgetWrite>}\n\n /**\n * @summary Set a channel’s monthly royalty pool\n */\nexport const useLearningSetRoyaltyBudget = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningSetRoyaltyBudget>>, TError,LearningSetRoyaltyBudgetMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningSetRoyaltyBudget>>,\n TError,\n LearningSetRoyaltyBudgetMutationVariables,\n TContext\n > => {\n return useMutation(getLearningSetRoyaltyBudgetMutationOptions(options), queryClient);\n }\n export const getLearningRequestRoyaltyCalculationUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/calculate`\n}\n\n/**\n * Freeze applicable agreements, channels, adjustments and activity cutoff, then queue input and channel processing. The month must have closed in Europe/Paris and have at least one active channel budget. Poll the period and budgets. Repeating while calculating requeues failed work without replacing frozen facts; an already calculated period returns its current result. HTTP 202 is acceptance, not approval or payment. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Queue a closed month’s royalty calculation\n */\nexport const learningRequestRoyaltyCalculation = async (periodId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\n\n return request<LearningRoyaltyPeriodRead>(getLearningRequestRoyaltyCalculationUrl(periodId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningRequestRoyaltyCalculationMutationKey = () => ['learningRequestRoyaltyCalculation'] as const;\n\nexport const getLearningRequestRoyaltyCalculationMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningRequestRoyaltyCalculation>>, TError,LearningRequestRoyaltyCalculationMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningRequestRoyaltyCalculation>>, TError,LearningRequestRoyaltyCalculationMutationVariables, TContext> => {\n\nconst mutationKey = getLearningRequestRoyaltyCalculationMutationKey();\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 learningRequestRoyaltyCalculation>>, LearningRequestRoyaltyCalculationMutationVariables> = (props) => {\n const {periodId} = props ?? {};\n\n return learningRequestRoyaltyCalculation(periodId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningRequestRoyaltyCalculationMutationResult = NonNullable<Awaited<ReturnType<typeof learningRequestRoyaltyCalculation>>>\n\n export type LearningRequestRoyaltyCalculationMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningRequestRoyaltyCalculationMutationVariables = {periodId: number}\n\n /**\n * @summary Queue a closed month’s royalty calculation\n */\nexport const useLearningRequestRoyaltyCalculation = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningRequestRoyaltyCalculation>>, TError,LearningRequestRoyaltyCalculationMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningRequestRoyaltyCalculation>>,\n TError,\n LearningRequestRoyaltyCalculationMutationVariables,\n TContext\n > => {\n return useMutation(getLearningRequestRoyaltyCalculationMutationOptions(options), queryClient);\n }\n export const getLearningResetRoyaltyCalculationUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/reset`\n}\n\n/**\n * Require the generation just reviewed, advance it, clear frozen inputs and worker claims, and reset channel budgets to draft. This permits corrected inputs after a failed or unwanted calculation. Historical and approved months are immutable. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Invalidate an unapproved calculation\n */\nexport const learningResetRoyaltyCalculation = async (periodId: number,\n learningRoyaltyApprovalWrite: LearningRoyaltyApprovalWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\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<LearningRoyaltyPeriodRead>(getLearningResetRoyaltyCalculationUrl(periodId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyApprovalWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningResetRoyaltyCalculationMutationKey = () => ['learningResetRoyaltyCalculation'] as const;\n\nexport const getLearningResetRoyaltyCalculationMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningResetRoyaltyCalculation>>, TError,LearningResetRoyaltyCalculationMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningResetRoyaltyCalculation>>, TError,LearningResetRoyaltyCalculationMutationVariables, TContext> => {\n\nconst mutationKey = getLearningResetRoyaltyCalculationMutationKey();\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 learningResetRoyaltyCalculation>>, LearningResetRoyaltyCalculationMutationVariables> = (props) => {\n const {periodId,data} = props ?? {};\n\n return learningResetRoyaltyCalculation(periodId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningResetRoyaltyCalculationMutationResult = NonNullable<Awaited<ReturnType<typeof learningResetRoyaltyCalculation>>>\n export type LearningResetRoyaltyCalculationMutationBody = BodyType<LearningRoyaltyApprovalWrite>\n export type LearningResetRoyaltyCalculationMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningResetRoyaltyCalculationMutationVariables = {periodId: number;data: BodyType<LearningRoyaltyApprovalWrite>}\n\n /**\n * @summary Invalidate an unapproved calculation\n */\nexport const useLearningResetRoyaltyCalculation = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningResetRoyaltyCalculation>>, TError,LearningResetRoyaltyCalculationMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningResetRoyaltyCalculation>>,\n TError,\n LearningResetRoyaltyCalculationMutationVariables,\n TContext\n > => {\n return useMutation(getLearningResetRoyaltyCalculationMutationOptions(options), queryClient);\n }\n export const getLearningReadRoyaltySettlementUrl = (settlementId: number,) => {\n\n\n\n\n return `/learning/finance/settlements/${settlementId}`\n}\n\n/**\n * Read the two-month components, computed payable amount and recorded payment status. A historical settlement without a resolved payee requires catalogue finance authority; otherwise the linked rightsholder may read it. Amounts are decimal major currency units, not integer cents. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Read a rightsholder settlement\n */\nexport const learningReadRoyaltySettlement = async (settlementId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltySettlementRead> => {\n\n return request<LearningRoyaltySettlementRead>(getLearningReadRoyaltySettlementUrl(settlementId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningReadRoyaltySettlementQueryKey = (settlementId: number,) => {\n return [\n `/learning/finance/settlements/${settlementId}`\n ] as const;\n }\n\n\nexport const getLearningReadRoyaltySettlementQueryOptions = <TData = Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(settlementId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningReadRoyaltySettlementQueryKey(settlementId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningReadRoyaltySettlement>>> = ({ signal }) => learningReadRoyaltySettlement(settlementId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: settlementId !== null && settlementId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningReadRoyaltySettlementQueryResult = NonNullable<Awaited<ReturnType<typeof learningReadRoyaltySettlement>>>\nexport type LearningReadRoyaltySettlementQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningReadRoyaltySettlement<TData = Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n settlementId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningReadRoyaltySettlement>>,\n TError,\n Awaited<ReturnType<typeof learningReadRoyaltySettlement>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningReadRoyaltySettlement<TData = Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n settlementId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningReadRoyaltySettlement>>,\n TError,\n Awaited<ReturnType<typeof learningReadRoyaltySettlement>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningReadRoyaltySettlement<TData = Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n settlementId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read a rightsholder settlement\n */\n\nexport function useLearningReadRoyaltySettlement<TData = Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n settlementId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningReadRoyaltySettlementQueryOptions(settlementId,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 getLearningIssueRoyaltyInvoiceUrl = (settlementId: number,) => {\n\n\n\n\n return `/learning/finance/settlements/${settlementId}/invoice`\n}\n\n/**\n * Snapshot the rightsholder’s complete billing address, recipient, settlement net amount and percentage tax rate. Generate a native number per payee/year. Matching recipient/tax retries return the existing invoice; issued facts cannot be replaced. The example EUR 590 net at 20% produces EUR 118 tax and EUR 708 total in the PDF. Issuance does not mark the settlement paid. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Issue an immutable royalty invoice\n */\nexport const learningIssueRoyaltyInvoice = async (settlementId: number,\n learningRoyaltyInvoiceWrite: LearningRoyaltyInvoiceWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyInvoiceRead> => {\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<LearningRoyaltyInvoiceRead>(getLearningIssueRoyaltyInvoiceUrl(settlementId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyInvoiceWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningIssueRoyaltyInvoiceMutationKey = () => ['learningIssueRoyaltyInvoice'] as const;\n\nexport const getLearningIssueRoyaltyInvoiceMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningIssueRoyaltyInvoice>>, TError,LearningIssueRoyaltyInvoiceMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningIssueRoyaltyInvoice>>, TError,LearningIssueRoyaltyInvoiceMutationVariables, TContext> => {\n\nconst mutationKey = getLearningIssueRoyaltyInvoiceMutationKey();\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 learningIssueRoyaltyInvoice>>, LearningIssueRoyaltyInvoiceMutationVariables> = (props) => {\n const {settlementId,data} = props ?? {};\n\n return learningIssueRoyaltyInvoice(settlementId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningIssueRoyaltyInvoiceMutationResult = NonNullable<Awaited<ReturnType<typeof learningIssueRoyaltyInvoice>>>\n export type LearningIssueRoyaltyInvoiceMutationBody = BodyType<LearningRoyaltyInvoiceWrite>\n export type LearningIssueRoyaltyInvoiceMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningIssueRoyaltyInvoiceMutationVariables = {settlementId: number;data: BodyType<LearningRoyaltyInvoiceWrite>}\n\n /**\n * @summary Issue an immutable royalty invoice\n */\nexport const useLearningIssueRoyaltyInvoice = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningIssueRoyaltyInvoice>>, TError,LearningIssueRoyaltyInvoiceMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningIssueRoyaltyInvoice>>,\n TError,\n LearningIssueRoyaltyInvoiceMutationVariables,\n TContext\n > => {\n return useMutation(getLearningIssueRoyaltyInvoiceMutationOptions(options), queryClient);\n }\n export const getLearningRecordRoyaltyPaymentUrl = (settlementId: number,) => {\n\n\n\n\n return `/learning/finance/settlements/${settlementId}/paid`\n}\n\n/**\n * Mark the settlement paid using external accounting evidence and record the current time as paidAt. This operation never initiates a bank transfer or sends money. A matching paymentReference is idempotent; different existing evidence conflicts. Historical unresolved payee/payment facts must first be reconciled. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Record an observed royalty payment\n */\nexport const learningRecordRoyaltyPayment = async (settlementId: number,\n learningRoyaltyPaidWrite: LearningRoyaltyPaidWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltySettlementRead> => {\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<LearningRoyaltySettlementRead>(getLearningRecordRoyaltyPaymentUrl(settlementId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyPaidWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningRecordRoyaltyPaymentMutationKey = () => ['learningRecordRoyaltyPayment'] as const;\n\nexport const getLearningRecordRoyaltyPaymentMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningRecordRoyaltyPayment>>, TError,LearningRecordRoyaltyPaymentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningRecordRoyaltyPayment>>, TError,LearningRecordRoyaltyPaymentMutationVariables, TContext> => {\n\nconst mutationKey = getLearningRecordRoyaltyPaymentMutationKey();\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 learningRecordRoyaltyPayment>>, LearningRecordRoyaltyPaymentMutationVariables> = (props) => {\n const {settlementId,data} = props ?? {};\n\n return learningRecordRoyaltyPayment(settlementId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningRecordRoyaltyPaymentMutationResult = NonNullable<Awaited<ReturnType<typeof learningRecordRoyaltyPayment>>>\n export type LearningRecordRoyaltyPaymentMutationBody = BodyType<LearningRoyaltyPaidWrite>\n export type LearningRecordRoyaltyPaymentMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningRecordRoyaltyPaymentMutationVariables = {settlementId: number;data: BodyType<LearningRoyaltyPaidWrite>}\n\n /**\n * @summary Record an observed royalty payment\n */\nexport const useLearningRecordRoyaltyPayment = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningRecordRoyaltyPayment>>, TError,LearningRecordRoyaltyPaymentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningRecordRoyaltyPayment>>,\n TError,\n LearningRecordRoyaltyPaymentMutationVariables,\n TContext\n > => {\n return useMutation(getLearningRecordRoyaltyPaymentMutationOptions(options), queryClient);\n }\n"],"mappings":";;;;;;;;;;;AA0EA,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,qCAAqC,gBAAyB;CAKzE,OAAO,gCAAgC,YAAY;AACrD;;;;;AAMA,MAAa,8BAA8B,OAAO,aAC9C,kCAAoE,YAAmF;CAEvJ,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OA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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,cAAyI,UAAU;EACrJ,MAAM,EAAC,cAAa,SAAQ,SAAS,CAAC;EAEtC,OAAQ,6BAA6B,cAAa,MAAK,cAAc;CACvE;CAON,OAAQ;EAAE;EAAY,GAAG;CAAgB;AAAC;;;;AAU5C,MAAa,mCACW,SACrB,gBAKQ;CACL,OAAO,YAAY,+CAA+C,OAAO,GAAG,WAAW;AACzF"}
|
|
1
|
+
{"version":3,"file":"biblio-learning-finance.js","names":[],"sources":["../../src/react/biblio-learning-finance/biblio-learning-finance.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.15.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 LearningAssetRead,\n LearningChannelListRead,\n LearningChannelRead,\n LearningChannelWrite,\n LearningContractChannelWrite,\n LearningListPayeeAllocationsParams,\n LearningListPayeeSettlementsParams,\n LearningListPayeesParams,\n LearningListRoyaltyAllocationsParams,\n LearningListRoyaltyPeriodsParams,\n LearningPayeeDocumentPage,\n LearningPayeeDocumentUploadWrite,\n LearningPayeeDocumentsParams,\n LearningPayeePage,\n LearningPayeeRead,\n LearningPayeeWrite,\n LearningRoyaltyAdjustmentWrite,\n LearningRoyaltyAgreementEndWrite,\n LearningRoyaltyAgreementRead,\n LearningRoyaltyAgreementWrite,\n LearningRoyaltyAllocationPage,\n LearningRoyaltyApprovalWrite,\n LearningRoyaltyBudgetListRead,\n LearningRoyaltyBudgetRead,\n LearningRoyaltyBudgetWrite,\n LearningRoyaltyInvoiceRead,\n LearningRoyaltyInvoiceWrite,\n LearningRoyaltyPaidWrite,\n LearningRoyaltyPeriodPage,\n LearningRoyaltyPeriodRead,\n LearningRoyaltyPeriodWrite,\n LearningRoyaltySettlementPage,\n LearningRoyaltySettlementRead,\n LearningRoyaltySettlementWrite,\n LearningUploadRead,\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 getLearningEndRoyaltyAgreementUrl = (agreementId: number,) => {\n\n\n\n\n return `/learning/finance/agreements/${agreementId}/end`\n}\n\n/**\n * Set the inclusive final month using first-of-month dates. expectedEndsMonth must match the current end unless this exact end is already applied. The change cannot precede the start, overlap other terms, or invalidate approved accounting. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Set an agreement’s final covered month\n */\nexport const learningEndRoyaltyAgreement = async (agreementId: number,\n learningRoyaltyAgreementEndWrite: LearningRoyaltyAgreementEndWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyAgreementRead> => {\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<LearningRoyaltyAgreementRead>(getLearningEndRoyaltyAgreementUrl(agreementId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyAgreementEndWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningEndRoyaltyAgreementMutationKey = () => ['learningEndRoyaltyAgreement'] as const;\n\nexport const getLearningEndRoyaltyAgreementMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningEndRoyaltyAgreement>>, TError,LearningEndRoyaltyAgreementMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningEndRoyaltyAgreement>>, TError,LearningEndRoyaltyAgreementMutationVariables, TContext> => {\n\nconst mutationKey = getLearningEndRoyaltyAgreementMutationKey();\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 learningEndRoyaltyAgreement>>, LearningEndRoyaltyAgreementMutationVariables> = (props) => {\n const {agreementId,data} = props ?? {};\n\n return learningEndRoyaltyAgreement(agreementId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningEndRoyaltyAgreementMutationResult = NonNullable<Awaited<ReturnType<typeof learningEndRoyaltyAgreement>>>\n export type LearningEndRoyaltyAgreementMutationBody = BodyType<LearningRoyaltyAgreementEndWrite>\n export type LearningEndRoyaltyAgreementMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningEndRoyaltyAgreementMutationVariables = {agreementId: number;data: BodyType<LearningRoyaltyAgreementEndWrite>}\n\n /**\n * @summary Set an agreement’s final covered month\n */\nexport const useLearningEndRoyaltyAgreement = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningEndRoyaltyAgreement>>, TError,LearningEndRoyaltyAgreementMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningEndRoyaltyAgreement>>,\n TError,\n LearningEndRoyaltyAgreementMutationVariables,\n TContext\n > => {\n return useMutation(getLearningEndRoyaltyAgreementMutationOptions(options), queryClient);\n }\n export const getLearningListDistributionChannelsUrl = (catalogueId: number,) => {\n\n\n\n\n return `/learning/finance/catalogues/${catalogueId}/channels`\n}\n\n/**\n * List every channel in the catalogue, including inactive channels, ordered by channel ID. Organic identifies the direct distribution pool; a channel does not grant course access. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary List catalogue distribution channels\n */\nexport const learningListDistributionChannels = async (catalogueId: number, options?: Parameters<typeof request>[1]): Promise<LearningChannelListRead> => {\n\n return request<LearningChannelListRead>(getLearningListDistributionChannelsUrl(catalogueId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningListDistributionChannelsQueryKey = (catalogueId: number,) => {\n return [\n `/learning/finance/catalogues/${catalogueId}/channels`\n ] as const;\n }\n\n\nexport const getLearningListDistributionChannelsQueryOptions = <TData = Awaited<ReturnType<typeof learningListDistributionChannels>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(catalogueId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListDistributionChannels>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningListDistributionChannelsQueryKey(catalogueId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningListDistributionChannels>>> = ({ signal }) => learningListDistributionChannels(catalogueId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: catalogueId !== null && catalogueId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningListDistributionChannels>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningListDistributionChannelsQueryResult = NonNullable<Awaited<ReturnType<typeof learningListDistributionChannels>>>\nexport type LearningListDistributionChannelsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningListDistributionChannels<TData = Awaited<ReturnType<typeof learningListDistributionChannels>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n catalogueId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListDistributionChannels>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListDistributionChannels>>,\n TError,\n Awaited<ReturnType<typeof learningListDistributionChannels>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListDistributionChannels<TData = Awaited<ReturnType<typeof learningListDistributionChannels>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n catalogueId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListDistributionChannels>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListDistributionChannels>>,\n TError,\n Awaited<ReturnType<typeof learningListDistributionChannels>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListDistributionChannels<TData = Awaited<ReturnType<typeof learningListDistributionChannels>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n catalogueId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListDistributionChannels>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List catalogue distribution channels\n */\n\nexport function useLearningListDistributionChannels<TData = Awaited<ReturnType<typeof learningListDistributionChannels>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n catalogueId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListDistributionChannels>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningListDistributionChannelsQueryOptions(catalogueId,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 getLearningCreateDistributionChannelUrl = (catalogueId: number,) => {\n\n\n\n\n return `/learning/finance/catalogues/${catalogueId}/channels`\n}\n\n/**\n * Create an active organic or promotional accounting channel. At most one active organic channel is permitted per catalogue. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Create a distribution channel\n */\nexport const learningCreateDistributionChannel = async (catalogueId: number,\n learningChannelWrite: LearningChannelWrite, options?: Parameters<typeof request>[1]): Promise<LearningChannelRead> => {\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<LearningChannelRead>(getLearningCreateDistributionChannelUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningChannelWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningCreateDistributionChannelMutationKey = () => ['learningCreateDistributionChannel'] as const;\n\nexport const getLearningCreateDistributionChannelMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreateDistributionChannel>>, TError,LearningCreateDistributionChannelMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningCreateDistributionChannel>>, TError,LearningCreateDistributionChannelMutationVariables, TContext> => {\n\nconst mutationKey = getLearningCreateDistributionChannelMutationKey();\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 learningCreateDistributionChannel>>, LearningCreateDistributionChannelMutationVariables> = (props) => {\n const {catalogueId,data} = props ?? {};\n\n return learningCreateDistributionChannel(catalogueId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningCreateDistributionChannelMutationResult = NonNullable<Awaited<ReturnType<typeof learningCreateDistributionChannel>>>\n export type LearningCreateDistributionChannelMutationBody = BodyType<LearningChannelWrite>\n export type LearningCreateDistributionChannelMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningCreateDistributionChannelMutationVariables = {catalogueId: number;data: BodyType<LearningChannelWrite>}\n\n /**\n * @summary Create a distribution channel\n */\nexport const useLearningCreateDistributionChannel = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreateDistributionChannel>>, TError,LearningCreateDistributionChannelMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningCreateDistributionChannel>>,\n TError,\n LearningCreateDistributionChannelMutationVariables,\n TContext\n > => {\n return useMutation(getLearningCreateDistributionChannelMutationOptions(options), queryClient);\n }\n export const getLearningCreatePayeeUrl = (catalogueId: number,) => {\n\n\n\n\n return `/learning/finance/catalogues/${catalogueId}/payees`\n}\n\n/**\n * Link an active independent account to one catalogue’s billing profile. The (catalogue, user) pair must be unique. expectedUpdatedAt is ignored on creation; optional legal details may be completed before invoicing. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Create a rightsholder billing profile\n */\nexport const learningCreatePayee = async (catalogueId: number,\n learningPayeeWrite: LearningPayeeWrite, options?: Parameters<typeof request>[1]): Promise<LearningPayeeRead> => {\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<LearningPayeeRead>(getLearningCreatePayeeUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPayeeWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningCreatePayeeMutationKey = () => ['learningCreatePayee'] as const;\n\nexport const getLearningCreatePayeeMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreatePayee>>, TError,LearningCreatePayeeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningCreatePayee>>, TError,LearningCreatePayeeMutationVariables, TContext> => {\n\nconst mutationKey = getLearningCreatePayeeMutationKey();\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 learningCreatePayee>>, LearningCreatePayeeMutationVariables> = (props) => {\n const {catalogueId,data} = props ?? {};\n\n return learningCreatePayee(catalogueId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningCreatePayeeMutationResult = NonNullable<Awaited<ReturnType<typeof learningCreatePayee>>>\n export type LearningCreatePayeeMutationBody = BodyType<LearningPayeeWrite>\n export type LearningCreatePayeeMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningCreatePayeeMutationVariables = {catalogueId: number;data: BodyType<LearningPayeeWrite>}\n\n /**\n * @summary Create a rightsholder billing profile\n */\nexport const useLearningCreatePayee = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreatePayee>>, TError,LearningCreatePayeeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningCreatePayee>>,\n TError,\n LearningCreatePayeeMutationVariables,\n TContext\n > => {\n return useMutation(getLearningCreatePayeeMutationOptions(options), queryClient);\n }\n export const getLearningListRoyaltyPeriodsUrl = (catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams,) => {\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 ? `/learning/finance/catalogues/${catalogueId}/periods?${stringifiedParams}` : `/learning/finance/catalogues/${catalogueId}/periods`\n}\n\n/**\n * List accounting periods for the catalogue, newest month then ID first. State and generation identify which inputs/results are current; historical accounting remains readable even when a catalogue closes. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary List catalogue accounting months\n */\nexport const learningListRoyaltyPeriods = async (catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodPage> => {\n\n return request<LearningRoyaltyPeriodPage>(getLearningListRoyaltyPeriodsUrl(catalogueId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningListRoyaltyPeriodsQueryKey = (catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams,) => {\n return [\n `/learning/finance/catalogues/${catalogueId}/periods`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getLearningListRoyaltyPeriodsQueryOptions = <TData = Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningListRoyaltyPeriodsQueryKey(catalogueId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningListRoyaltyPeriods>>> = ({ signal }) => learningListRoyaltyPeriods(catalogueId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: catalogueId !== null && catalogueId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningListRoyaltyPeriodsQueryResult = NonNullable<Awaited<ReturnType<typeof learningListRoyaltyPeriods>>>\nexport type LearningListRoyaltyPeriodsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningListRoyaltyPeriods<TData = Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n catalogueId: number,\n params: undefined | LearningListRoyaltyPeriodsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListRoyaltyPeriods>>,\n TError,\n Awaited<ReturnType<typeof learningListRoyaltyPeriods>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListRoyaltyPeriods<TData = Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListRoyaltyPeriods>>,\n TError,\n Awaited<ReturnType<typeof learningListRoyaltyPeriods>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListRoyaltyPeriods<TData = Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List catalogue accounting months\n */\n\nexport function useLearningListRoyaltyPeriods<TData = Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyPeriods>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningListRoyaltyPeriodsQueryOptions(catalogueId,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 getLearningCreateRoyaltyPeriodUrl = (catalogueId: number,) => {\n\n\n\n\n return `/learning/finance/catalogues/${catalogueId}/periods`\n}\n\n/**\n * Create a draft period for one catalogue, calendar month and currency. month must be the first day; currency is three uppercase letters. A period may be opened before the month closes, but calculation must wait for its Europe/Paris month boundary. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Open a monthly royalty period\n */\nexport const learningCreateRoyaltyPeriod = async (catalogueId: number,\n learningRoyaltyPeriodWrite: LearningRoyaltyPeriodWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\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<LearningRoyaltyPeriodRead>(getLearningCreateRoyaltyPeriodUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyPeriodWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningCreateRoyaltyPeriodMutationKey = () => ['learningCreateRoyaltyPeriod'] as const;\n\nexport const getLearningCreateRoyaltyPeriodMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreateRoyaltyPeriod>>, TError,LearningCreateRoyaltyPeriodMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningCreateRoyaltyPeriod>>, TError,LearningCreateRoyaltyPeriodMutationVariables, TContext> => {\n\nconst mutationKey = getLearningCreateRoyaltyPeriodMutationKey();\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 learningCreateRoyaltyPeriod>>, LearningCreateRoyaltyPeriodMutationVariables> = (props) => {\n const {catalogueId,data} = props ?? {};\n\n return learningCreateRoyaltyPeriod(catalogueId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningCreateRoyaltyPeriodMutationResult = NonNullable<Awaited<ReturnType<typeof learningCreateRoyaltyPeriod>>>\n export type LearningCreateRoyaltyPeriodMutationBody = BodyType<LearningRoyaltyPeriodWrite>\n export type LearningCreateRoyaltyPeriodMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningCreateRoyaltyPeriodMutationVariables = {catalogueId: number;data: BodyType<LearningRoyaltyPeriodWrite>}\n\n /**\n * @summary Open a monthly royalty period\n */\nexport const useLearningCreateRoyaltyPeriod = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreateRoyaltyPeriod>>, TError,LearningCreateRoyaltyPeriodMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningCreateRoyaltyPeriod>>,\n TError,\n LearningCreateRoyaltyPeriodMutationVariables,\n TContext\n > => {\n return useMutation(getLearningCreateRoyaltyPeriodMutationOptions(options), queryClient);\n }\n export const getLearningSetContractChannelUrl = (contractId: number,) => {\n\n\n\n\n return `/learning/finance/contracts/${contractId}/channel`\n}\n\n/**\n * Replace the contract’s distribution mapping and eligibility flag. The channel must be active; this mapping controls royalty attribution and does not grant reader access. Global commercial authority is required in addition to the channel catalogue scope. Success returns no body. Mutations require high authentication assurance.\n * @summary Assign a contract’s royalty channel\n */\nexport const learningSetContractChannel = async (contractId: number,\n learningContractChannelWrite: LearningContractChannelWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getLearningSetContractChannelUrl(contractId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningContractChannelWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningSetContractChannelMutationKey = () => ['learningSetContractChannel'] as const;\n\nexport const getLearningSetContractChannelMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningSetContractChannel>>, TError,LearningSetContractChannelMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningSetContractChannel>>, TError,LearningSetContractChannelMutationVariables, TContext> => {\n\nconst mutationKey = getLearningSetContractChannelMutationKey();\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 learningSetContractChannel>>, LearningSetContractChannelMutationVariables> = (props) => {\n const {contractId,data} = props ?? {};\n\n return learningSetContractChannel(contractId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningSetContractChannelMutationResult = NonNullable<Awaited<ReturnType<typeof learningSetContractChannel>>>\n export type LearningSetContractChannelMutationBody = BodyType<LearningContractChannelWrite>\n export type LearningSetContractChannelMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningSetContractChannelMutationVariables = {contractId: number;data: BodyType<LearningContractChannelWrite>}\n\n /**\n * @summary Assign a contract’s royalty channel\n */\nexport const useLearningSetContractChannel = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningSetContractChannel>>, TError,LearningSetContractChannelMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningSetContractChannel>>,\n TError,\n LearningSetContractChannelMutationVariables,\n TContext\n > => {\n return useMutation(getLearningSetContractChannelMutationOptions(options), queryClient);\n }\n export const getLearningCreateRoyaltyAgreementUrl = (courseId: number,) => {\n\n\n\n\n return `/learning/finance/courses/${courseId}/agreements`\n}\n\n/**\n * Create terms for an active rightsholder in the course’s financial catalogue. First-of-month bounds are inclusive; null endsMonth leaves the agreement open. Overlapping terms for the same course/payee are refused. share is a fraction; coefficients are negotiated multipliers. Calculation requires the course’s applicable shares to sum to one. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Create monthly rightsholder terms\n */\nexport const learningCreateRoyaltyAgreement = async (courseId: number,\n learningRoyaltyAgreementWrite: LearningRoyaltyAgreementWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyAgreementRead> => {\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<LearningRoyaltyAgreementRead>(getLearningCreateRoyaltyAgreementUrl(courseId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyAgreementWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningCreateRoyaltyAgreementMutationKey = () => ['learningCreateRoyaltyAgreement'] as const;\n\nexport const getLearningCreateRoyaltyAgreementMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreateRoyaltyAgreement>>, TError,LearningCreateRoyaltyAgreementMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningCreateRoyaltyAgreement>>, TError,LearningCreateRoyaltyAgreementMutationVariables, TContext> => {\n\nconst mutationKey = getLearningCreateRoyaltyAgreementMutationKey();\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 learningCreateRoyaltyAgreement>>, LearningCreateRoyaltyAgreementMutationVariables> = (props) => {\n const {courseId,data} = props ?? {};\n\n return learningCreateRoyaltyAgreement(courseId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningCreateRoyaltyAgreementMutationResult = NonNullable<Awaited<ReturnType<typeof learningCreateRoyaltyAgreement>>>\n export type LearningCreateRoyaltyAgreementMutationBody = BodyType<LearningRoyaltyAgreementWrite>\n export type LearningCreateRoyaltyAgreementMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningCreateRoyaltyAgreementMutationVariables = {courseId: number;data: BodyType<LearningRoyaltyAgreementWrite>}\n\n /**\n * @summary Create monthly rightsholder terms\n */\nexport const useLearningCreateRoyaltyAgreement = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreateRoyaltyAgreement>>, TError,LearningCreateRoyaltyAgreementMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningCreateRoyaltyAgreement>>,\n TError,\n LearningCreateRoyaltyAgreementMutationVariables,\n TContext\n > => {\n return useMutation(getLearningCreateRoyaltyAgreementMutationOptions(options), queryClient);\n }\n export const getLearningReadRoyaltyInvoiceUrl = (invoiceId: number,) => {\n\n\n\n\n return `/learning/finance/invoices/${invoiceId}`\n}\n\n/**\n * Read immutable issuance facts and the authenticated document endpoint. number is the native sequence; sourceNumber preserves an imported reference. Historical missing net/tax facts stay null and must not be reconstructed from current legal details. A source invoice without a settlement requires catalogue finance authority. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Read native or source invoice facts\n */\nexport const learningReadRoyaltyInvoice = async (invoiceId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyInvoiceRead> => {\n\n return request<LearningRoyaltyInvoiceRead>(getLearningReadRoyaltyInvoiceUrl(invoiceId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningReadRoyaltyInvoiceQueryKey = (invoiceId: number,) => {\n return [\n `/learning/finance/invoices/${invoiceId}`\n ] as const;\n }\n\n\nexport const getLearningReadRoyaltyInvoiceQueryOptions = <TData = Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(invoiceId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningReadRoyaltyInvoiceQueryKey(invoiceId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>> = ({ signal }) => learningReadRoyaltyInvoice(invoiceId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: invoiceId !== null && invoiceId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningReadRoyaltyInvoiceQueryResult = NonNullable<Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>>\nexport type LearningReadRoyaltyInvoiceQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningReadRoyaltyInvoice<TData = Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n invoiceId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>,\n TError,\n Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningReadRoyaltyInvoice<TData = Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n invoiceId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>,\n TError,\n Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningReadRoyaltyInvoice<TData = Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n invoiceId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read native or source invoice facts\n */\n\nexport function useLearningReadRoyaltyInvoice<TData = Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n invoiceId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyInvoice>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningReadRoyaltyInvoiceQueryOptions(invoiceId,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 getLearningDownloadRoyaltyInvoiceUrl = (invoiceId: number,) => {\n\n\n\n\n return `/learning/finance/invoices/${invoiceId}/document`\n}\n\n/**\n * Render the stored issuance snapshots as binary application/pdf. Returns Cache-Control: private, no-store and an attachment filename invoice-{invoice_id}.pdf. Missing original parties, amount, tax rate or supported layout prevents rendering; current billing details are never substituted into old invoices. A source invoice without a settlement requires catalogue finance authority. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Download a private invoice PDF\n */\nexport const learningDownloadRoyaltyInvoice = async (invoiceId: number, options?: Parameters<typeof request>[1]): Promise<Blob> => {\n\n return request<Blob>(getLearningDownloadRoyaltyInvoiceUrl(invoiceId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningDownloadRoyaltyInvoiceQueryKey = (invoiceId: number,) => {\n return [\n `/learning/finance/invoices/${invoiceId}/document`\n ] as const;\n }\n\n\nexport const getLearningDownloadRoyaltyInvoiceQueryOptions = <TData = Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(invoiceId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningDownloadRoyaltyInvoiceQueryKey(invoiceId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>> = ({ signal }) => learningDownloadRoyaltyInvoice(invoiceId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: invoiceId !== null && invoiceId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningDownloadRoyaltyInvoiceQueryResult = NonNullable<Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>>\nexport type LearningDownloadRoyaltyInvoiceQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningDownloadRoyaltyInvoice<TData = Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n invoiceId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>,\n TError,\n Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningDownloadRoyaltyInvoice<TData = Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n invoiceId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>,\n TError,\n Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningDownloadRoyaltyInvoice<TData = Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n invoiceId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Download a private invoice PDF\n */\n\nexport function useLearningDownloadRoyaltyInvoice<TData = Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n invoiceId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadRoyaltyInvoice>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningDownloadRoyaltyInvoiceQueryOptions(invoiceId,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 getLearningListPayeesUrl = (params?: LearningListPayeesParams,) => {\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 ? `/learning/finance/payees?${stringifiedParams}` : `/learning/finance/payees`\n}\n\n/**\n * List the caller’s linked rightsholders plus profiles in catalogues where they hold a finance grant; global commercial operators see all. Includes inactive and historical rows, ordered by ID. Public author attribution alone grants no finance access. Dependent profiles and support impersonation are refused.\n * @summary List accessible rightsholder billing profiles\n */\nexport const learningListPayees = async (params?: LearningListPayeesParams, options?: Parameters<typeof request>[1]): Promise<LearningPayeePage> => {\n\n return request<LearningPayeePage>(getLearningListPayeesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningListPayeesQueryKey = (params?: LearningListPayeesParams,) => {\n return [\n `/learning/finance/payees`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getLearningListPayeesQueryOptions = <TData = Awaited<ReturnType<typeof learningListPayees>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: LearningListPayeesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayees>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningListPayeesQueryKey(params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningListPayees>>> = ({ signal }) => learningListPayees(params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningListPayees>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningListPayeesQueryResult = NonNullable<Awaited<ReturnType<typeof learningListPayees>>>\nexport type LearningListPayeesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningListPayees<TData = Awaited<ReturnType<typeof learningListPayees>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params: undefined | LearningListPayeesParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayees>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListPayees>>,\n TError,\n Awaited<ReturnType<typeof learningListPayees>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListPayees<TData = Awaited<ReturnType<typeof learningListPayees>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: LearningListPayeesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayees>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListPayees>>,\n TError,\n Awaited<ReturnType<typeof learningListPayees>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListPayees<TData = Awaited<ReturnType<typeof learningListPayees>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: LearningListPayeesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayees>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List accessible rightsholder billing profiles\n */\n\nexport function useLearningListPayees<TData = Awaited<ReturnType<typeof learningListPayees>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n params?: LearningListPayeesParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayees>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningListPayeesQueryOptions(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 getLearningReadPayeeUrl = (payeeId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}`\n}\n\n/**\n * Read current legal details and the updatedAt concurrency value needed for replacement. Historical null values remain unknown. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Read a rightsholder billing profile\n */\nexport const learningReadPayee = async (payeeId: number, options?: Parameters<typeof request>[1]): Promise<LearningPayeeRead> => {\n\n return request<LearningPayeeRead>(getLearningReadPayeeUrl(payeeId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningReadPayeeQueryKey = (payeeId: number,) => {\n return [\n `/learning/finance/payees/${payeeId}`\n ] as const;\n }\n\n\nexport const getLearningReadPayeeQueryOptions = <TData = Awaited<ReturnType<typeof learningReadPayee>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(payeeId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadPayee>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningReadPayeeQueryKey(payeeId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningReadPayee>>> = ({ signal }) => learningReadPayee(payeeId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: payeeId !== null && payeeId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningReadPayee>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningReadPayeeQueryResult = NonNullable<Awaited<ReturnType<typeof learningReadPayee>>>\nexport type LearningReadPayeeQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningReadPayee<TData = Awaited<ReturnType<typeof learningReadPayee>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadPayee>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningReadPayee>>,\n TError,\n Awaited<ReturnType<typeof learningReadPayee>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningReadPayee<TData = Awaited<ReturnType<typeof learningReadPayee>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadPayee>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningReadPayee>>,\n TError,\n Awaited<ReturnType<typeof learningReadPayee>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningReadPayee<TData = Awaited<ReturnType<typeof learningReadPayee>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadPayee>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read a rightsholder billing profile\n */\n\nexport function useLearningReadPayee<TData = Awaited<ReturnType<typeof learningReadPayee>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadPayee>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningReadPayeeQueryOptions(payeeId,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 getLearningUpdatePayeeUrl = (payeeId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}`\n}\n\n/**\n * Replace all editable billing fields; omitted optional fields become null. Send the current updatedAt as expectedUpdatedAt and keep userId unchanged. Returns the new concurrency timestamp. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Replace a rightsholder’s legal details\n */\nexport const learningUpdatePayee = async (payeeId: number,\n learningPayeeWrite: LearningPayeeWrite, options?: Parameters<typeof request>[1]): Promise<LearningPayeeRead> => {\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<LearningPayeeRead>(getLearningUpdatePayeeUrl(payeeId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPayeeWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningUpdatePayeeMutationKey = () => ['learningUpdatePayee'] as const;\n\nexport const getLearningUpdatePayeeMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningUpdatePayee>>, TError,LearningUpdatePayeeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningUpdatePayee>>, TError,LearningUpdatePayeeMutationVariables, TContext> => {\n\nconst mutationKey = getLearningUpdatePayeeMutationKey();\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 learningUpdatePayee>>, LearningUpdatePayeeMutationVariables> = (props) => {\n const {payeeId,data} = props ?? {};\n\n return learningUpdatePayee(payeeId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningUpdatePayeeMutationResult = NonNullable<Awaited<ReturnType<typeof learningUpdatePayee>>>\n export type LearningUpdatePayeeMutationBody = BodyType<LearningPayeeWrite>\n export type LearningUpdatePayeeMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningUpdatePayeeMutationVariables = {payeeId: number;data: BodyType<LearningPayeeWrite>}\n\n /**\n * @summary Replace a rightsholder’s legal details\n */\nexport const useLearningUpdatePayee = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningUpdatePayee>>, TError,LearningUpdatePayeeMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningUpdatePayee>>,\n TError,\n LearningUpdatePayeeMutationVariables,\n TContext\n > => {\n return useMutation(getLearningUpdatePayeeMutationOptions(options), queryClient);\n }\n export const getLearningListPayeeAllocationsUrl = (payeeId: number,\n params?: LearningListPayeeAllocationsParams,) => {\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 ? `/learning/finance/payees/${payeeId}/allocations?${stringifiedParams}` : `/learning/finance/payees/${payeeId}/allocations`\n}\n\n/**\n * Page only this rightsholder’s allocations from approved months and each month’s current generation, newest month then allocation ID. Unapproved calculation output stays in the catalogue finance review endpoint. Amounts are decimal major currency units, not integer cents. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary List approved rightsholder allocations\n */\nexport const learningListPayeeAllocations = async (payeeId: number,\n params?: LearningListPayeeAllocationsParams, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyAllocationPage> => {\n\n return request<LearningRoyaltyAllocationPage>(getLearningListPayeeAllocationsUrl(payeeId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningListPayeeAllocationsQueryKey = (payeeId: number,\n params?: LearningListPayeeAllocationsParams,) => {\n return [\n `/learning/finance/payees/${payeeId}/allocations`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getLearningListPayeeAllocationsQueryOptions = <TData = Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(payeeId: number,\n params?: LearningListPayeeAllocationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningListPayeeAllocationsQueryKey(payeeId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningListPayeeAllocations>>> = ({ signal }) => learningListPayeeAllocations(payeeId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: payeeId !== null && payeeId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningListPayeeAllocationsQueryResult = NonNullable<Awaited<ReturnType<typeof learningListPayeeAllocations>>>\nexport type LearningListPayeeAllocationsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningListPayeeAllocations<TData = Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params: undefined | LearningListPayeeAllocationsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListPayeeAllocations>>,\n TError,\n Awaited<ReturnType<typeof learningListPayeeAllocations>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListPayeeAllocations<TData = Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningListPayeeAllocationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListPayeeAllocations>>,\n TError,\n Awaited<ReturnType<typeof learningListPayeeAllocations>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListPayeeAllocations<TData = Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningListPayeeAllocationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List approved rightsholder allocations\n */\n\nexport function useLearningListPayeeAllocations<TData = Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningListPayeeAllocationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeAllocations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningListPayeeAllocationsQueryOptions(payeeId,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 getLearningReservePayeeDocumentUrl = (payeeId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}/document-uploads`\n}\n\n/**\n * Reserve legal evidence, then PUT exactly sizeBytes raw bytes to uploadUrl with the declared Content-Type. For this purpose only PDF, JPEG and PNG are accepted, with a 10 MiB (10,485,760 byte) maximum despite the broader shared upload schema. Reservation alone does not create a completed legal document; completion validates the bytes. At most ten unexpired pending uploads are allowed per profile. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Reserve a private rightsholder document upload\n */\nexport const learningReservePayeeDocument = async (payeeId: number,\n learningPayeeDocumentUploadWrite: LearningPayeeDocumentUploadWrite, options?: Parameters<typeof request>[1]): Promise<LearningUploadRead> => {\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<LearningUploadRead>(getLearningReservePayeeDocumentUrl(payeeId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPayeeDocumentUploadWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningReservePayeeDocumentMutationKey = () => ['learningReservePayeeDocument'] as const;\n\nexport const getLearningReservePayeeDocumentMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningReservePayeeDocument>>, TError,LearningReservePayeeDocumentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningReservePayeeDocument>>, TError,LearningReservePayeeDocumentMutationVariables, TContext> => {\n\nconst mutationKey = getLearningReservePayeeDocumentMutationKey();\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 learningReservePayeeDocument>>, LearningReservePayeeDocumentMutationVariables> = (props) => {\n const {payeeId,data} = props ?? {};\n\n return learningReservePayeeDocument(payeeId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningReservePayeeDocumentMutationResult = NonNullable<Awaited<ReturnType<typeof learningReservePayeeDocument>>>\n export type LearningReservePayeeDocumentMutationBody = BodyType<LearningPayeeDocumentUploadWrite>\n export type LearningReservePayeeDocumentMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningReservePayeeDocumentMutationVariables = {payeeId: number;data: BodyType<LearningPayeeDocumentUploadWrite>}\n\n /**\n * @summary Reserve a private rightsholder document upload\n */\nexport const useLearningReservePayeeDocument = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningReservePayeeDocument>>, TError,LearningReservePayeeDocumentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningReservePayeeDocument>>,\n TError,\n LearningReservePayeeDocumentMutationVariables,\n TContext\n > => {\n return useMutation(getLearningReservePayeeDocumentMutationOptions(options), queryClient);\n }\n export const getLearningPayeeDocumentsUrl = (payeeId: number,\n params?: LearningPayeeDocumentsParams,) => {\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 ? `/learning/finance/payees/${payeeId}/documents?${stringifiedParams}` : `/learning/finance/payees/${payeeId}/documents`\n}\n\n/**\n * List completed document metadata, newest ID first. No file bytes or storage keys appear here; use the scoped document endpoint for delivery. Source creation dates may be unknown. This read also requires high authentication assurance. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary List private rightsholder legal documents\n */\nexport const learningPayeeDocuments = async (payeeId: number,\n params?: LearningPayeeDocumentsParams, options?: Parameters<typeof request>[1]): Promise<LearningPayeeDocumentPage> => {\n\n return request<LearningPayeeDocumentPage>(getLearningPayeeDocumentsUrl(payeeId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningPayeeDocumentsQueryKey = (payeeId: number,\n params?: LearningPayeeDocumentsParams,) => {\n return [\n `/learning/finance/payees/${payeeId}/documents`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getLearningPayeeDocumentsQueryOptions = <TData = Awaited<ReturnType<typeof learningPayeeDocuments>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(payeeId: number,\n params?: LearningPayeeDocumentsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningPayeeDocuments>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningPayeeDocumentsQueryKey(payeeId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningPayeeDocuments>>> = ({ signal }) => learningPayeeDocuments(payeeId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: payeeId !== null && payeeId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningPayeeDocuments>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningPayeeDocumentsQueryResult = NonNullable<Awaited<ReturnType<typeof learningPayeeDocuments>>>\nexport type LearningPayeeDocumentsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningPayeeDocuments<TData = Awaited<ReturnType<typeof learningPayeeDocuments>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params: undefined | LearningPayeeDocumentsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningPayeeDocuments>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningPayeeDocuments>>,\n TError,\n Awaited<ReturnType<typeof learningPayeeDocuments>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningPayeeDocuments<TData = Awaited<ReturnType<typeof learningPayeeDocuments>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningPayeeDocumentsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningPayeeDocuments>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningPayeeDocuments>>,\n TError,\n Awaited<ReturnType<typeof learningPayeeDocuments>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningPayeeDocuments<TData = Awaited<ReturnType<typeof learningPayeeDocuments>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningPayeeDocumentsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningPayeeDocuments>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List private rightsholder legal documents\n */\n\nexport function useLearningPayeeDocuments<TData = Awaited<ReturnType<typeof learningPayeeDocuments>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningPayeeDocumentsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningPayeeDocuments>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningPayeeDocumentsQueryOptions(payeeId,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 getLearningDownloadPayeeDocumentUrl = (payeeId: number,\n documentId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}/documents/${documentId}`\n}\n\n/**\n * Authorize both the payee and its document, then return a JSON asset descriptor. Follow its url to retrieve PDF/image bytes; this operation itself does not return a binary file. Treat temporary signed delivery URLs as private capabilities. This read requires high authentication assurance. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Get delivery for a private legal document\n */\nexport const learningDownloadPayeeDocument = async (payeeId: number,\n documentId: number, options?: Parameters<typeof request>[1]): Promise<LearningAssetRead> => {\n\n return request<LearningAssetRead>(getLearningDownloadPayeeDocumentUrl(payeeId,documentId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningDownloadPayeeDocumentQueryKey = (payeeId: number,\n documentId: number,) => {\n return [\n `/learning/finance/payees/${payeeId}/documents/${documentId}`\n ] as const;\n }\n\n\nexport const getLearningDownloadPayeeDocumentQueryOptions = <TData = Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(payeeId: number,\n documentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningDownloadPayeeDocumentQueryKey(payeeId,documentId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningDownloadPayeeDocument>>> = ({ signal }) => learningDownloadPayeeDocument(payeeId,documentId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: payeeId !== null && payeeId !== undefined && documentId !== null && documentId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningDownloadPayeeDocumentQueryResult = NonNullable<Awaited<ReturnType<typeof learningDownloadPayeeDocument>>>\nexport type LearningDownloadPayeeDocumentQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningDownloadPayeeDocument<TData = Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n documentId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningDownloadPayeeDocument>>,\n TError,\n Awaited<ReturnType<typeof learningDownloadPayeeDocument>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningDownloadPayeeDocument<TData = Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n documentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningDownloadPayeeDocument>>,\n TError,\n Awaited<ReturnType<typeof learningDownloadPayeeDocument>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningDownloadPayeeDocument<TData = Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n documentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Get delivery for a private legal document\n */\n\nexport function useLearningDownloadPayeeDocument<TData = Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n documentId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningDownloadPayeeDocument>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningDownloadPayeeDocumentQueryOptions(payeeId,documentId,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 getLearningListPayeeSettlementsUrl = (payeeId: number,\n params?: LearningListPayeeSettlementsParams,) => {\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 ? `/learning/finance/payees/${payeeId}/settlements?${stringifiedParams}` : `/learning/finance/payees/${payeeId}/settlements`\n}\n\n/**\n * Page all settlements for this rightsholder, newest year/period/ID first. Each period covers two calendar months. Source component nulls remain unknown even when the displayed payable total applies zero-for-missing arithmetic; an unpaid flag alone is not complete source payment evidence. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary List a rightsholder’s settlements\n */\nexport const learningListPayeeSettlements = async (payeeId: number,\n params?: LearningListPayeeSettlementsParams, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltySettlementPage> => {\n\n return request<LearningRoyaltySettlementPage>(getLearningListPayeeSettlementsUrl(payeeId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningListPayeeSettlementsQueryKey = (payeeId: number,\n params?: LearningListPayeeSettlementsParams,) => {\n return [\n `/learning/finance/payees/${payeeId}/settlements`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getLearningListPayeeSettlementsQueryOptions = <TData = Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(payeeId: number,\n params?: LearningListPayeeSettlementsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningListPayeeSettlementsQueryKey(payeeId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningListPayeeSettlements>>> = ({ signal }) => learningListPayeeSettlements(payeeId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: payeeId !== null && payeeId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningListPayeeSettlementsQueryResult = NonNullable<Awaited<ReturnType<typeof learningListPayeeSettlements>>>\nexport type LearningListPayeeSettlementsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningListPayeeSettlements<TData = Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params: undefined | LearningListPayeeSettlementsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListPayeeSettlements>>,\n TError,\n Awaited<ReturnType<typeof learningListPayeeSettlements>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListPayeeSettlements<TData = Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningListPayeeSettlementsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListPayeeSettlements>>,\n TError,\n Awaited<ReturnType<typeof learningListPayeeSettlements>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListPayeeSettlements<TData = Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningListPayeeSettlementsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List a rightsholder’s settlements\n */\n\nexport function useLearningListPayeeSettlements<TData = Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n payeeId: number,\n params?: LearningListPayeeSettlementsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListPayeeSettlements>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningListPayeeSettlementsQueryOptions(payeeId,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 getLearningCreatePayeeSettlementUrl = (payeeId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}/settlements`\n}\n\n/**\n * Require both monthly periods in the same currency to be approved. period 1 means January–February and period 5 means September–October. Organic totals include slices, sales and bonuses; promotional totals include slices. Payable is max(0, organic + promotional + affiliate - advance), rounded half up to two decimals. Matching retries return the existing native settlement; source or conflicting settlements require review. Creation records accounting and initiates no transfer. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Create a two-month rightsholder settlement\n */\nexport const learningCreatePayeeSettlement = async (payeeId: number,\n learningRoyaltySettlementWrite: LearningRoyaltySettlementWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltySettlementRead> => {\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<LearningRoyaltySettlementRead>(getLearningCreatePayeeSettlementUrl(payeeId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltySettlementWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningCreatePayeeSettlementMutationKey = () => ['learningCreatePayeeSettlement'] as const;\n\nexport const getLearningCreatePayeeSettlementMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreatePayeeSettlement>>, TError,LearningCreatePayeeSettlementMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningCreatePayeeSettlement>>, TError,LearningCreatePayeeSettlementMutationVariables, TContext> => {\n\nconst mutationKey = getLearningCreatePayeeSettlementMutationKey();\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 learningCreatePayeeSettlement>>, LearningCreatePayeeSettlementMutationVariables> = (props) => {\n const {payeeId,data} = props ?? {};\n\n return learningCreatePayeeSettlement(payeeId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningCreatePayeeSettlementMutationResult = NonNullable<Awaited<ReturnType<typeof learningCreatePayeeSettlement>>>\n export type LearningCreatePayeeSettlementMutationBody = BodyType<LearningRoyaltySettlementWrite>\n export type LearningCreatePayeeSettlementMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningCreatePayeeSettlementMutationVariables = {payeeId: number;data: BodyType<LearningRoyaltySettlementWrite>}\n\n /**\n * @summary Create a two-month rightsholder settlement\n */\nexport const useLearningCreatePayeeSettlement = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningCreatePayeeSettlement>>, TError,LearningCreatePayeeSettlementMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningCreatePayeeSettlement>>,\n TError,\n LearningCreatePayeeSettlementMutationVariables,\n TContext\n > => {\n return useMutation(getLearningCreatePayeeSettlementMutationOptions(options), queryClient);\n }\n export const getLearningReadRoyaltyPeriodUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}`\n}\n\n/**\n * Poll state, inputState and generation after requesting calculation. draft → calculating → calculated → approved; failed input preparation is reported by inputState and inputErrorCode. Read channel budgets for channel-specific failures. Approval requires complete inputs and all current budgets. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary Read calculation and approval state\n */\nexport const learningReadRoyaltyPeriod = async (periodId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\n\n return request<LearningRoyaltyPeriodRead>(getLearningReadRoyaltyPeriodUrl(periodId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningReadRoyaltyPeriodQueryKey = (periodId: number,) => {\n return [\n `/learning/finance/periods/${periodId}`\n ] as const;\n }\n\n\nexport const getLearningReadRoyaltyPeriodQueryOptions = <TData = Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(periodId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningReadRoyaltyPeriodQueryKey(periodId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>> = ({ signal }) => learningReadRoyaltyPeriod(periodId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: periodId !== null && periodId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningReadRoyaltyPeriodQueryResult = NonNullable<Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>>\nexport type LearningReadRoyaltyPeriodQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningReadRoyaltyPeriod<TData = Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>,\n TError,\n Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningReadRoyaltyPeriod<TData = Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>,\n TError,\n Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningReadRoyaltyPeriod<TData = Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read calculation and approval state\n */\n\nexport function useLearningReadRoyaltyPeriod<TData = Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltyPeriod>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningReadRoyaltyPeriodQueryOptions(periodId,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 getLearningSetRoyaltyAdjustmentUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/adjustments`\n}\n\n/**\n * Replace the signed sale and bonus amounts for one course/payee in this period’s catalogue. Adjustments are attached only to the organic channel during calculation, which requires exactly one organic budget when adjustments exist. Historical, approved and running calculations cannot be edited. Success returns no body. Amounts are decimal major currency units, not integer cents. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Set monthly sales and bonus adjustments\n */\nexport const learningSetRoyaltyAdjustment = async (periodId: number,\n learningRoyaltyAdjustmentWrite: LearningRoyaltyAdjustmentWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getLearningSetRoyaltyAdjustmentUrl(periodId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyAdjustmentWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningSetRoyaltyAdjustmentMutationKey = () => ['learningSetRoyaltyAdjustment'] as const;\n\nexport const getLearningSetRoyaltyAdjustmentMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningSetRoyaltyAdjustment>>, TError,LearningSetRoyaltyAdjustmentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningSetRoyaltyAdjustment>>, TError,LearningSetRoyaltyAdjustmentMutationVariables, TContext> => {\n\nconst mutationKey = getLearningSetRoyaltyAdjustmentMutationKey();\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 learningSetRoyaltyAdjustment>>, LearningSetRoyaltyAdjustmentMutationVariables> = (props) => {\n const {periodId,data} = props ?? {};\n\n return learningSetRoyaltyAdjustment(periodId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningSetRoyaltyAdjustmentMutationResult = NonNullable<Awaited<ReturnType<typeof learningSetRoyaltyAdjustment>>>\n export type LearningSetRoyaltyAdjustmentMutationBody = BodyType<LearningRoyaltyAdjustmentWrite>\n export type LearningSetRoyaltyAdjustmentMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningSetRoyaltyAdjustmentMutationVariables = {periodId: number;data: BodyType<LearningRoyaltyAdjustmentWrite>}\n\n /**\n * @summary Set monthly sales and bonus adjustments\n */\nexport const useLearningSetRoyaltyAdjustment = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningSetRoyaltyAdjustment>>, TError,LearningSetRoyaltyAdjustmentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningSetRoyaltyAdjustment>>,\n TError,\n LearningSetRoyaltyAdjustmentMutationVariables,\n TContext\n > => {\n return useMutation(getLearningSetRoyaltyAdjustmentMutationOptions(options), queryClient);\n }\n export const getLearningListRoyaltyAllocationsUrl = (periodId: number,\n params?: LearningListRoyaltyAllocationsParams,) => {\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 ? `/learning/finance/periods/${periodId}/allocations?${stringifiedParams}` : `/learning/finance/periods/${periodId}/allocations`\n}\n\n/**\n * Page allocations for the period’s current generation, ordered by allocation ID, including unapproved calculation output for review. Within a channel, each subject contributes one unit split across courses in proportion to eligible seconds; course weight sums those fractions. Native percentage is that weight divided by the budget’s subject count times 100. sliceAmount additionally applies rightsholder share and channel coefficient; sales/bonuses are separate organic adjustments. Imported unknown percentages remain null. Amounts are decimal major currency units, not integer cents. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary Inspect the month’s current allocations\n */\nexport const learningListRoyaltyAllocations = async (periodId: number,\n params?: LearningListRoyaltyAllocationsParams, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyAllocationPage> => {\n\n return request<LearningRoyaltyAllocationPage>(getLearningListRoyaltyAllocationsUrl(periodId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningListRoyaltyAllocationsQueryKey = (periodId: number,\n params?: LearningListRoyaltyAllocationsParams,) => {\n return [\n `/learning/finance/periods/${periodId}/allocations`, ...(params ? [params] : [])\n ] as const;\n }\n\n\nexport const getLearningListRoyaltyAllocationsQueryOptions = <TData = Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(periodId: number,\n params?: LearningListRoyaltyAllocationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningListRoyaltyAllocationsQueryKey(periodId,params);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningListRoyaltyAllocations>>> = ({ signal }) => learningListRoyaltyAllocations(periodId,params, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: periodId !== null && periodId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningListRoyaltyAllocationsQueryResult = NonNullable<Awaited<ReturnType<typeof learningListRoyaltyAllocations>>>\nexport type LearningListRoyaltyAllocationsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningListRoyaltyAllocations<TData = Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number,\n params: undefined | LearningListRoyaltyAllocationsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListRoyaltyAllocations>>,\n TError,\n Awaited<ReturnType<typeof learningListRoyaltyAllocations>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListRoyaltyAllocations<TData = Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number,\n params?: LearningListRoyaltyAllocationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListRoyaltyAllocations>>,\n TError,\n Awaited<ReturnType<typeof learningListRoyaltyAllocations>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListRoyaltyAllocations<TData = Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number,\n params?: LearningListRoyaltyAllocationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Inspect the month’s current allocations\n */\n\nexport function useLearningListRoyaltyAllocations<TData = Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number,\n params?: LearningListRoyaltyAllocationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyAllocations>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningListRoyaltyAllocationsQueryOptions(periodId,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 getLearningApproveRoyaltyCalculationUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/approve`\n}\n\n/**\n * Make a native month immutable after the input snapshot and every channel budget complete in expectedGeneration. Repeating approval of that same generation returns its approved state. Only approved allocations are visible through payee allocation history and eligible for settlement. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Approve a completed royalty generation\n */\nexport const learningApproveRoyaltyCalculation = async (periodId: number,\n learningRoyaltyApprovalWrite: LearningRoyaltyApprovalWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\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<LearningRoyaltyPeriodRead>(getLearningApproveRoyaltyCalculationUrl(periodId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyApprovalWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningApproveRoyaltyCalculationMutationKey = () => ['learningApproveRoyaltyCalculation'] as const;\n\nexport const getLearningApproveRoyaltyCalculationMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningApproveRoyaltyCalculation>>, TError,LearningApproveRoyaltyCalculationMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningApproveRoyaltyCalculation>>, TError,LearningApproveRoyaltyCalculationMutationVariables, TContext> => {\n\nconst mutationKey = getLearningApproveRoyaltyCalculationMutationKey();\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 learningApproveRoyaltyCalculation>>, LearningApproveRoyaltyCalculationMutationVariables> = (props) => {\n const {periodId,data} = props ?? {};\n\n return learningApproveRoyaltyCalculation(periodId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningApproveRoyaltyCalculationMutationResult = NonNullable<Awaited<ReturnType<typeof learningApproveRoyaltyCalculation>>>\n export type LearningApproveRoyaltyCalculationMutationBody = BodyType<LearningRoyaltyApprovalWrite>\n export type LearningApproveRoyaltyCalculationMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningApproveRoyaltyCalculationMutationVariables = {periodId: number;data: BodyType<LearningRoyaltyApprovalWrite>}\n\n /**\n * @summary Approve a completed royalty generation\n */\nexport const useLearningApproveRoyaltyCalculation = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningApproveRoyaltyCalculation>>, TError,LearningApproveRoyaltyCalculationMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningApproveRoyaltyCalculation>>,\n TError,\n LearningApproveRoyaltyCalculationMutationVariables,\n TContext\n > => {\n return useMutation(getLearningApproveRoyaltyCalculationMutationOptions(options), queryClient);\n }\n export const getLearningListRoyaltyBudgetsUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/budgets`\n}\n\n/**\n * List every budget for the month, ordered by ID. Compare each budget generation with its period before reviewing results. inputSubjectCount is the distinct subject denominator of the frozen activity population, not minutes or lesson counts. Amounts are decimal major currency units, not integer cents. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary List channel budgets and calculation results\n */\nexport const learningListRoyaltyBudgets = async (periodId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyBudgetListRead> => {\n\n return request<LearningRoyaltyBudgetListRead>(getLearningListRoyaltyBudgetsUrl(periodId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningListRoyaltyBudgetsQueryKey = (periodId: number,) => {\n return [\n `/learning/finance/periods/${periodId}/budgets`\n ] as const;\n }\n\n\nexport const getLearningListRoyaltyBudgetsQueryOptions = <TData = Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(periodId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningListRoyaltyBudgetsQueryKey(periodId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningListRoyaltyBudgets>>> = ({ signal }) => learningListRoyaltyBudgets(periodId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: periodId !== null && periodId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningListRoyaltyBudgetsQueryResult = NonNullable<Awaited<ReturnType<typeof learningListRoyaltyBudgets>>>\nexport type LearningListRoyaltyBudgetsQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningListRoyaltyBudgets<TData = Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListRoyaltyBudgets>>,\n TError,\n Awaited<ReturnType<typeof learningListRoyaltyBudgets>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListRoyaltyBudgets<TData = Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningListRoyaltyBudgets>>,\n TError,\n Awaited<ReturnType<typeof learningListRoyaltyBudgets>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningListRoyaltyBudgets<TData = Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary List channel budgets and calculation results\n */\n\nexport function useLearningListRoyaltyBudgets<TData = Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n periodId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningListRoyaltyBudgets>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningListRoyaltyBudgetsQueryOptions(periodId,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 getLearningSetRoyaltyBudgetUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/budgets`\n}\n\n/**\n * Create or replace the channel budget for an editable period. amount is nonnegative with at most eight decimal places and 24 total digits, in the period’s currency. Editing calculated inputs advances the period generation and returns it to draft; historical, approved and running calculations cannot be edited. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Set a channel’s monthly royalty pool\n */\nexport const learningSetRoyaltyBudget = async (periodId: number,\n learningRoyaltyBudgetWrite: LearningRoyaltyBudgetWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyBudgetRead> => {\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<LearningRoyaltyBudgetRead>(getLearningSetRoyaltyBudgetUrl(periodId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyBudgetWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningSetRoyaltyBudgetMutationKey = () => ['learningSetRoyaltyBudget'] as const;\n\nexport const getLearningSetRoyaltyBudgetMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningSetRoyaltyBudget>>, TError,LearningSetRoyaltyBudgetMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningSetRoyaltyBudget>>, TError,LearningSetRoyaltyBudgetMutationVariables, TContext> => {\n\nconst mutationKey = getLearningSetRoyaltyBudgetMutationKey();\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 learningSetRoyaltyBudget>>, LearningSetRoyaltyBudgetMutationVariables> = (props) => {\n const {periodId,data} = props ?? {};\n\n return learningSetRoyaltyBudget(periodId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningSetRoyaltyBudgetMutationResult = NonNullable<Awaited<ReturnType<typeof learningSetRoyaltyBudget>>>\n export type LearningSetRoyaltyBudgetMutationBody = BodyType<LearningRoyaltyBudgetWrite>\n export type LearningSetRoyaltyBudgetMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningSetRoyaltyBudgetMutationVariables = {periodId: number;data: BodyType<LearningRoyaltyBudgetWrite>}\n\n /**\n * @summary Set a channel’s monthly royalty pool\n */\nexport const useLearningSetRoyaltyBudget = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningSetRoyaltyBudget>>, TError,LearningSetRoyaltyBudgetMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningSetRoyaltyBudget>>,\n TError,\n LearningSetRoyaltyBudgetMutationVariables,\n TContext\n > => {\n return useMutation(getLearningSetRoyaltyBudgetMutationOptions(options), queryClient);\n }\n export const getLearningRequestRoyaltyCalculationUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/calculate`\n}\n\n/**\n * Freeze applicable agreements, channels, adjustments and activity cutoff, then queue input and channel processing. The month must have closed in Europe/Paris and have at least one active channel budget. Poll the period and budgets. Repeating while calculating requeues failed work without replacing frozen facts; an already calculated period returns its current result. HTTP 202 is acceptance, not approval or payment. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Queue a closed month’s royalty calculation\n */\nexport const learningRequestRoyaltyCalculation = async (periodId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\n\n return request<LearningRoyaltyPeriodRead>(getLearningRequestRoyaltyCalculationUrl(periodId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningRequestRoyaltyCalculationMutationKey = () => ['learningRequestRoyaltyCalculation'] as const;\n\nexport const getLearningRequestRoyaltyCalculationMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningRequestRoyaltyCalculation>>, TError,LearningRequestRoyaltyCalculationMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningRequestRoyaltyCalculation>>, TError,LearningRequestRoyaltyCalculationMutationVariables, TContext> => {\n\nconst mutationKey = getLearningRequestRoyaltyCalculationMutationKey();\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 learningRequestRoyaltyCalculation>>, LearningRequestRoyaltyCalculationMutationVariables> = (props) => {\n const {periodId} = props ?? {};\n\n return learningRequestRoyaltyCalculation(periodId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningRequestRoyaltyCalculationMutationResult = NonNullable<Awaited<ReturnType<typeof learningRequestRoyaltyCalculation>>>\n\n export type LearningRequestRoyaltyCalculationMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningRequestRoyaltyCalculationMutationVariables = {periodId: number}\n\n /**\n * @summary Queue a closed month’s royalty calculation\n */\nexport const useLearningRequestRoyaltyCalculation = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningRequestRoyaltyCalculation>>, TError,LearningRequestRoyaltyCalculationMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningRequestRoyaltyCalculation>>,\n TError,\n LearningRequestRoyaltyCalculationMutationVariables,\n TContext\n > => {\n return useMutation(getLearningRequestRoyaltyCalculationMutationOptions(options), queryClient);\n }\n export const getLearningResetRoyaltyCalculationUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/reset`\n}\n\n/**\n * Require the generation just reviewed, advance it, clear frozen inputs and worker claims, and reset channel budgets to draft. This permits corrected inputs after a failed or unwanted calculation. Historical and approved months are immutable. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Invalidate an unapproved calculation\n */\nexport const learningResetRoyaltyCalculation = async (periodId: number,\n learningRoyaltyApprovalWrite: LearningRoyaltyApprovalWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\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<LearningRoyaltyPeriodRead>(getLearningResetRoyaltyCalculationUrl(periodId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyApprovalWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningResetRoyaltyCalculationMutationKey = () => ['learningResetRoyaltyCalculation'] as const;\n\nexport const getLearningResetRoyaltyCalculationMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningResetRoyaltyCalculation>>, TError,LearningResetRoyaltyCalculationMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningResetRoyaltyCalculation>>, TError,LearningResetRoyaltyCalculationMutationVariables, TContext> => {\n\nconst mutationKey = getLearningResetRoyaltyCalculationMutationKey();\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 learningResetRoyaltyCalculation>>, LearningResetRoyaltyCalculationMutationVariables> = (props) => {\n const {periodId,data} = props ?? {};\n\n return learningResetRoyaltyCalculation(periodId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningResetRoyaltyCalculationMutationResult = NonNullable<Awaited<ReturnType<typeof learningResetRoyaltyCalculation>>>\n export type LearningResetRoyaltyCalculationMutationBody = BodyType<LearningRoyaltyApprovalWrite>\n export type LearningResetRoyaltyCalculationMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningResetRoyaltyCalculationMutationVariables = {periodId: number;data: BodyType<LearningRoyaltyApprovalWrite>}\n\n /**\n * @summary Invalidate an unapproved calculation\n */\nexport const useLearningResetRoyaltyCalculation = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningResetRoyaltyCalculation>>, TError,LearningResetRoyaltyCalculationMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningResetRoyaltyCalculation>>,\n TError,\n LearningResetRoyaltyCalculationMutationVariables,\n TContext\n > => {\n return useMutation(getLearningResetRoyaltyCalculationMutationOptions(options), queryClient);\n }\n export const getLearningReadRoyaltySettlementUrl = (settlementId: number,) => {\n\n\n\n\n return `/learning/finance/settlements/${settlementId}`\n}\n\n/**\n * Read the two-month components, computed payable amount and recorded payment status. A historical settlement without a resolved payee requires catalogue finance authority; otherwise the linked rightsholder may read it. Amounts are decimal major currency units, not integer cents. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Read a rightsholder settlement\n */\nexport const learningReadRoyaltySettlement = async (settlementId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltySettlementRead> => {\n\n return request<LearningRoyaltySettlementRead>(getLearningReadRoyaltySettlementUrl(settlementId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n\n\n\nexport const getLearningReadRoyaltySettlementQueryKey = (settlementId: number,) => {\n return [\n `/learning/finance/settlements/${settlementId}`\n ] as const;\n }\n\n\nexport const getLearningReadRoyaltySettlementQueryOptions = <TData = Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(settlementId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError, TData>>, request?: SecondParameter<typeof request>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getLearningReadRoyaltySettlementQueryKey(settlementId);\n\n\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof learningReadRoyaltySettlement>>> = ({ signal }) => learningReadRoyaltySettlement(settlementId, { signal, ...requestOptions });\n\n\n\n\n\n return { queryKey, queryFn, enabled: settlementId !== null && settlementId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type LearningReadRoyaltySettlementQueryResult = NonNullable<Awaited<ReturnType<typeof learningReadRoyaltySettlement>>>\nexport type LearningReadRoyaltySettlementQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n\n\nexport function useLearningReadRoyaltySettlement<TData = Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n settlementId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningReadRoyaltySettlement>>,\n TError,\n Awaited<ReturnType<typeof learningReadRoyaltySettlement>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningReadRoyaltySettlement<TData = Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n settlementId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof learningReadRoyaltySettlement>>,\n TError,\n Awaited<ReturnType<typeof learningReadRoyaltySettlement>>\n > , 'initialData'\n >, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useLearningReadRoyaltySettlement<TData = Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n settlementId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Read a rightsholder settlement\n */\n\nexport function useLearningReadRoyaltySettlement<TData = Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(\n settlementId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof learningReadRoyaltySettlement>>, TError, TData>>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getLearningReadRoyaltySettlementQueryOptions(settlementId,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 getLearningIssueRoyaltyInvoiceUrl = (settlementId: number,) => {\n\n\n\n\n return `/learning/finance/settlements/${settlementId}/invoice`\n}\n\n/**\n * Snapshot the rightsholder’s complete billing address, recipient, settlement net amount and percentage tax rate. Generate a native number per payee/year. Matching recipient/tax retries return the existing invoice; issued facts cannot be replaced. The example EUR 590 net at 20% produces EUR 118 tax and EUR 708 total in the PDF. Issuance does not mark the settlement paid. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Issue an immutable royalty invoice\n */\nexport const learningIssueRoyaltyInvoice = async (settlementId: number,\n learningRoyaltyInvoiceWrite: LearningRoyaltyInvoiceWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyInvoiceRead> => {\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<LearningRoyaltyInvoiceRead>(getLearningIssueRoyaltyInvoiceUrl(settlementId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyInvoiceWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningIssueRoyaltyInvoiceMutationKey = () => ['learningIssueRoyaltyInvoice'] as const;\n\nexport const getLearningIssueRoyaltyInvoiceMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningIssueRoyaltyInvoice>>, TError,LearningIssueRoyaltyInvoiceMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningIssueRoyaltyInvoice>>, TError,LearningIssueRoyaltyInvoiceMutationVariables, TContext> => {\n\nconst mutationKey = getLearningIssueRoyaltyInvoiceMutationKey();\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 learningIssueRoyaltyInvoice>>, LearningIssueRoyaltyInvoiceMutationVariables> = (props) => {\n const {settlementId,data} = props ?? {};\n\n return learningIssueRoyaltyInvoice(settlementId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningIssueRoyaltyInvoiceMutationResult = NonNullable<Awaited<ReturnType<typeof learningIssueRoyaltyInvoice>>>\n export type LearningIssueRoyaltyInvoiceMutationBody = BodyType<LearningRoyaltyInvoiceWrite>\n export type LearningIssueRoyaltyInvoiceMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningIssueRoyaltyInvoiceMutationVariables = {settlementId: number;data: BodyType<LearningRoyaltyInvoiceWrite>}\n\n /**\n * @summary Issue an immutable royalty invoice\n */\nexport const useLearningIssueRoyaltyInvoice = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningIssueRoyaltyInvoice>>, TError,LearningIssueRoyaltyInvoiceMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningIssueRoyaltyInvoice>>,\n TError,\n LearningIssueRoyaltyInvoiceMutationVariables,\n TContext\n > => {\n return useMutation(getLearningIssueRoyaltyInvoiceMutationOptions(options), queryClient);\n }\n export const getLearningRecordRoyaltyPaymentUrl = (settlementId: number,) => {\n\n\n\n\n return `/learning/finance/settlements/${settlementId}/paid`\n}\n\n/**\n * Mark the settlement paid using external accounting evidence and record the current time as paidAt. This operation never initiates a bank transfer or sends money. A matching paymentReference is idempotent; different existing evidence conflicts. Historical unresolved payee/payment facts must first be reconciled. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Record an observed royalty payment\n */\nexport const learningRecordRoyaltyPayment = async (settlementId: number,\n learningRoyaltyPaidWrite: LearningRoyaltyPaidWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltySettlementRead> => {\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<LearningRoyaltySettlementRead>(getLearningRecordRoyaltyPaymentUrl(settlementId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyPaidWrite)\n }\n);}\n\n\n\n\n\nexport const getLearningRecordRoyaltyPaymentMutationKey = () => ['learningRecordRoyaltyPayment'] as const;\n\nexport const getLearningRecordRoyaltyPaymentMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningRecordRoyaltyPayment>>, TError,LearningRecordRoyaltyPaymentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof learningRecordRoyaltyPayment>>, TError,LearningRecordRoyaltyPaymentMutationVariables, TContext> => {\n\nconst mutationKey = getLearningRecordRoyaltyPaymentMutationKey();\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 learningRecordRoyaltyPayment>>, LearningRecordRoyaltyPaymentMutationVariables> = (props) => {\n const {settlementId,data} = props ?? {};\n\n return learningRecordRoyaltyPayment(settlementId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type LearningRecordRoyaltyPaymentMutationResult = NonNullable<Awaited<ReturnType<typeof learningRecordRoyaltyPayment>>>\n export type LearningRecordRoyaltyPaymentMutationBody = BodyType<LearningRoyaltyPaidWrite>\n export type LearningRecordRoyaltyPaymentMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type LearningRecordRoyaltyPaymentMutationVariables = {settlementId: number;data: BodyType<LearningRoyaltyPaidWrite>}\n\n /**\n * @summary Record an observed royalty payment\n */\nexport const useLearningRecordRoyaltyPayment = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof learningRecordRoyaltyPayment>>, TError,LearningRecordRoyaltyPaymentMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof learningRecordRoyaltyPayment>>,\n TError,\n LearningRecordRoyaltyPaymentMutationVariables,\n TContext\n > => {\n return useMutation(getLearningRecordRoyaltyPaymentMutationOptions(options), queryClient);\n }\n"],"mappings":";;;;;;;;;;;AA0EA,MAAM,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