@learnorama/mozaik-sdk 0.22.10-staging.78.1 → 0.23.0-staging.79.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CUSTOMER-ADMIN.md +18 -2
- package/FRONTEND-REQUESTS.md +130 -0
- 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 +176 -3
- package/dist/api/admin-customer.js +470 -5
- package/dist/api/admin-customer.js.map +1 -1
- package/dist/api/admin-desk.d.ts +1 -1
- package/dist/api/admin-desk.js.map +1 -1
- package/dist/api/admin-licenses.d.ts +1 -1
- package/dist/api/admin-licenses.js.map +1 -1
- package/dist/api/admin-partner-selections.d.ts +1 -1
- package/dist/api/admin-partner-selections.js.map +1 -1
- package/dist/api/admin-patrons.d.ts +1 -1
- package/dist/api/admin-patrons.js.map +1 -1
- package/dist/api/admin-reviews.d.ts +1 -1
- package/dist/api/admin-reviews.js.map +1 -1
- package/dist/api/admin-roles.d.ts +1 -1
- package/dist/api/admin-roles.js.map +1 -1
- package/dist/api/admin-support.d.ts +1 -1
- package/dist/api/admin-support.js.map +1 -1
- package/dist/api/admin-tenants.d.ts +61 -1
- package/dist/api/admin-tenants.js +222 -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 +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.d.ts +1 -1
- package/dist/api/biblio-search.js.map +1 -1
- package/dist/api/biblio-telemetry.d.ts +1 -1
- package/dist/api/biblio-telemetry.js.map +1 -1
- package/dist/api/biblio-youscribe.js.map +1 -1
- package/dist/api/consumption.d.ts +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.d.ts +1 -1
- package/dist/api/cvs-streaming.js.map +1 -1
- package/dist/api/index.d.ts +3 -3
- package/dist/api/index.js +3 -3
- package/dist/api/partner-catalogue.d.ts +1 -1
- package/dist/api/partner-catalogue.js.map +1 -1
- package/dist/api/partner-reader-nextory.d.ts +1 -1
- package/dist/api/partner-reader-nextory.js.map +1 -1
- package/dist/api/partner-reader-youscribe.d.ts +1 -1
- package/dist/api/partner-reader-youscribe.js.map +1 -1
- package/dist/api/partner-reading.d.ts +1 -1
- package/dist/api/partner-reading.js.map +1 -1
- package/dist/api/profiles.d.ts +1 -1
- package/dist/api/profiles.js.map +1 -1
- package/dist/api/search.d.ts +1 -1
- package/dist/api/search.js.map +1 -1
- package/dist/api/tutoring-catalogue.d.ts +1 -1
- package/dist/api/tutoring-catalogue.js.map +1 -1
- package/dist/api/tutoring-chat.d.ts +1 -1
- package/dist/api/tutoring-chat.js.map +1 -1
- package/dist/api/tutoring-dispatch.d.ts +1 -1
- package/dist/api/tutoring-dispatch.js.map +1 -1
- package/dist/api/tutoring-practitioner.js.map +1 -1
- package/dist/api/tutoring-requests.d.ts +1 -1
- package/dist/api/tutoring-requests.js.map +1 -1
- package/dist/chunks/client2.d.ts +1 -1
- package/dist/chunks/connection.d.ts +1 -1
- package/dist/chunks/index.d.ts +2047 -840
- package/dist/chunks/index2.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +2 -2
- package/dist/models.js +236 -3
- package/dist/models.js.map +1 -1
- package/dist/react/account.d.ts +1 -1
- package/dist/react/account.js +1 -1
- package/dist/react/account.js.map +1 -1
- package/dist/react/admin-catalogue.d.ts +1 -1
- package/dist/react/admin-catalogue.js +1 -1
- package/dist/react/admin-catalogue.js.map +1 -1
- package/dist/react/admin-consumption.d.ts +1 -1
- package/dist/react/admin-consumption.js +1 -1
- package/dist/react/admin-consumption.js.map +1 -1
- package/dist/react/admin-contracts.d.ts +1 -1
- package/dist/react/admin-contracts.js +1 -1
- package/dist/react/admin-contracts.js.map +1 -1
- package/dist/react/admin-customer.d.ts +690 -3
- package/dist/react/admin-customer.js +1128 -97
- 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 +257 -1
- package/dist/react/admin-tenants.js +499 -2
- 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 +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 +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 +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 +3 -3
- package/dist/react/index.js +3 -3
- package/dist/react/partner-catalogue.d.ts +1 -1
- package/dist/react/partner-catalogue.js +1 -1
- package/dist/react/partner-catalogue.js.map +1 -1
- package/dist/react/partner-reader-nextory.d.ts +1 -1
- package/dist/react/partner-reader-nextory.js +1 -1
- package/dist/react/partner-reader-nextory.js.map +1 -1
- package/dist/react/partner-reader-youscribe.d.ts +1 -1
- package/dist/react/partner-reader-youscribe.js +1 -1
- package/dist/react/partner-reader-youscribe.js.map +1 -1
- package/dist/react/partner-reading.d.ts +1 -1
- package/dist/react/partner-reading.js +1 -1
- package/dist/react/partner-reading.js.map +1 -1
- package/dist/react/profiles.d.ts +1 -1
- package/dist/react/profiles.js +1 -1
- package/dist/react/profiles.js.map +1 -1
- package/dist/react/search.d.ts +1 -1
- package/dist/react/search.js +1 -1
- package/dist/react/search.js.map +1 -1
- package/dist/react/tutoring-catalogue.d.ts +1 -1
- package/dist/react/tutoring-catalogue.js +1 -1
- package/dist/react/tutoring-catalogue.js.map +1 -1
- package/dist/react/tutoring-chat.d.ts +1 -1
- package/dist/react/tutoring-chat.js +1 -1
- package/dist/react/tutoring-chat.js.map +1 -1
- package/dist/react/tutoring-dispatch.d.ts +1 -1
- package/dist/react/tutoring-dispatch.js +1 -1
- package/dist/react/tutoring-dispatch.js.map +1 -1
- package/dist/react/tutoring-practitioner.d.ts +1 -1
- package/dist/react/tutoring-practitioner.js +1 -1
- package/dist/react/tutoring-practitioner.js.map +1 -1
- package/dist/react/tutoring-requests.d.ts +1 -1
- package/dist/react/tutoring-requests.js +1 -1
- package/dist/react/tutoring-requests.js.map +1 -1
- package/package.json +7 -7
|
@@ -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.23.0
|
|
11
11
|
*/
|
|
12
12
|
const withQueryKey = (query, queryKey) => {
|
|
13
13
|
const result = { queryKey };
|
|
@@ -57,6 +57,209 @@ function useListCustomerTutorials(options, queryClient) {
|
|
|
57
57
|
const query = useQuery(queryOptions, queryClient);
|
|
58
58
|
return withQueryKey(query, queryOptions.queryKey);
|
|
59
59
|
}
|
|
60
|
+
const getListCustomerSegmentsUrl = () => {
|
|
61
|
+
return `/admin/me/access-codes/segments`;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Segments of this administrator's site with their code, registrations and cap. Segments are created by Mozaik.
|
|
65
|
+
* @summary List Customer Segments
|
|
66
|
+
*/
|
|
67
|
+
const listCustomerSegments = async (options) => {
|
|
68
|
+
return request(getListCustomerSegmentsUrl(), {
|
|
69
|
+
...options,
|
|
70
|
+
method: "GET"
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
const getListCustomerSegmentsQueryKey = () => {
|
|
74
|
+
return [`/admin/me/access-codes/segments`];
|
|
75
|
+
};
|
|
76
|
+
const getListCustomerSegmentsQueryOptions = (options) => {
|
|
77
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
78
|
+
const queryKey = queryOptions?.queryKey ?? getListCustomerSegmentsQueryKey();
|
|
79
|
+
const queryFn = ({ signal }) => listCustomerSegments({
|
|
80
|
+
signal,
|
|
81
|
+
...requestOptions
|
|
82
|
+
});
|
|
83
|
+
return {
|
|
84
|
+
queryKey,
|
|
85
|
+
queryFn,
|
|
86
|
+
...queryOptions
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* @summary List Customer Segments
|
|
91
|
+
*/
|
|
92
|
+
function useListCustomerSegments(options, queryClient) {
|
|
93
|
+
const queryOptions = getListCustomerSegmentsQueryOptions(options);
|
|
94
|
+
const query = useQuery(queryOptions, queryClient);
|
|
95
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
96
|
+
}
|
|
97
|
+
const getRenewCustomerSegmentUrl = (segmentId) => {
|
|
98
|
+
return `/admin/me/access-codes/segments/${segmentId}/renew`;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Rotate one segment's code, retaining its registrations, cap and validity.
|
|
102
|
+
* @summary Renew Customer Segment
|
|
103
|
+
*/
|
|
104
|
+
const renewCustomerSegment = async (segmentId, options) => {
|
|
105
|
+
return request(getRenewCustomerSegmentUrl(segmentId), {
|
|
106
|
+
...options,
|
|
107
|
+
method: "POST"
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
const getRenewCustomerSegmentMutationKey = () => ["renewCustomerSegment"];
|
|
111
|
+
const getRenewCustomerSegmentMutationOptions = (options) => {
|
|
112
|
+
const mutationKey = getRenewCustomerSegmentMutationKey();
|
|
113
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
114
|
+
...options,
|
|
115
|
+
mutation: {
|
|
116
|
+
...options.mutation,
|
|
117
|
+
mutationKey
|
|
118
|
+
}
|
|
119
|
+
} : {
|
|
120
|
+
mutation: { mutationKey },
|
|
121
|
+
request: void 0
|
|
122
|
+
};
|
|
123
|
+
const mutationFn = (props) => {
|
|
124
|
+
const { segmentId } = props ?? {};
|
|
125
|
+
return renewCustomerSegment(segmentId, requestOptions);
|
|
126
|
+
};
|
|
127
|
+
return {
|
|
128
|
+
mutationFn,
|
|
129
|
+
...mutationOptions
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* @summary Renew Customer Segment
|
|
134
|
+
*/
|
|
135
|
+
const useRenewCustomerSegment = (options, queryClient) => {
|
|
136
|
+
return useMutation(getRenewCustomerSegmentMutationOptions(options), queryClient);
|
|
137
|
+
};
|
|
138
|
+
const getListCustomerSingleUseCodesUrl = (params) => {
|
|
139
|
+
const normalizedParams = new URLSearchParams();
|
|
140
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
141
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
142
|
+
});
|
|
143
|
+
const stringifiedParams = normalizedParams.toString();
|
|
144
|
+
return stringifiedParams.length > 0 ? `/admin/me/access-codes/single-use?${stringifiedParams}` : `/admin/me/access-codes/single-use`;
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* Single-use codes of this administrator's site, optionally in one state, with the total of each state.
|
|
148
|
+
* @summary List Customer Single Use Codes
|
|
149
|
+
*/
|
|
150
|
+
const listCustomerSingleUseCodes = async (params, options) => {
|
|
151
|
+
return request(getListCustomerSingleUseCodesUrl(params), {
|
|
152
|
+
...options,
|
|
153
|
+
method: "GET"
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
const getListCustomerSingleUseCodesQueryKey = (params) => {
|
|
157
|
+
return [`/admin/me/access-codes/single-use`, ...params ? [params] : []];
|
|
158
|
+
};
|
|
159
|
+
const getListCustomerSingleUseCodesQueryOptions = (params, options) => {
|
|
160
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
161
|
+
const queryKey = queryOptions?.queryKey ?? getListCustomerSingleUseCodesQueryKey(params);
|
|
162
|
+
const queryFn = ({ signal }) => listCustomerSingleUseCodes(params, {
|
|
163
|
+
signal,
|
|
164
|
+
...requestOptions
|
|
165
|
+
});
|
|
166
|
+
return {
|
|
167
|
+
queryKey,
|
|
168
|
+
queryFn,
|
|
169
|
+
...queryOptions
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* @summary List Customer Single Use Codes
|
|
174
|
+
*/
|
|
175
|
+
function useListCustomerSingleUseCodes(params, options, queryClient) {
|
|
176
|
+
const queryOptions = getListCustomerSingleUseCodesQueryOptions(params, options);
|
|
177
|
+
const query = useQuery(queryOptions, queryClient);
|
|
178
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
179
|
+
}
|
|
180
|
+
const getExportCustomerSingleUseCodesUrl = (params) => {
|
|
181
|
+
const normalizedParams = new URLSearchParams();
|
|
182
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
183
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
184
|
+
});
|
|
185
|
+
const stringifiedParams = normalizedParams.toString();
|
|
186
|
+
return stringifiedParams.length > 0 ? `/admin/me/access-codes/single-use/export?${stringifiedParams}` : `/admin/me/access-codes/single-use/export`;
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* Audited XLSX of the single-use codes in the same optional state as the list: code, state, date of use, validity.
|
|
190
|
+
* @summary Export Customer Single Use Codes
|
|
191
|
+
*/
|
|
192
|
+
const exportCustomerSingleUseCodes = async (params, options) => {
|
|
193
|
+
return request(getExportCustomerSingleUseCodesUrl(params), {
|
|
194
|
+
...options,
|
|
195
|
+
method: "GET"
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
const getExportCustomerSingleUseCodesQueryKey = (params) => {
|
|
199
|
+
return [`/admin/me/access-codes/single-use/export`, ...params ? [params] : []];
|
|
200
|
+
};
|
|
201
|
+
const getExportCustomerSingleUseCodesQueryOptions = (params, options) => {
|
|
202
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
203
|
+
const queryKey = queryOptions?.queryKey ?? getExportCustomerSingleUseCodesQueryKey(params);
|
|
204
|
+
const queryFn = ({ signal }) => exportCustomerSingleUseCodes(params, {
|
|
205
|
+
signal,
|
|
206
|
+
...requestOptions
|
|
207
|
+
});
|
|
208
|
+
return {
|
|
209
|
+
queryKey,
|
|
210
|
+
queryFn,
|
|
211
|
+
...queryOptions
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* @summary Export Customer Single Use Codes
|
|
216
|
+
*/
|
|
217
|
+
function useExportCustomerSingleUseCodes(params, options, queryClient) {
|
|
218
|
+
const queryOptions = getExportCustomerSingleUseCodesQueryOptions(params, options);
|
|
219
|
+
const query = useQuery(queryOptions, queryClient);
|
|
220
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
221
|
+
}
|
|
222
|
+
const getDisableCustomerSingleUseCodeUrl = (codeId) => {
|
|
223
|
+
return `/admin/me/access-codes/single-use/${codeId}/disable`;
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* Withdraw an unused code. A used code stays used; repeating the call changes nothing.
|
|
227
|
+
* @summary Disable Customer Single Use Code
|
|
228
|
+
*/
|
|
229
|
+
const disableCustomerSingleUseCode = async (codeId, options) => {
|
|
230
|
+
return request(getDisableCustomerSingleUseCodeUrl(codeId), {
|
|
231
|
+
...options,
|
|
232
|
+
method: "POST"
|
|
233
|
+
});
|
|
234
|
+
};
|
|
235
|
+
const getDisableCustomerSingleUseCodeMutationKey = () => ["disableCustomerSingleUseCode"];
|
|
236
|
+
const getDisableCustomerSingleUseCodeMutationOptions = (options) => {
|
|
237
|
+
const mutationKey = getDisableCustomerSingleUseCodeMutationKey();
|
|
238
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
239
|
+
...options,
|
|
240
|
+
mutation: {
|
|
241
|
+
...options.mutation,
|
|
242
|
+
mutationKey
|
|
243
|
+
}
|
|
244
|
+
} : {
|
|
245
|
+
mutation: { mutationKey },
|
|
246
|
+
request: void 0
|
|
247
|
+
};
|
|
248
|
+
const mutationFn = (props) => {
|
|
249
|
+
const { codeId } = props ?? {};
|
|
250
|
+
return disableCustomerSingleUseCode(codeId, requestOptions);
|
|
251
|
+
};
|
|
252
|
+
return {
|
|
253
|
+
mutationFn,
|
|
254
|
+
...mutationOptions
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* @summary Disable Customer Single Use Code
|
|
259
|
+
*/
|
|
260
|
+
const useDisableCustomerSingleUseCode = (options, queryClient) => {
|
|
261
|
+
return useMutation(getDisableCustomerSingleUseCodeMutationOptions(options), queryClient);
|
|
262
|
+
};
|
|
60
263
|
const getReadCustomerActivationUrl = () => {
|
|
61
264
|
return `/admin/me/activation-code`;
|
|
62
265
|
};
|
|
@@ -512,6 +715,10 @@ const getReadBeneficiaryImportUrl = (importId) => {
|
|
|
512
715
|
return `/admin/me/beneficiaries/imports/${importId}`;
|
|
513
716
|
};
|
|
514
717
|
/**
|
|
718
|
+
* Progress and issues of an import this administrator created.
|
|
719
|
+
*
|
|
720
|
+
* Its author can always follow it: the report describes their own file, not
|
|
721
|
+
* the beneficiary directory.
|
|
515
722
|
* @summary Read Beneficiary Import
|
|
516
723
|
*/
|
|
517
724
|
const readBeneficiaryImport = async (importId, options) => {
|
|
@@ -545,15 +752,24 @@ function useReadBeneficiaryImport(importId, options, queryClient) {
|
|
|
545
752
|
const query = useQuery(queryOptions, queryClient);
|
|
546
753
|
return withQueryKey(query, queryOptions.queryKey);
|
|
547
754
|
}
|
|
548
|
-
const getApplyBeneficiaryImportUrl = (importId) => {
|
|
549
|
-
|
|
755
|
+
const getApplyBeneficiaryImportUrl = (importId, params) => {
|
|
756
|
+
const normalizedParams = new URLSearchParams();
|
|
757
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
758
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
759
|
+
});
|
|
760
|
+
const stringifiedParams = normalizedParams.toString();
|
|
761
|
+
return stringifiedParams.length > 0 ? `/admin/me/beneficiaries/imports/${importId}/apply?${stringifiedParams}` : `/admin/me/beneficiaries/imports/${importId}/apply`;
|
|
550
762
|
};
|
|
551
763
|
/**
|
|
552
764
|
* Approve the saved preview. Background tasks apply 100 records per atomic batch; no emails or provider subscriptions are created by import.
|
|
765
|
+
*
|
|
766
|
+
* A preview with rejected rows is refused (409) unless `skipRejected` is
|
|
767
|
+
* true: the import is then applied without them, and they stay listed as
|
|
768
|
+
* skipped issues. A row the file names is never treated as absent.
|
|
553
769
|
* @summary Apply Beneficiary Import
|
|
554
770
|
*/
|
|
555
|
-
const applyBeneficiaryImport = async (importId, options) => {
|
|
556
|
-
return request(getApplyBeneficiaryImportUrl(importId), {
|
|
771
|
+
const applyBeneficiaryImport = async (importId, params, options) => {
|
|
772
|
+
return request(getApplyBeneficiaryImportUrl(importId, params), {
|
|
557
773
|
...options,
|
|
558
774
|
method: "POST"
|
|
559
775
|
});
|
|
@@ -572,8 +788,8 @@ const getApplyBeneficiaryImportMutationOptions = (options) => {
|
|
|
572
788
|
request: void 0
|
|
573
789
|
};
|
|
574
790
|
const mutationFn = (props) => {
|
|
575
|
-
const { importId } = props ?? {};
|
|
576
|
-
return applyBeneficiaryImport(importId, requestOptions);
|
|
791
|
+
const { importId, params } = props ?? {};
|
|
792
|
+
return applyBeneficiaryImport(importId, params, requestOptions);
|
|
577
793
|
};
|
|
578
794
|
return {
|
|
579
795
|
mutationFn,
|
|
@@ -586,6 +802,44 @@ const getApplyBeneficiaryImportMutationOptions = (options) => {
|
|
|
586
802
|
const useApplyBeneficiaryImport = (options, queryClient) => {
|
|
587
803
|
return useMutation(getApplyBeneficiaryImportMutationOptions(options), queryClient);
|
|
588
804
|
};
|
|
805
|
+
const getDownloadRejectedImportRowsUrl = (importId) => {
|
|
806
|
+
return `/admin/me/beneficiaries/imports/${importId}/rejected`;
|
|
807
|
+
};
|
|
808
|
+
/**
|
|
809
|
+
* XLSX of every rejected row of the administrator's own import: source row, the address typed there and a coded reason.
|
|
810
|
+
* @summary Download Rejected Import Rows
|
|
811
|
+
*/
|
|
812
|
+
const downloadRejectedImportRows = async (importId, options) => {
|
|
813
|
+
return request(getDownloadRejectedImportRowsUrl(importId), {
|
|
814
|
+
...options,
|
|
815
|
+
method: "GET"
|
|
816
|
+
});
|
|
817
|
+
};
|
|
818
|
+
const getDownloadRejectedImportRowsQueryKey = (importId) => {
|
|
819
|
+
return [`/admin/me/beneficiaries/imports/${importId}/rejected`];
|
|
820
|
+
};
|
|
821
|
+
const getDownloadRejectedImportRowsQueryOptions = (importId, options) => {
|
|
822
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
823
|
+
const queryKey = queryOptions?.queryKey ?? getDownloadRejectedImportRowsQueryKey(importId);
|
|
824
|
+
const queryFn = ({ signal }) => downloadRejectedImportRows(importId, {
|
|
825
|
+
signal,
|
|
826
|
+
...requestOptions
|
|
827
|
+
});
|
|
828
|
+
return {
|
|
829
|
+
queryKey,
|
|
830
|
+
queryFn,
|
|
831
|
+
enabled: importId !== null && importId !== void 0,
|
|
832
|
+
...queryOptions
|
|
833
|
+
};
|
|
834
|
+
};
|
|
835
|
+
/**
|
|
836
|
+
* @summary Download Rejected Import Rows
|
|
837
|
+
*/
|
|
838
|
+
function useDownloadRejectedImportRows(importId, options, queryClient) {
|
|
839
|
+
const queryOptions = getDownloadRejectedImportRowsQueryOptions(importId, options);
|
|
840
|
+
const query = useQuery(queryOptions, queryClient);
|
|
841
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
842
|
+
}
|
|
589
843
|
const getRetryBeneficiaryImportUrl = (importId) => {
|
|
590
844
|
return `/admin/me/beneficiaries/imports/${importId}/retry`;
|
|
591
845
|
};
|
|
@@ -627,6 +881,47 @@ const getRetryBeneficiaryImportMutationOptions = (options) => {
|
|
|
627
881
|
const useRetryBeneficiaryImport = (options, queryClient) => {
|
|
628
882
|
return useMutation(getRetryBeneficiaryImportMutationOptions(options), queryClient);
|
|
629
883
|
};
|
|
884
|
+
const getReviewBeneficiaryImportUrl = (importId) => {
|
|
885
|
+
return `/admin/me/beneficiaries/imports/${importId}/review`;
|
|
886
|
+
};
|
|
887
|
+
/**
|
|
888
|
+
* Before approving: who a replace import would disable, and homonyms to check.
|
|
889
|
+
*
|
|
890
|
+
* Counts are whole; each list holds the first hundred. Both are empty once
|
|
891
|
+
* the import is applied, because its rows are not kept.
|
|
892
|
+
* @summary Review Beneficiary Import
|
|
893
|
+
*/
|
|
894
|
+
const reviewBeneficiaryImport = async (importId, options) => {
|
|
895
|
+
return request(getReviewBeneficiaryImportUrl(importId), {
|
|
896
|
+
...options,
|
|
897
|
+
method: "GET"
|
|
898
|
+
});
|
|
899
|
+
};
|
|
900
|
+
const getReviewBeneficiaryImportQueryKey = (importId) => {
|
|
901
|
+
return [`/admin/me/beneficiaries/imports/${importId}/review`];
|
|
902
|
+
};
|
|
903
|
+
const getReviewBeneficiaryImportQueryOptions = (importId, options) => {
|
|
904
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
905
|
+
const queryKey = queryOptions?.queryKey ?? getReviewBeneficiaryImportQueryKey(importId);
|
|
906
|
+
const queryFn = ({ signal }) => reviewBeneficiaryImport(importId, {
|
|
907
|
+
signal,
|
|
908
|
+
...requestOptions
|
|
909
|
+
});
|
|
910
|
+
return {
|
|
911
|
+
queryKey,
|
|
912
|
+
queryFn,
|
|
913
|
+
enabled: importId !== null && importId !== void 0,
|
|
914
|
+
...queryOptions
|
|
915
|
+
};
|
|
916
|
+
};
|
|
917
|
+
/**
|
|
918
|
+
* @summary Review Beneficiary Import
|
|
919
|
+
*/
|
|
920
|
+
function useReviewBeneficiaryImport(importId, options, queryClient) {
|
|
921
|
+
const queryOptions = getReviewBeneficiaryImportQueryOptions(importId, options);
|
|
922
|
+
const query = useQuery(queryOptions, queryClient);
|
|
923
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
924
|
+
}
|
|
630
925
|
const getInviteBeneficiaryUrl = () => {
|
|
631
926
|
return `/admin/me/beneficiaries/invitations`;
|
|
632
927
|
};
|
|
@@ -952,67 +1247,31 @@ const getResendBeneficiaryInvitationMutationOptions = (options) => {
|
|
|
952
1247
|
const useResendBeneficiaryInvitation = (options, queryClient) => {
|
|
953
1248
|
return useMutation(getResendBeneficiaryInvitationMutationOptions(options), queryClient);
|
|
954
1249
|
};
|
|
955
|
-
const
|
|
956
|
-
return `/admin/me/contacts`;
|
|
957
|
-
};
|
|
958
|
-
/**
|
|
959
|
-
* @summary List Customer Contacts
|
|
960
|
-
*/
|
|
961
|
-
const listCustomerContacts = async (options) => {
|
|
962
|
-
return request(getListCustomerContactsUrl(), {
|
|
963
|
-
...options,
|
|
964
|
-
method: "GET"
|
|
965
|
-
});
|
|
966
|
-
};
|
|
967
|
-
const getListCustomerContactsQueryKey = () => {
|
|
968
|
-
return [`/admin/me/contacts`];
|
|
969
|
-
};
|
|
970
|
-
const getListCustomerContactsQueryOptions = (options) => {
|
|
971
|
-
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
972
|
-
const queryKey = queryOptions?.queryKey ?? getListCustomerContactsQueryKey();
|
|
973
|
-
const queryFn = ({ signal }) => listCustomerContacts({
|
|
974
|
-
signal,
|
|
975
|
-
...requestOptions
|
|
976
|
-
});
|
|
977
|
-
return {
|
|
978
|
-
queryKey,
|
|
979
|
-
queryFn,
|
|
980
|
-
...queryOptions
|
|
981
|
-
};
|
|
982
|
-
};
|
|
983
|
-
/**
|
|
984
|
-
* @summary List Customer Contacts
|
|
985
|
-
*/
|
|
986
|
-
function useListCustomerContacts(options, queryClient) {
|
|
987
|
-
const queryOptions = getListCustomerContactsQueryOptions(options);
|
|
988
|
-
const query = useQuery(queryOptions, queryClient);
|
|
989
|
-
return withQueryKey(query, queryOptions.queryKey);
|
|
990
|
-
}
|
|
991
|
-
const getListCustomerContractsUrl = (params) => {
|
|
1250
|
+
const getListCustomerCalendarUrl = (params) => {
|
|
992
1251
|
const normalizedParams = new URLSearchParams();
|
|
993
1252
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
994
1253
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
995
1254
|
});
|
|
996
1255
|
const stringifiedParams = normalizedParams.toString();
|
|
997
|
-
return stringifiedParams.length > 0 ? `/admin/me/
|
|
1256
|
+
return stringifiedParams.length > 0 ? `/admin/me/calendar?${stringifiedParams}` : `/admin/me/calendar`;
|
|
998
1257
|
};
|
|
999
1258
|
/**
|
|
1000
|
-
*
|
|
1001
|
-
* @summary List Customer
|
|
1259
|
+
* The organisation's communication calendar for one year (the current one by default): the plan written by Mozaik and its own internal events.
|
|
1260
|
+
* @summary List Customer Calendar
|
|
1002
1261
|
*/
|
|
1003
|
-
const
|
|
1004
|
-
return request(
|
|
1262
|
+
const listCustomerCalendar = async (params, options) => {
|
|
1263
|
+
return request(getListCustomerCalendarUrl(params), {
|
|
1005
1264
|
...options,
|
|
1006
1265
|
method: "GET"
|
|
1007
1266
|
});
|
|
1008
1267
|
};
|
|
1009
|
-
const
|
|
1010
|
-
return [`/admin/me/
|
|
1268
|
+
const getListCustomerCalendarQueryKey = (params) => {
|
|
1269
|
+
return [`/admin/me/calendar`, ...params ? [params] : []];
|
|
1011
1270
|
};
|
|
1012
|
-
const
|
|
1271
|
+
const getListCustomerCalendarQueryOptions = (params, options) => {
|
|
1013
1272
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1014
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1015
|
-
const queryFn = ({ signal }) =>
|
|
1273
|
+
const queryKey = queryOptions?.queryKey ?? getListCustomerCalendarQueryKey(params);
|
|
1274
|
+
const queryFn = ({ signal }) => listCustomerCalendar(params, {
|
|
1016
1275
|
signal,
|
|
1017
1276
|
...requestOptions
|
|
1018
1277
|
});
|
|
@@ -1023,84 +1282,649 @@ const getListCustomerContractsQueryOptions = (params, options) => {
|
|
|
1023
1282
|
};
|
|
1024
1283
|
};
|
|
1025
1284
|
/**
|
|
1026
|
-
* @summary List Customer
|
|
1285
|
+
* @summary List Customer Calendar
|
|
1027
1286
|
*/
|
|
1028
|
-
function
|
|
1029
|
-
const queryOptions =
|
|
1287
|
+
function useListCustomerCalendar(params, options, queryClient) {
|
|
1288
|
+
const queryOptions = getListCustomerCalendarQueryOptions(params, options);
|
|
1030
1289
|
const query = useQuery(queryOptions, queryClient);
|
|
1031
1290
|
return withQueryKey(query, queryOptions.queryKey);
|
|
1032
1291
|
}
|
|
1033
|
-
const
|
|
1034
|
-
|
|
1035
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1036
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1037
|
-
});
|
|
1038
|
-
const stringifiedParams = normalizedParams.toString();
|
|
1039
|
-
return stringifiedParams.length > 0 ? `/admin/me/contracts/${contractId}/usage?${stringifiedParams}` : `/admin/me/contracts/${contractId}/usage`;
|
|
1292
|
+
const getAddCustomerCalendarEventUrl = () => {
|
|
1293
|
+
return `/admin/me/calendar`;
|
|
1040
1294
|
};
|
|
1041
1295
|
/**
|
|
1042
|
-
*
|
|
1043
|
-
* @summary
|
|
1296
|
+
* A principal or a manager adds an internal event of the organisation.
|
|
1297
|
+
* @summary Add Customer Calendar Event
|
|
1044
1298
|
*/
|
|
1045
|
-
const
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
};
|
|
1051
|
-
const
|
|
1299
|
+
const addCustomerCalendarEvent = async (calendarEventWrite, options) => {
|
|
1300
|
+
const getHeaders = (h) => {
|
|
1301
|
+
if (!h) return {};
|
|
1302
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1303
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
1304
|
+
const headers = {};
|
|
1305
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
1306
|
+
return headers;
|
|
1307
|
+
};
|
|
1308
|
+
return request(getAddCustomerCalendarEventUrl(), {
|
|
1309
|
+
...options,
|
|
1310
|
+
method: "POST",
|
|
1311
|
+
headers: {
|
|
1312
|
+
"Content-Type": "application/json",
|
|
1313
|
+
...getHeaders(options?.headers)
|
|
1314
|
+
},
|
|
1315
|
+
body: JSON.stringify(calendarEventWrite)
|
|
1316
|
+
});
|
|
1317
|
+
};
|
|
1318
|
+
const getAddCustomerCalendarEventMutationKey = () => ["addCustomerCalendarEvent"];
|
|
1319
|
+
const getAddCustomerCalendarEventMutationOptions = (options) => {
|
|
1320
|
+
const mutationKey = getAddCustomerCalendarEventMutationKey();
|
|
1321
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1322
|
+
...options,
|
|
1323
|
+
mutation: {
|
|
1324
|
+
...options.mutation,
|
|
1325
|
+
mutationKey
|
|
1326
|
+
}
|
|
1327
|
+
} : {
|
|
1328
|
+
mutation: { mutationKey },
|
|
1329
|
+
request: void 0
|
|
1330
|
+
};
|
|
1331
|
+
const mutationFn = (props) => {
|
|
1332
|
+
const { data } = props ?? {};
|
|
1333
|
+
return addCustomerCalendarEvent(data, requestOptions);
|
|
1334
|
+
};
|
|
1335
|
+
return {
|
|
1336
|
+
mutationFn,
|
|
1337
|
+
...mutationOptions
|
|
1338
|
+
};
|
|
1339
|
+
};
|
|
1340
|
+
/**
|
|
1341
|
+
* @summary Add Customer Calendar Event
|
|
1342
|
+
*/
|
|
1343
|
+
const useAddCustomerCalendarEvent = (options, queryClient) => {
|
|
1344
|
+
return useMutation(getAddCustomerCalendarEventMutationOptions(options), queryClient);
|
|
1345
|
+
};
|
|
1346
|
+
const getRemoveCustomerCalendarEventUrl = (eventId) => {
|
|
1347
|
+
return `/admin/me/calendar/${eventId}`;
|
|
1348
|
+
};
|
|
1349
|
+
/**
|
|
1350
|
+
* Withdraw an internal event of the organisation.
|
|
1351
|
+
* @summary Remove Customer Calendar Event
|
|
1352
|
+
*/
|
|
1353
|
+
const removeCustomerCalendarEvent = async (eventId, options) => {
|
|
1354
|
+
return request(getRemoveCustomerCalendarEventUrl(eventId), {
|
|
1355
|
+
...options,
|
|
1356
|
+
method: "DELETE"
|
|
1357
|
+
});
|
|
1358
|
+
};
|
|
1359
|
+
const getRemoveCustomerCalendarEventMutationKey = () => ["removeCustomerCalendarEvent"];
|
|
1360
|
+
const getRemoveCustomerCalendarEventMutationOptions = (options) => {
|
|
1361
|
+
const mutationKey = getRemoveCustomerCalendarEventMutationKey();
|
|
1362
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1363
|
+
...options,
|
|
1364
|
+
mutation: {
|
|
1365
|
+
...options.mutation,
|
|
1366
|
+
mutationKey
|
|
1367
|
+
}
|
|
1368
|
+
} : {
|
|
1369
|
+
mutation: { mutationKey },
|
|
1370
|
+
request: void 0
|
|
1371
|
+
};
|
|
1372
|
+
const mutationFn = (props) => {
|
|
1373
|
+
const { eventId } = props ?? {};
|
|
1374
|
+
return removeCustomerCalendarEvent(eventId, requestOptions);
|
|
1375
|
+
};
|
|
1376
|
+
return {
|
|
1377
|
+
mutationFn,
|
|
1378
|
+
...mutationOptions
|
|
1379
|
+
};
|
|
1380
|
+
};
|
|
1381
|
+
/**
|
|
1382
|
+
* @summary Remove Customer Calendar Event
|
|
1383
|
+
*/
|
|
1384
|
+
const useRemoveCustomerCalendarEvent = (options, queryClient) => {
|
|
1385
|
+
return useMutation(getRemoveCustomerCalendarEventMutationOptions(options), queryClient);
|
|
1386
|
+
};
|
|
1387
|
+
const getChangeCustomerCalendarEventUrl = (eventId) => {
|
|
1388
|
+
return `/admin/me/calendar/${eventId}`;
|
|
1389
|
+
};
|
|
1390
|
+
/**
|
|
1391
|
+
* Change an internal event. Steps of the plan written by Mozaik are not the organisation's to change (404).
|
|
1392
|
+
* @summary Change Customer Calendar Event
|
|
1393
|
+
*/
|
|
1394
|
+
const changeCustomerCalendarEvent = async (eventId, calendarEventWrite, options) => {
|
|
1395
|
+
const getHeaders = (h) => {
|
|
1396
|
+
if (!h) return {};
|
|
1397
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1398
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
1399
|
+
const headers = {};
|
|
1400
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
1401
|
+
return headers;
|
|
1402
|
+
};
|
|
1403
|
+
return request(getChangeCustomerCalendarEventUrl(eventId), {
|
|
1404
|
+
...options,
|
|
1405
|
+
method: "PUT",
|
|
1406
|
+
headers: {
|
|
1407
|
+
"Content-Type": "application/json",
|
|
1408
|
+
...getHeaders(options?.headers)
|
|
1409
|
+
},
|
|
1410
|
+
body: JSON.stringify(calendarEventWrite)
|
|
1411
|
+
});
|
|
1412
|
+
};
|
|
1413
|
+
const getChangeCustomerCalendarEventMutationKey = () => ["changeCustomerCalendarEvent"];
|
|
1414
|
+
const getChangeCustomerCalendarEventMutationOptions = (options) => {
|
|
1415
|
+
const mutationKey = getChangeCustomerCalendarEventMutationKey();
|
|
1416
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1417
|
+
...options,
|
|
1418
|
+
mutation: {
|
|
1419
|
+
...options.mutation,
|
|
1420
|
+
mutationKey
|
|
1421
|
+
}
|
|
1422
|
+
} : {
|
|
1423
|
+
mutation: { mutationKey },
|
|
1424
|
+
request: void 0
|
|
1425
|
+
};
|
|
1426
|
+
const mutationFn = (props) => {
|
|
1427
|
+
const { eventId, data } = props ?? {};
|
|
1428
|
+
return changeCustomerCalendarEvent(eventId, data, requestOptions);
|
|
1429
|
+
};
|
|
1430
|
+
return {
|
|
1431
|
+
mutationFn,
|
|
1432
|
+
...mutationOptions
|
|
1433
|
+
};
|
|
1434
|
+
};
|
|
1435
|
+
/**
|
|
1436
|
+
* @summary Change Customer Calendar Event
|
|
1437
|
+
*/
|
|
1438
|
+
const useChangeCustomerCalendarEvent = (options, queryClient) => {
|
|
1439
|
+
return useMutation(getChangeCustomerCalendarEventMutationOptions(options), queryClient);
|
|
1440
|
+
};
|
|
1441
|
+
const getListCustomerConsoleUrl = (params) => {
|
|
1442
|
+
const normalizedParams = new URLSearchParams();
|
|
1443
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1444
|
+
if (Array.isArray(value) && ["kind"].includes(key)) {
|
|
1445
|
+
value.forEach((v) => {
|
|
1446
|
+
normalizedParams.append(key, v === null ? "null" : String(v));
|
|
1447
|
+
});
|
|
1448
|
+
return;
|
|
1449
|
+
}
|
|
1450
|
+
});
|
|
1451
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1452
|
+
return stringifiedParams.length > 0 ? `/admin/me/console?${stringifiedParams}` : `/admin/me/console`;
|
|
1453
|
+
};
|
|
1454
|
+
/**
|
|
1455
|
+
* What Mozaik currently publishes to this organisation, soonest first.
|
|
1456
|
+
*
|
|
1457
|
+
* Webinars, events and news to come, the announcement banner, the
|
|
1458
|
+
* communication kit and the paper supports that can be ordered. Items are
|
|
1459
|
+
* chosen for the organisation's kind and phase and for today; a webinar or
|
|
1460
|
+
* an event leaves the list once it has started.
|
|
1461
|
+
* @summary List Customer Console
|
|
1462
|
+
*/
|
|
1463
|
+
const listCustomerConsole = async (params, options) => {
|
|
1464
|
+
return request(getListCustomerConsoleUrl(params), {
|
|
1465
|
+
...options,
|
|
1466
|
+
method: "GET"
|
|
1467
|
+
});
|
|
1468
|
+
};
|
|
1469
|
+
const getListCustomerConsoleQueryKey = (params) => {
|
|
1470
|
+
return [`/admin/me/console`, ...params ? [params] : []];
|
|
1471
|
+
};
|
|
1472
|
+
const getListCustomerConsoleQueryOptions = (params, options) => {
|
|
1473
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1474
|
+
const queryKey = queryOptions?.queryKey ?? getListCustomerConsoleQueryKey(params);
|
|
1475
|
+
const queryFn = ({ signal }) => listCustomerConsole(params, {
|
|
1476
|
+
signal,
|
|
1477
|
+
...requestOptions
|
|
1478
|
+
});
|
|
1479
|
+
return {
|
|
1480
|
+
queryKey,
|
|
1481
|
+
queryFn,
|
|
1482
|
+
...queryOptions
|
|
1483
|
+
};
|
|
1484
|
+
};
|
|
1485
|
+
/**
|
|
1486
|
+
* @summary List Customer Console
|
|
1487
|
+
*/
|
|
1488
|
+
function useListCustomerConsole(params, options, queryClient) {
|
|
1489
|
+
const queryOptions = getListCustomerConsoleQueryOptions(params, options);
|
|
1490
|
+
const query = useQuery(queryOptions, queryClient);
|
|
1491
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
1492
|
+
}
|
|
1493
|
+
const getListCustomerContactsUrl = () => {
|
|
1494
|
+
return `/admin/me/contacts`;
|
|
1495
|
+
};
|
|
1496
|
+
/**
|
|
1497
|
+
* @summary List Customer Contacts
|
|
1498
|
+
*/
|
|
1499
|
+
const listCustomerContacts = async (options) => {
|
|
1500
|
+
return request(getListCustomerContactsUrl(), {
|
|
1501
|
+
...options,
|
|
1502
|
+
method: "GET"
|
|
1503
|
+
});
|
|
1504
|
+
};
|
|
1505
|
+
const getListCustomerContactsQueryKey = () => {
|
|
1506
|
+
return [`/admin/me/contacts`];
|
|
1507
|
+
};
|
|
1508
|
+
const getListCustomerContactsQueryOptions = (options) => {
|
|
1509
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1510
|
+
const queryKey = queryOptions?.queryKey ?? getListCustomerContactsQueryKey();
|
|
1511
|
+
const queryFn = ({ signal }) => listCustomerContacts({
|
|
1512
|
+
signal,
|
|
1513
|
+
...requestOptions
|
|
1514
|
+
});
|
|
1515
|
+
return {
|
|
1516
|
+
queryKey,
|
|
1517
|
+
queryFn,
|
|
1518
|
+
...queryOptions
|
|
1519
|
+
};
|
|
1520
|
+
};
|
|
1521
|
+
/**
|
|
1522
|
+
* @summary List Customer Contacts
|
|
1523
|
+
*/
|
|
1524
|
+
function useListCustomerContacts(options, queryClient) {
|
|
1525
|
+
const queryOptions = getListCustomerContactsQueryOptions(options);
|
|
1526
|
+
const query = useQuery(queryOptions, queryClient);
|
|
1527
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
1528
|
+
}
|
|
1529
|
+
const getListCustomerContractsUrl = (params) => {
|
|
1530
|
+
const normalizedParams = new URLSearchParams();
|
|
1531
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1532
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1533
|
+
});
|
|
1534
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1535
|
+
return stringifiedParams.length > 0 ? `/admin/me/contracts?${stringifiedParams}` : `/admin/me/contracts`;
|
|
1536
|
+
};
|
|
1537
|
+
/**
|
|
1538
|
+
* Organisation contracts and their usage URLs, excluding personal purchases.
|
|
1539
|
+
* @summary List Customer Contracts
|
|
1540
|
+
*/
|
|
1541
|
+
const listCustomerContracts = async (params, options) => {
|
|
1542
|
+
return request(getListCustomerContractsUrl(params), {
|
|
1543
|
+
...options,
|
|
1544
|
+
method: "GET"
|
|
1545
|
+
});
|
|
1546
|
+
};
|
|
1547
|
+
const getListCustomerContractsQueryKey = (params) => {
|
|
1548
|
+
return [`/admin/me/contracts`, ...params ? [params] : []];
|
|
1549
|
+
};
|
|
1550
|
+
const getListCustomerContractsQueryOptions = (params, options) => {
|
|
1551
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1552
|
+
const queryKey = queryOptions?.queryKey ?? getListCustomerContractsQueryKey(params);
|
|
1553
|
+
const queryFn = ({ signal }) => listCustomerContracts(params, {
|
|
1554
|
+
signal,
|
|
1555
|
+
...requestOptions
|
|
1556
|
+
});
|
|
1557
|
+
return {
|
|
1558
|
+
queryKey,
|
|
1559
|
+
queryFn,
|
|
1560
|
+
...queryOptions
|
|
1561
|
+
};
|
|
1562
|
+
};
|
|
1563
|
+
/**
|
|
1564
|
+
* @summary List Customer Contracts
|
|
1565
|
+
*/
|
|
1566
|
+
function useListCustomerContracts(params, options, queryClient) {
|
|
1567
|
+
const queryOptions = getListCustomerContractsQueryOptions(params, options);
|
|
1568
|
+
const query = useQuery(queryOptions, queryClient);
|
|
1569
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
1570
|
+
}
|
|
1571
|
+
const getReadCustomerContractUsageUrl = (contractId, params) => {
|
|
1572
|
+
const normalizedParams = new URLSearchParams();
|
|
1573
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1574
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1575
|
+
});
|
|
1576
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1577
|
+
return stringifiedParams.length > 0 ? `/admin/me/contracts/${contractId}/usage?${stringifiedParams}` : `/admin/me/contracts/${contractId}/usage`;
|
|
1578
|
+
};
|
|
1579
|
+
/**
|
|
1580
|
+
* Aggregate consumption for an in-scope contract; foreign contracts are forbidden.
|
|
1581
|
+
* @summary Read Customer Contract Usage
|
|
1582
|
+
*/
|
|
1583
|
+
const readCustomerContractUsage = async (contractId, params, options) => {
|
|
1584
|
+
return request(getReadCustomerContractUsageUrl(contractId, params), {
|
|
1585
|
+
...options,
|
|
1586
|
+
method: "GET"
|
|
1587
|
+
});
|
|
1588
|
+
};
|
|
1589
|
+
const getReadCustomerContractUsageQueryKey = (contractId, params) => {
|
|
1052
1590
|
return [`/admin/me/contracts/${contractId}/usage`, ...params ? [params] : []];
|
|
1053
1591
|
};
|
|
1054
|
-
const getReadCustomerContractUsageQueryOptions = (contractId, params, options) => {
|
|
1592
|
+
const getReadCustomerContractUsageQueryOptions = (contractId, params, options) => {
|
|
1593
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1594
|
+
const queryKey = queryOptions?.queryKey ?? getReadCustomerContractUsageQueryKey(contractId, params);
|
|
1595
|
+
const queryFn = ({ signal }) => readCustomerContractUsage(contractId, params, {
|
|
1596
|
+
signal,
|
|
1597
|
+
...requestOptions
|
|
1598
|
+
});
|
|
1599
|
+
return {
|
|
1600
|
+
queryKey,
|
|
1601
|
+
queryFn,
|
|
1602
|
+
enabled: contractId !== null && contractId !== void 0,
|
|
1603
|
+
...queryOptions
|
|
1604
|
+
};
|
|
1605
|
+
};
|
|
1606
|
+
/**
|
|
1607
|
+
* @summary Read Customer Contract Usage
|
|
1608
|
+
*/
|
|
1609
|
+
function useReadCustomerContractUsage(contractId, params, options, queryClient) {
|
|
1610
|
+
const queryOptions = getReadCustomerContractUsageQueryOptions(contractId, params, options);
|
|
1611
|
+
const query = useQuery(queryOptions, queryClient);
|
|
1612
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
1613
|
+
}
|
|
1614
|
+
const getReadCustomerDashboardUrl = (params) => {
|
|
1615
|
+
const normalizedParams = new URLSearchParams();
|
|
1616
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1617
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1618
|
+
});
|
|
1619
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1620
|
+
return stringifiedParams.length > 0 ? `/admin/me/dashboard?${stringifiedParams}` : `/admin/me/dashboard`;
|
|
1621
|
+
};
|
|
1622
|
+
/**
|
|
1623
|
+
* Customer aggregates over rolling days, or an inclusive pair of Europe/Paris calendar dates.
|
|
1624
|
+
*
|
|
1625
|
+
* A complete date range takes precedence over days. The comparison covers
|
|
1626
|
+
* the same number of calendar days immediately before the selected range.
|
|
1627
|
+
* @summary Read Customer Dashboard
|
|
1628
|
+
*/
|
|
1629
|
+
const readCustomerDashboard = async (params, options) => {
|
|
1630
|
+
return request(getReadCustomerDashboardUrl(params), {
|
|
1631
|
+
...options,
|
|
1632
|
+
method: "GET"
|
|
1633
|
+
});
|
|
1634
|
+
};
|
|
1635
|
+
const getReadCustomerDashboardQueryKey = (params) => {
|
|
1636
|
+
return [`/admin/me/dashboard`, ...params ? [params] : []];
|
|
1637
|
+
};
|
|
1638
|
+
const getReadCustomerDashboardQueryOptions = (params, options) => {
|
|
1639
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1640
|
+
const queryKey = queryOptions?.queryKey ?? getReadCustomerDashboardQueryKey(params);
|
|
1641
|
+
const queryFn = ({ signal }) => readCustomerDashboard(params, {
|
|
1642
|
+
signal,
|
|
1643
|
+
...requestOptions
|
|
1644
|
+
});
|
|
1645
|
+
return {
|
|
1646
|
+
queryKey,
|
|
1647
|
+
queryFn,
|
|
1648
|
+
...queryOptions
|
|
1649
|
+
};
|
|
1650
|
+
};
|
|
1651
|
+
/**
|
|
1652
|
+
* @summary Read Customer Dashboard
|
|
1653
|
+
*/
|
|
1654
|
+
function useReadCustomerDashboard(params, options, queryClient) {
|
|
1655
|
+
const queryOptions = getReadCustomerDashboardQueryOptions(params, options);
|
|
1656
|
+
const query = useQuery(queryOptions, queryClient);
|
|
1657
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
1658
|
+
}
|
|
1659
|
+
const getReadCustomerFilmCreditsUrl = (params) => {
|
|
1660
|
+
const normalizedParams = new URLSearchParams();
|
|
1661
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1662
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1663
|
+
});
|
|
1664
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1665
|
+
return stringifiedParams.length > 0 ? `/admin/me/film-credits?${stringifiedParams}` : `/admin/me/film-credits`;
|
|
1666
|
+
};
|
|
1667
|
+
/**
|
|
1668
|
+
* Monthly film allowance of each beneficiary, and the bounds the offer leaves the organisation.
|
|
1669
|
+
* @summary Read Customer Film Credits
|
|
1670
|
+
*/
|
|
1671
|
+
const readCustomerFilmCredits = async (params, options) => {
|
|
1672
|
+
return request(getReadCustomerFilmCreditsUrl(params), {
|
|
1673
|
+
...options,
|
|
1674
|
+
method: "GET"
|
|
1675
|
+
});
|
|
1676
|
+
};
|
|
1677
|
+
const getReadCustomerFilmCreditsQueryKey = (params) => {
|
|
1678
|
+
return [`/admin/me/film-credits`, ...params ? [params] : []];
|
|
1679
|
+
};
|
|
1680
|
+
const getReadCustomerFilmCreditsQueryOptions = (params, options) => {
|
|
1681
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1682
|
+
const queryKey = queryOptions?.queryKey ?? getReadCustomerFilmCreditsQueryKey(params);
|
|
1683
|
+
const queryFn = ({ signal }) => readCustomerFilmCredits(params, {
|
|
1684
|
+
signal,
|
|
1685
|
+
...requestOptions
|
|
1686
|
+
});
|
|
1687
|
+
return {
|
|
1688
|
+
queryKey,
|
|
1689
|
+
queryFn,
|
|
1690
|
+
...queryOptions
|
|
1691
|
+
};
|
|
1692
|
+
};
|
|
1693
|
+
/**
|
|
1694
|
+
* @summary Read Customer Film Credits
|
|
1695
|
+
*/
|
|
1696
|
+
function useReadCustomerFilmCredits(params, options, queryClient) {
|
|
1697
|
+
const queryOptions = getReadCustomerFilmCreditsQueryOptions(params, options);
|
|
1698
|
+
const query = useQuery(queryOptions, queryClient);
|
|
1699
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
1700
|
+
}
|
|
1701
|
+
const getSetCustomerFilmCreditsUrl = (params) => {
|
|
1702
|
+
const normalizedParams = new URLSearchParams();
|
|
1703
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1704
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1705
|
+
});
|
|
1706
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1707
|
+
return stringifiedParams.length > 0 ? `/admin/me/film-credits?${stringifiedParams}` : `/admin/me/film-credits`;
|
|
1708
|
+
};
|
|
1709
|
+
/**
|
|
1710
|
+
* Principal-only choice of the monthly film allowance, within the offer's bounds.
|
|
1711
|
+
*
|
|
1712
|
+
* 409 when Mozaik set no bounds or no allowance for this customer; 422
|
|
1713
|
+
* outside the bounds. It applies at once to every beneficiary without an
|
|
1714
|
+
* individual allowance.
|
|
1715
|
+
* @summary Set Customer Film Credits
|
|
1716
|
+
*/
|
|
1717
|
+
const setCustomerFilmCredits = async (customerFilmCreditsWrite, params, options) => {
|
|
1718
|
+
const getHeaders = (h) => {
|
|
1719
|
+
if (!h) return {};
|
|
1720
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1721
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
1722
|
+
const headers = {};
|
|
1723
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
1724
|
+
return headers;
|
|
1725
|
+
};
|
|
1726
|
+
return request(getSetCustomerFilmCreditsUrl(params), {
|
|
1727
|
+
...options,
|
|
1728
|
+
method: "PUT",
|
|
1729
|
+
headers: {
|
|
1730
|
+
"Content-Type": "application/json",
|
|
1731
|
+
...getHeaders(options?.headers)
|
|
1732
|
+
},
|
|
1733
|
+
body: JSON.stringify(customerFilmCreditsWrite)
|
|
1734
|
+
});
|
|
1735
|
+
};
|
|
1736
|
+
const getSetCustomerFilmCreditsMutationKey = () => ["setCustomerFilmCredits"];
|
|
1737
|
+
const getSetCustomerFilmCreditsMutationOptions = (options) => {
|
|
1738
|
+
const mutationKey = getSetCustomerFilmCreditsMutationKey();
|
|
1739
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1740
|
+
...options,
|
|
1741
|
+
mutation: {
|
|
1742
|
+
...options.mutation,
|
|
1743
|
+
mutationKey
|
|
1744
|
+
}
|
|
1745
|
+
} : {
|
|
1746
|
+
mutation: { mutationKey },
|
|
1747
|
+
request: void 0
|
|
1748
|
+
};
|
|
1749
|
+
const mutationFn = (props) => {
|
|
1750
|
+
const { data, params } = props ?? {};
|
|
1751
|
+
return setCustomerFilmCredits(data, params, requestOptions);
|
|
1752
|
+
};
|
|
1753
|
+
return {
|
|
1754
|
+
mutationFn,
|
|
1755
|
+
...mutationOptions
|
|
1756
|
+
};
|
|
1757
|
+
};
|
|
1758
|
+
/**
|
|
1759
|
+
* @summary Set Customer Film Credits
|
|
1760
|
+
*/
|
|
1761
|
+
const useSetCustomerFilmCredits = (options, queryClient) => {
|
|
1762
|
+
return useMutation(getSetCustomerFilmCreditsMutationOptions(options), queryClient);
|
|
1763
|
+
};
|
|
1764
|
+
const getReadCustomerLaunchUrl = () => {
|
|
1765
|
+
return `/admin/me/launch`;
|
|
1766
|
+
};
|
|
1767
|
+
/**
|
|
1768
|
+
* Launch steps and their dates. The list step is the organisation's first applied import; the others are recorded by its account manager.
|
|
1769
|
+
* @summary Read Customer Launch
|
|
1770
|
+
*/
|
|
1771
|
+
const readCustomerLaunch = async (options) => {
|
|
1772
|
+
return request(getReadCustomerLaunchUrl(), {
|
|
1773
|
+
...options,
|
|
1774
|
+
method: "GET"
|
|
1775
|
+
});
|
|
1776
|
+
};
|
|
1777
|
+
const getReadCustomerLaunchQueryKey = () => {
|
|
1778
|
+
return [`/admin/me/launch`];
|
|
1779
|
+
};
|
|
1780
|
+
const getReadCustomerLaunchQueryOptions = (options) => {
|
|
1055
1781
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1056
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1057
|
-
const queryFn = ({ signal }) =>
|
|
1782
|
+
const queryKey = queryOptions?.queryKey ?? getReadCustomerLaunchQueryKey();
|
|
1783
|
+
const queryFn = ({ signal }) => readCustomerLaunch({
|
|
1058
1784
|
signal,
|
|
1059
1785
|
...requestOptions
|
|
1060
1786
|
});
|
|
1061
1787
|
return {
|
|
1062
1788
|
queryKey,
|
|
1063
1789
|
queryFn,
|
|
1064
|
-
enabled: contractId !== null && contractId !== void 0,
|
|
1065
1790
|
...queryOptions
|
|
1066
1791
|
};
|
|
1067
1792
|
};
|
|
1068
1793
|
/**
|
|
1069
|
-
* @summary Read Customer
|
|
1794
|
+
* @summary Read Customer Launch
|
|
1070
1795
|
*/
|
|
1071
|
-
function
|
|
1072
|
-
const queryOptions =
|
|
1796
|
+
function useReadCustomerLaunch(options, queryClient) {
|
|
1797
|
+
const queryOptions = getReadCustomerLaunchQueryOptions(options);
|
|
1073
1798
|
const query = useQuery(queryOptions, queryClient);
|
|
1074
1799
|
return withQueryKey(query, queryOptions.queryKey);
|
|
1075
1800
|
}
|
|
1076
|
-
const
|
|
1801
|
+
const getListCustomerMaterialOrdersUrl = (params) => {
|
|
1077
1802
|
const normalizedParams = new URLSearchParams();
|
|
1078
1803
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1079
1804
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1080
1805
|
});
|
|
1081
1806
|
const stringifiedParams = normalizedParams.toString();
|
|
1082
|
-
return stringifiedParams.length > 0 ? `/admin/me/
|
|
1807
|
+
return stringifiedParams.length > 0 ? `/admin/me/material-orders?${stringifiedParams}` : `/admin/me/material-orders`;
|
|
1083
1808
|
};
|
|
1084
1809
|
/**
|
|
1085
|
-
*
|
|
1810
|
+
* Paper orders of the organisation, latest first, whoever placed them.
|
|
1811
|
+
* @summary List Customer Material Orders
|
|
1812
|
+
*/
|
|
1813
|
+
const listCustomerMaterialOrders = async (params, options) => {
|
|
1814
|
+
return request(getListCustomerMaterialOrdersUrl(params), {
|
|
1815
|
+
...options,
|
|
1816
|
+
method: "GET"
|
|
1817
|
+
});
|
|
1818
|
+
};
|
|
1819
|
+
const getListCustomerMaterialOrdersQueryKey = (params) => {
|
|
1820
|
+
return [`/admin/me/material-orders`, ...params ? [params] : []];
|
|
1821
|
+
};
|
|
1822
|
+
const getListCustomerMaterialOrdersQueryOptions = (params, options) => {
|
|
1823
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1824
|
+
const queryKey = queryOptions?.queryKey ?? getListCustomerMaterialOrdersQueryKey(params);
|
|
1825
|
+
const queryFn = ({ signal }) => listCustomerMaterialOrders(params, {
|
|
1826
|
+
signal,
|
|
1827
|
+
...requestOptions
|
|
1828
|
+
});
|
|
1829
|
+
return {
|
|
1830
|
+
queryKey,
|
|
1831
|
+
queryFn,
|
|
1832
|
+
...queryOptions
|
|
1833
|
+
};
|
|
1834
|
+
};
|
|
1835
|
+
/**
|
|
1836
|
+
* @summary List Customer Material Orders
|
|
1837
|
+
*/
|
|
1838
|
+
function useListCustomerMaterialOrders(params, options, queryClient) {
|
|
1839
|
+
const queryOptions = getListCustomerMaterialOrdersQueryOptions(params, options);
|
|
1840
|
+
const query = useQuery(queryOptions, queryClient);
|
|
1841
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
1842
|
+
}
|
|
1843
|
+
const getOrderCustomerMaterialsUrl = () => {
|
|
1844
|
+
return `/admin/me/material-orders`;
|
|
1845
|
+
};
|
|
1846
|
+
/**
|
|
1847
|
+
* Order paper supports among those `GET /admin/me/console?kind=material` offers.
|
|
1086
1848
|
*
|
|
1087
|
-
*
|
|
1088
|
-
*
|
|
1089
|
-
* @summary
|
|
1849
|
+
* The order is a request to Mozaik: its state and the reply telling when it
|
|
1850
|
+
* was delivered follow the request states. Retry with the same key safely.
|
|
1851
|
+
* @summary Order Customer Materials
|
|
1090
1852
|
*/
|
|
1091
|
-
const
|
|
1092
|
-
|
|
1853
|
+
const orderCustomerMaterials = async (materialOrderWrite, options) => {
|
|
1854
|
+
const getHeaders = (h) => {
|
|
1855
|
+
if (!h) return {};
|
|
1856
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1857
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
1858
|
+
const headers = {};
|
|
1859
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
1860
|
+
return headers;
|
|
1861
|
+
};
|
|
1862
|
+
return request(getOrderCustomerMaterialsUrl(), {
|
|
1863
|
+
...options,
|
|
1864
|
+
method: "POST",
|
|
1865
|
+
headers: {
|
|
1866
|
+
"Content-Type": "application/json",
|
|
1867
|
+
...getHeaders(options?.headers)
|
|
1868
|
+
},
|
|
1869
|
+
body: JSON.stringify(materialOrderWrite)
|
|
1870
|
+
});
|
|
1871
|
+
};
|
|
1872
|
+
const getOrderCustomerMaterialsMutationKey = () => ["orderCustomerMaterials"];
|
|
1873
|
+
const getOrderCustomerMaterialsMutationOptions = (options) => {
|
|
1874
|
+
const mutationKey = getOrderCustomerMaterialsMutationKey();
|
|
1875
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1876
|
+
...options,
|
|
1877
|
+
mutation: {
|
|
1878
|
+
...options.mutation,
|
|
1879
|
+
mutationKey
|
|
1880
|
+
}
|
|
1881
|
+
} : {
|
|
1882
|
+
mutation: { mutationKey },
|
|
1883
|
+
request: void 0
|
|
1884
|
+
};
|
|
1885
|
+
const mutationFn = (props) => {
|
|
1886
|
+
const { data } = props ?? {};
|
|
1887
|
+
return orderCustomerMaterials(data, requestOptions);
|
|
1888
|
+
};
|
|
1889
|
+
return {
|
|
1890
|
+
mutationFn,
|
|
1891
|
+
...mutationOptions
|
|
1892
|
+
};
|
|
1893
|
+
};
|
|
1894
|
+
/**
|
|
1895
|
+
* @summary Order Customer Materials
|
|
1896
|
+
*/
|
|
1897
|
+
const useOrderCustomerMaterials = (options, queryClient) => {
|
|
1898
|
+
return useMutation(getOrderCustomerMaterialsMutationOptions(options), queryClient);
|
|
1899
|
+
};
|
|
1900
|
+
const getReadCustomerOfferUrl = (params) => {
|
|
1901
|
+
const normalizedParams = new URLSearchParams();
|
|
1902
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1903
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1904
|
+
});
|
|
1905
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1906
|
+
return stringifiedParams.length > 0 ? `/admin/me/offer?${stringifiedParams}` : `/admin/me/offer`;
|
|
1907
|
+
};
|
|
1908
|
+
/**
|
|
1909
|
+
* The offer's name and every catalogue pack, marked included when a current contract of the organisation grants it.
|
|
1910
|
+
*
|
|
1911
|
+
* Contracts and their dates are in `GET /admin/me/contracts`. A quote is
|
|
1912
|
+
* asked through `POST /admin/me/requests`.
|
|
1913
|
+
* @summary Read Customer Offer
|
|
1914
|
+
*/
|
|
1915
|
+
const readCustomerOffer = async (params, options) => {
|
|
1916
|
+
return request(getReadCustomerOfferUrl(params), {
|
|
1093
1917
|
...options,
|
|
1094
1918
|
method: "GET"
|
|
1095
1919
|
});
|
|
1096
1920
|
};
|
|
1097
|
-
const
|
|
1098
|
-
return [`/admin/me/
|
|
1921
|
+
const getReadCustomerOfferQueryKey = (params) => {
|
|
1922
|
+
return [`/admin/me/offer`, ...params ? [params] : []];
|
|
1099
1923
|
};
|
|
1100
|
-
const
|
|
1924
|
+
const getReadCustomerOfferQueryOptions = (params, options) => {
|
|
1101
1925
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1102
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1103
|
-
const queryFn = ({ signal }) =>
|
|
1926
|
+
const queryKey = queryOptions?.queryKey ?? getReadCustomerOfferQueryKey(params);
|
|
1927
|
+
const queryFn = ({ signal }) => readCustomerOffer(params, {
|
|
1104
1928
|
signal,
|
|
1105
1929
|
...requestOptions
|
|
1106
1930
|
});
|
|
@@ -1111,10 +1935,10 @@ const getReadCustomerDashboardQueryOptions = (params, options) => {
|
|
|
1111
1935
|
};
|
|
1112
1936
|
};
|
|
1113
1937
|
/**
|
|
1114
|
-
* @summary Read Customer
|
|
1938
|
+
* @summary Read Customer Offer
|
|
1115
1939
|
*/
|
|
1116
|
-
function
|
|
1117
|
-
const queryOptions =
|
|
1940
|
+
function useReadCustomerOffer(params, options, queryClient) {
|
|
1941
|
+
const queryOptions = getReadCustomerOfferQueryOptions(params, options);
|
|
1118
1942
|
const query = useQuery(queryOptions, queryClient);
|
|
1119
1943
|
return withQueryKey(query, queryOptions.queryKey);
|
|
1120
1944
|
}
|
|
@@ -1464,6 +2288,63 @@ function useReadCustomerOrganizationOverview(params, options, queryClient) {
|
|
|
1464
2288
|
const query = useQuery(queryOptions, queryClient);
|
|
1465
2289
|
return withQueryKey(query, queryOptions.queryKey);
|
|
1466
2290
|
}
|
|
2291
|
+
const getRenameCustomerSiteUrl = (tenantId) => {
|
|
2292
|
+
return `/admin/me/organisation/sites/${tenantId}`;
|
|
2293
|
+
};
|
|
2294
|
+
/**
|
|
2295
|
+
* Principal-only name of one library of the network.
|
|
2296
|
+
*
|
|
2297
|
+
* The library-system identifier is set with Mozaik support, and a new
|
|
2298
|
+
* library is opened by Mozaik: ask through `POST /admin/me/requests`.
|
|
2299
|
+
* @summary Rename Customer Site
|
|
2300
|
+
*/
|
|
2301
|
+
const renameCustomerSite = async (tenantId, customerSiteUpdateWrite, options) => {
|
|
2302
|
+
const getHeaders = (h) => {
|
|
2303
|
+
if (!h) return {};
|
|
2304
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2305
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
2306
|
+
const headers = {};
|
|
2307
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
2308
|
+
return headers;
|
|
2309
|
+
};
|
|
2310
|
+
return request(getRenameCustomerSiteUrl(tenantId), {
|
|
2311
|
+
...options,
|
|
2312
|
+
method: "PATCH",
|
|
2313
|
+
headers: {
|
|
2314
|
+
"Content-Type": "application/json",
|
|
2315
|
+
...getHeaders(options?.headers)
|
|
2316
|
+
},
|
|
2317
|
+
body: JSON.stringify(customerSiteUpdateWrite)
|
|
2318
|
+
});
|
|
2319
|
+
};
|
|
2320
|
+
const getRenameCustomerSiteMutationKey = () => ["renameCustomerSite"];
|
|
2321
|
+
const getRenameCustomerSiteMutationOptions = (options) => {
|
|
2322
|
+
const mutationKey = getRenameCustomerSiteMutationKey();
|
|
2323
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
2324
|
+
...options,
|
|
2325
|
+
mutation: {
|
|
2326
|
+
...options.mutation,
|
|
2327
|
+
mutationKey
|
|
2328
|
+
}
|
|
2329
|
+
} : {
|
|
2330
|
+
mutation: { mutationKey },
|
|
2331
|
+
request: void 0
|
|
2332
|
+
};
|
|
2333
|
+
const mutationFn = (props) => {
|
|
2334
|
+
const { tenantId, data } = props ?? {};
|
|
2335
|
+
return renameCustomerSite(tenantId, data, requestOptions);
|
|
2336
|
+
};
|
|
2337
|
+
return {
|
|
2338
|
+
mutationFn,
|
|
2339
|
+
...mutationOptions
|
|
2340
|
+
};
|
|
2341
|
+
};
|
|
2342
|
+
/**
|
|
2343
|
+
* @summary Rename Customer Site
|
|
2344
|
+
*/
|
|
2345
|
+
const useRenameCustomerSite = (options, queryClient) => {
|
|
2346
|
+
return useMutation(getRenameCustomerSiteMutationOptions(options), queryClient);
|
|
2347
|
+
};
|
|
1467
2348
|
const getListCustomerRequestsUrl = (params) => {
|
|
1468
2349
|
const normalizedParams = new URLSearchParams();
|
|
1469
2350
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -1560,6 +2441,156 @@ const getCreateCustomerRequestMutationOptions = (options) => {
|
|
|
1560
2441
|
const useCreateCustomerRequest = (options, queryClient) => {
|
|
1561
2442
|
return useMutation(getCreateCustomerRequestMutationOptions(options), queryClient);
|
|
1562
2443
|
};
|
|
2444
|
+
const getQueryCustomerStatisticsUrl = () => {
|
|
2445
|
+
return `/admin/me/statistics`;
|
|
2446
|
+
};
|
|
2447
|
+
/**
|
|
2448
|
+
* Aggregate usage of the administrator's organisation, from a typed query.
|
|
2449
|
+
*
|
|
2450
|
+
* The organisation and its sites come from the administrator's grant and
|
|
2451
|
+
* statistics must be enabled for the customer. `site` only narrows. A title
|
|
2452
|
+
* or a publication is listed only once `audienceFloor` distinct identified
|
|
2453
|
+
* readers opened it, before any ranking or page.
|
|
2454
|
+
* @summary Query Customer Statistics
|
|
2455
|
+
*/
|
|
2456
|
+
const queryCustomerStatistics = async (customerStatsQuery, options) => {
|
|
2457
|
+
const getHeaders = (h) => {
|
|
2458
|
+
if (!h) return {};
|
|
2459
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2460
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
2461
|
+
const headers = {};
|
|
2462
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
2463
|
+
return headers;
|
|
2464
|
+
};
|
|
2465
|
+
return request(getQueryCustomerStatisticsUrl(), {
|
|
2466
|
+
...options,
|
|
2467
|
+
method: "POST",
|
|
2468
|
+
headers: {
|
|
2469
|
+
"Content-Type": "application/json",
|
|
2470
|
+
...getHeaders(options?.headers)
|
|
2471
|
+
},
|
|
2472
|
+
body: JSON.stringify(customerStatsQuery)
|
|
2473
|
+
});
|
|
2474
|
+
};
|
|
2475
|
+
const getQueryCustomerStatisticsMutationKey = () => ["queryCustomerStatistics"];
|
|
2476
|
+
const getQueryCustomerStatisticsMutationOptions = (options) => {
|
|
2477
|
+
const mutationKey = getQueryCustomerStatisticsMutationKey();
|
|
2478
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
2479
|
+
...options,
|
|
2480
|
+
mutation: {
|
|
2481
|
+
...options.mutation,
|
|
2482
|
+
mutationKey
|
|
2483
|
+
}
|
|
2484
|
+
} : {
|
|
2485
|
+
mutation: { mutationKey },
|
|
2486
|
+
request: void 0
|
|
2487
|
+
};
|
|
2488
|
+
const mutationFn = (props) => {
|
|
2489
|
+
const { data } = props ?? {};
|
|
2490
|
+
return queryCustomerStatistics(data, requestOptions);
|
|
2491
|
+
};
|
|
2492
|
+
return {
|
|
2493
|
+
mutationFn,
|
|
2494
|
+
...mutationOptions
|
|
2495
|
+
};
|
|
2496
|
+
};
|
|
2497
|
+
/**
|
|
2498
|
+
* @summary Query Customer Statistics
|
|
2499
|
+
*/
|
|
2500
|
+
const useQueryCustomerStatistics = (options, queryClient) => {
|
|
2501
|
+
return useMutation(getQueryCustomerStatisticsMutationOptions(options), queryClient);
|
|
2502
|
+
};
|
|
2503
|
+
const getExportCustomerStatisticsUrl = (params) => {
|
|
2504
|
+
const normalizedParams = new URLSearchParams();
|
|
2505
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2506
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2507
|
+
});
|
|
2508
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2509
|
+
return stringifiedParams.length > 0 ? `/admin/me/statistics/export?${stringifiedParams}` : `/admin/me/statistics/export`;
|
|
2510
|
+
};
|
|
2511
|
+
/**
|
|
2512
|
+
* XLSX of the organisation's usage over an inclusive Europe/Paris date range.
|
|
2513
|
+
*
|
|
2514
|
+
* One sheet of aggregates (block, measure, group, value): totals, months,
|
|
2515
|
+
* universes, packs, sites and the hundred most opened titles. It holds no
|
|
2516
|
+
* row about a person, and titles follow the same audience floor as the query.
|
|
2517
|
+
* @summary Export Customer Statistics
|
|
2518
|
+
*/
|
|
2519
|
+
const exportCustomerStatistics = async (params, options) => {
|
|
2520
|
+
return request(getExportCustomerStatisticsUrl(params), {
|
|
2521
|
+
...options,
|
|
2522
|
+
method: "GET"
|
|
2523
|
+
});
|
|
2524
|
+
};
|
|
2525
|
+
const getExportCustomerStatisticsQueryKey = (params) => {
|
|
2526
|
+
return [`/admin/me/statistics/export`, ...params ? [params] : []];
|
|
2527
|
+
};
|
|
2528
|
+
const getExportCustomerStatisticsQueryOptions = (params, options) => {
|
|
2529
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
2530
|
+
const queryKey = queryOptions?.queryKey ?? getExportCustomerStatisticsQueryKey(params);
|
|
2531
|
+
const queryFn = ({ signal }) => exportCustomerStatistics(params, {
|
|
2532
|
+
signal,
|
|
2533
|
+
...requestOptions
|
|
2534
|
+
});
|
|
2535
|
+
return {
|
|
2536
|
+
queryKey,
|
|
2537
|
+
queryFn,
|
|
2538
|
+
...queryOptions
|
|
2539
|
+
};
|
|
2540
|
+
};
|
|
2541
|
+
/**
|
|
2542
|
+
* @summary Export Customer Statistics
|
|
2543
|
+
*/
|
|
2544
|
+
function useExportCustomerStatistics(params, options, queryClient) {
|
|
2545
|
+
const queryOptions = getExportCustomerStatisticsQueryOptions(params, options);
|
|
2546
|
+
const query = useQuery(queryOptions, queryClient);
|
|
2547
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
2548
|
+
}
|
|
2549
|
+
const getDownloadCustomerStatisticsReportUrl = (params) => {
|
|
2550
|
+
const normalizedParams = new URLSearchParams();
|
|
2551
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2552
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2553
|
+
});
|
|
2554
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2555
|
+
return stringifiedParams.length > 0 ? `/admin/me/statistics/report?${stringifiedParams}` : `/admin/me/statistics/report`;
|
|
2556
|
+
};
|
|
2557
|
+
/**
|
|
2558
|
+
* PDF usage report over an inclusive Europe/Paris date range, a quarter for instance.
|
|
2559
|
+
*
|
|
2560
|
+
* The same aggregates as the export, one table per block: totals, months,
|
|
2561
|
+
* universes, packs, sites and the most opened titles.
|
|
2562
|
+
* @summary Download Customer Statistics Report
|
|
2563
|
+
*/
|
|
2564
|
+
const downloadCustomerStatisticsReport = async (params, options) => {
|
|
2565
|
+
return request(getDownloadCustomerStatisticsReportUrl(params), {
|
|
2566
|
+
...options,
|
|
2567
|
+
method: "GET"
|
|
2568
|
+
});
|
|
2569
|
+
};
|
|
2570
|
+
const getDownloadCustomerStatisticsReportQueryKey = (params) => {
|
|
2571
|
+
return [`/admin/me/statistics/report`, ...params ? [params] : []];
|
|
2572
|
+
};
|
|
2573
|
+
const getDownloadCustomerStatisticsReportQueryOptions = (params, options) => {
|
|
2574
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
2575
|
+
const queryKey = queryOptions?.queryKey ?? getDownloadCustomerStatisticsReportQueryKey(params);
|
|
2576
|
+
const queryFn = ({ signal }) => downloadCustomerStatisticsReport(params, {
|
|
2577
|
+
signal,
|
|
2578
|
+
...requestOptions
|
|
2579
|
+
});
|
|
2580
|
+
return {
|
|
2581
|
+
queryKey,
|
|
2582
|
+
queryFn,
|
|
2583
|
+
...queryOptions
|
|
2584
|
+
};
|
|
2585
|
+
};
|
|
2586
|
+
/**
|
|
2587
|
+
* @summary Download Customer Statistics Report
|
|
2588
|
+
*/
|
|
2589
|
+
function useDownloadCustomerStatisticsReport(params, options, queryClient) {
|
|
2590
|
+
const queryOptions = getDownloadCustomerStatisticsReportQueryOptions(params, options);
|
|
2591
|
+
const query = useQuery(queryOptions, queryClient);
|
|
2592
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
2593
|
+
}
|
|
1563
2594
|
const getListCustomerAdministratorsUrl = () => {
|
|
1564
2595
|
return `/admin/organisation/admins`;
|
|
1565
2596
|
};
|
|
@@ -1934,6 +2965,6 @@ const useConfigureCustomerAdministration = (options, queryClient) => {
|
|
|
1934
2965
|
return useMutation(getConfigureCustomerAdministrationMutationOptions(options), queryClient);
|
|
1935
2966
|
};
|
|
1936
2967
|
//#endregion
|
|
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 };
|
|
2968
|
+
export { acceptCustomerAdminInvitation, addCustomerCalendarEvent, applyBeneficiaryImport, approveBeneficiary, changeCustomerCalendarEvent, configureCustomerAdministration, configureCustomerDomains, correctBeneficiaryInvitation, createCustomerRequest, disableCustomerSingleUseCode, downloadBeneficiaryImportTemplate, downloadCustomerStatisticsReport, downloadRejectedImportRows, exportBeneficiaries, exportCustomerAudit, exportCustomerSingleUseCodes, exportCustomerStatistics, getAcceptCustomerAdminInvitationMutationKey, getAcceptCustomerAdminInvitationMutationOptions, getAcceptCustomerAdminInvitationUrl, getAddCustomerCalendarEventMutationKey, getAddCustomerCalendarEventMutationOptions, getAddCustomerCalendarEventUrl, getApplyBeneficiaryImportMutationKey, getApplyBeneficiaryImportMutationOptions, getApplyBeneficiaryImportUrl, getApproveBeneficiaryMutationKey, getApproveBeneficiaryMutationOptions, getApproveBeneficiaryUrl, getChangeCustomerCalendarEventMutationKey, getChangeCustomerCalendarEventMutationOptions, getChangeCustomerCalendarEventUrl, getConfigureCustomerAdministrationMutationKey, getConfigureCustomerAdministrationMutationOptions, getConfigureCustomerAdministrationUrl, getConfigureCustomerDomainsMutationKey, getConfigureCustomerDomainsMutationOptions, getConfigureCustomerDomainsUrl, getCorrectBeneficiaryInvitationMutationKey, getCorrectBeneficiaryInvitationMutationOptions, getCorrectBeneficiaryInvitationUrl, getCreateCustomerRequestMutationKey, getCreateCustomerRequestMutationOptions, getCreateCustomerRequestUrl, getDisableCustomerSingleUseCodeMutationKey, getDisableCustomerSingleUseCodeMutationOptions, getDisableCustomerSingleUseCodeUrl, getDownloadBeneficiaryImportTemplateQueryKey, getDownloadBeneficiaryImportTemplateQueryOptions, getDownloadBeneficiaryImportTemplateUrl, getDownloadCustomerStatisticsReportQueryKey, getDownloadCustomerStatisticsReportQueryOptions, getDownloadCustomerStatisticsReportUrl, getDownloadRejectedImportRowsQueryKey, getDownloadRejectedImportRowsQueryOptions, getDownloadRejectedImportRowsUrl, getExportBeneficiariesQueryKey, getExportBeneficiariesQueryOptions, getExportBeneficiariesUrl, getExportCustomerAuditQueryKey, getExportCustomerAuditQueryOptions, getExportCustomerAuditUrl, getExportCustomerSingleUseCodesQueryKey, getExportCustomerSingleUseCodesQueryOptions, getExportCustomerSingleUseCodesUrl, getExportCustomerStatisticsQueryKey, getExportCustomerStatisticsQueryOptions, getExportCustomerStatisticsUrl, getInviteBeneficiaryMutationKey, getInviteBeneficiaryMutationOptions, getInviteBeneficiaryUrl, getInviteCustomerAdministratorMutationKey, getInviteCustomerAdministratorMutationOptions, getInviteCustomerAdministratorUrl, getInviteFirstCustomerAdministratorMutationKey, getInviteFirstCustomerAdministratorMutationOptions, getInviteFirstCustomerAdministratorUrl, getListBeneficiaryImportsQueryKey, getListBeneficiaryImportsQueryOptions, getListBeneficiaryImportsUrl, getListBeneficiaryPackChoicesQueryKey, getListBeneficiaryPackChoicesQueryOptions, getListBeneficiaryPackChoicesUrl, getListCustomerAdministratorsQueryKey, getListCustomerAdministratorsQueryOptions, getListCustomerAdministratorsUrl, getListCustomerAuditQueryKey, getListCustomerAuditQueryOptions, getListCustomerAuditUrl, getListCustomerBeneficiariesQueryKey, getListCustomerBeneficiariesQueryOptions, getListCustomerBeneficiariesUrl, getListCustomerCalendarQueryKey, getListCustomerCalendarQueryOptions, getListCustomerCalendarUrl, getListCustomerConsoleQueryKey, getListCustomerConsoleQueryOptions, getListCustomerConsoleUrl, getListCustomerContactsQueryKey, getListCustomerContactsQueryOptions, getListCustomerContactsUrl, getListCustomerContractsQueryKey, getListCustomerContractsQueryOptions, getListCustomerContractsUrl, getListCustomerMaterialOrdersQueryKey, getListCustomerMaterialOrdersQueryOptions, getListCustomerMaterialOrdersUrl, getListCustomerRequestsQueryKey, getListCustomerRequestsQueryOptions, getListCustomerRequestsUrl, getListCustomerSegmentsQueryKey, getListCustomerSegmentsQueryOptions, getListCustomerSegmentsUrl, getListCustomerSingleUseCodesQueryKey, getListCustomerSingleUseCodesQueryOptions, getListCustomerSingleUseCodesUrl, getListCustomerTutorialsQueryKey, getListCustomerTutorialsQueryOptions, getListCustomerTutorialsUrl, getOrderCustomerMaterialsMutationKey, getOrderCustomerMaterialsMutationOptions, getOrderCustomerMaterialsUrl, getPreviewBeneficiaryFileMutationKey, getPreviewBeneficiaryFileMutationOptions, getPreviewBeneficiaryFileUrl, getPreviewBeneficiaryRowsMutationKey, getPreviewBeneficiaryRowsMutationOptions, getPreviewBeneficiaryRowsUrl, getQueryCustomerStatisticsMutationKey, getQueryCustomerStatisticsMutationOptions, getQueryCustomerStatisticsUrl, getReadBeneficiaryImportQueryKey, getReadBeneficiaryImportQueryOptions, getReadBeneficiaryImportUrl, getReadCustomerActivationQueryKey, getReadCustomerActivationQueryOptions, getReadCustomerActivationUrl, getReadCustomerContractUsageQueryKey, getReadCustomerContractUsageQueryOptions, getReadCustomerContractUsageUrl, getReadCustomerDashboardQueryKey, getReadCustomerDashboardQueryOptions, getReadCustomerDashboardUrl, getReadCustomerFilmCreditsQueryKey, getReadCustomerFilmCreditsQueryOptions, getReadCustomerFilmCreditsUrl, getReadCustomerLaunchQueryKey, getReadCustomerLaunchQueryOptions, getReadCustomerLaunchUrl, getReadCustomerOfferQueryKey, getReadCustomerOfferQueryOptions, getReadCustomerOfferUrl, getReadCustomerOrganizationOverviewQueryKey, getReadCustomerOrganizationOverviewQueryOptions, getReadCustomerOrganizationOverviewUrl, getReadCustomerOrganizationQueryKey, getReadCustomerOrganizationQueryOptions, getReadCustomerOrganizationUrl, getReadOrganizationContactsQueryKey, getReadOrganizationContactsQueryOptions, getReadOrganizationContactsUrl, getRemoveCustomerCalendarEventMutationKey, getRemoveCustomerCalendarEventMutationOptions, getRemoveCustomerCalendarEventUrl, getRenameCustomerSiteMutationKey, getRenameCustomerSiteMutationOptions, getRenameCustomerSiteUrl, getRenewCustomerActivationMutationKey, getRenewCustomerActivationMutationOptions, getRenewCustomerActivationUrl, getRenewCustomerSegmentMutationKey, getRenewCustomerSegmentMutationOptions, getRenewCustomerSegmentUrl, getResendBeneficiaryInvitationMutationKey, getResendBeneficiaryInvitationMutationOptions, getResendBeneficiaryInvitationUrl, getRetryBeneficiaryImportMutationKey, getRetryBeneficiaryImportMutationOptions, getRetryBeneficiaryImportUrl, getReviewBeneficiaryImportQueryKey, getReviewBeneficiaryImportQueryOptions, getReviewBeneficiaryImportUrl, getRevokeBeneficiaryInvitationMutationKey, getRevokeBeneficiaryInvitationMutationOptions, getRevokeBeneficiaryInvitationUrl, getRevokeCustomerAdministratorInvitationMutationKey, getRevokeCustomerAdministratorInvitationMutationOptions, getRevokeCustomerAdministratorInvitationUrl, getRevokeCustomerAdministratorMutationKey, getRevokeCustomerAdministratorMutationOptions, getRevokeCustomerAdministratorUrl, getSetCustomerFilmCreditsMutationKey, getSetCustomerFilmCreditsMutationOptions, getSetCustomerFilmCreditsUrl, 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, listCustomerCalendar, listCustomerConsole, listCustomerContacts, listCustomerContracts, listCustomerMaterialOrders, listCustomerRequests, listCustomerSegments, listCustomerSingleUseCodes, listCustomerTutorials, orderCustomerMaterials, previewBeneficiaryFile, previewBeneficiaryRows, queryCustomerStatistics, readBeneficiaryImport, readCustomerActivation, readCustomerContractUsage, readCustomerDashboard, readCustomerFilmCredits, readCustomerLaunch, readCustomerOffer, readCustomerOrganization, readCustomerOrganizationOverview, readOrganizationContacts, removeCustomerCalendarEvent, renameCustomerSite, renewCustomerActivation, renewCustomerSegment, resendBeneficiaryInvitation, retryBeneficiaryImport, reviewBeneficiaryImport, revokeBeneficiaryInvitation, revokeCustomerAdministrator, revokeCustomerAdministratorInvitation, setCustomerFilmCredits, updateBeneficiariesBulk, updateBeneficiary, updateCustomerAdministrator, updateCustomerOrganization, updateOrganizationContacts, uploadOrganizationLogo, useAcceptCustomerAdminInvitation, useAddCustomerCalendarEvent, useApplyBeneficiaryImport, useApproveBeneficiary, useChangeCustomerCalendarEvent, useConfigureCustomerAdministration, useConfigureCustomerDomains, useCorrectBeneficiaryInvitation, useCreateCustomerRequest, useDisableCustomerSingleUseCode, useDownloadBeneficiaryImportTemplate, useDownloadCustomerStatisticsReport, useDownloadRejectedImportRows, useExportBeneficiaries, useExportCustomerAudit, useExportCustomerSingleUseCodes, useExportCustomerStatistics, useInviteBeneficiary, useInviteCustomerAdministrator, useInviteFirstCustomerAdministrator, useListBeneficiaryImports, useListBeneficiaryPackChoices, useListCustomerAdministrators, useListCustomerAudit, useListCustomerBeneficiaries, useListCustomerCalendar, useListCustomerConsole, useListCustomerContacts, useListCustomerContracts, useListCustomerMaterialOrders, useListCustomerRequests, useListCustomerSegments, useListCustomerSingleUseCodes, useListCustomerTutorials, useOrderCustomerMaterials, usePreviewBeneficiaryFile, usePreviewBeneficiaryRows, useQueryCustomerStatistics, useReadBeneficiaryImport, useReadCustomerActivation, useReadCustomerContractUsage, useReadCustomerDashboard, useReadCustomerFilmCredits, useReadCustomerLaunch, useReadCustomerOffer, useReadCustomerOrganization, useReadCustomerOrganizationOverview, useReadOrganizationContacts, useRemoveCustomerCalendarEvent, useRenameCustomerSite, useRenewCustomerActivation, useRenewCustomerSegment, useResendBeneficiaryInvitation, useRetryBeneficiaryImport, useReviewBeneficiaryImport, useRevokeBeneficiaryInvitation, useRevokeCustomerAdministrator, useRevokeCustomerAdministratorInvitation, useSetCustomerFilmCredits, useUpdateBeneficiariesBulk, useUpdateBeneficiary, useUpdateCustomerAdministrator, useUpdateCustomerOrganization, useUpdateOrganizationContacts, useUploadOrganizationLogo };
|
|
1938
2969
|
|
|
1939
2970
|
//# sourceMappingURL=admin-customer.js.map
|