@learnorama/mozaik-sdk 0.14.1-staging.51.1 → 0.14.2-staging.52.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/CUSTOMER-ADMIN.md +101 -0
  2. package/CVS-PLAYBACK.md +135 -0
  3. package/PRESS.md +208 -0
  4. package/README.md +8 -0
  5. package/TV-LOGIN.md +137 -0
  6. package/dist/api/account.d.ts +1 -1
  7. package/dist/api/account.js.map +1 -1
  8. package/dist/api/admin-catalogue.d.ts +13 -1
  9. package/dist/api/admin-catalogue.js +53 -1
  10. package/dist/api/admin-catalogue.js.map +1 -1
  11. package/dist/api/admin-consumption.d.ts +1 -1
  12. package/dist/api/admin-consumption.js.map +1 -1
  13. package/dist/api/admin-contracts.d.ts +1 -1
  14. package/dist/api/admin-contracts.js.map +1 -1
  15. package/dist/api/admin-customer.d.ts +79 -0
  16. package/dist/api/admin-customer.js +213 -0
  17. package/dist/api/admin-customer.js.map +1 -0
  18. package/dist/api/admin-desk.d.ts +1 -1
  19. package/dist/api/admin-desk.js.map +1 -1
  20. package/dist/api/admin-licenses.js.map +1 -1
  21. package/dist/api/admin-partner-selections.d.ts +1 -1
  22. package/dist/api/admin-partner-selections.js.map +1 -1
  23. package/dist/api/admin-patrons.d.ts +1 -1
  24. package/dist/api/admin-patrons.js.map +1 -1
  25. package/dist/api/admin-reviews.d.ts +1 -1
  26. package/dist/api/admin-reviews.js.map +1 -1
  27. package/dist/api/admin-roles.d.ts +1 -1
  28. package/dist/api/admin-roles.js.map +1 -1
  29. package/dist/api/admin-support.d.ts +1 -1
  30. package/dist/api/admin-support.js.map +1 -1
  31. package/dist/api/admin-tenants.js.map +1 -1
  32. package/dist/api/admin-tutoring.d.ts +1 -1
  33. package/dist/api/admin-tutoring.js.map +1 -1
  34. package/dist/api/auth-device.d.ts +1 -1
  35. package/dist/api/auth-device.js.map +1 -1
  36. package/dist/api/auth.d.ts +1 -1
  37. package/dist/api/auth.js.map +1 -1
  38. package/dist/api/biblio-billing-webhooks.d.ts +1 -1
  39. package/dist/api/biblio-billing-webhooks.js.map +1 -1
  40. package/dist/api/biblio-billing.d.ts +1 -1
  41. package/dist/api/biblio-billing.js.map +1 -1
  42. package/dist/api/biblio-catalogue.d.ts +1 -1
  43. package/dist/api/biblio-catalogue.js.map +1 -1
  44. package/dist/api/biblio-home.d.ts +1 -1
  45. package/dist/api/biblio-home.js.map +1 -1
  46. package/dist/api/biblio-learning-author-profiles.d.ts +1 -1
  47. package/dist/api/biblio-learning-author-profiles.js.map +1 -1
  48. package/dist/api/biblio-learning-authoring.d.ts +1 -1
  49. package/dist/api/biblio-learning-authoring.js.map +1 -1
  50. package/dist/api/biblio-learning-editorial.d.ts +1 -1
  51. package/dist/api/biblio-learning-editorial.js.map +1 -1
  52. package/dist/api/biblio-learning-feedback.d.ts +1 -1
  53. package/dist/api/biblio-learning-feedback.js.map +1 -1
  54. package/dist/api/biblio-learning-finance.d.ts +1 -1
  55. package/dist/api/biblio-learning-finance.js.map +1 -1
  56. package/dist/api/biblio-learning-integrations.d.ts +1 -1
  57. package/dist/api/biblio-learning-integrations.js.map +1 -1
  58. package/dist/api/biblio-learning-membership.d.ts +1 -1
  59. package/dist/api/biblio-learning-membership.js.map +1 -1
  60. package/dist/api/biblio-learning.d.ts +1 -1
  61. package/dist/api/biblio-learning.js.map +1 -1
  62. package/dist/api/biblio-library.d.ts +13 -1
  63. package/dist/api/biblio-library.js +25 -1
  64. package/dist/api/biblio-library.js.map +1 -1
  65. package/dist/api/biblio-nextory.d.ts +1 -1
  66. package/dist/api/biblio-nextory.js.map +1 -1
  67. package/dist/api/biblio-press.d.ts +45 -1
  68. package/dist/api/biblio-press.js +125 -1
  69. package/dist/api/biblio-press.js.map +1 -1
  70. package/dist/api/biblio-search.js.map +1 -1
  71. package/dist/api/biblio-telemetry.js.map +1 -1
  72. package/dist/api/consumption.d.ts +4 -4
  73. package/dist/api/consumption.js +3 -3
  74. package/dist/api/consumption.js.map +1 -1
  75. package/dist/api/cvs-app.d.ts +1 -1
  76. package/dist/api/cvs-app.js.map +1 -1
  77. package/dist/api/cvs-documents.d.ts +33 -1
  78. package/dist/api/cvs-documents.js +81 -1
  79. package/dist/api/cvs-documents.js.map +1 -1
  80. package/dist/api/cvs-favorites.d.ts +1 -1
  81. package/dist/api/cvs-favorites.js.map +1 -1
  82. package/dist/api/cvs-ils.d.ts +1 -1
  83. package/dist/api/cvs-ils.js.map +1 -1
  84. package/dist/api/cvs-loans.d.ts +1 -1
  85. package/dist/api/cvs-loans.js.map +1 -1
  86. package/dist/api/cvs-payments.d.ts +1 -1
  87. package/dist/api/cvs-payments.js.map +1 -1
  88. package/dist/api/cvs-streaming.d.ts +11 -0
  89. package/dist/api/cvs-streaming.js +19 -1
  90. package/dist/api/cvs-streaming.js.map +1 -1
  91. package/dist/api/index.d.ts +7 -6
  92. package/dist/api/index.js +7 -6
  93. package/dist/api/partner-catalogue.d.ts +1 -1
  94. package/dist/api/partner-catalogue.js.map +1 -1
  95. package/dist/api/partner-reader.d.ts +1 -1
  96. package/dist/api/partner-reader.js.map +1 -1
  97. package/dist/api/profiles.d.ts +1 -1
  98. package/dist/api/profiles.js.map +1 -1
  99. package/dist/api/search.d.ts +1 -1
  100. package/dist/api/search.js.map +1 -1
  101. package/dist/api/tutoring-catalogue.d.ts +1 -1
  102. package/dist/api/tutoring-catalogue.js.map +1 -1
  103. package/dist/api/tutoring-chat.d.ts +1 -1
  104. package/dist/api/tutoring-chat.js.map +1 -1
  105. package/dist/api/tutoring-dispatch.d.ts +1 -1
  106. package/dist/api/tutoring-dispatch.js.map +1 -1
  107. package/dist/api/tutoring-practitioner.js.map +1 -1
  108. package/dist/api/tutoring-requests.d.ts +1 -1
  109. package/dist/api/tutoring-requests.js.map +1 -1
  110. package/dist/auth.d.ts +1 -1
  111. package/dist/chunks/client2.d.ts +1 -1
  112. package/dist/chunks/connection.d.ts +1 -1
  113. package/dist/chunks/index.d.ts +1450 -538
  114. package/dist/index.d.ts +3 -3
  115. package/dist/index.js +3 -3
  116. package/dist/index.js.map +1 -1
  117. package/dist/models.d.ts +2 -2
  118. package/dist/models.js +151 -2
  119. package/dist/models.js.map +1 -1
  120. package/dist/react/account.d.ts +1 -1
  121. package/dist/react/account.js +1 -1
  122. package/dist/react/account.js.map +1 -1
  123. package/dist/react/admin-catalogue.d.ts +51 -1
  124. package/dist/react/admin-catalogue.js +110 -2
  125. package/dist/react/admin-catalogue.js.map +1 -1
  126. package/dist/react/admin-consumption.d.ts +1 -1
  127. package/dist/react/admin-consumption.js +1 -1
  128. package/dist/react/admin-consumption.js.map +1 -1
  129. package/dist/react/admin-contracts.d.ts +1 -1
  130. package/dist/react/admin-contracts.js +1 -1
  131. package/dist/react/admin-contracts.js.map +1 -1
  132. package/dist/react/admin-customer.d.ts +347 -0
  133. package/dist/react/admin-customer.js +545 -0
  134. package/dist/react/admin-customer.js.map +1 -0
  135. package/dist/react/admin-desk.d.ts +1 -1
  136. package/dist/react/admin-desk.js +1 -1
  137. package/dist/react/admin-desk.js.map +1 -1
  138. package/dist/react/admin-licenses.d.ts +1 -1
  139. package/dist/react/admin-licenses.js +1 -1
  140. package/dist/react/admin-licenses.js.map +1 -1
  141. package/dist/react/admin-partner-selections.d.ts +1 -1
  142. package/dist/react/admin-partner-selections.js +1 -1
  143. package/dist/react/admin-partner-selections.js.map +1 -1
  144. package/dist/react/admin-patrons.d.ts +1 -1
  145. package/dist/react/admin-patrons.js +1 -1
  146. package/dist/react/admin-patrons.js.map +1 -1
  147. package/dist/react/admin-reviews.d.ts +1 -1
  148. package/dist/react/admin-reviews.js +1 -1
  149. package/dist/react/admin-reviews.js.map +1 -1
  150. package/dist/react/admin-roles.d.ts +1 -1
  151. package/dist/react/admin-roles.js +1 -1
  152. package/dist/react/admin-roles.js.map +1 -1
  153. package/dist/react/admin-support.d.ts +1 -1
  154. package/dist/react/admin-support.js +1 -1
  155. package/dist/react/admin-support.js.map +1 -1
  156. package/dist/react/admin-tenants.d.ts +1 -1
  157. package/dist/react/admin-tenants.js +1 -1
  158. package/dist/react/admin-tenants.js.map +1 -1
  159. package/dist/react/admin-tutoring.d.ts +1 -1
  160. package/dist/react/admin-tutoring.js +1 -1
  161. package/dist/react/admin-tutoring.js.map +1 -1
  162. package/dist/react/auth-device.d.ts +1 -1
  163. package/dist/react/auth-device.js +1 -1
  164. package/dist/react/auth-device.js.map +1 -1
  165. package/dist/react/auth.d.ts +1 -1
  166. package/dist/react/auth.js +1 -1
  167. package/dist/react/auth.js.map +1 -1
  168. package/dist/react/biblio-billing-webhooks.d.ts +1 -1
  169. package/dist/react/biblio-billing-webhooks.js +1 -1
  170. package/dist/react/biblio-billing-webhooks.js.map +1 -1
  171. package/dist/react/biblio-billing.d.ts +1 -1
  172. package/dist/react/biblio-billing.js +1 -1
  173. package/dist/react/biblio-billing.js.map +1 -1
  174. package/dist/react/biblio-catalogue.d.ts +1 -1
  175. package/dist/react/biblio-catalogue.js +1 -1
  176. package/dist/react/biblio-catalogue.js.map +1 -1
  177. package/dist/react/biblio-home.d.ts +1 -1
  178. package/dist/react/biblio-home.js +1 -1
  179. package/dist/react/biblio-home.js.map +1 -1
  180. package/dist/react/biblio-learning-author-profiles.d.ts +1 -1
  181. package/dist/react/biblio-learning-author-profiles.js +1 -1
  182. package/dist/react/biblio-learning-author-profiles.js.map +1 -1
  183. package/dist/react/biblio-learning-authoring.d.ts +1 -1
  184. package/dist/react/biblio-learning-authoring.js +1 -1
  185. package/dist/react/biblio-learning-authoring.js.map +1 -1
  186. package/dist/react/biblio-learning-editorial.d.ts +1 -1
  187. package/dist/react/biblio-learning-editorial.js +1 -1
  188. package/dist/react/biblio-learning-editorial.js.map +1 -1
  189. package/dist/react/biblio-learning-feedback.d.ts +1 -1
  190. package/dist/react/biblio-learning-feedback.js +1 -1
  191. package/dist/react/biblio-learning-feedback.js.map +1 -1
  192. package/dist/react/biblio-learning-finance.d.ts +1 -1
  193. package/dist/react/biblio-learning-finance.js +1 -1
  194. package/dist/react/biblio-learning-finance.js.map +1 -1
  195. package/dist/react/biblio-learning-integrations.d.ts +1 -1
  196. package/dist/react/biblio-learning-integrations.js +1 -1
  197. package/dist/react/biblio-learning-integrations.js.map +1 -1
  198. package/dist/react/biblio-learning-membership.d.ts +1 -1
  199. package/dist/react/biblio-learning-membership.js +1 -1
  200. package/dist/react/biblio-learning-membership.js.map +1 -1
  201. package/dist/react/biblio-learning.d.ts +1 -1
  202. package/dist/react/biblio-learning.js +1 -1
  203. package/dist/react/biblio-learning.js.map +1 -1
  204. package/dist/react/biblio-library.d.ts +30 -1
  205. package/dist/react/biblio-library.js +54 -2
  206. package/dist/react/biblio-library.js.map +1 -1
  207. package/dist/react/biblio-nextory.d.ts +1 -1
  208. package/dist/react/biblio-nextory.js +1 -1
  209. package/dist/react/biblio-nextory.js.map +1 -1
  210. package/dist/react/biblio-press.d.ts +196 -1
  211. package/dist/react/biblio-press.js +310 -2
  212. package/dist/react/biblio-press.js.map +1 -1
  213. package/dist/react/biblio-search.d.ts +1 -1
  214. package/dist/react/biblio-search.js +1 -1
  215. package/dist/react/biblio-search.js.map +1 -1
  216. package/dist/react/biblio-telemetry.d.ts +1 -1
  217. package/dist/react/biblio-telemetry.js +1 -1
  218. package/dist/react/biblio-telemetry.js.map +1 -1
  219. package/dist/react/chat.d.ts +1 -1
  220. package/dist/react/consumption.d.ts +4 -4
  221. package/dist/react/consumption.js +4 -4
  222. package/dist/react/consumption.js.map +1 -1
  223. package/dist/react/cvs-app.d.ts +1 -1
  224. package/dist/react/cvs-app.js +1 -1
  225. package/dist/react/cvs-app.js.map +1 -1
  226. package/dist/react/cvs-documents.d.ts +141 -1
  227. package/dist/react/cvs-documents.js +179 -2
  228. package/dist/react/cvs-documents.js.map +1 -1
  229. package/dist/react/cvs-favorites.d.ts +1 -1
  230. package/dist/react/cvs-favorites.js +1 -1
  231. package/dist/react/cvs-favorites.js.map +1 -1
  232. package/dist/react/cvs-ils.d.ts +1 -1
  233. package/dist/react/cvs-ils.js +1 -1
  234. package/dist/react/cvs-ils.js.map +1 -1
  235. package/dist/react/cvs-loans.d.ts +1 -1
  236. package/dist/react/cvs-loans.js +1 -1
  237. package/dist/react/cvs-loans.js.map +1 -1
  238. package/dist/react/cvs-payments.d.ts +1 -1
  239. package/dist/react/cvs-payments.js +1 -1
  240. package/dist/react/cvs-payments.js.map +1 -1
  241. package/dist/react/cvs-streaming.d.ts +39 -1
  242. package/dist/react/cvs-streaming.js +45 -2
  243. package/dist/react/cvs-streaming.js.map +1 -1
  244. package/dist/react/index.d.ts +7 -6
  245. package/dist/react/index.js +7 -6
  246. package/dist/react/partner-catalogue.d.ts +1 -1
  247. package/dist/react/partner-catalogue.js +1 -1
  248. package/dist/react/partner-catalogue.js.map +1 -1
  249. package/dist/react/partner-reader.d.ts +1 -1
  250. package/dist/react/partner-reader.js +1 -1
  251. package/dist/react/partner-reader.js.map +1 -1
  252. package/dist/react/profiles.d.ts +1 -1
  253. package/dist/react/profiles.js +1 -1
  254. package/dist/react/profiles.js.map +1 -1
  255. package/dist/react/search.d.ts +1 -1
  256. package/dist/react/search.js +1 -1
  257. package/dist/react/search.js.map +1 -1
  258. package/dist/react/tutoring-catalogue.d.ts +1 -1
  259. package/dist/react/tutoring-catalogue.js +1 -1
  260. package/dist/react/tutoring-catalogue.js.map +1 -1
  261. package/dist/react/tutoring-chat.d.ts +1 -1
  262. package/dist/react/tutoring-chat.js +1 -1
  263. package/dist/react/tutoring-chat.js.map +1 -1
  264. package/dist/react/tutoring-dispatch.d.ts +1 -1
  265. package/dist/react/tutoring-dispatch.js +1 -1
  266. package/dist/react/tutoring-dispatch.js.map +1 -1
  267. package/dist/react/tutoring-practitioner.d.ts +1 -1
  268. package/dist/react/tutoring-practitioner.js +1 -1
  269. package/dist/react/tutoring-practitioner.js.map +1 -1
  270. package/dist/react/tutoring-requests.d.ts +1 -1
  271. package/dist/react/tutoring-requests.js +1 -1
  272. package/dist/react/tutoring-requests.js.map +1 -1
  273. package/package.json +12 -8
@@ -1,5 +1,5 @@
1
1
 
2
- import { A as ThemeWrite, An as PressVoucherCodesWrite, Hn as PressRefreshRead, M as ThemeListRead, N as ThemeRead, On as PressVoucherImportRead, Sn as PressVoucherOfferRead, Vn as PressRefreshWrite, bn as PressVoucherOfferWrite, gn as PressVoucherUsageRead, j as ThemeOrderWrite, jn as PressVoucherActivationReportWrite, kn as PressVoucherDisableWrite, li as ListPressArticleRefreshesParams, ni as ListThemesParams, qn as PressDiscoveryJobRead, vn as PressVoucherPoolWrite, yn as PressVoucherPoolRead } from "../chunks/index.js";
2
+ import { $n as PressRefreshRead, A as ThemeWrite, Ai as ListPressArticleRefreshesParams, Cn as PressVoucherPoolWrite, Dn as PressVoucherOfferRead, Fn as PressVoucherCodesWrite, In as PressVoucherActivationReportWrite, M as ThemeListRead, N as ThemeRead, Nn as PressVoucherImportRead, Ol as PressRegionRead, Pn as PressVoucherDisableWrite, Qn as PressRefreshWrite, Tn as PressVoucherOfferWrite, Xn as PressRegionsWrite, hr as PressArticleMetadataWrite, j as ThemeOrderWrite, lr as PressDiscoveryJobRead, wn as PressVoucherPoolRead, xi as ListThemesParams, xn as PressVoucherUsageRead } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/admin-catalogue/admin-catalogue.d.ts
5
5
  export declare const getListPressArticleRefreshesUrl: (params?: ListPressArticleRefreshesParams) => string;
@@ -14,6 +14,18 @@ export declare const getRequestPressArticleRefreshUrl: () => string;
14
14
  * @summary Request Press Article Refresh
15
15
  */
16
16
  export declare const requestPressArticleRefresh: (pressRefreshWrite: PressRefreshWrite, options?: Parameters<typeof request>[1]) => Promise<PressRefreshRead>;
17
+ export declare const getUpdatePressArticleMetadataUrl: (articleId: number) => string;
18
+ /**
19
+ * Record verified article metadata. Summary length is never a full article word count.
20
+ * @summary Update Press Article Metadata
21
+ */
22
+ export declare const updatePressArticleMetadata: (articleId: number, pressArticleMetadataWrite: PressArticleMetadataWrite, options?: Parameters<typeof request>[1]) => Promise<void>;
23
+ export declare const getConfigurePressRegionsUrl: (publicationId: string) => string;
24
+ /**
25
+ * Replace verified editorial geographic mappings; never infer them from a country.
26
+ * @summary Configure Press Regions
27
+ */
28
+ export declare const configurePressRegions: (publicationId: string, pressRegionsWrite: PressRegionsWrite, options?: Parameters<typeof request>[1]) => Promise<PressRegionRead[]>;
17
29
  export declare const getListPressVoucherOffersUrl: () => string;
18
30
  /**
19
31
  * Global code-offer configuration; no code values are returned.
@@ -45,6 +45,58 @@ const requestPressArticleRefresh = async (pressRefreshWrite, options) => {
45
45
  body: JSON.stringify(pressRefreshWrite)
46
46
  });
47
47
  };
48
+ const getUpdatePressArticleMetadataUrl = (articleId) => {
49
+ return `/admin/press/articles/${articleId}/metadata`;
50
+ };
51
+ /**
52
+ * Record verified article metadata. Summary length is never a full article word count.
53
+ * @summary Update Press Article Metadata
54
+ */
55
+ const updatePressArticleMetadata = async (articleId, pressArticleMetadataWrite, options) => {
56
+ const getHeaders = (h) => {
57
+ if (!h) return {};
58
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
59
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
60
+ const headers = {};
61
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
62
+ return headers;
63
+ };
64
+ return request(getUpdatePressArticleMetadataUrl(articleId), {
65
+ ...options,
66
+ method: "PATCH",
67
+ headers: {
68
+ "Content-Type": "application/json",
69
+ ...getHeaders(options?.headers)
70
+ },
71
+ body: JSON.stringify(pressArticleMetadataWrite)
72
+ });
73
+ };
74
+ const getConfigurePressRegionsUrl = (publicationId) => {
75
+ return `/admin/press/publications/${publicationId}/regions`;
76
+ };
77
+ /**
78
+ * Replace verified editorial geographic mappings; never infer them from a country.
79
+ * @summary Configure Press Regions
80
+ */
81
+ const configurePressRegions = async (publicationId, pressRegionsWrite, options) => {
82
+ const getHeaders = (h) => {
83
+ if (!h) return {};
84
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
85
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
86
+ const headers = {};
87
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
88
+ return headers;
89
+ };
90
+ return request(getConfigurePressRegionsUrl(publicationId), {
91
+ ...options,
92
+ method: "PUT",
93
+ headers: {
94
+ "Content-Type": "application/json",
95
+ ...getHeaders(options?.headers)
96
+ },
97
+ body: JSON.stringify(pressRegionsWrite)
98
+ });
99
+ };
48
100
  const getListPressVoucherOffersUrl = () => {
49
101
  return `/admin/press/voucher-offers`;
50
102
  };
@@ -398,6 +450,6 @@ const amendTheme = async (themeId, themeWrite, options) => {
398
450
  });
399
451
  };
400
452
  //#endregion
401
- export { amendTheme, configurePressVoucherOffer, createPressVoucherPool, createTheme, deleteTheme, disablePressVoucherCodes, getAmendThemeUrl, getConfigurePressVoucherOfferUrl, getCreatePressVoucherPoolUrl, getCreateThemeUrl, getDeleteThemeUrl, getDisablePressVoucherCodesUrl, getImportPressVoucherActivationsUrl, getImportPressVoucherCodesUrl, getListPressArticleRefreshesUrl, getListPressVoucherOffersUrl, getListPressVoucherPoolsUrl, getListThemesUrl, getReadPressVoucherUsageUrl, getReadThemeUrl, getReorderThemesUrl, getRequestPressArticleRefreshUrl, getUpdatePressVoucherPoolUrl, importPressVoucherActivations, importPressVoucherCodes, listPressArticleRefreshes, listPressVoucherOffers, listPressVoucherPools, listThemes, readPressVoucherUsage, readTheme, reorderThemes, requestPressArticleRefresh, updatePressVoucherPool };
453
+ export { amendTheme, configurePressRegions, configurePressVoucherOffer, createPressVoucherPool, createTheme, deleteTheme, disablePressVoucherCodes, getAmendThemeUrl, getConfigurePressRegionsUrl, getConfigurePressVoucherOfferUrl, getCreatePressVoucherPoolUrl, getCreateThemeUrl, getDeleteThemeUrl, getDisablePressVoucherCodesUrl, getImportPressVoucherActivationsUrl, getImportPressVoucherCodesUrl, getListPressArticleRefreshesUrl, getListPressVoucherOffersUrl, getListPressVoucherPoolsUrl, getListThemesUrl, getReadPressVoucherUsageUrl, getReadThemeUrl, getReorderThemesUrl, getRequestPressArticleRefreshUrl, getUpdatePressArticleMetadataUrl, getUpdatePressVoucherPoolUrl, importPressVoucherActivations, importPressVoucherCodes, listPressArticleRefreshes, listPressVoucherOffers, listPressVoucherPools, listThemes, readPressVoucherUsage, readTheme, reorderThemes, requestPressArticleRefresh, updatePressArticleMetadata, updatePressVoucherPool };
402
454
 
403
455
  //# sourceMappingURL=admin-catalogue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"admin-catalogue.js","names":[],"sources":["../../src/api/admin-catalogue/admin-catalogue.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.14.1\n */\nimport type {\n ListPressArticleRefreshesParams,\n ListThemesParams,\n PressDiscoveryJobRead,\n PressRefreshRead,\n PressRefreshWrite,\n PressVoucherActivationReportWrite,\n PressVoucherCodesWrite,\n PressVoucherDisableWrite,\n PressVoucherImportRead,\n PressVoucherOfferRead,\n PressVoucherOfferWrite,\n PressVoucherPoolRead,\n PressVoucherPoolWrite,\n PressVoucherUsageRead,\n ThemeListRead,\n ThemeOrderWrite,\n ThemeRead,\n ThemeWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListPressArticleRefreshesUrl = (params?: ListPressArticleRefreshesParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/admin/press/article-refreshes?${stringifiedParams}` : `/admin/press/article-refreshes`\n}\n\n/**\n * Recent refresh progress and safe error codes; no provider credentials or response dumps.\n * @summary List Press Article Refreshes\n */\nexport const listPressArticleRefreshes = async (params?: ListPressArticleRefreshesParams, options?: Parameters<typeof request>[1]): Promise<PressDiscoveryJobRead[]> => {\n\n return request<PressDiscoveryJobRead[]>(getListPressArticleRefreshesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getRequestPressArticleRefreshUrl = () => {\n\n\n\n\n return `/admin/press/article-refreshes`\n}\n\n/**\n * Queue a bounded, idempotent metadata refresh; workers fetch one page per task.\n * @summary Request Press Article Refresh\n */\nexport const requestPressArticleRefresh = async (pressRefreshWrite: PressRefreshWrite, options?: Parameters<typeof request>[1]): Promise<PressRefreshRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<PressRefreshRead>(getRequestPressArticleRefreshUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressRefreshWrite)\n }\n);}\n\n\nexport const getListPressVoucherOffersUrl = () => {\n\n\n\n\n return `/admin/press/voucher-offers`\n}\n\n/**\n * Global code-offer configuration; no code values are returned.\n * @summary List Press Voucher Offers\n */\nexport const listPressVoucherOffers = async ( options?: Parameters<typeof request>[1]): Promise<PressVoucherOfferRead[]> => {\n\n return request<PressVoucherOfferRead[]>(getListPressVoucherOffersUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getConfigurePressVoucherOfferUrl = () => {\n\n\n\n\n return `/admin/press/voucher-offers`\n}\n\n/**\n * Configure a known newspaper offer and explicit native publication bindings.\n * @summary Configure Press Voucher Offer\n */\nexport const configurePressVoucherOffer = async (pressVoucherOfferWrite: PressVoucherOfferWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherOfferRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<PressVoucherOfferRead>(getConfigurePressVoucherOfferUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherOfferWrite)\n }\n);}\n\n\nexport const getListPressVoucherPoolsUrl = (offerId: number,) => {\n\n\n\n\n return `/admin/press/voucher-offers/${offerId}/pools`\n}\n\n/**\n * Stock, allocations and confirmed activations. No private codes are listed.\n * @summary List Press Voucher Pools\n */\nexport const listPressVoucherPools = async (offerId: number, options?: Parameters<typeof request>[1]): Promise<PressVoucherPoolRead[]> => {\n\n return request<PressVoucherPoolRead[]>(getListPressVoucherPoolsUrl(offerId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getCreatePressVoucherPoolUrl = (offerId: number,) => {\n\n\n\n\n return `/admin/press/voucher-offers/${offerId}/pools`\n}\n\n/**\n * Create a bank with explicit availability and calendar-based benefit/renewal rules.\n * @summary Create Press Voucher Pool\n */\nexport const createPressVoucherPool = async (offerId: number,\n pressVoucherPoolWrite: PressVoucherPoolWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherPoolRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<PressVoucherPoolRead>(getCreatePressVoucherPoolUrl(offerId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherPoolWrite)\n }\n);}\n\n\nexport const getReadPressVoucherUsageUrl = (offerId: number,) => {\n\n\n\n\n return `/admin/press/voucher-offers/${offerId}/usage`\n}\n\n/**\n * Allocation and confirmed-activation counts, with legacy reported evidence separate.\n *\n * No per-reader sessions or durations are fabricated from legacy averages.\n * @summary Read Press Voucher Usage\n */\nexport const readPressVoucherUsage = async (offerId: number, options?: Parameters<typeof request>[1]): Promise<PressVoucherUsageRead> => {\n\n return request<PressVoucherUsageRead>(getReadPressVoucherUsageUrl(offerId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getUpdatePressVoucherPoolUrl = (poolId: number,) => {\n\n\n\n\n return `/admin/press/voucher-pools/${poolId}`\n}\n\n/**\n * Enable/close stock; an allocated bank's benefit policy cannot change retroactively.\n * @summary Update Press Voucher Pool\n */\nexport const updatePressVoucherPool = async (poolId: number,\n pressVoucherPoolWrite: PressVoucherPoolWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherPoolRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<PressVoucherPoolRead>(getUpdatePressVoucherPoolUrl(poolId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherPoolWrite)\n }\n);}\n\n\nexport const getImportPressVoucherActivationsUrl = (poolId: number,) => {\n\n\n\n\n return `/admin/press/voucher-pools/${poolId}/activations`\n}\n\n/**\n * Apply publisher-confirmed dates; never infer activation from allocation.\n *\n * Matching repeats are harmless. Unknown codes, conflicting confirmations and\n * future activation dates are refused atomically. An already-used unallocated\n * code is quarantined so it cannot be handed to another household.\n * @summary Import Press Voucher Activations\n */\nexport const importPressVoucherActivations = async (poolId: number,\n pressVoucherActivationReportWrite: PressVoucherActivationReportWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherImportRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<PressVoucherImportRead>(getImportPressVoucherActivationsUrl(poolId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherActivationReportWrite)\n }\n);}\n\n\nexport const getImportPressVoucherCodesUrl = (poolId: number,) => {\n\n\n\n\n return `/admin/press/voucher-pools/${poolId}/codes`\n}\n\n/**\n * Import at most 500 private codes atomically. Same-bank repeats are idempotent.\n *\n * A code already in another bank is refused; existing owners are never changed.\n * Values are encrypted at rest and omitted from responses and audit details.\n * @summary Import Press Voucher Codes\n */\nexport const importPressVoucherCodes = async (poolId: number,\n pressVoucherCodesWrite: PressVoucherCodesWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherImportRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<PressVoucherImportRead>(getImportPressVoucherCodesUrl(poolId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherCodesWrite)\n }\n);}\n\n\nexport const getDisablePressVoucherCodesUrl = (poolId: number,) => {\n\n\n\n\n return `/admin/press/voucher-pools/${poolId}/codes/disable`\n}\n\n/**\n * Disable local issuance/retrieval without clearing ownership or cancelling publisher accounts.\n * @summary Disable Press Voucher Codes\n */\nexport const disablePressVoucherCodes = async (poolId: number,\n pressVoucherDisableWrite: PressVoucherDisableWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherImportRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<PressVoucherImportRead>(getDisablePressVoucherCodesUrl(poolId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherDisableWrite)\n }\n);}\n\n\nexport const getListThemesUrl = (params?: ListThemesParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/admin/themes?${stringifiedParams}` : `/admin/themes`\n}\n\n/**\n * Every theme, or one pillar's, in display order.\n *\n * Not paginated. There are 27 of them, and a client that has to page through\n * a list it is about to reorder cannot reorder it.\n * @summary List Themes\n */\nexport const listThemes = async (params?: ListThemesParams, options?: Parameters<typeof request>[1]): Promise<ThemeListRead> => {\n\n return request<ThemeListRead>(getListThemesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getCreateThemeUrl = () => {\n\n\n\n\n return `/admin/themes`\n}\n\n/**\n * Add a theme.\n *\n * ``409`` on a duplicate ``(pillar, title)``: that pair is unique in the\n * schema, and two themes with the same name in the same pillar are\n * indistinguishable to everyone downstream.\n *\n * With no ``sortOrder`` it goes last, which is what the legacy's form does by\n * defaulting the field to the current maximum plus one.\n * @summary Create Theme\n */\nexport const createTheme = async (themeWrite: ThemeWrite, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ThemeRead>(getCreateThemeUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(themeWrite)\n }\n);}\n\n\nexport const getReorderThemesUrl = () => {\n\n\n\n\n return `/admin/themes/order`\n}\n\n/**\n * Set the display order for a set of themes, in one transaction.\n *\n * The legacy renumbers one theme per request, so dragging an item in a list of\n * thirty was thirty requests — and closing the tab halfway left the order\n * half-applied, with two themes claiming the same position and the listing\n * silently choosing between them.\n *\n * Ids not named keep their relative order after the ones that are, so a client\n * may send only what moved. An unknown id is ``404`` and nothing is written:\n * a partially applied reorder is the failure this endpoint exists to prevent.\n * @summary Reorder Themes\n */\nexport const reorderThemes = async (themeOrderWrite: ThemeOrderWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getReorderThemesUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(themeOrderWrite)\n }\n);}\n\n\nexport const getDeleteThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * Remove a theme.\n *\n * ``409`` when works still carry it. The legacy deletes and leaves the\n * references dangling, which is how a catalogue ends up with items filed under\n * a theme that no longer exists and no screen that can find them.\n *\n * Idempotent otherwise: deleting something already gone is ``204``, because\n * the caller wanted it gone and it is gone.\n * @summary Delete Theme\n */\nexport const deleteTheme = async (themeId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteThemeUrl(themeId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getReadThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * One theme.\n * @summary Read Theme\n */\nexport const readTheme = async (themeId: number, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\n\n return request<ThemeRead>(getReadThemeUrl(themeId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getAmendThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * Amend a theme. Same uniqueness rule as creating one.\n * @summary Amend Theme\n */\nexport const amendTheme = async (themeId: number,\n themeWrite: ThemeWrite, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ThemeRead>(getAmendThemeUrl(themeId),\n {\n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(themeWrite)\n }\n);}\n\n\n"],"mappings":";;;AA8BA,MAAa,mCAAmC,WAA8C;CAC5F,MAAM,mBAAmB,IAAI,gBAAgB;CAE7C,OAAO,QAAQ,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;EAErD,IAAI,UAAU,KAAA,GACZ,iBAAiB,OAAO,KAAK,UAAU,OAAO,SAAS,OAAO,KAAK,CAAC;CAExE,CAAC;CAED,MAAM,oBAAoB,iBAAiB,SAAS;CAEpD,OAAO,kBAAkB,SAAS,IAAI,kCAAkC,sBAAsB;AAChG;;;;;AAMA,MAA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AiB;AAC1B;;;;;AAMA,MAAa,aAAa,OAAO,SAC7B,YAAwB,YAAgE;CAExF,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAmB,iBAAiB,OAAO,GAChD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,UAAU;CACjC,CACF;AAAE"}
1
+ {"version":3,"file":"admin-catalogue.js","names":[],"sources":["../../src/api/admin-catalogue/admin-catalogue.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.14.2\n */\nimport type {\n ListPressArticleRefreshesParams,\n ListThemesParams,\n PressArticleMetadataWrite,\n PressDiscoveryJobRead,\n PressRefreshRead,\n PressRefreshWrite,\n PressRegionRead,\n PressRegionsWrite,\n PressVoucherActivationReportWrite,\n PressVoucherCodesWrite,\n PressVoucherDisableWrite,\n PressVoucherImportRead,\n PressVoucherOfferRead,\n PressVoucherOfferWrite,\n PressVoucherPoolRead,\n PressVoucherPoolWrite,\n PressVoucherUsageRead,\n ThemeListRead,\n ThemeOrderWrite,\n ThemeRead,\n ThemeWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListPressArticleRefreshesUrl = (params?: ListPressArticleRefreshesParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/admin/press/article-refreshes?${stringifiedParams}` : `/admin/press/article-refreshes`\n}\n\n/**\n * Recent refresh progress and safe error codes; no provider credentials or response dumps.\n * @summary List Press Article Refreshes\n */\nexport const listPressArticleRefreshes = async (params?: ListPressArticleRefreshesParams, options?: Parameters<typeof request>[1]): Promise<PressDiscoveryJobRead[]> => {\n\n return request<PressDiscoveryJobRead[]>(getListPressArticleRefreshesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getRequestPressArticleRefreshUrl = () => {\n\n\n\n\n return `/admin/press/article-refreshes`\n}\n\n/**\n * Queue a bounded, idempotent metadata refresh; workers fetch one page per task.\n * @summary Request Press Article Refresh\n */\nexport const requestPressArticleRefresh = async (pressRefreshWrite: PressRefreshWrite, options?: Parameters<typeof request>[1]): Promise<PressRefreshRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<PressRefreshRead>(getRequestPressArticleRefreshUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressRefreshWrite)\n }\n);}\n\n\nexport const getUpdatePressArticleMetadataUrl = (articleId: number,) => {\n\n\n\n\n return `/admin/press/articles/${articleId}/metadata`\n}\n\n/**\n * Record verified article metadata. Summary length is never a full article word count.\n * @summary Update Press Article Metadata\n */\nexport const updatePressArticleMetadata = async (articleId: number,\n pressArticleMetadataWrite: PressArticleMetadataWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getUpdatePressArticleMetadataUrl(articleId),\n {\n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressArticleMetadataWrite)\n }\n);}\n\n\nexport const getConfigurePressRegionsUrl = (publicationId: string,) => {\n\n\n\n\n return `/admin/press/publications/${publicationId}/regions`\n}\n\n/**\n * Replace verified editorial geographic mappings; never infer them from a country.\n * @summary Configure Press Regions\n */\nexport const configurePressRegions = async (publicationId: string,\n pressRegionsWrite: PressRegionsWrite, options?: Parameters<typeof request>[1]): Promise<PressRegionRead[]> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<PressRegionRead[]>(getConfigurePressRegionsUrl(publicationId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressRegionsWrite)\n }\n);}\n\n\nexport const getListPressVoucherOffersUrl = () => {\n\n\n\n\n return `/admin/press/voucher-offers`\n}\n\n/**\n * Global code-offer configuration; no code values are returned.\n * @summary List Press Voucher Offers\n */\nexport const listPressVoucherOffers = async ( options?: Parameters<typeof request>[1]): Promise<PressVoucherOfferRead[]> => {\n\n return request<PressVoucherOfferRead[]>(getListPressVoucherOffersUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getConfigurePressVoucherOfferUrl = () => {\n\n\n\n\n return `/admin/press/voucher-offers`\n}\n\n/**\n * Configure a known newspaper offer and explicit native publication bindings.\n * @summary Configure Press Voucher Offer\n */\nexport const configurePressVoucherOffer = async (pressVoucherOfferWrite: PressVoucherOfferWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherOfferRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<PressVoucherOfferRead>(getConfigurePressVoucherOfferUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherOfferWrite)\n }\n);}\n\n\nexport const getListPressVoucherPoolsUrl = (offerId: number,) => {\n\n\n\n\n return `/admin/press/voucher-offers/${offerId}/pools`\n}\n\n/**\n * Stock, allocations and confirmed activations. No private codes are listed.\n * @summary List Press Voucher Pools\n */\nexport const listPressVoucherPools = async (offerId: number, options?: Parameters<typeof request>[1]): Promise<PressVoucherPoolRead[]> => {\n\n return request<PressVoucherPoolRead[]>(getListPressVoucherPoolsUrl(offerId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getCreatePressVoucherPoolUrl = (offerId: number,) => {\n\n\n\n\n return `/admin/press/voucher-offers/${offerId}/pools`\n}\n\n/**\n * Create a bank with explicit availability and calendar-based benefit/renewal rules.\n * @summary Create Press Voucher Pool\n */\nexport const createPressVoucherPool = async (offerId: number,\n pressVoucherPoolWrite: PressVoucherPoolWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherPoolRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<PressVoucherPoolRead>(getCreatePressVoucherPoolUrl(offerId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherPoolWrite)\n }\n);}\n\n\nexport const getReadPressVoucherUsageUrl = (offerId: number,) => {\n\n\n\n\n return `/admin/press/voucher-offers/${offerId}/usage`\n}\n\n/**\n * Allocation and confirmed-activation counts, with legacy reported evidence separate.\n *\n * No per-reader sessions or durations are fabricated from legacy averages.\n * @summary Read Press Voucher Usage\n */\nexport const readPressVoucherUsage = async (offerId: number, options?: Parameters<typeof request>[1]): Promise<PressVoucherUsageRead> => {\n\n return request<PressVoucherUsageRead>(getReadPressVoucherUsageUrl(offerId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getUpdatePressVoucherPoolUrl = (poolId: number,) => {\n\n\n\n\n return `/admin/press/voucher-pools/${poolId}`\n}\n\n/**\n * Enable/close stock; an allocated bank's benefit policy cannot change retroactively.\n * @summary Update Press Voucher Pool\n */\nexport const updatePressVoucherPool = async (poolId: number,\n pressVoucherPoolWrite: PressVoucherPoolWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherPoolRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<PressVoucherPoolRead>(getUpdatePressVoucherPoolUrl(poolId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherPoolWrite)\n }\n);}\n\n\nexport const getImportPressVoucherActivationsUrl = (poolId: number,) => {\n\n\n\n\n return `/admin/press/voucher-pools/${poolId}/activations`\n}\n\n/**\n * Apply publisher-confirmed dates; never infer activation from allocation.\n *\n * Matching repeats are harmless. Unknown codes, conflicting confirmations and\n * future activation dates are refused atomically. An already-used unallocated\n * code is quarantined so it cannot be handed to another household.\n * @summary Import Press Voucher Activations\n */\nexport const importPressVoucherActivations = async (poolId: number,\n pressVoucherActivationReportWrite: PressVoucherActivationReportWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherImportRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<PressVoucherImportRead>(getImportPressVoucherActivationsUrl(poolId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherActivationReportWrite)\n }\n);}\n\n\nexport const getImportPressVoucherCodesUrl = (poolId: number,) => {\n\n\n\n\n return `/admin/press/voucher-pools/${poolId}/codes`\n}\n\n/**\n * Import at most 500 private codes atomically. Same-bank repeats are idempotent.\n *\n * A code already in another bank is refused; existing owners are never changed.\n * Values are encrypted at rest and omitted from responses and audit details.\n * @summary Import Press Voucher Codes\n */\nexport const importPressVoucherCodes = async (poolId: number,\n pressVoucherCodesWrite: PressVoucherCodesWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherImportRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<PressVoucherImportRead>(getImportPressVoucherCodesUrl(poolId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherCodesWrite)\n }\n);}\n\n\nexport const getDisablePressVoucherCodesUrl = (poolId: number,) => {\n\n\n\n\n return `/admin/press/voucher-pools/${poolId}/codes/disable`\n}\n\n/**\n * Disable local issuance/retrieval without clearing ownership or cancelling publisher accounts.\n * @summary Disable Press Voucher Codes\n */\nexport const disablePressVoucherCodes = async (poolId: number,\n pressVoucherDisableWrite: PressVoucherDisableWrite, options?: Parameters<typeof request>[1]): Promise<PressVoucherImportRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<PressVoucherImportRead>(getDisablePressVoucherCodesUrl(poolId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(pressVoucherDisableWrite)\n }\n);}\n\n\nexport const getListThemesUrl = (params?: ListThemesParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/admin/themes?${stringifiedParams}` : `/admin/themes`\n}\n\n/**\n * Every theme, or one pillar's, in display order.\n *\n * Not paginated. There are 27 of them, and a client that has to page through\n * a list it is about to reorder cannot reorder it.\n * @summary List Themes\n */\nexport const listThemes = async (params?: ListThemesParams, options?: Parameters<typeof request>[1]): Promise<ThemeListRead> => {\n\n return request<ThemeListRead>(getListThemesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getCreateThemeUrl = () => {\n\n\n\n\n return `/admin/themes`\n}\n\n/**\n * Add a theme.\n *\n * ``409`` on a duplicate ``(pillar, title)``: that pair is unique in the\n * schema, and two themes with the same name in the same pillar are\n * indistinguishable to everyone downstream.\n *\n * With no ``sortOrder`` it goes last, which is what the legacy's form does by\n * defaulting the field to the current maximum plus one.\n * @summary Create Theme\n */\nexport const createTheme = async (themeWrite: ThemeWrite, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ThemeRead>(getCreateThemeUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(themeWrite)\n }\n);}\n\n\nexport const getReorderThemesUrl = () => {\n\n\n\n\n return `/admin/themes/order`\n}\n\n/**\n * Set the display order for a set of themes, in one transaction.\n *\n * The legacy renumbers one theme per request, so dragging an item in a list of\n * thirty was thirty requests — and closing the tab halfway left the order\n * half-applied, with two themes claiming the same position and the listing\n * silently choosing between them.\n *\n * Ids not named keep their relative order after the ones that are, so a client\n * may send only what moved. An unknown id is ``404`` and nothing is written:\n * a partially applied reorder is the failure this endpoint exists to prevent.\n * @summary Reorder Themes\n */\nexport const reorderThemes = async (themeOrderWrite: ThemeOrderWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getReorderThemesUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(themeOrderWrite)\n }\n);}\n\n\nexport const getDeleteThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * Remove a theme.\n *\n * ``409`` when works still carry it. The legacy deletes and leaves the\n * references dangling, which is how a catalogue ends up with items filed under\n * a theme that no longer exists and no screen that can find them.\n *\n * Idempotent otherwise: deleting something already gone is ``204``, because\n * the caller wanted it gone and it is gone.\n * @summary Delete Theme\n */\nexport const deleteTheme = async (themeId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteThemeUrl(themeId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getReadThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * One theme.\n * @summary Read Theme\n */\nexport const readTheme = async (themeId: number, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\n\n return request<ThemeRead>(getReadThemeUrl(themeId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getAmendThemeUrl = (themeId: number,) => {\n\n\n\n\n return `/admin/themes/${themeId}`\n}\n\n/**\n * Amend a theme. Same uniqueness rule as creating one.\n * @summary Amend Theme\n */\nexport const amendTheme = async (themeId: number,\n themeWrite: ThemeWrite, options?: Parameters<typeof request>[1]): Promise<ThemeRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ThemeRead>(getAmendThemeUrl(themeId),\n {\n ...options,\n method: 'PATCH',\n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 import { la as LeaseCloseWrite, yi as LiveLeaseListRead } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/admin-consumption/admin-consumption.d.ts
5
5
  export declare const getListLiveLeasesUrl: () => string;
@@ -1 +1 @@
1
- {"version":3,"file":"admin-consumption.js","names":[],"sources":["../../src/api/admin-consumption/admin-consumption.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.14.1\n */\nimport type {\n LeaseCloseWrite,\n LiveLeaseListRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListLiveLeasesUrl = () => {\n\n\n\n\n return `/admin/consumption/live`\n}\n\n/**\n * What is open right now, within the caller's tenant scope.\n *\n * Read from the ledger rather than the Redis live set: this is a diagnostic and\n * must show the truth even when the cache is cold, and it runs once when\n * somebody opens a screen rather than on every read.\n *\n * Shares :func:`~app.services.entitlement.is_live` with the two seat counts.\n * An earlier version of this route filtered on ``returned_at`` alone and so\n * listed every lapsed-but-unreaped lease as live — which made the screen look\n * exactly like a stuck reaper even when the reaper was fine.\n * @summary List Live Leases\n */\nexport const listLiveLeases = async ( options?: Parameters<typeof request>[1]): Promise<LiveLeaseListRead> => {\n\n return request<LiveLeaseListRead>(getListLiveLeasesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getForceCloseLeaseUrl = (eventId: number,) => {\n\n\n\n\n return `/admin/consumption/${eventId}`\n}\n\n/**\n * Force-close somebody else's lease. The legacy's ``FermeSessionAdherent``.\n *\n * Audited, which the legacy's was not: a button that ends a stranger's reading\n * session and leaves no trace is indistinguishable from abuse of the same\n * button. Tenant-scoped like every staff action, so a lease outside the\n * caller's scope is ``404`` rather than ``403``.\n * @summary Force Close Lease\n */\nexport const forceCloseLease = async (eventId: number,\n leaseCloseWrite: LeaseCloseWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getForceCloseLeaseUrl(eventId),\n {\n ...options,\n method: 'DELETE',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(leaseCloseWrite)\n }\n);}\n\n\n"],"mappings":";;;AAcA,MAAa,6BAA6B;CAKxC,OAAO;AACT;;;;;;;;;;;;;;AAeA,MAAa,iBAAiB,OAAQ,YAAwE;CAE5G,OAAO,QAA2B,qBAAqB,GACvD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,yBAAyB,YAAqB;CAKzD,OAAO,sBAAsB;AAC/B;;;;;;;;;;AAWA,MAAa,kBAAkB,OAAO,SAClC,iBAAkC,YAA2D;CAE7F,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAc,sBAAsB,OAAO,GAChD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,eAAe;CACtC,CACF;AAAE"}
1
+ {"version":3,"file":"admin-consumption.js","names":[],"sources":["../../src/api/admin-consumption/admin-consumption.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.14.2\n */\nimport type {\n LeaseCloseWrite,\n LiveLeaseListRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListLiveLeasesUrl = () => {\n\n\n\n\n return `/admin/consumption/live`\n}\n\n/**\n * What is open right now, within the caller's tenant scope.\n *\n * Read from the ledger rather than the Redis live set: this is a diagnostic and\n * must show the truth even when the cache is cold, and it runs once when\n * somebody opens a screen rather than on every read.\n *\n * Shares :func:`~app.services.entitlement.is_live` with the two seat counts.\n * An earlier version of this route filtered on ``returned_at`` alone and so\n * listed every lapsed-but-unreaped lease as live — which made the screen look\n * exactly like a stuck reaper even when the reaper was fine.\n * @summary List Live Leases\n */\nexport const listLiveLeases = async ( options?: Parameters<typeof request>[1]): Promise<LiveLeaseListRead> => {\n\n return request<LiveLeaseListRead>(getListLiveLeasesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getForceCloseLeaseUrl = (eventId: number,) => {\n\n\n\n\n return `/admin/consumption/${eventId}`\n}\n\n/**\n * Force-close somebody else's lease. The legacy's ``FermeSessionAdherent``.\n *\n * Audited, which the legacy's was not: a button that ends a stranger's reading\n * session and leaves no trace is indistinguishable from abuse of the same\n * button. Tenant-scoped like every staff action, so a lease outside the\n * caller's scope is ``404`` rather than ``403``.\n * @summary Force Close Lease\n */\nexport const forceCloseLease = async (eventId: number,\n leaseCloseWrite: LeaseCloseWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getForceCloseLeaseUrl(eventId),\n {\n ...options,\n method: 'DELETE',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(leaseCloseWrite)\n }\n);}\n\n\n"],"mappings":";;;AAcA,MAAa,6BAA6B;CAKxC,OAAO;AACT;;;;;;;;;;;;;;AAeA,MAAa,iBAAiB,OAAQ,YAAwE;CAE5G,OAAO,QAA2B,qBAAqB,GACvD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,yBAAyB,YAAqB;CAKzD,OAAO,sBAAsB;AAC/B;;;;;;;;;;AAWA,MAAa,kBAAkB,OAAO,SAClC,iBAAkC,YAA2D;CAE7F,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAc,sBAAsB,OAAO,GAChD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,eAAe;CACtC,CACF;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { Mm as CategoryExclusionWrite, Nm as CategoryExclusionRead, gm as ContractProviderWrite, vm as ContractCategoryGrantWrite, ym as ContractCategoryGrantRead } from "../chunks/index.js";
2
+ import { Hh as CategoryExclusionRead, Vh as CategoryExclusionWrite, ch as ContractProviderWrite, dh as ContractCategoryGrantRead, uh as ContractCategoryGrantWrite } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/admin-contracts/admin-contracts.d.ts
5
5
  export declare const getCreateContractCategoryGrantUrl: (contractId: number) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"admin-contracts.js","names":[],"sources":["../../src/api/admin-contracts/admin-contracts.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.14.1\n */\nimport type {\n CategoryExclusionRead,\n CategoryExclusionWrite,\n ContractCategoryGrantRead,\n ContractCategoryGrantWrite,\n ContractProviderWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getCreateContractCategoryGrantUrl = (contractId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants`\n}\n\n/**\n * Grant VIEW on one category and optional provider; null is explicitly unrestricted.\n *\n * This changes permission only. No paid licence or external account is created.\n * Existing contract/beneficiary windows and provider seat checks still apply.\n * @summary Create Contract Category Grant\n */\nexport const createContractCategoryGrant = async (contractId: number,\n contractCategoryGrantWrite: ContractCategoryGrantWrite, options?: Parameters<typeof request>[1]): Promise<ContractCategoryGrantRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ContractCategoryGrantRead>(getCreateContractCategoryGrantUrl(contractId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(contractCategoryGrantWrite)\n }\n);}\n\n\nexport const getRevokeContractCategoryGrantUrl = (contractId: number,\n grantId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants/${grantId}`\n}\n\n/**\n * Deactivate a line without deleting its consumption/audit references.\n * @summary Revoke Contract Category Grant\n */\nexport const revokeContractCategoryGrant = async (contractId: number,\n grantId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRevokeContractCategoryGrantUrl(contractId,grantId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getSetContractGrantProviderUrl = (contractId: number,\n grantId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants/${grantId}/provider`\n}\n\n/**\n * Restrict this existing line, retaining its ID, acts, history and dates.\n *\n * Other unrestricted/overlapping lines can still permit a provider. Inspect\n * the contract's complete grant list before claiming it is YouScribe-only.\n * @summary Set Contract Grant Provider\n */\nexport const setContractGrantProvider = async (contractId: number,\n grantId: number,\n contractProviderWrite: ContractProviderWrite, options?: Parameters<typeof request>[1]): Promise<ContractCategoryGrantRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ContractCategoryGrantRead>(getSetContractGrantProviderUrl(contractId,grantId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(contractProviderWrite)\n }\n);}\n\n\nexport const getCreateCategoryProviderExclusionUrl = (tenantId: number,) => {\n\n\n\n\n return `/admin/tenants/${tenantId}/entitlement-exclusions`\n}\n\n/**\n * Deny a category/provider pair; userId narrows the deny to that profile.\n *\n * The exclusion applies across the customer's contracts and can only reduce\n * access. Other profiles, including other household members, are unaffected\n * when userId is set. Null provider explicitly covers every applicable provider.\n * @summary Create Category Provider Exclusion\n */\nexport const createCategoryProviderExclusion = async (tenantId: number,\n categoryExclusionWrite: CategoryExclusionWrite, options?: Parameters<typeof request>[1]): Promise<CategoryExclusionRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<CategoryExclusionRead>(getCreateCategoryProviderExclusionUrl(tenantId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(categoryExclusionWrite)\n }\n);}\n\n\nexport const getRemoveCategoryProviderExclusionUrl = (tenantId: number,\n exclusionId: number,) => {\n\n\n\n\n return `/admin/tenants/${tenantId}/entitlement-exclusions/${exclusionId}`\n}\n\n/**\n * Remove this restriction; a valid contract grant is still required.\n * @summary Remove Category Provider Exclusion\n */\nexport const removeCategoryProviderExclusion = async (tenantId: number,\n exclusionId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRemoveCategoryProviderExclusionUrl(tenantId,exclusionId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAiBA,MAAa,qCAAqC,eAAwB;CAKxE,OAAO,oBAAoB,WAAW;AACxC;;;;;;;;AASA,MAAa,8BAA8B,OAAO,YAC9C,4BAAwD,YAAgF;CAExI,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAmC,kCAAkC,UAAU,GACpF;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,0BAA0B;CACjD,CACF;AAAE;AAGF,MAAa,qCAAqC,YAC9C,YAAqB;CAKvB,OAAO,oBAAoB,WAAW,mBAAmB;AAC3D;;;;;AAMA,MAAa,8BAA8B,OAAO,YAC9C,SAAiB,YAA2D;CAE9E,OAAO,QAAc,kCAAkC,YAAW,OAAO,GACzE;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,kCAAkC,YAC3C,YAAqB;CAKvB,OAAO,oBAAoB,WAAW,mBAAmB,QAAQ;AACnE;;;;;;;;AASA,MAAa,2BAA2B,OAAO,YAC3C,SACA,uBAA8C,YAAgF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AAGF,MAAa,yCAAyC,UAClD,gBAAyB;CAK3B,OAAO,kBAAkB,SAAS,0BAA0B;AAC9D;;;;;AAMA,MAAa,kCAAkC,OAAO,UAClD,aAAqB,YAA2D;CAElF,OAAO,QAAc,sCAAsC,UAAS,WAAW,GAC/E;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
1
+ {"version":3,"file":"admin-contracts.js","names":[],"sources":["../../src/api/admin-contracts/admin-contracts.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.14.2\n */\nimport type {\n CategoryExclusionRead,\n CategoryExclusionWrite,\n ContractCategoryGrantRead,\n ContractCategoryGrantWrite,\n ContractProviderWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getCreateContractCategoryGrantUrl = (contractId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants`\n}\n\n/**\n * Grant VIEW on one category and optional provider; null is explicitly unrestricted.\n *\n * This changes permission only. No paid licence or external account is created.\n * Existing contract/beneficiary windows and provider seat checks still apply.\n * @summary Create Contract Category Grant\n */\nexport const createContractCategoryGrant = async (contractId: number,\n contractCategoryGrantWrite: ContractCategoryGrantWrite, options?: Parameters<typeof request>[1]): Promise<ContractCategoryGrantRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ContractCategoryGrantRead>(getCreateContractCategoryGrantUrl(contractId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(contractCategoryGrantWrite)\n }\n);}\n\n\nexport const getRevokeContractCategoryGrantUrl = (contractId: number,\n grantId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants/${grantId}`\n}\n\n/**\n * Deactivate a line without deleting its consumption/audit references.\n * @summary Revoke Contract Category Grant\n */\nexport const revokeContractCategoryGrant = async (contractId: number,\n grantId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRevokeContractCategoryGrantUrl(contractId,grantId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getSetContractGrantProviderUrl = (contractId: number,\n grantId: number,) => {\n\n\n\n\n return `/admin/contracts/${contractId}/category-grants/${grantId}/provider`\n}\n\n/**\n * Restrict this existing line, retaining its ID, acts, history and dates.\n *\n * Other unrestricted/overlapping lines can still permit a provider. Inspect\n * the contract's complete grant list before claiming it is YouScribe-only.\n * @summary Set Contract Grant Provider\n */\nexport const setContractGrantProvider = async (contractId: number,\n grantId: number,\n contractProviderWrite: ContractProviderWrite, options?: Parameters<typeof request>[1]): Promise<ContractCategoryGrantRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<ContractCategoryGrantRead>(getSetContractGrantProviderUrl(contractId,grantId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(contractProviderWrite)\n }\n);}\n\n\nexport const getCreateCategoryProviderExclusionUrl = (tenantId: number,) => {\n\n\n\n\n return `/admin/tenants/${tenantId}/entitlement-exclusions`\n}\n\n/**\n * Deny a category/provider pair; userId narrows the deny to that profile.\n *\n * The exclusion applies across the customer's contracts and can only reduce\n * access. Other profiles, including other household members, are unaffected\n * when userId is set. Null provider explicitly covers every applicable provider.\n * @summary Create Category Provider Exclusion\n */\nexport const createCategoryProviderExclusion = async (tenantId: number,\n categoryExclusionWrite: CategoryExclusionWrite, options?: Parameters<typeof request>[1]): Promise<CategoryExclusionRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<CategoryExclusionRead>(getCreateCategoryProviderExclusionUrl(tenantId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(categoryExclusionWrite)\n }\n);}\n\n\nexport const getRemoveCategoryProviderExclusionUrl = (tenantId: number,\n exclusionId: number,) => {\n\n\n\n\n return `/admin/tenants/${tenantId}/entitlement-exclusions/${exclusionId}`\n}\n\n/**\n * Remove this restriction; a valid contract grant is still required.\n * @summary Remove Category Provider Exclusion\n */\nexport const removeCategoryProviderExclusion = async (tenantId: number,\n exclusionId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRemoveCategoryProviderExclusionUrl(tenantId,exclusionId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAiBA,MAAa,qCAAqC,eAAwB;CAKxE,OAAO,oBAAo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p as CustomerContractUsageRead, Bp as CustomerPatronPage, Hp as CustomerOverviewRead, Ji as ListCustomerBeneficiariesParams, Pt as ReadCustomerDashboardParams, Up as CustomerOrganizationRead, Xp as CustomerDashboardRead, im as CustomerAdminInviteWrite, nm as CustomerAdministratorRead, tm as CustomerAdministratorListRead, zp as CustomerSettingsWrite } from "../chunks/index.js";
3
+ import { c as request } from "../chunks/client.js";
4
+ //#region src/api/admin-customer/admin-customer.d.ts
5
+ export declare const getListCustomerBeneficiariesUrl: (params?: ListCustomerBeneficiariesParams) => string;
6
+ /**
7
+ * Scoped beneficiary directory, only when Mozaik enabled its visibility for this customer.
8
+ *
9
+ * This never returns individual reading titles, tutoring conversations or
10
+ * internal staff notes. Customer roles do not grant internal desk access.
11
+ * @summary List Customer Beneficiaries
12
+ */
13
+ export declare const listCustomerBeneficiaries: (params?: ListCustomerBeneficiariesParams, options?: Parameters<typeof request>[1]) => Promise<CustomerPatronPage>;
14
+ export declare const getReadCustomerContractUsageUrl: (contractId: number) => string;
15
+ /**
16
+ * Aggregate consumption for an in-scope contract; foreign contracts are forbidden.
17
+ * @summary Read Customer Contract Usage
18
+ */
19
+ export declare const readCustomerContractUsage: (contractId: number, options?: Parameters<typeof request>[1]) => Promise<CustomerContractUsageRead>;
20
+ export declare const getReadCustomerDashboardUrl: (params?: ReadCustomerDashboardParams) => string;
21
+ /**
22
+ * Customer aggregates only. Reading openings are not presented as login counts.
23
+ * @summary Read Customer Dashboard
24
+ */
25
+ export declare const readCustomerDashboard: (params?: ReadCustomerDashboardParams, options?: Parameters<typeof request>[1]) => Promise<CustomerDashboardRead>;
26
+ export declare const getReadCustomerOrganizationUrl: () => string;
27
+ /**
28
+ * Organization of the authenticated customer administrator, with no caller-supplied tenant authority.
29
+ * @summary Read Customer Organization
30
+ */
31
+ export declare const readCustomerOrganization: (options?: Parameters<typeof request>[1]) => Promise<CustomerOrganizationRead>;
32
+ export declare const getReadCustomerOrganizationOverviewUrl: () => string;
33
+ /**
34
+ * Current account-holder and contract totals in this customer's permitted sites.
35
+ * @summary Read Customer Organization Overview
36
+ */
37
+ export declare const readCustomerOrganizationOverview: (options?: Parameters<typeof request>[1]) => Promise<CustomerOverviewRead>;
38
+ export declare const getListCustomerAdministratorsUrl: () => string;
39
+ /**
40
+ * @summary List Customer Administrators
41
+ */
42
+ export declare const listCustomerAdministrators: (options?: Parameters<typeof request>[1]) => Promise<CustomerAdministratorListRead>;
43
+ export declare const getInviteCustomerAdministratorUrl: () => string;
44
+ /**
45
+ * Principal-only invitation. Existing accounts never receive an unsolicited password reset.
46
+ * @summary Invite Customer Administrator
47
+ */
48
+ export declare const inviteCustomerAdministrator: (customerAdminInviteWrite: CustomerAdminInviteWrite, options?: Parameters<typeof request>[1]) => Promise<CustomerAdministratorRead>;
49
+ export declare const getAcceptCustomerAdminInvitationUrl: () => string;
50
+ /**
51
+ * Accept only the live invitation bound to this verified Keycloak identity and home organization.
52
+ * @summary Accept Customer Admin Invitation
53
+ */
54
+ export declare const acceptCustomerAdminInvitation: (options?: Parameters<typeof request>[1]) => Promise<void>;
55
+ export declare const getRevokeCustomerAdministratorInvitationUrl: (invitationId: number) => string;
56
+ /**
57
+ * @summary Revoke Customer Administrator Invitation
58
+ */
59
+ export declare const revokeCustomerAdministratorInvitation: (invitationId: number, options?: Parameters<typeof request>[1]) => Promise<void>;
60
+ export declare const getRevokeCustomerAdministratorUrl: (userId: number) => string;
61
+ /**
62
+ * Revoke administrative rights immediately, preserving the person's patron login. The last principal cannot be removed.
63
+ * @summary Revoke Customer Administrator
64
+ */
65
+ export declare const revokeCustomerAdministrator: (userId: number, options?: Parameters<typeof request>[1]) => Promise<void>;
66
+ export declare const getInviteFirstCustomerAdministratorUrl: (tenantId: number) => string;
67
+ /**
68
+ * Mozaik staff bootstrap within their authorized tenant scope; no customer can bootstrap another organization.
69
+ * @summary Invite First Customer Administrator
70
+ */
71
+ export declare const inviteFirstCustomerAdministrator: (tenantId: number, customerAdminInviteWrite: CustomerAdminInviteWrite, options?: Parameters<typeof request>[1]) => Promise<CustomerAdministratorRead>;
72
+ export declare const getConfigureCustomerAdministrationUrl: (tenantId: number) => string;
73
+ /**
74
+ * Internal Mozaik policy/branding only. Customers cannot enable their own access to beneficiary data.
75
+ * @summary Configure Customer Administration
76
+ */
77
+ export declare const configureCustomerAdministration: (tenantId: number, customerSettingsWrite: CustomerSettingsWrite, options?: Parameters<typeof request>[1]) => Promise<CustomerSettingsWrite>;
78
+ //#endregion
79
+ //# sourceMappingURL=admin-customer.d.ts.map
@@ -0,0 +1,213 @@
1
+
2
+ import { r as request } from "../chunks/client.js";
3
+ //#region src/api/admin-customer/admin-customer.ts
4
+ const getListCustomerBeneficiariesUrl = (params) => {
5
+ const normalizedParams = new URLSearchParams();
6
+ Object.entries(params || {}).forEach(([key, value]) => {
7
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
8
+ });
9
+ const stringifiedParams = normalizedParams.toString();
10
+ return stringifiedParams.length > 0 ? `/admin/me/beneficiaries?${stringifiedParams}` : `/admin/me/beneficiaries`;
11
+ };
12
+ /**
13
+ * Scoped beneficiary directory, only when Mozaik enabled its visibility for this customer.
14
+ *
15
+ * This never returns individual reading titles, tutoring conversations or
16
+ * internal staff notes. Customer roles do not grant internal desk access.
17
+ * @summary List Customer Beneficiaries
18
+ */
19
+ const listCustomerBeneficiaries = async (params, options) => {
20
+ return request(getListCustomerBeneficiariesUrl(params), {
21
+ ...options,
22
+ method: "GET"
23
+ });
24
+ };
25
+ const getReadCustomerContractUsageUrl = (contractId) => {
26
+ return `/admin/me/contracts/${contractId}/usage`;
27
+ };
28
+ /**
29
+ * Aggregate consumption for an in-scope contract; foreign contracts are forbidden.
30
+ * @summary Read Customer Contract Usage
31
+ */
32
+ const readCustomerContractUsage = async (contractId, options) => {
33
+ return request(getReadCustomerContractUsageUrl(contractId), {
34
+ ...options,
35
+ method: "GET"
36
+ });
37
+ };
38
+ const getReadCustomerDashboardUrl = (params) => {
39
+ const normalizedParams = new URLSearchParams();
40
+ Object.entries(params || {}).forEach(([key, value]) => {
41
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
42
+ });
43
+ const stringifiedParams = normalizedParams.toString();
44
+ return stringifiedParams.length > 0 ? `/admin/me/dashboard?${stringifiedParams}` : `/admin/me/dashboard`;
45
+ };
46
+ /**
47
+ * Customer aggregates only. Reading openings are not presented as login counts.
48
+ * @summary Read Customer Dashboard
49
+ */
50
+ const readCustomerDashboard = async (params, options) => {
51
+ return request(getReadCustomerDashboardUrl(params), {
52
+ ...options,
53
+ method: "GET"
54
+ });
55
+ };
56
+ const getReadCustomerOrganizationUrl = () => {
57
+ return `/admin/me/organisation`;
58
+ };
59
+ /**
60
+ * Organization of the authenticated customer administrator, with no caller-supplied tenant authority.
61
+ * @summary Read Customer Organization
62
+ */
63
+ const readCustomerOrganization = async (options) => {
64
+ return request(getReadCustomerOrganizationUrl(), {
65
+ ...options,
66
+ method: "GET"
67
+ });
68
+ };
69
+ const getReadCustomerOrganizationOverviewUrl = () => {
70
+ return `/admin/me/organisation/overview`;
71
+ };
72
+ /**
73
+ * Current account-holder and contract totals in this customer's permitted sites.
74
+ * @summary Read Customer Organization Overview
75
+ */
76
+ const readCustomerOrganizationOverview = async (options) => {
77
+ return request(getReadCustomerOrganizationOverviewUrl(), {
78
+ ...options,
79
+ method: "GET"
80
+ });
81
+ };
82
+ const getListCustomerAdministratorsUrl = () => {
83
+ return `/admin/organisation/admins`;
84
+ };
85
+ /**
86
+ * @summary List Customer Administrators
87
+ */
88
+ const listCustomerAdministrators = async (options) => {
89
+ return request(getListCustomerAdministratorsUrl(), {
90
+ ...options,
91
+ method: "GET"
92
+ });
93
+ };
94
+ const getInviteCustomerAdministratorUrl = () => {
95
+ return `/admin/organisation/admins/invitations`;
96
+ };
97
+ /**
98
+ * Principal-only invitation. Existing accounts never receive an unsolicited password reset.
99
+ * @summary Invite Customer Administrator
100
+ */
101
+ const inviteCustomerAdministrator = async (customerAdminInviteWrite, options) => {
102
+ const getHeaders = (h) => {
103
+ if (!h) return {};
104
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
105
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
106
+ const headers = {};
107
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
108
+ return headers;
109
+ };
110
+ return request(getInviteCustomerAdministratorUrl(), {
111
+ ...options,
112
+ method: "POST",
113
+ headers: {
114
+ "Content-Type": "application/json",
115
+ ...getHeaders(options?.headers)
116
+ },
117
+ body: JSON.stringify(customerAdminInviteWrite)
118
+ });
119
+ };
120
+ const getAcceptCustomerAdminInvitationUrl = () => {
121
+ return `/admin/organisation/admins/invitations/accept`;
122
+ };
123
+ /**
124
+ * Accept only the live invitation bound to this verified Keycloak identity and home organization.
125
+ * @summary Accept Customer Admin Invitation
126
+ */
127
+ const acceptCustomerAdminInvitation = async (options) => {
128
+ return request(getAcceptCustomerAdminInvitationUrl(), {
129
+ ...options,
130
+ method: "POST"
131
+ });
132
+ };
133
+ const getRevokeCustomerAdministratorInvitationUrl = (invitationId) => {
134
+ return `/admin/organisation/admins/invitations/${invitationId}`;
135
+ };
136
+ /**
137
+ * @summary Revoke Customer Administrator Invitation
138
+ */
139
+ const revokeCustomerAdministratorInvitation = async (invitationId, options) => {
140
+ return request(getRevokeCustomerAdministratorInvitationUrl(invitationId), {
141
+ ...options,
142
+ method: "DELETE"
143
+ });
144
+ };
145
+ const getRevokeCustomerAdministratorUrl = (userId) => {
146
+ return `/admin/organisation/admins/${userId}`;
147
+ };
148
+ /**
149
+ * Revoke administrative rights immediately, preserving the person's patron login. The last principal cannot be removed.
150
+ * @summary Revoke Customer Administrator
151
+ */
152
+ const revokeCustomerAdministrator = async (userId, options) => {
153
+ return request(getRevokeCustomerAdministratorUrl(userId), {
154
+ ...options,
155
+ method: "DELETE"
156
+ });
157
+ };
158
+ const getInviteFirstCustomerAdministratorUrl = (tenantId) => {
159
+ return `/admin/tenants/${tenantId}/customer-admin-invitations`;
160
+ };
161
+ /**
162
+ * Mozaik staff bootstrap within their authorized tenant scope; no customer can bootstrap another organization.
163
+ * @summary Invite First Customer Administrator
164
+ */
165
+ const inviteFirstCustomerAdministrator = async (tenantId, customerAdminInviteWrite, options) => {
166
+ const getHeaders = (h) => {
167
+ if (!h) return {};
168
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
169
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
170
+ const headers = {};
171
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
172
+ return headers;
173
+ };
174
+ return request(getInviteFirstCustomerAdministratorUrl(tenantId), {
175
+ ...options,
176
+ method: "POST",
177
+ headers: {
178
+ "Content-Type": "application/json",
179
+ ...getHeaders(options?.headers)
180
+ },
181
+ body: JSON.stringify(customerAdminInviteWrite)
182
+ });
183
+ };
184
+ const getConfigureCustomerAdministrationUrl = (tenantId) => {
185
+ return `/admin/tenants/${tenantId}/customer-admin-settings`;
186
+ };
187
+ /**
188
+ * Internal Mozaik policy/branding only. Customers cannot enable their own access to beneficiary data.
189
+ * @summary Configure Customer Administration
190
+ */
191
+ const configureCustomerAdministration = async (tenantId, customerSettingsWrite, options) => {
192
+ const getHeaders = (h) => {
193
+ if (!h) return {};
194
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
195
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
196
+ const headers = {};
197
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
198
+ return headers;
199
+ };
200
+ return request(getConfigureCustomerAdministrationUrl(tenantId), {
201
+ ...options,
202
+ method: "PUT",
203
+ headers: {
204
+ "Content-Type": "application/json",
205
+ ...getHeaders(options?.headers)
206
+ },
207
+ body: JSON.stringify(customerSettingsWrite)
208
+ });
209
+ };
210
+ //#endregion
211
+ export { acceptCustomerAdminInvitation, configureCustomerAdministration, getAcceptCustomerAdminInvitationUrl, getConfigureCustomerAdministrationUrl, getInviteCustomerAdministratorUrl, getInviteFirstCustomerAdministratorUrl, getListCustomerAdministratorsUrl, getListCustomerBeneficiariesUrl, getReadCustomerContractUsageUrl, getReadCustomerDashboardUrl, getReadCustomerOrganizationOverviewUrl, getReadCustomerOrganizationUrl, getRevokeCustomerAdministratorInvitationUrl, getRevokeCustomerAdministratorUrl, inviteCustomerAdministrator, inviteFirstCustomerAdministrator, listCustomerAdministrators, listCustomerBeneficiaries, readCustomerContractUsage, readCustomerDashboard, readCustomerOrganization, readCustomerOrganizationOverview, revokeCustomerAdministrator, revokeCustomerAdministratorInvitation };
212
+
213
+ //# sourceMappingURL=admin-customer.js.map