@learnorama/mozaik-sdk 0.19.0-staging.60.1 → 0.20.2-staging.63.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COURSES.md +18 -1
- package/CUSTOMER-ADMIN.md +7 -0
- package/CVS-PLAYBACK.md +9 -1
- package/FRONTEND-REQUESTS.md +17 -2
- package/OFFLINE.md +90 -0
- package/PRESS.md +42 -2
- package/README.md +7 -4
- package/dist/api/account.d.ts +1 -1
- package/dist/api/account.js.map +1 -1
- package/dist/api/admin-catalogue.d.ts +2 -2
- package/dist/api/admin-catalogue.js +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 +19 -2
- package/dist/api/admin-customer.js +38 -2
- package/dist/api/admin-customer.js.map +1 -1
- package/dist/api/admin-desk.d.ts +91 -1
- package/dist/api/admin-desk.js +255 -1
- package/dist/api/admin-desk.js.map +1 -1
- package/dist/api/admin-licenses.d.ts +1 -1
- package/dist/api/admin-licenses.js.map +1 -1
- package/dist/api/admin-partner-selections.d.ts +1 -1
- package/dist/api/admin-partner-selections.js.map +1 -1
- package/dist/api/admin-patrons.d.ts +1 -1
- package/dist/api/admin-patrons.js.map +1 -1
- package/dist/api/admin-reviews.d.ts +1 -1
- package/dist/api/admin-reviews.js.map +1 -1
- package/dist/api/admin-roles.d.ts +1 -1
- package/dist/api/admin-roles.js.map +1 -1
- package/dist/api/admin-support.d.ts +1 -1
- package/dist/api/admin-support.js.map +1 -1
- package/dist/api/admin-tenants.d.ts +1 -1
- package/dist/api/admin-tenants.js.map +1 -1
- package/dist/api/admin-tutoring.d.ts +1 -1
- package/dist/api/admin-tutoring.js.map +1 -1
- package/dist/api/admin-vod.d.ts +1 -1
- package/dist/api/admin-vod.js.map +1 -1
- package/dist/api/auth-device.d.ts +1 -1
- package/dist/api/auth-device.js.map +1 -1
- package/dist/api/auth.d.ts +1 -1
- package/dist/api/auth.js.map +1 -1
- package/dist/api/biblio-billing-webhooks.d.ts +1 -1
- package/dist/api/biblio-billing-webhooks.js.map +1 -1
- package/dist/api/biblio-billing.d.ts +1 -1
- package/dist/api/biblio-billing.js.map +1 -1
- package/dist/api/biblio-catalogue.d.ts +7 -1
- package/dist/api/biblio-catalogue.js +14 -1
- package/dist/api/biblio-catalogue.js.map +1 -1
- package/dist/api/biblio-home.d.ts +1 -1
- package/dist/api/biblio-home.js.map +1 -1
- package/dist/api/biblio-learning-author-profiles.d.ts +1 -1
- package/dist/api/biblio-learning-author-profiles.js.map +1 -1
- package/dist/api/biblio-learning-authoring.d.ts +1 -1
- package/dist/api/biblio-learning-authoring.js.map +1 -1
- package/dist/api/biblio-learning-editorial.d.ts +1 -1
- package/dist/api/biblio-learning-editorial.js.map +1 -1
- package/dist/api/biblio-learning-feedback.d.ts +1 -1
- package/dist/api/biblio-learning-feedback.js.map +1 -1
- package/dist/api/biblio-learning-finance.d.ts +1 -1
- package/dist/api/biblio-learning-finance.js.map +1 -1
- package/dist/api/biblio-learning-integrations.d.ts +1 -1
- package/dist/api/biblio-learning-integrations.js.map +1 -1
- package/dist/api/biblio-learning-membership.d.ts +1 -1
- package/dist/api/biblio-learning-membership.js.map +1 -1
- package/dist/api/biblio-learning.d.ts +1 -1
- package/dist/api/biblio-learning.js.map +1 -1
- package/dist/api/biblio-library.d.ts +1 -1
- package/dist/api/biblio-library.js.map +1 -1
- package/dist/api/biblio-nextory.d.ts +1 -1
- package/dist/api/biblio-nextory.js.map +1 -1
- package/dist/api/biblio-press.d.ts +19 -1
- package/dist/api/biblio-press.js +40 -1
- package/dist/api/biblio-press.js.map +1 -1
- package/dist/api/biblio-search.d.ts +1 -1
- package/dist/api/biblio-search.js.map +1 -1
- package/dist/api/biblio-telemetry.d.ts +1 -1
- package/dist/api/biblio-telemetry.js.map +1 -1
- package/dist/api/biblio-youscribe.d.ts +1 -1
- package/dist/api/biblio-youscribe.js.map +1 -1
- package/dist/api/consumption.d.ts +19 -1
- package/dist/api/consumption.js +53 -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 +7 -1
- package/dist/api/cvs-loans.js +27 -1
- package/dist/api/cvs-loans.js.map +1 -1
- package/dist/api/cvs-payments.d.ts +1 -1
- package/dist/api/cvs-payments.js.map +1 -1
- package/dist/api/cvs-streaming.d.ts +16 -1
- package/dist/api/cvs-streaming.js +43 -1
- package/dist/api/cvs-streaming.js.map +1 -1
- package/dist/api/index.d.ts +11 -11
- package/dist/api/index.js +11 -11
- package/dist/api/partner-catalogue.d.ts +39 -5
- package/dist/api/partner-catalogue.js +71 -6
- package/dist/api/partner-catalogue.js.map +1 -1
- package/dist/api/partner-reader-nextory.d.ts +30 -12
- package/dist/api/partner-reader-nextory.js +70 -12
- package/dist/api/partner-reader-nextory.js.map +1 -1
- package/dist/api/partner-reader-youscribe.d.ts +13 -1
- package/dist/api/partner-reader-youscribe.js +27 -1
- package/dist/api/partner-reader-youscribe.js.map +1 -1
- package/dist/api/partner-reading.d.ts +1 -1
- package/dist/api/partner-reading.js.map +1 -1
- package/dist/api/profiles.d.ts +1 -1
- package/dist/api/profiles.js.map +1 -1
- package/dist/api/search.d.ts +1 -1
- package/dist/api/search.js.map +1 -1
- package/dist/api/tutoring-catalogue.d.ts +1 -1
- package/dist/api/tutoring-catalogue.js.map +1 -1
- package/dist/api/tutoring-chat.d.ts +1 -1
- package/dist/api/tutoring-chat.js.map +1 -1
- package/dist/api/tutoring-dispatch.d.ts +1 -1
- package/dist/api/tutoring-dispatch.js.map +1 -1
- package/dist/api/tutoring-practitioner.d.ts +1 -1
- package/dist/api/tutoring-practitioner.js.map +1 -1
- package/dist/api/tutoring-requests.d.ts +1 -1
- package/dist/api/tutoring-requests.js.map +1 -1
- package/dist/auth.d.ts +2 -33
- package/dist/auth.js +8 -2
- package/dist/auth.js.map +1 -1
- package/dist/chunks/client2.d.ts +2 -2
- package/dist/chunks/connection.d.ts +1 -1
- package/dist/chunks/index.d.ts +2005 -700
- package/dist/chunks/index2.d.ts +34 -0
- 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 +162 -3
- package/dist/models.js.map +1 -1
- package/dist/offline.d.ts +42 -0
- package/dist/offline.js +353 -0
- package/dist/offline.js.map +1 -0
- 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 +2 -2
- package/dist/react/admin-catalogue.js +2 -2
- package/dist/react/admin-catalogue.js.map +1 -1
- package/dist/react/admin-consumption.d.ts +1 -1
- package/dist/react/admin-consumption.js +1 -1
- package/dist/react/admin-consumption.js.map +1 -1
- package/dist/react/admin-contracts.d.ts +1 -1
- package/dist/react/admin-contracts.js +1 -1
- package/dist/react/admin-contracts.js.map +1 -1
- package/dist/react/admin-customer.d.ts +73 -2
- package/dist/react/admin-customer.js +87 -3
- package/dist/react/admin-customer.js.map +1 -1
- package/dist/react/admin-desk.d.ts +352 -1
- package/dist/react/admin-desk.js +536 -2
- package/dist/react/admin-desk.js.map +1 -1
- package/dist/react/admin-licenses.d.ts +1 -1
- package/dist/react/admin-licenses.js +1 -1
- package/dist/react/admin-licenses.js.map +1 -1
- package/dist/react/admin-partner-selections.d.ts +1 -1
- package/dist/react/admin-partner-selections.js +1 -1
- package/dist/react/admin-partner-selections.js.map +1 -1
- package/dist/react/admin-patrons.d.ts +1 -1
- package/dist/react/admin-patrons.js +1 -1
- package/dist/react/admin-patrons.js.map +1 -1
- package/dist/react/admin-reviews.d.ts +1 -1
- package/dist/react/admin-reviews.js +1 -1
- package/dist/react/admin-reviews.js.map +1 -1
- package/dist/react/admin-roles.d.ts +1 -1
- package/dist/react/admin-roles.js +1 -1
- package/dist/react/admin-roles.js.map +1 -1
- package/dist/react/admin-support.d.ts +1 -1
- package/dist/react/admin-support.js +1 -1
- package/dist/react/admin-support.js.map +1 -1
- package/dist/react/admin-tenants.d.ts +1 -1
- package/dist/react/admin-tenants.js +1 -1
- package/dist/react/admin-tenants.js.map +1 -1
- package/dist/react/admin-tutoring.d.ts +1 -1
- package/dist/react/admin-tutoring.js +1 -1
- package/dist/react/admin-tutoring.js.map +1 -1
- package/dist/react/admin-vod.d.ts +1 -1
- package/dist/react/admin-vod.js +1 -1
- package/dist/react/admin-vod.js.map +1 -1
- package/dist/react/auth-device.d.ts +1 -1
- package/dist/react/auth-device.js +1 -1
- package/dist/react/auth-device.js.map +1 -1
- package/dist/react/auth.d.ts +1 -1
- package/dist/react/auth.js +1 -1
- package/dist/react/auth.js.map +1 -1
- package/dist/react/biblio-billing-webhooks.d.ts +1 -1
- package/dist/react/biblio-billing-webhooks.js +1 -1
- package/dist/react/biblio-billing-webhooks.js.map +1 -1
- package/dist/react/biblio-billing.d.ts +1 -1
- package/dist/react/biblio-billing.js +1 -1
- package/dist/react/biblio-billing.js.map +1 -1
- package/dist/react/biblio-catalogue.d.ts +24 -1
- package/dist/react/biblio-catalogue.js +43 -2
- package/dist/react/biblio-catalogue.js.map +1 -1
- package/dist/react/biblio-home.d.ts +1 -1
- package/dist/react/biblio-home.js +1 -1
- package/dist/react/biblio-home.js.map +1 -1
- package/dist/react/biblio-learning-author-profiles.d.ts +1 -1
- package/dist/react/biblio-learning-author-profiles.js +1 -1
- package/dist/react/biblio-learning-author-profiles.js.map +1 -1
- package/dist/react/biblio-learning-authoring.d.ts +1 -1
- package/dist/react/biblio-learning-authoring.js +1 -1
- package/dist/react/biblio-learning-authoring.js.map +1 -1
- package/dist/react/biblio-learning-editorial.d.ts +1 -1
- package/dist/react/biblio-learning-editorial.js +1 -1
- package/dist/react/biblio-learning-editorial.js.map +1 -1
- package/dist/react/biblio-learning-feedback.d.ts +1 -1
- package/dist/react/biblio-learning-feedback.js +1 -1
- package/dist/react/biblio-learning-feedback.js.map +1 -1
- package/dist/react/biblio-learning-finance.d.ts +1 -1
- package/dist/react/biblio-learning-finance.js +1 -1
- package/dist/react/biblio-learning-finance.js.map +1 -1
- package/dist/react/biblio-learning-integrations.d.ts +1 -1
- package/dist/react/biblio-learning-integrations.js +1 -1
- package/dist/react/biblio-learning-integrations.js.map +1 -1
- package/dist/react/biblio-learning-membership.d.ts +1 -1
- package/dist/react/biblio-learning-membership.js +1 -1
- package/dist/react/biblio-learning-membership.js.map +1 -1
- package/dist/react/biblio-learning.d.ts +1 -1
- package/dist/react/biblio-learning.js +1 -1
- package/dist/react/biblio-learning.js.map +1 -1
- package/dist/react/biblio-library.d.ts +1 -1
- package/dist/react/biblio-library.js +1 -1
- package/dist/react/biblio-library.js.map +1 -1
- package/dist/react/biblio-nextory.d.ts +1 -1
- package/dist/react/biblio-nextory.js +1 -1
- package/dist/react/biblio-nextory.js.map +1 -1
- package/dist/react/biblio-press.d.ts +91 -1
- package/dist/react/biblio-press.js +118 -2
- package/dist/react/biblio-press.js.map +1 -1
- package/dist/react/biblio-search.d.ts +1 -1
- package/dist/react/biblio-search.js +1 -1
- package/dist/react/biblio-search.js.map +1 -1
- package/dist/react/biblio-telemetry.d.ts +1 -1
- package/dist/react/biblio-telemetry.js +1 -1
- package/dist/react/biblio-telemetry.js.map +1 -1
- package/dist/react/biblio-youscribe.d.ts +1 -1
- package/dist/react/biblio-youscribe.js +1 -1
- package/dist/react/biblio-youscribe.js.map +1 -1
- package/dist/react/chat.d.ts +1 -1
- package/dist/react/consumption.d.ts +85 -3
- package/dist/react/consumption.js +148 -3
- 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 +26 -1
- package/dist/react/cvs-loans.js +56 -2
- 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 +62 -1
- package/dist/react/cvs-streaming.js +97 -2
- package/dist/react/cvs-streaming.js.map +1 -1
- package/dist/react/index.d.ts +11 -11
- package/dist/react/index.js +11 -11
- package/dist/react/partner-catalogue.d.ts +121 -6
- package/dist/react/partner-catalogue.js +147 -7
- package/dist/react/partner-catalogue.js.map +1 -1
- package/dist/react/partner-reader-nextory.d.ts +69 -12
- package/dist/react/partner-reader-nextory.js +128 -13
- package/dist/react/partner-reader-nextory.js.map +1 -1
- package/dist/react/partner-reader-youscribe.d.ts +57 -1
- package/dist/react/partner-reader-youscribe.js +80 -2
- package/dist/react/partner-reader-youscribe.js.map +1 -1
- package/dist/react/partner-reading.d.ts +1 -1
- package/dist/react/partner-reading.js +1 -1
- package/dist/react/partner-reading.js.map +1 -1
- package/dist/react/profiles.d.ts +1 -1
- package/dist/react/profiles.js +1 -1
- package/dist/react/profiles.js.map +1 -1
- package/dist/react/search.d.ts +1 -1
- package/dist/react/search.js +1 -1
- package/dist/react/search.js.map +1 -1
- package/dist/react/tutoring-catalogue.d.ts +1 -1
- package/dist/react/tutoring-catalogue.js +1 -1
- package/dist/react/tutoring-catalogue.js.map +1 -1
- package/dist/react/tutoring-chat.d.ts +1 -1
- package/dist/react/tutoring-chat.js +1 -1
- package/dist/react/tutoring-chat.js.map +1 -1
- package/dist/react/tutoring-dispatch.d.ts +1 -1
- package/dist/react/tutoring-dispatch.js +1 -1
- package/dist/react/tutoring-dispatch.js.map +1 -1
- package/dist/react/tutoring-practitioner.d.ts +1 -1
- package/dist/react/tutoring-practitioner.js +1 -1
- package/dist/react/tutoring-practitioner.js.map +1 -1
- package/dist/react/tutoring-requests.d.ts +1 -1
- package/dist/react/tutoring-requests.js +1 -1
- package/dist/react/tutoring-requests.js.map +1 -1
- package/package.json +13 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-contracts.js","names":[],"sources":["../../src/react/admin-contracts/admin-contracts.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.19.0\n */\nimport {\n useMutation\n} from '@tanstack/react-query';\nimport type {\n MutationFunction,\n QueryClient,\n UseMutationOptions,\n UseMutationResult\n} from '@tanstack/react-query';\n\nimport type {\n CategoryExclusionRead,\n CategoryExclusionWrite,\n ContractCategoryGrantRead,\n ContractCategoryGrantWrite,\n ContractProviderWrite,\n HTTPExceptionResponse,\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\nexport const getCreateContractCategoryGrantUrl = (contractId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants`\n}\n\n/**\n * Grant VIEW on one category and optional provider; null is explicitly unrestricted.\n *\n * This changes permission only. No paid licence or external account is created.\n * Existing contract/beneficiary windows and provider seat checks still apply.\n * @summary Create Contract Category Grant\n */\nexport const createContractCategoryGrant = async (contractId: number,\n contractCategoryGrantWrite: ContractCategoryGrantWrite, options?: Parameters<typeof request>[1]): Promise<ContractCategoryGrantRead> => {\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<ContractCategoryGrantRead>(getCreateContractCategoryGrantUrl(contractId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(contractCategoryGrantWrite)\n }\n);}\n\n\n\n\n\nexport const getCreateContractCategoryGrantMutationKey = () => ['createContractCategoryGrant'] as const;\n\nexport const getCreateContractCategoryGrantMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createContractCategoryGrant>>, TError,CreateContractCategoryGrantMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof createContractCategoryGrant>>, TError,CreateContractCategoryGrantMutationVariables, TContext> => {\n\nconst mutationKey = getCreateContractCategoryGrantMutationKey();\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 createContractCategoryGrant>>, CreateContractCategoryGrantMutationVariables> = (props) => {\n const {contractId,data} = props ?? {};\n\n return createContractCategoryGrant(contractId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateContractCategoryGrantMutationResult = NonNullable<Awaited<ReturnType<typeof createContractCategoryGrant>>>\n export type CreateContractCategoryGrantMutationBody = BodyType<ContractCategoryGrantWrite>\n export type CreateContractCategoryGrantMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type CreateContractCategoryGrantMutationVariables = {contractId: number;data: BodyType<ContractCategoryGrantWrite>}\n\n /**\n * @summary Create Contract Category Grant\n */\nexport const useCreateContractCategoryGrant = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createContractCategoryGrant>>, TError,CreateContractCategoryGrantMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof createContractCategoryGrant>>,\n TError,\n CreateContractCategoryGrantMutationVariables,\n TContext\n > => {\n return useMutation(getCreateContractCategoryGrantMutationOptions(options), queryClient);\n }\n export const getRevokeContractCategoryGrantUrl = (contractId: number,\n grantId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants/${grantId}`\n}\n\n/**\n * Deactivate a line without deleting its consumption/audit references.\n * @summary Revoke Contract Category Grant\n */\nexport const revokeContractCategoryGrant = async (contractId: number,\n grantId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRevokeContractCategoryGrantUrl(contractId,grantId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n\n\n\nexport const getRevokeContractCategoryGrantMutationKey = () => ['revokeContractCategoryGrant'] as const;\n\nexport const getRevokeContractCategoryGrantMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof revokeContractCategoryGrant>>, TError,RevokeContractCategoryGrantMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof revokeContractCategoryGrant>>, TError,RevokeContractCategoryGrantMutationVariables, TContext> => {\n\nconst mutationKey = getRevokeContractCategoryGrantMutationKey();\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 revokeContractCategoryGrant>>, RevokeContractCategoryGrantMutationVariables> = (props) => {\n const {contractId,grantId} = props ?? {};\n\n return revokeContractCategoryGrant(contractId,grantId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RevokeContractCategoryGrantMutationResult = NonNullable<Awaited<ReturnType<typeof revokeContractCategoryGrant>>>\n\n export type RevokeContractCategoryGrantMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type RevokeContractCategoryGrantMutationVariables = {contractId: number;grantId: number}\n\n /**\n * @summary Revoke Contract Category Grant\n */\nexport const useRevokeContractCategoryGrant = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof revokeContractCategoryGrant>>, TError,RevokeContractCategoryGrantMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof revokeContractCategoryGrant>>,\n TError,\n RevokeContractCategoryGrantMutationVariables,\n TContext\n > => {\n return useMutation(getRevokeContractCategoryGrantMutationOptions(options), queryClient);\n }\n export const getSetContractGrantProviderUrl = (contractId: number,\n grantId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants/${grantId}/provider`\n}\n\n/**\n * Restrict this existing line, retaining its ID, acts, history and dates.\n *\n * Other unrestricted/overlapping lines can still permit a provider. Inspect\n * the contract's complete grant list before claiming it is YouScribe-only.\n * @summary Set Contract Grant Provider\n */\nexport const setContractGrantProvider = async (contractId: number,\n grantId: number,\n contractProviderWrite: ContractProviderWrite, options?: Parameters<typeof request>[1]): Promise<ContractCategoryGrantRead> => {\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<ContractCategoryGrantRead>(getSetContractGrantProviderUrl(contractId,grantId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(contractProviderWrite)\n }\n);}\n\n\n\n\n\nexport const getSetContractGrantProviderMutationKey = () => ['setContractGrantProvider'] as const;\n\nexport const getSetContractGrantProviderMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setContractGrantProvider>>, TError,SetContractGrantProviderMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof setContractGrantProvider>>, TError,SetContractGrantProviderMutationVariables, TContext> => {\n\nconst mutationKey = getSetContractGrantProviderMutationKey();\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 setContractGrantProvider>>, SetContractGrantProviderMutationVariables> = (props) => {\n const {contractId,grantId,data} = props ?? {};\n\n return setContractGrantProvider(contractId,grantId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type SetContractGrantProviderMutationResult = NonNullable<Awaited<ReturnType<typeof setContractGrantProvider>>>\n export type SetContractGrantProviderMutationBody = BodyType<ContractProviderWrite>\n export type SetContractGrantProviderMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type SetContractGrantProviderMutationVariables = {contractId: number;grantId: number;data: BodyType<ContractProviderWrite>}\n\n /**\n * @summary Set Contract Grant Provider\n */\nexport const useSetContractGrantProvider = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setContractGrantProvider>>, TError,SetContractGrantProviderMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof setContractGrantProvider>>,\n TError,\n SetContractGrantProviderMutationVariables,\n TContext\n > => {\n return useMutation(getSetContractGrantProviderMutationOptions(options), queryClient);\n }\n export const getCreateCategoryProviderExclusionUrl = (tenantId: number,) => {\n\n\n\n\n return `/admin/tenants/${tenantId}/entitlement-exclusions`\n}\n\n/**\n * Deny a category/provider pair; userId narrows the deny to that profile.\n *\n * The exclusion applies across the customer's contracts and can only reduce\n * access. Other profiles, including other household members, are unaffected\n * when userId is set. Null provider explicitly covers every applicable provider.\n * @summary Create Category Provider Exclusion\n */\nexport const createCategoryProviderExclusion = async (tenantId: number,\n categoryExclusionWrite: CategoryExclusionWrite, options?: Parameters<typeof request>[1]): Promise<CategoryExclusionRead> => {\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<CategoryExclusionRead>(getCreateCategoryProviderExclusionUrl(tenantId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(categoryExclusionWrite)\n }\n);}\n\n\n\n\n\nexport const getCreateCategoryProviderExclusionMutationKey = () => ['createCategoryProviderExclusion'] as const;\n\nexport const getCreateCategoryProviderExclusionMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createCategoryProviderExclusion>>, TError,CreateCategoryProviderExclusionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof createCategoryProviderExclusion>>, TError,CreateCategoryProviderExclusionMutationVariables, TContext> => {\n\nconst mutationKey = getCreateCategoryProviderExclusionMutationKey();\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 createCategoryProviderExclusion>>, CreateCategoryProviderExclusionMutationVariables> = (props) => {\n const {tenantId,data} = props ?? {};\n\n return createCategoryProviderExclusion(tenantId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateCategoryProviderExclusionMutationResult = NonNullable<Awaited<ReturnType<typeof createCategoryProviderExclusion>>>\n export type CreateCategoryProviderExclusionMutationBody = BodyType<CategoryExclusionWrite>\n export type CreateCategoryProviderExclusionMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type CreateCategoryProviderExclusionMutationVariables = {tenantId: number;data: BodyType<CategoryExclusionWrite>}\n\n /**\n * @summary Create Category Provider Exclusion\n */\nexport const useCreateCategoryProviderExclusion = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createCategoryProviderExclusion>>, TError,CreateCategoryProviderExclusionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof createCategoryProviderExclusion>>,\n TError,\n CreateCategoryProviderExclusionMutationVariables,\n TContext\n > => {\n return useMutation(getCreateCategoryProviderExclusionMutationOptions(options), queryClient);\n }\n export const getRemoveCategoryProviderExclusionUrl = (tenantId: number,\n exclusionId: number,) => {\n\n\n\n\n return `/admin/tenants/${tenantId}/entitlement-exclusions/${exclusionId}`\n}\n\n/**\n * Remove this restriction; a valid contract grant is still required.\n * @summary Remove Category Provider Exclusion\n */\nexport const removeCategoryProviderExclusion = async (tenantId: number,\n exclusionId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRemoveCategoryProviderExclusionUrl(tenantId,exclusionId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n\n\n\nexport const getRemoveCategoryProviderExclusionMutationKey = () => ['removeCategoryProviderExclusion'] as const;\n\nexport const getRemoveCategoryProviderExclusionMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeCategoryProviderExclusion>>, TError,RemoveCategoryProviderExclusionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof removeCategoryProviderExclusion>>, TError,RemoveCategoryProviderExclusionMutationVariables, TContext> => {\n\nconst mutationKey = getRemoveCategoryProviderExclusionMutationKey();\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 removeCategoryProviderExclusion>>, RemoveCategoryProviderExclusionMutationVariables> = (props) => {\n const {tenantId,exclusionId} = props ?? {};\n\n return removeCategoryProviderExclusion(tenantId,exclusionId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RemoveCategoryProviderExclusionMutationResult = NonNullable<Awaited<ReturnType<typeof removeCategoryProviderExclusion>>>\n\n export type RemoveCategoryProviderExclusionMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type RemoveCategoryProviderExclusionMutationVariables = {tenantId: number;exclusionId: number}\n\n /**\n * @summary Remove Category Provider Exclusion\n */\nexport const useRemoveCategoryProviderExclusion = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeCategoryProviderExclusion>>, TError,RemoveCategoryProviderExclusionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof removeCategoryProviderExclusion>>,\n TError,\n RemoveCategoryProviderExclusionMutationVariables,\n TContext\n > => {\n return useMutation(getRemoveCategoryProviderExclusionMutationOptions(options), queryClient);\n }\n"],"mappings":";;;;;;;;;;;AAmCA,MAAa,qCAAqC,eAAwB;CAKxE,OAAO,oBAAoB,WAAW;AACxC;;;;;;;;AASA,MAAa,8BAA8B,OAAO,YAC9C,4BAAwD,YAAgF;CAExI,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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admin-contracts/admin-contracts.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.20.2\n */\nimport {\n useMutation\n} from '@tanstack/react-query';\nimport type {\n MutationFunction,\n QueryClient,\n UseMutationOptions,\n UseMutationResult\n} from '@tanstack/react-query';\n\nimport type {\n CategoryExclusionRead,\n CategoryExclusionWrite,\n ContractCategoryGrantRead,\n ContractCategoryGrantWrite,\n ContractProviderWrite,\n HTTPExceptionResponse,\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\nexport const getCreateContractCategoryGrantUrl = (contractId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants`\n}\n\n/**\n * Grant VIEW on one category and optional provider; null is explicitly unrestricted.\n *\n * This changes permission only. No paid licence or external account is created.\n * Existing contract/beneficiary windows and provider seat checks still apply.\n * @summary Create Contract Category Grant\n */\nexport const createContractCategoryGrant = async (contractId: number,\n contractCategoryGrantWrite: ContractCategoryGrantWrite, options?: Parameters<typeof request>[1]): Promise<ContractCategoryGrantRead> => {\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<ContractCategoryGrantRead>(getCreateContractCategoryGrantUrl(contractId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(contractCategoryGrantWrite)\n }\n);}\n\n\n\n\n\nexport const getCreateContractCategoryGrantMutationKey = () => ['createContractCategoryGrant'] as const;\n\nexport const getCreateContractCategoryGrantMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createContractCategoryGrant>>, TError,CreateContractCategoryGrantMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof createContractCategoryGrant>>, TError,CreateContractCategoryGrantMutationVariables, TContext> => {\n\nconst mutationKey = getCreateContractCategoryGrantMutationKey();\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 createContractCategoryGrant>>, CreateContractCategoryGrantMutationVariables> = (props) => {\n const {contractId,data} = props ?? {};\n\n return createContractCategoryGrant(contractId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateContractCategoryGrantMutationResult = NonNullable<Awaited<ReturnType<typeof createContractCategoryGrant>>>\n export type CreateContractCategoryGrantMutationBody = BodyType<ContractCategoryGrantWrite>\n export type CreateContractCategoryGrantMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type CreateContractCategoryGrantMutationVariables = {contractId: number;data: BodyType<ContractCategoryGrantWrite>}\n\n /**\n * @summary Create Contract Category Grant\n */\nexport const useCreateContractCategoryGrant = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createContractCategoryGrant>>, TError,CreateContractCategoryGrantMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof createContractCategoryGrant>>,\n TError,\n CreateContractCategoryGrantMutationVariables,\n TContext\n > => {\n return useMutation(getCreateContractCategoryGrantMutationOptions(options), queryClient);\n }\n export const getRevokeContractCategoryGrantUrl = (contractId: number,\n grantId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants/${grantId}`\n}\n\n/**\n * Deactivate a line without deleting its consumption/audit references.\n * @summary Revoke Contract Category Grant\n */\nexport const revokeContractCategoryGrant = async (contractId: number,\n grantId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRevokeContractCategoryGrantUrl(contractId,grantId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n\n\n\nexport const getRevokeContractCategoryGrantMutationKey = () => ['revokeContractCategoryGrant'] as const;\n\nexport const getRevokeContractCategoryGrantMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof revokeContractCategoryGrant>>, TError,RevokeContractCategoryGrantMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof revokeContractCategoryGrant>>, TError,RevokeContractCategoryGrantMutationVariables, TContext> => {\n\nconst mutationKey = getRevokeContractCategoryGrantMutationKey();\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 revokeContractCategoryGrant>>, RevokeContractCategoryGrantMutationVariables> = (props) => {\n const {contractId,grantId} = props ?? {};\n\n return revokeContractCategoryGrant(contractId,grantId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RevokeContractCategoryGrantMutationResult = NonNullable<Awaited<ReturnType<typeof revokeContractCategoryGrant>>>\n\n export type RevokeContractCategoryGrantMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type RevokeContractCategoryGrantMutationVariables = {contractId: number;grantId: number}\n\n /**\n * @summary Revoke Contract Category Grant\n */\nexport const useRevokeContractCategoryGrant = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof revokeContractCategoryGrant>>, TError,RevokeContractCategoryGrantMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof revokeContractCategoryGrant>>,\n TError,\n RevokeContractCategoryGrantMutationVariables,\n TContext\n > => {\n return useMutation(getRevokeContractCategoryGrantMutationOptions(options), queryClient);\n }\n export const getSetContractGrantProviderUrl = (contractId: number,\n grantId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants/${grantId}/provider`\n}\n\n/**\n * Restrict this existing line, retaining its ID, acts, history and dates.\n *\n * Other unrestricted/overlapping lines can still permit a provider. Inspect\n * the contract's complete grant list before claiming it is YouScribe-only.\n * @summary Set Contract Grant Provider\n */\nexport const setContractGrantProvider = async (contractId: number,\n grantId: number,\n contractProviderWrite: ContractProviderWrite, options?: Parameters<typeof request>[1]): Promise<ContractCategoryGrantRead> => {\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<ContractCategoryGrantRead>(getSetContractGrantProviderUrl(contractId,grantId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(contractProviderWrite)\n }\n);}\n\n\n\n\n\nexport const getSetContractGrantProviderMutationKey = () => ['setContractGrantProvider'] as const;\n\nexport const getSetContractGrantProviderMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setContractGrantProvider>>, TError,SetContractGrantProviderMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof setContractGrantProvider>>, TError,SetContractGrantProviderMutationVariables, TContext> => {\n\nconst mutationKey = getSetContractGrantProviderMutationKey();\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 setContractGrantProvider>>, SetContractGrantProviderMutationVariables> = (props) => {\n const {contractId,grantId,data} = props ?? {};\n\n return setContractGrantProvider(contractId,grantId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type SetContractGrantProviderMutationResult = NonNullable<Awaited<ReturnType<typeof setContractGrantProvider>>>\n export type SetContractGrantProviderMutationBody = BodyType<ContractProviderWrite>\n export type SetContractGrantProviderMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type SetContractGrantProviderMutationVariables = {contractId: number;grantId: number;data: BodyType<ContractProviderWrite>}\n\n /**\n * @summary Set Contract Grant Provider\n */\nexport const useSetContractGrantProvider = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof setContractGrantProvider>>, TError,SetContractGrantProviderMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof setContractGrantProvider>>,\n TError,\n SetContractGrantProviderMutationVariables,\n TContext\n > => {\n return useMutation(getSetContractGrantProviderMutationOptions(options), queryClient);\n }\n export const getCreateCategoryProviderExclusionUrl = (tenantId: number,) => {\n\n\n\n\n return `/admin/tenants/${tenantId}/entitlement-exclusions`\n}\n\n/**\n * Deny a category/provider pair; userId narrows the deny to that profile.\n *\n * The exclusion applies across the customer's contracts and can only reduce\n * access. Other profiles, including other household members, are unaffected\n * when userId is set. Null provider explicitly covers every applicable provider.\n * @summary Create Category Provider Exclusion\n */\nexport const createCategoryProviderExclusion = async (tenantId: number,\n categoryExclusionWrite: CategoryExclusionWrite, options?: Parameters<typeof request>[1]): Promise<CategoryExclusionRead> => {\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<CategoryExclusionRead>(getCreateCategoryProviderExclusionUrl(tenantId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(categoryExclusionWrite)\n }\n);}\n\n\n\n\n\nexport const getCreateCategoryProviderExclusionMutationKey = () => ['createCategoryProviderExclusion'] as const;\n\nexport const getCreateCategoryProviderExclusionMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createCategoryProviderExclusion>>, TError,CreateCategoryProviderExclusionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof createCategoryProviderExclusion>>, TError,CreateCategoryProviderExclusionMutationVariables, TContext> => {\n\nconst mutationKey = getCreateCategoryProviderExclusionMutationKey();\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 createCategoryProviderExclusion>>, CreateCategoryProviderExclusionMutationVariables> = (props) => {\n const {tenantId,data} = props ?? {};\n\n return createCategoryProviderExclusion(tenantId,data,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateCategoryProviderExclusionMutationResult = NonNullable<Awaited<ReturnType<typeof createCategoryProviderExclusion>>>\n export type CreateCategoryProviderExclusionMutationBody = BodyType<CategoryExclusionWrite>\n export type CreateCategoryProviderExclusionMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type CreateCategoryProviderExclusionMutationVariables = {tenantId: number;data: BodyType<CategoryExclusionWrite>}\n\n /**\n * @summary Create Category Provider Exclusion\n */\nexport const useCreateCategoryProviderExclusion = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createCategoryProviderExclusion>>, TError,CreateCategoryProviderExclusionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof createCategoryProviderExclusion>>,\n TError,\n CreateCategoryProviderExclusionMutationVariables,\n TContext\n > => {\n return useMutation(getCreateCategoryProviderExclusionMutationOptions(options), queryClient);\n }\n export const getRemoveCategoryProviderExclusionUrl = (tenantId: number,\n exclusionId: number,) => {\n\n\n\n\n return `/admin/tenants/${tenantId}/entitlement-exclusions/${exclusionId}`\n}\n\n/**\n * Remove this restriction; a valid contract grant is still required.\n * @summary Remove Category Provider Exclusion\n */\nexport const removeCategoryProviderExclusion = async (tenantId: number,\n exclusionId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRemoveCategoryProviderExclusionUrl(tenantId,exclusionId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n\n\n\nexport const getRemoveCategoryProviderExclusionMutationKey = () => ['removeCategoryProviderExclusion'] as const;\n\nexport const getRemoveCategoryProviderExclusionMutationOptions = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeCategoryProviderExclusion>>, TError,RemoveCategoryProviderExclusionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n): UseMutationOptions<Awaited<ReturnType<typeof removeCategoryProviderExclusion>>, TError,RemoveCategoryProviderExclusionMutationVariables, TContext> => {\n\nconst mutationKey = getRemoveCategoryProviderExclusionMutationKey();\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 removeCategoryProviderExclusion>>, RemoveCategoryProviderExclusionMutationVariables> = (props) => {\n const {tenantId,exclusionId} = props ?? {};\n\n return removeCategoryProviderExclusion(tenantId,exclusionId,requestOptions)\n }\n\n\n\n\n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RemoveCategoryProviderExclusionMutationResult = NonNullable<Awaited<ReturnType<typeof removeCategoryProviderExclusion>>>\n\n export type RemoveCategoryProviderExclusionMutationError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>\n export type RemoveCategoryProviderExclusionMutationVariables = {tenantId: number;exclusionId: number}\n\n /**\n * @summary Remove Category Provider Exclusion\n */\nexport const useRemoveCategoryProviderExclusion = <TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeCategoryProviderExclusion>>, TError,RemoveCategoryProviderExclusionMutationVariables, TContext>, request?: SecondParameter<typeof request>}\n , queryClient?: QueryClient): UseMutationResult<\n Awaited<ReturnType<typeof removeCategoryProviderExclusion>>,\n TError,\n RemoveCategoryProviderExclusionMutationVariables,\n TContext\n > => {\n return useMutation(getRemoveCategoryProviderExclusionMutationOptions(options), queryClient);\n }\n"],"mappings":";;;;;;;;;;;AAmCA,MAAa,qCAAqC,eAAwB;CAKxE,OAAO,oBAAoB,WAAW;AACxC;;;;;;;;AASA,MAAa,8BAA8B,OAAO,YAC9C,4BAAwD,YAAgF;CAExI,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,OAAO,QAAmC,kCAAkC,UAAU,GACpF;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,0BAA0B;CACjD,CACF;AAAE;AAMF,MAAa,kDAAkD,CAAC,6BAA6B;AAE7F,MAAa,iDACW,YACyH;CAEjJ,MAAM,cAAc,0CAA0C;CAC9D,MAAM,EAAC,UAAU,iBAAiB,SAAS,mBAAkB,UACvD,QAAQ,YAAY,iBAAiB,QAAQ,YAAY,QAAQ,SAAS,cAC1E,UACE;EAAC,GAAG;EAAS,UAAU;GAAC,GAAG,QAAQ;GAAU;EAAW;CAAC,IACzD;EAAC,UAA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ClD,aAAqB,YAA2D;CAElF,OAAO,QAAc,sCAAsC,UAAS,WAAW,GAC/E;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAMF,MAAa,sDAAsD,CAAC,iCAAiC;AAErG,MAAa,qDACW,YACiI;CAEzJ,MAAM,cAAc,8CAA8C;CAClE,MAAM,EAAC,UAAU,iBAAiB,SAAS,mBAAkB,UACvD,QAAQ,YAAY,iBAAiB,QAAQ,YAAY,QAAQ,SAAS,cAC1E,UACE;EAAC,GAAG;EAAS,UAAU;GAAC,GAAG,QAAQ;GAAU;EAAW;CAAC,IACzD;EAAC,UAAU,EAAE,YAAa;EAAG,SAAS,KAAA;CAAS;CAKjD,MAAM,cAA+I,UAAU;EAC3J,MAAM,EAAC,UAAS,gBAAe,SAAS,CAAC;EAEzC,OAAQ,gCAAgC,UAAS,aAAY,cAAc;CAC7E;CAON,OAAQ;EAAE;EAAY,GAAG;CAAgB;AAAC;;;;AAU5C,MAAa,sCACW,SACrB,gBAKQ;CACL,OAAO,YAAY,kDAAkD,OAAO,GAAG,WAAW;AAC5F"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { $
|
|
2
|
+
import { $g as CustomerTutorialListRead, B_ as CustomerAdminUpdateWrite, Do as ListCustomerRequestsParams, E_ as CustomerDashboardRead, F_ as CustomerContactListRead, G_ as CustomerAdminInviteWrite, H_ as CustomerAdministratorRead, Kd as ExportBeneficiariesParams, Oo as ListCustomerContractsParams, R_ as CustomerAuditPage, Ro as ListBeneficiaryPackChoicesParams, Sx as BeneficiaryBulkWrite, T as ValidationErrorResponse, T_ as CustomerDomainsWrite, V_ as CustomerAdministratorListRead, X_ as CustomerActivationRead, __ as CustomerOrganizationRead, _n as ReadCustomerContractUsageParams, _x as BeneficiaryInviteWrite, ar as PreviewBeneficiaryFileParams, bx as BeneficiaryImportRead, dx as BeneficiaryUpdateRead, g_ as CustomerOrganizationUpdateWrite, gb as BodyPreviewBeneficiaryFile, gn as ReadCustomerDashboardParams, gx as BeneficiaryImportPreviewWrite, h_ as CustomerOverviewRead, hn as ReadCustomerOrganizationOverviewParams, hx as BeneficiaryInvitationCorrectionWrite, j_ as CustomerContractPage, jo as ListCustomerAuditParams, k_ as CustomerContractUsageRead, ko as ListCustomerBeneficiariesParams, mb as BodyUploadOrganizationLogo, n_ as CustomerRequestWrite, nd as HTTPExceptionResponse, o_ as CustomerRequestPage, oa as OrganizationContactsWrite, p_ as CustomerPackChoicesRead, px as BeneficiaryInvitationRead, s_ as CustomerRequestRead, sa as OrganizationContactsRead, t_ as CustomerSettingsWrite, u_ as CustomerPatronPage, ux as BeneficiaryUpdateWrite, wx as BeneficiaryBulkRead, yx as BeneficiaryImportPage, zo as ListBeneficiaryImportsParams } from "../chunks/index.js";
|
|
3
3
|
import { a as ErrorType, c as request, n as BodyType } from "../chunks/client.js";
|
|
4
4
|
import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, QueryClient, QueryKey, UndefinedInitialDataOptions, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
5
5
|
//#region src/react/admin-customer/admin-customer.d.ts
|
|
@@ -285,6 +285,39 @@ export declare const usePreviewBeneficiaryRows: <TError = ErrorType<HTTPExceptio
|
|
|
285
285
|
mutation?: UseMutationOptions<Awaited<ReturnType<typeof previewBeneficiaryRows>>, TError, PreviewBeneficiaryRowsMutationVariables, TContext>;
|
|
286
286
|
request?: SecondParameter<typeof request>;
|
|
287
287
|
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof previewBeneficiaryRows>>, TError, PreviewBeneficiaryRowsMutationVariables, TContext>;
|
|
288
|
+
export declare const getDownloadBeneficiaryImportTemplateUrl: () => string;
|
|
289
|
+
/**
|
|
290
|
+
* Download a blank workbook with the required beneficiary import columns.
|
|
291
|
+
* @summary Download Beneficiary Import Template
|
|
292
|
+
*/
|
|
293
|
+
export declare const downloadBeneficiaryImportTemplate: (options?: Parameters<typeof request>[1]) => Promise<Blob>;
|
|
294
|
+
export declare const getDownloadBeneficiaryImportTemplateQueryKey: () => readonly [`/admin/me/beneficiaries/imports/template`];
|
|
295
|
+
export declare const getDownloadBeneficiaryImportTemplateQueryOptions: <TData = Awaited<ReturnType<typeof downloadBeneficiaryImportTemplate>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
296
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadBeneficiaryImportTemplate>>, TError, TData>>;
|
|
297
|
+
request?: SecondParameter<typeof request>;
|
|
298
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof downloadBeneficiaryImportTemplate>>, TError, TData> & {
|
|
299
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
300
|
+
};
|
|
301
|
+
export type DownloadBeneficiaryImportTemplateQueryResult = NonNullable<Awaited<ReturnType<typeof downloadBeneficiaryImportTemplate>>>;
|
|
302
|
+
export type DownloadBeneficiaryImportTemplateQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
|
|
303
|
+
export declare function useDownloadBeneficiaryImportTemplate<TData = Awaited<ReturnType<typeof downloadBeneficiaryImportTemplate>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options: {
|
|
304
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadBeneficiaryImportTemplate>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof downloadBeneficiaryImportTemplate>>, TError, Awaited<ReturnType<typeof downloadBeneficiaryImportTemplate>>>, 'initialData'>;
|
|
305
|
+
request?: SecondParameter<typeof request>;
|
|
306
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
307
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
308
|
+
};
|
|
309
|
+
export declare function useDownloadBeneficiaryImportTemplate<TData = Awaited<ReturnType<typeof downloadBeneficiaryImportTemplate>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
310
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadBeneficiaryImportTemplate>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof downloadBeneficiaryImportTemplate>>, TError, Awaited<ReturnType<typeof downloadBeneficiaryImportTemplate>>>, 'initialData'>;
|
|
311
|
+
request?: SecondParameter<typeof request>;
|
|
312
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
313
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
314
|
+
};
|
|
315
|
+
export declare function useDownloadBeneficiaryImportTemplate<TData = Awaited<ReturnType<typeof downloadBeneficiaryImportTemplate>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(options?: {
|
|
316
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof downloadBeneficiaryImportTemplate>>, TError, TData>>;
|
|
317
|
+
request?: SecondParameter<typeof request>;
|
|
318
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
319
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
320
|
+
};
|
|
288
321
|
export declare const getReadBeneficiaryImportUrl: (importId: number) => string;
|
|
289
322
|
/**
|
|
290
323
|
* @summary Read Beneficiary Import
|
|
@@ -386,6 +419,41 @@ export declare const useInviteBeneficiary: <TError = ErrorType<HTTPExceptionResp
|
|
|
386
419
|
mutation?: UseMutationOptions<Awaited<ReturnType<typeof inviteBeneficiary>>, TError, InviteBeneficiaryMutationVariables, TContext>;
|
|
387
420
|
request?: SecondParameter<typeof request>;
|
|
388
421
|
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof inviteBeneficiary>>, TError, InviteBeneficiaryMutationVariables, TContext>;
|
|
422
|
+
export declare const getListBeneficiaryPackChoicesUrl: (params?: ListBeneficiaryPackChoicesParams) => string;
|
|
423
|
+
/**
|
|
424
|
+
* Packs available for electedPack when inviting or updating a beneficiary at this site.
|
|
425
|
+
*
|
|
426
|
+
* Omit site to use the administrator's assigned site or their home organization.
|
|
427
|
+
* @summary List Beneficiary Pack Choices
|
|
428
|
+
*/
|
|
429
|
+
export declare const listBeneficiaryPackChoices: (params?: ListBeneficiaryPackChoicesParams, options?: Parameters<typeof request>[1]) => Promise<CustomerPackChoicesRead>;
|
|
430
|
+
export declare const getListBeneficiaryPackChoicesQueryKey: (params?: ListBeneficiaryPackChoicesParams) => readonly ["/admin/me/beneficiaries/packs", ...ListBeneficiaryPackChoicesParams[]];
|
|
431
|
+
export declare const getListBeneficiaryPackChoicesQueryOptions: <TData = Awaited<ReturnType<typeof listBeneficiaryPackChoices>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListBeneficiaryPackChoicesParams, options?: {
|
|
432
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listBeneficiaryPackChoices>>, TError, TData>>;
|
|
433
|
+
request?: SecondParameter<typeof request>;
|
|
434
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof listBeneficiaryPackChoices>>, TError, TData> & {
|
|
435
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
436
|
+
};
|
|
437
|
+
export type ListBeneficiaryPackChoicesQueryResult = NonNullable<Awaited<ReturnType<typeof listBeneficiaryPackChoices>>>;
|
|
438
|
+
export type ListBeneficiaryPackChoicesQueryError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>;
|
|
439
|
+
export declare function useListBeneficiaryPackChoices<TData = Awaited<ReturnType<typeof listBeneficiaryPackChoices>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params: undefined | ListBeneficiaryPackChoicesParams, options: {
|
|
440
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listBeneficiaryPackChoices>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listBeneficiaryPackChoices>>, TError, Awaited<ReturnType<typeof listBeneficiaryPackChoices>>>, 'initialData'>;
|
|
441
|
+
request?: SecondParameter<typeof request>;
|
|
442
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
443
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
444
|
+
};
|
|
445
|
+
export declare function useListBeneficiaryPackChoices<TData = Awaited<ReturnType<typeof listBeneficiaryPackChoices>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListBeneficiaryPackChoicesParams, options?: {
|
|
446
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listBeneficiaryPackChoices>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listBeneficiaryPackChoices>>, TError, Awaited<ReturnType<typeof listBeneficiaryPackChoices>>>, 'initialData'>;
|
|
447
|
+
request?: SecondParameter<typeof request>;
|
|
448
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
449
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
450
|
+
};
|
|
451
|
+
export declare function useListBeneficiaryPackChoices<TData = Awaited<ReturnType<typeof listBeneficiaryPackChoices>>, TError = ErrorType<HTTPExceptionResponse | ValidationErrorResponse>>(params?: ListBeneficiaryPackChoicesParams, options?: {
|
|
452
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listBeneficiaryPackChoices>>, TError, TData>>;
|
|
453
|
+
request?: SecondParameter<typeof request>;
|
|
454
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
455
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
456
|
+
};
|
|
389
457
|
export declare const getUpdateBeneficiaryUrl: (userId: number) => string;
|
|
390
458
|
/**
|
|
391
459
|
* Change organization access only. Identity/email/site transfers require reconciliation, never reassignment of another person's history.
|
|
@@ -602,7 +670,10 @@ export declare function useReadCustomerContractUsage<TData = Awaited<ReturnType<
|
|
|
602
670
|
};
|
|
603
671
|
export declare const getReadCustomerDashboardUrl: (params?: ReadCustomerDashboardParams) => string;
|
|
604
672
|
/**
|
|
605
|
-
* Customer aggregates
|
|
673
|
+
* Customer aggregates over rolling days, or an inclusive pair of Europe/Paris calendar dates.
|
|
674
|
+
*
|
|
675
|
+
* A complete date range takes precedence over days. The comparison covers
|
|
676
|
+
* the same number of calendar days immediately before the selected range.
|
|
606
677
|
* @summary Read Customer Dashboard
|
|
607
678
|
*/
|
|
608
679
|
export declare const readCustomerDashboard: (params?: ReadCustomerDashboardParams, options?: Parameters<typeof request>[1]) => Promise<CustomerDashboardRead>;
|
|
@@ -7,7 +7,7 @@ import { useMutation, useQuery } from "@tanstack/react-query";
|
|
|
7
7
|
* Do not edit manually.
|
|
8
8
|
* Mozaik backend
|
|
9
9
|
* Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.
|
|
10
|
-
* OpenAPI spec version: 0.
|
|
10
|
+
* OpenAPI spec version: 0.20.2
|
|
11
11
|
*/
|
|
12
12
|
const withQueryKey = (query, queryKey) => {
|
|
13
13
|
const result = { queryKey };
|
|
@@ -471,6 +471,43 @@ const getPreviewBeneficiaryRowsMutationOptions = (options) => {
|
|
|
471
471
|
const usePreviewBeneficiaryRows = (options, queryClient) => {
|
|
472
472
|
return useMutation(getPreviewBeneficiaryRowsMutationOptions(options), queryClient);
|
|
473
473
|
};
|
|
474
|
+
const getDownloadBeneficiaryImportTemplateUrl = () => {
|
|
475
|
+
return `/admin/me/beneficiaries/imports/template`;
|
|
476
|
+
};
|
|
477
|
+
/**
|
|
478
|
+
* Download a blank workbook with the required beneficiary import columns.
|
|
479
|
+
* @summary Download Beneficiary Import Template
|
|
480
|
+
*/
|
|
481
|
+
const downloadBeneficiaryImportTemplate = async (options) => {
|
|
482
|
+
return request(getDownloadBeneficiaryImportTemplateUrl(), {
|
|
483
|
+
...options,
|
|
484
|
+
method: "GET"
|
|
485
|
+
});
|
|
486
|
+
};
|
|
487
|
+
const getDownloadBeneficiaryImportTemplateQueryKey = () => {
|
|
488
|
+
return [`/admin/me/beneficiaries/imports/template`];
|
|
489
|
+
};
|
|
490
|
+
const getDownloadBeneficiaryImportTemplateQueryOptions = (options) => {
|
|
491
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
492
|
+
const queryKey = queryOptions?.queryKey ?? getDownloadBeneficiaryImportTemplateQueryKey();
|
|
493
|
+
const queryFn = ({ signal }) => downloadBeneficiaryImportTemplate({
|
|
494
|
+
signal,
|
|
495
|
+
...requestOptions
|
|
496
|
+
});
|
|
497
|
+
return {
|
|
498
|
+
queryKey,
|
|
499
|
+
queryFn,
|
|
500
|
+
...queryOptions
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
/**
|
|
504
|
+
* @summary Download Beneficiary Import Template
|
|
505
|
+
*/
|
|
506
|
+
function useDownloadBeneficiaryImportTemplate(options, queryClient) {
|
|
507
|
+
const queryOptions = getDownloadBeneficiaryImportTemplateQueryOptions(options);
|
|
508
|
+
const query = useQuery(queryOptions, queryClient);
|
|
509
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
510
|
+
}
|
|
474
511
|
const getReadBeneficiaryImportUrl = (importId) => {
|
|
475
512
|
return `/admin/me/beneficiaries/imports/${importId}`;
|
|
476
513
|
};
|
|
@@ -643,6 +680,50 @@ const getInviteBeneficiaryMutationOptions = (options) => {
|
|
|
643
680
|
const useInviteBeneficiary = (options, queryClient) => {
|
|
644
681
|
return useMutation(getInviteBeneficiaryMutationOptions(options), queryClient);
|
|
645
682
|
};
|
|
683
|
+
const getListBeneficiaryPackChoicesUrl = (params) => {
|
|
684
|
+
const normalizedParams = new URLSearchParams();
|
|
685
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
686
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
687
|
+
});
|
|
688
|
+
const stringifiedParams = normalizedParams.toString();
|
|
689
|
+
return stringifiedParams.length > 0 ? `/admin/me/beneficiaries/packs?${stringifiedParams}` : `/admin/me/beneficiaries/packs`;
|
|
690
|
+
};
|
|
691
|
+
/**
|
|
692
|
+
* Packs available for electedPack when inviting or updating a beneficiary at this site.
|
|
693
|
+
*
|
|
694
|
+
* Omit site to use the administrator's assigned site or their home organization.
|
|
695
|
+
* @summary List Beneficiary Pack Choices
|
|
696
|
+
*/
|
|
697
|
+
const listBeneficiaryPackChoices = async (params, options) => {
|
|
698
|
+
return request(getListBeneficiaryPackChoicesUrl(params), {
|
|
699
|
+
...options,
|
|
700
|
+
method: "GET"
|
|
701
|
+
});
|
|
702
|
+
};
|
|
703
|
+
const getListBeneficiaryPackChoicesQueryKey = (params) => {
|
|
704
|
+
return [`/admin/me/beneficiaries/packs`, ...params ? [params] : []];
|
|
705
|
+
};
|
|
706
|
+
const getListBeneficiaryPackChoicesQueryOptions = (params, options) => {
|
|
707
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
708
|
+
const queryKey = queryOptions?.queryKey ?? getListBeneficiaryPackChoicesQueryKey(params);
|
|
709
|
+
const queryFn = ({ signal }) => listBeneficiaryPackChoices(params, {
|
|
710
|
+
signal,
|
|
711
|
+
...requestOptions
|
|
712
|
+
});
|
|
713
|
+
return {
|
|
714
|
+
queryKey,
|
|
715
|
+
queryFn,
|
|
716
|
+
...queryOptions
|
|
717
|
+
};
|
|
718
|
+
};
|
|
719
|
+
/**
|
|
720
|
+
* @summary List Beneficiary Pack Choices
|
|
721
|
+
*/
|
|
722
|
+
function useListBeneficiaryPackChoices(params, options, queryClient) {
|
|
723
|
+
const queryOptions = getListBeneficiaryPackChoicesQueryOptions(params, options);
|
|
724
|
+
const query = useQuery(queryOptions, queryClient);
|
|
725
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
726
|
+
}
|
|
646
727
|
const getUpdateBeneficiaryUrl = (userId) => {
|
|
647
728
|
return `/admin/me/beneficiaries/${userId}`;
|
|
648
729
|
};
|
|
@@ -1001,7 +1082,10 @@ const getReadCustomerDashboardUrl = (params) => {
|
|
|
1001
1082
|
return stringifiedParams.length > 0 ? `/admin/me/dashboard?${stringifiedParams}` : `/admin/me/dashboard`;
|
|
1002
1083
|
};
|
|
1003
1084
|
/**
|
|
1004
|
-
* Customer aggregates
|
|
1085
|
+
* Customer aggregates over rolling days, or an inclusive pair of Europe/Paris calendar dates.
|
|
1086
|
+
*
|
|
1087
|
+
* A complete date range takes precedence over days. The comparison covers
|
|
1088
|
+
* the same number of calendar days immediately before the selected range.
|
|
1005
1089
|
* @summary Read Customer Dashboard
|
|
1006
1090
|
*/
|
|
1007
1091
|
const readCustomerDashboard = async (params, options) => {
|
|
@@ -1850,6 +1934,6 @@ const useConfigureCustomerAdministration = (options, queryClient) => {
|
|
|
1850
1934
|
return useMutation(getConfigureCustomerAdministrationMutationOptions(options), queryClient);
|
|
1851
1935
|
};
|
|
1852
1936
|
//#endregion
|
|
1853
|
-
export { acceptCustomerAdminInvitation, applyBeneficiaryImport, approveBeneficiary, configureCustomerAdministration, configureCustomerDomains, correctBeneficiaryInvitation, createCustomerRequest, exportBeneficiaries, exportCustomerAudit, getAcceptCustomerAdminInvitationMutationKey, getAcceptCustomerAdminInvitationMutationOptions, getAcceptCustomerAdminInvitationUrl, getApplyBeneficiaryImportMutationKey, getApplyBeneficiaryImportMutationOptions, getApplyBeneficiaryImportUrl, getApproveBeneficiaryMutationKey, getApproveBeneficiaryMutationOptions, getApproveBeneficiaryUrl, getConfigureCustomerAdministrationMutationKey, getConfigureCustomerAdministrationMutationOptions, getConfigureCustomerAdministrationUrl, getConfigureCustomerDomainsMutationKey, getConfigureCustomerDomainsMutationOptions, getConfigureCustomerDomainsUrl, getCorrectBeneficiaryInvitationMutationKey, getCorrectBeneficiaryInvitationMutationOptions, getCorrectBeneficiaryInvitationUrl, getCreateCustomerRequestMutationKey, getCreateCustomerRequestMutationOptions, getCreateCustomerRequestUrl, getExportBeneficiariesQueryKey, getExportBeneficiariesQueryOptions, getExportBeneficiariesUrl, getExportCustomerAuditQueryKey, getExportCustomerAuditQueryOptions, getExportCustomerAuditUrl, getInviteBeneficiaryMutationKey, getInviteBeneficiaryMutationOptions, getInviteBeneficiaryUrl, getInviteCustomerAdministratorMutationKey, getInviteCustomerAdministratorMutationOptions, getInviteCustomerAdministratorUrl, getInviteFirstCustomerAdministratorMutationKey, getInviteFirstCustomerAdministratorMutationOptions, getInviteFirstCustomerAdministratorUrl, getListBeneficiaryImportsQueryKey, getListBeneficiaryImportsQueryOptions, getListBeneficiaryImportsUrl, getListCustomerAdministratorsQueryKey, getListCustomerAdministratorsQueryOptions, getListCustomerAdministratorsUrl, getListCustomerAuditQueryKey, getListCustomerAuditQueryOptions, getListCustomerAuditUrl, getListCustomerBeneficiariesQueryKey, getListCustomerBeneficiariesQueryOptions, getListCustomerBeneficiariesUrl, getListCustomerContactsQueryKey, getListCustomerContactsQueryOptions, getListCustomerContactsUrl, getListCustomerContractsQueryKey, getListCustomerContractsQueryOptions, getListCustomerContractsUrl, getListCustomerRequestsQueryKey, getListCustomerRequestsQueryOptions, getListCustomerRequestsUrl, getListCustomerTutorialsQueryKey, getListCustomerTutorialsQueryOptions, getListCustomerTutorialsUrl, getPreviewBeneficiaryFileMutationKey, getPreviewBeneficiaryFileMutationOptions, getPreviewBeneficiaryFileUrl, getPreviewBeneficiaryRowsMutationKey, getPreviewBeneficiaryRowsMutationOptions, getPreviewBeneficiaryRowsUrl, getReadBeneficiaryImportQueryKey, getReadBeneficiaryImportQueryOptions, getReadBeneficiaryImportUrl, getReadCustomerActivationQueryKey, getReadCustomerActivationQueryOptions, getReadCustomerActivationUrl, getReadCustomerContractUsageQueryKey, getReadCustomerContractUsageQueryOptions, getReadCustomerContractUsageUrl, getReadCustomerDashboardQueryKey, getReadCustomerDashboardQueryOptions, getReadCustomerDashboardUrl, getReadCustomerOrganizationOverviewQueryKey, getReadCustomerOrganizationOverviewQueryOptions, getReadCustomerOrganizationOverviewUrl, getReadCustomerOrganizationQueryKey, getReadCustomerOrganizationQueryOptions, getReadCustomerOrganizationUrl, getReadOrganizationContactsQueryKey, getReadOrganizationContactsQueryOptions, getReadOrganizationContactsUrl, getRenewCustomerActivationMutationKey, getRenewCustomerActivationMutationOptions, getRenewCustomerActivationUrl, getResendBeneficiaryInvitationMutationKey, getResendBeneficiaryInvitationMutationOptions, getResendBeneficiaryInvitationUrl, getRetryBeneficiaryImportMutationKey, getRetryBeneficiaryImportMutationOptions, getRetryBeneficiaryImportUrl, getRevokeBeneficiaryInvitationMutationKey, getRevokeBeneficiaryInvitationMutationOptions, getRevokeBeneficiaryInvitationUrl, getRevokeCustomerAdministratorInvitationMutationKey, getRevokeCustomerAdministratorInvitationMutationOptions, getRevokeCustomerAdministratorInvitationUrl, getRevokeCustomerAdministratorMutationKey, getRevokeCustomerAdministratorMutationOptions, getRevokeCustomerAdministratorUrl, getUpdateBeneficiariesBulkMutationKey, getUpdateBeneficiariesBulkMutationOptions, getUpdateBeneficiariesBulkUrl, getUpdateBeneficiaryMutationKey, getUpdateBeneficiaryMutationOptions, getUpdateBeneficiaryUrl, getUpdateCustomerAdministratorMutationKey, getUpdateCustomerAdministratorMutationOptions, getUpdateCustomerAdministratorUrl, getUpdateCustomerOrganizationMutationKey, getUpdateCustomerOrganizationMutationOptions, getUpdateCustomerOrganizationUrl, getUpdateOrganizationContactsMutationKey, getUpdateOrganizationContactsMutationOptions, getUpdateOrganizationContactsUrl, getUploadOrganizationLogoMutationKey, getUploadOrganizationLogoMutationOptions, getUploadOrganizationLogoUrl, inviteBeneficiary, inviteCustomerAdministrator, inviteFirstCustomerAdministrator, listBeneficiaryImports, listCustomerAdministrators, listCustomerAudit, listCustomerBeneficiaries, listCustomerContacts, listCustomerContracts, listCustomerRequests, listCustomerTutorials, previewBeneficiaryFile, previewBeneficiaryRows, readBeneficiaryImport, readCustomerActivation, readCustomerContractUsage, readCustomerDashboard, readCustomerOrganization, readCustomerOrganizationOverview, readOrganizationContacts, renewCustomerActivation, resendBeneficiaryInvitation, retryBeneficiaryImport, revokeBeneficiaryInvitation, revokeCustomerAdministrator, revokeCustomerAdministratorInvitation, updateBeneficiariesBulk, updateBeneficiary, updateCustomerAdministrator, updateCustomerOrganization, updateOrganizationContacts, uploadOrganizationLogo, useAcceptCustomerAdminInvitation, useApplyBeneficiaryImport, useApproveBeneficiary, useConfigureCustomerAdministration, useConfigureCustomerDomains, useCorrectBeneficiaryInvitation, useCreateCustomerRequest, useExportBeneficiaries, useExportCustomerAudit, useInviteBeneficiary, useInviteCustomerAdministrator, useInviteFirstCustomerAdministrator, useListBeneficiaryImports, useListCustomerAdministrators, useListCustomerAudit, useListCustomerBeneficiaries, useListCustomerContacts, useListCustomerContracts, useListCustomerRequests, useListCustomerTutorials, usePreviewBeneficiaryFile, usePreviewBeneficiaryRows, useReadBeneficiaryImport, useReadCustomerActivation, useReadCustomerContractUsage, useReadCustomerDashboard, useReadCustomerOrganization, useReadCustomerOrganizationOverview, useReadOrganizationContacts, useRenewCustomerActivation, useResendBeneficiaryInvitation, useRetryBeneficiaryImport, useRevokeBeneficiaryInvitation, useRevokeCustomerAdministrator, useRevokeCustomerAdministratorInvitation, useUpdateBeneficiariesBulk, useUpdateBeneficiary, useUpdateCustomerAdministrator, useUpdateCustomerOrganization, useUpdateOrganizationContacts, useUploadOrganizationLogo };
|
|
1937
|
+
export { acceptCustomerAdminInvitation, applyBeneficiaryImport, approveBeneficiary, configureCustomerAdministration, configureCustomerDomains, correctBeneficiaryInvitation, createCustomerRequest, downloadBeneficiaryImportTemplate, exportBeneficiaries, exportCustomerAudit, getAcceptCustomerAdminInvitationMutationKey, getAcceptCustomerAdminInvitationMutationOptions, getAcceptCustomerAdminInvitationUrl, getApplyBeneficiaryImportMutationKey, getApplyBeneficiaryImportMutationOptions, getApplyBeneficiaryImportUrl, getApproveBeneficiaryMutationKey, getApproveBeneficiaryMutationOptions, getApproveBeneficiaryUrl, getConfigureCustomerAdministrationMutationKey, getConfigureCustomerAdministrationMutationOptions, getConfigureCustomerAdministrationUrl, getConfigureCustomerDomainsMutationKey, getConfigureCustomerDomainsMutationOptions, getConfigureCustomerDomainsUrl, getCorrectBeneficiaryInvitationMutationKey, getCorrectBeneficiaryInvitationMutationOptions, getCorrectBeneficiaryInvitationUrl, getCreateCustomerRequestMutationKey, getCreateCustomerRequestMutationOptions, getCreateCustomerRequestUrl, getDownloadBeneficiaryImportTemplateQueryKey, getDownloadBeneficiaryImportTemplateQueryOptions, getDownloadBeneficiaryImportTemplateUrl, getExportBeneficiariesQueryKey, getExportBeneficiariesQueryOptions, getExportBeneficiariesUrl, getExportCustomerAuditQueryKey, getExportCustomerAuditQueryOptions, getExportCustomerAuditUrl, getInviteBeneficiaryMutationKey, getInviteBeneficiaryMutationOptions, getInviteBeneficiaryUrl, getInviteCustomerAdministratorMutationKey, getInviteCustomerAdministratorMutationOptions, getInviteCustomerAdministratorUrl, getInviteFirstCustomerAdministratorMutationKey, getInviteFirstCustomerAdministratorMutationOptions, getInviteFirstCustomerAdministratorUrl, getListBeneficiaryImportsQueryKey, getListBeneficiaryImportsQueryOptions, getListBeneficiaryImportsUrl, getListBeneficiaryPackChoicesQueryKey, getListBeneficiaryPackChoicesQueryOptions, getListBeneficiaryPackChoicesUrl, getListCustomerAdministratorsQueryKey, getListCustomerAdministratorsQueryOptions, getListCustomerAdministratorsUrl, getListCustomerAuditQueryKey, getListCustomerAuditQueryOptions, getListCustomerAuditUrl, getListCustomerBeneficiariesQueryKey, getListCustomerBeneficiariesQueryOptions, getListCustomerBeneficiariesUrl, getListCustomerContactsQueryKey, getListCustomerContactsQueryOptions, getListCustomerContactsUrl, getListCustomerContractsQueryKey, getListCustomerContractsQueryOptions, getListCustomerContractsUrl, getListCustomerRequestsQueryKey, getListCustomerRequestsQueryOptions, getListCustomerRequestsUrl, getListCustomerTutorialsQueryKey, getListCustomerTutorialsQueryOptions, getListCustomerTutorialsUrl, getPreviewBeneficiaryFileMutationKey, getPreviewBeneficiaryFileMutationOptions, getPreviewBeneficiaryFileUrl, getPreviewBeneficiaryRowsMutationKey, getPreviewBeneficiaryRowsMutationOptions, getPreviewBeneficiaryRowsUrl, getReadBeneficiaryImportQueryKey, getReadBeneficiaryImportQueryOptions, getReadBeneficiaryImportUrl, getReadCustomerActivationQueryKey, getReadCustomerActivationQueryOptions, getReadCustomerActivationUrl, getReadCustomerContractUsageQueryKey, getReadCustomerContractUsageQueryOptions, getReadCustomerContractUsageUrl, getReadCustomerDashboardQueryKey, getReadCustomerDashboardQueryOptions, getReadCustomerDashboardUrl, getReadCustomerOrganizationOverviewQueryKey, getReadCustomerOrganizationOverviewQueryOptions, getReadCustomerOrganizationOverviewUrl, getReadCustomerOrganizationQueryKey, getReadCustomerOrganizationQueryOptions, getReadCustomerOrganizationUrl, getReadOrganizationContactsQueryKey, getReadOrganizationContactsQueryOptions, getReadOrganizationContactsUrl, getRenewCustomerActivationMutationKey, getRenewCustomerActivationMutationOptions, getRenewCustomerActivationUrl, getResendBeneficiaryInvitationMutationKey, getResendBeneficiaryInvitationMutationOptions, getResendBeneficiaryInvitationUrl, getRetryBeneficiaryImportMutationKey, getRetryBeneficiaryImportMutationOptions, getRetryBeneficiaryImportUrl, getRevokeBeneficiaryInvitationMutationKey, getRevokeBeneficiaryInvitationMutationOptions, getRevokeBeneficiaryInvitationUrl, getRevokeCustomerAdministratorInvitationMutationKey, getRevokeCustomerAdministratorInvitationMutationOptions, getRevokeCustomerAdministratorInvitationUrl, getRevokeCustomerAdministratorMutationKey, getRevokeCustomerAdministratorMutationOptions, getRevokeCustomerAdministratorUrl, getUpdateBeneficiariesBulkMutationKey, getUpdateBeneficiariesBulkMutationOptions, getUpdateBeneficiariesBulkUrl, getUpdateBeneficiaryMutationKey, getUpdateBeneficiaryMutationOptions, getUpdateBeneficiaryUrl, getUpdateCustomerAdministratorMutationKey, getUpdateCustomerAdministratorMutationOptions, getUpdateCustomerAdministratorUrl, getUpdateCustomerOrganizationMutationKey, getUpdateCustomerOrganizationMutationOptions, getUpdateCustomerOrganizationUrl, getUpdateOrganizationContactsMutationKey, getUpdateOrganizationContactsMutationOptions, getUpdateOrganizationContactsUrl, getUploadOrganizationLogoMutationKey, getUploadOrganizationLogoMutationOptions, getUploadOrganizationLogoUrl, inviteBeneficiary, inviteCustomerAdministrator, inviteFirstCustomerAdministrator, listBeneficiaryImports, listBeneficiaryPackChoices, listCustomerAdministrators, listCustomerAudit, listCustomerBeneficiaries, listCustomerContacts, listCustomerContracts, listCustomerRequests, listCustomerTutorials, previewBeneficiaryFile, previewBeneficiaryRows, readBeneficiaryImport, readCustomerActivation, readCustomerContractUsage, readCustomerDashboard, readCustomerOrganization, readCustomerOrganizationOverview, readOrganizationContacts, renewCustomerActivation, resendBeneficiaryInvitation, retryBeneficiaryImport, revokeBeneficiaryInvitation, revokeCustomerAdministrator, revokeCustomerAdministratorInvitation, updateBeneficiariesBulk, updateBeneficiary, updateCustomerAdministrator, updateCustomerOrganization, updateOrganizationContacts, uploadOrganizationLogo, useAcceptCustomerAdminInvitation, useApplyBeneficiaryImport, useApproveBeneficiary, useConfigureCustomerAdministration, useConfigureCustomerDomains, useCorrectBeneficiaryInvitation, useCreateCustomerRequest, useDownloadBeneficiaryImportTemplate, useExportBeneficiaries, useExportCustomerAudit, useInviteBeneficiary, useInviteCustomerAdministrator, useInviteFirstCustomerAdministrator, useListBeneficiaryImports, useListBeneficiaryPackChoices, useListCustomerAdministrators, useListCustomerAudit, useListCustomerBeneficiaries, useListCustomerContacts, useListCustomerContracts, useListCustomerRequests, useListCustomerTutorials, usePreviewBeneficiaryFile, usePreviewBeneficiaryRows, useReadBeneficiaryImport, useReadCustomerActivation, useReadCustomerContractUsage, useReadCustomerDashboard, useReadCustomerOrganization, useReadCustomerOrganizationOverview, useReadOrganizationContacts, useRenewCustomerActivation, useResendBeneficiaryInvitation, useRetryBeneficiaryImport, useRevokeBeneficiaryInvitation, useRevokeCustomerAdministrator, useRevokeCustomerAdministratorInvitation, useUpdateBeneficiariesBulk, useUpdateBeneficiary, useUpdateCustomerAdministrator, useUpdateCustomerOrganization, useUpdateOrganizationContacts, useUploadOrganizationLogo };
|
|
1854
1938
|
|
|
1855
1939
|
//# sourceMappingURL=admin-customer.js.map
|