@learnorama/mozaik-sdk 0.14.2-staging.52.1 → 0.15.0-staging.53.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. package/README.md +17 -11
  2. package/dist/api/account.d.ts +1 -1
  3. package/dist/api/account.js.map +1 -1
  4. package/dist/api/admin-catalogue.d.ts +1 -1
  5. package/dist/api/admin-catalogue.js.map +1 -1
  6. package/dist/api/admin-consumption.d.ts +1 -1
  7. package/dist/api/admin-consumption.js.map +1 -1
  8. package/dist/api/admin-contracts.d.ts +1 -1
  9. package/dist/api/admin-contracts.js.map +1 -1
  10. package/dist/api/admin-customer.d.ts +1 -1
  11. package/dist/api/admin-customer.js.map +1 -1
  12. package/dist/api/admin-desk.d.ts +1 -1
  13. package/dist/api/admin-desk.js.map +1 -1
  14. package/dist/api/admin-licenses.js.map +1 -1
  15. package/dist/api/admin-partner-selections.d.ts +1 -1
  16. package/dist/api/admin-partner-selections.js.map +1 -1
  17. package/dist/api/admin-patrons.d.ts +1 -1
  18. package/dist/api/admin-patrons.js.map +1 -1
  19. package/dist/api/admin-reviews.d.ts +1 -1
  20. package/dist/api/admin-reviews.js.map +1 -1
  21. package/dist/api/admin-roles.d.ts +1 -1
  22. package/dist/api/admin-roles.js.map +1 -1
  23. package/dist/api/admin-support.d.ts +1 -1
  24. package/dist/api/admin-support.js.map +1 -1
  25. package/dist/api/admin-tenants.js.map +1 -1
  26. package/dist/api/admin-tutoring.d.ts +1 -1
  27. package/dist/api/admin-tutoring.js.map +1 -1
  28. package/dist/api/auth-device.d.ts +1 -1
  29. package/dist/api/auth-device.js.map +1 -1
  30. package/dist/api/auth.d.ts +1 -1
  31. package/dist/api/auth.js.map +1 -1
  32. package/dist/api/biblio-billing-webhooks.d.ts +1 -1
  33. package/dist/api/biblio-billing-webhooks.js.map +1 -1
  34. package/dist/api/biblio-billing.d.ts +1 -1
  35. package/dist/api/biblio-billing.js.map +1 -1
  36. package/dist/api/biblio-catalogue.d.ts +1 -1
  37. package/dist/api/biblio-catalogue.js.map +1 -1
  38. package/dist/api/biblio-home.d.ts +1 -1
  39. package/dist/api/biblio-home.js.map +1 -1
  40. package/dist/api/biblio-learning-author-profiles.d.ts +1 -1
  41. package/dist/api/biblio-learning-author-profiles.js.map +1 -1
  42. package/dist/api/biblio-learning-authoring.d.ts +1 -1
  43. package/dist/api/biblio-learning-authoring.js.map +1 -1
  44. package/dist/api/biblio-learning-editorial.d.ts +1 -1
  45. package/dist/api/biblio-learning-editorial.js.map +1 -1
  46. package/dist/api/biblio-learning-feedback.d.ts +1 -1
  47. package/dist/api/biblio-learning-feedback.js.map +1 -1
  48. package/dist/api/biblio-learning-finance.d.ts +1 -1
  49. package/dist/api/biblio-learning-finance.js.map +1 -1
  50. package/dist/api/biblio-learning-integrations.d.ts +1 -1
  51. package/dist/api/biblio-learning-integrations.js.map +1 -1
  52. package/dist/api/biblio-learning-membership.d.ts +1 -1
  53. package/dist/api/biblio-learning-membership.js.map +1 -1
  54. package/dist/api/biblio-learning.d.ts +1 -1
  55. package/dist/api/biblio-learning.js.map +1 -1
  56. package/dist/api/biblio-library.d.ts +1 -1
  57. package/dist/api/biblio-library.js.map +1 -1
  58. package/dist/api/biblio-nextory.d.ts +1 -1
  59. package/dist/api/biblio-nextory.js.map +1 -1
  60. package/dist/api/biblio-press.d.ts +1 -1
  61. package/dist/api/biblio-press.js.map +1 -1
  62. package/dist/api/biblio-search.js.map +1 -1
  63. package/dist/api/biblio-telemetry.js.map +1 -1
  64. package/dist/api/biblio-youscribe.d.ts +51 -0
  65. package/dist/api/biblio-youscribe.js +66 -0
  66. package/dist/api/biblio-youscribe.js.map +1 -0
  67. package/dist/api/consumption.d.ts +1 -1
  68. package/dist/api/consumption.js.map +1 -1
  69. package/dist/api/cvs-app.d.ts +1 -1
  70. package/dist/api/cvs-app.js.map +1 -1
  71. package/dist/api/cvs-documents.d.ts +1 -1
  72. package/dist/api/cvs-documents.js.map +1 -1
  73. package/dist/api/cvs-favorites.d.ts +1 -1
  74. package/dist/api/cvs-favorites.js.map +1 -1
  75. package/dist/api/cvs-ils.d.ts +1 -1
  76. package/dist/api/cvs-ils.js.map +1 -1
  77. package/dist/api/cvs-loans.d.ts +1 -1
  78. package/dist/api/cvs-loans.js.map +1 -1
  79. package/dist/api/cvs-payments.d.ts +1 -1
  80. package/dist/api/cvs-payments.js.map +1 -1
  81. package/dist/api/cvs-streaming.js.map +1 -1
  82. package/dist/api/index.d.ts +5 -3
  83. package/dist/api/index.js +5 -3
  84. package/dist/api/partner-catalogue.d.ts +21 -1
  85. package/dist/api/partner-catalogue.js +28 -1
  86. package/dist/api/partner-catalogue.js.map +1 -1
  87. package/dist/api/partner-reader-nextory.d.ts +52 -0
  88. package/dist/api/partner-reader-nextory.js +92 -0
  89. package/dist/api/partner-reader-nextory.js.map +1 -0
  90. package/dist/api/partner-reader-youscribe.d.ts +63 -0
  91. package/dist/api/partner-reader-youscribe.js +97 -0
  92. package/dist/api/partner-reader-youscribe.js.map +1 -0
  93. package/dist/api/profiles.d.ts +1 -1
  94. package/dist/api/profiles.js.map +1 -1
  95. package/dist/api/search.d.ts +6 -1
  96. package/dist/api/search.js +10 -1
  97. package/dist/api/search.js.map +1 -1
  98. package/dist/api/tutoring-catalogue.d.ts +1 -1
  99. package/dist/api/tutoring-catalogue.js.map +1 -1
  100. package/dist/api/tutoring-chat.d.ts +1 -1
  101. package/dist/api/tutoring-chat.js.map +1 -1
  102. package/dist/api/tutoring-dispatch.d.ts +1 -1
  103. package/dist/api/tutoring-dispatch.js.map +1 -1
  104. package/dist/api/tutoring-practitioner.js.map +1 -1
  105. package/dist/api/tutoring-requests.d.ts +1 -1
  106. package/dist/api/tutoring-requests.js.map +1 -1
  107. package/dist/auth.d.ts +1 -1
  108. package/dist/chunks/client2.d.ts +1 -1
  109. package/dist/chunks/connection.d.ts +1 -1
  110. package/dist/chunks/index.d.ts +542 -508
  111. package/dist/index.d.ts +3 -3
  112. package/dist/index.js +3 -3
  113. package/dist/index.js.map +1 -1
  114. package/dist/models.d.ts +2 -2
  115. package/dist/models.js +7 -1
  116. package/dist/models.js.map +1 -1
  117. package/dist/react/account.d.ts +1 -1
  118. package/dist/react/account.js +1 -1
  119. package/dist/react/account.js.map +1 -1
  120. package/dist/react/admin-catalogue.d.ts +1 -1
  121. package/dist/react/admin-catalogue.js +1 -1
  122. package/dist/react/admin-catalogue.js.map +1 -1
  123. package/dist/react/admin-consumption.d.ts +1 -1
  124. package/dist/react/admin-consumption.js +1 -1
  125. package/dist/react/admin-consumption.js.map +1 -1
  126. package/dist/react/admin-contracts.d.ts +1 -1
  127. package/dist/react/admin-contracts.js +1 -1
  128. package/dist/react/admin-contracts.js.map +1 -1
  129. package/dist/react/admin-customer.d.ts +1 -1
  130. package/dist/react/admin-customer.js +1 -1
  131. package/dist/react/admin-customer.js.map +1 -1
  132. package/dist/react/admin-desk.d.ts +1 -1
  133. package/dist/react/admin-desk.js +1 -1
  134. package/dist/react/admin-desk.js.map +1 -1
  135. package/dist/react/admin-licenses.d.ts +1 -1
  136. package/dist/react/admin-licenses.js +1 -1
  137. package/dist/react/admin-licenses.js.map +1 -1
  138. package/dist/react/admin-partner-selections.d.ts +1 -1
  139. package/dist/react/admin-partner-selections.js +1 -1
  140. package/dist/react/admin-partner-selections.js.map +1 -1
  141. package/dist/react/admin-patrons.d.ts +1 -1
  142. package/dist/react/admin-patrons.js +1 -1
  143. package/dist/react/admin-patrons.js.map +1 -1
  144. package/dist/react/admin-reviews.d.ts +1 -1
  145. package/dist/react/admin-reviews.js +1 -1
  146. package/dist/react/admin-reviews.js.map +1 -1
  147. package/dist/react/admin-roles.d.ts +1 -1
  148. package/dist/react/admin-roles.js +1 -1
  149. package/dist/react/admin-roles.js.map +1 -1
  150. package/dist/react/admin-support.d.ts +1 -1
  151. package/dist/react/admin-support.js +1 -1
  152. package/dist/react/admin-support.js.map +1 -1
  153. package/dist/react/admin-tenants.d.ts +1 -1
  154. package/dist/react/admin-tenants.js +1 -1
  155. package/dist/react/admin-tenants.js.map +1 -1
  156. package/dist/react/admin-tutoring.d.ts +1 -1
  157. package/dist/react/admin-tutoring.js +1 -1
  158. package/dist/react/admin-tutoring.js.map +1 -1
  159. package/dist/react/auth-device.d.ts +1 -1
  160. package/dist/react/auth-device.js +1 -1
  161. package/dist/react/auth-device.js.map +1 -1
  162. package/dist/react/auth.d.ts +1 -1
  163. package/dist/react/auth.js +1 -1
  164. package/dist/react/auth.js.map +1 -1
  165. package/dist/react/biblio-billing-webhooks.d.ts +1 -1
  166. package/dist/react/biblio-billing-webhooks.js +1 -1
  167. package/dist/react/biblio-billing-webhooks.js.map +1 -1
  168. package/dist/react/biblio-billing.d.ts +1 -1
  169. package/dist/react/biblio-billing.js +1 -1
  170. package/dist/react/biblio-billing.js.map +1 -1
  171. package/dist/react/biblio-catalogue.d.ts +1 -1
  172. package/dist/react/biblio-catalogue.js +1 -1
  173. package/dist/react/biblio-catalogue.js.map +1 -1
  174. package/dist/react/biblio-home.d.ts +1 -1
  175. package/dist/react/biblio-home.js +1 -1
  176. package/dist/react/biblio-home.js.map +1 -1
  177. package/dist/react/biblio-learning-author-profiles.d.ts +1 -1
  178. package/dist/react/biblio-learning-author-profiles.js +1 -1
  179. package/dist/react/biblio-learning-author-profiles.js.map +1 -1
  180. package/dist/react/biblio-learning-authoring.d.ts +1 -1
  181. package/dist/react/biblio-learning-authoring.js +1 -1
  182. package/dist/react/biblio-learning-authoring.js.map +1 -1
  183. package/dist/react/biblio-learning-editorial.d.ts +1 -1
  184. package/dist/react/biblio-learning-editorial.js +1 -1
  185. package/dist/react/biblio-learning-editorial.js.map +1 -1
  186. package/dist/react/biblio-learning-feedback.d.ts +1 -1
  187. package/dist/react/biblio-learning-feedback.js +1 -1
  188. package/dist/react/biblio-learning-feedback.js.map +1 -1
  189. package/dist/react/biblio-learning-finance.d.ts +1 -1
  190. package/dist/react/biblio-learning-finance.js +1 -1
  191. package/dist/react/biblio-learning-finance.js.map +1 -1
  192. package/dist/react/biblio-learning-integrations.d.ts +1 -1
  193. package/dist/react/biblio-learning-integrations.js +1 -1
  194. package/dist/react/biblio-learning-integrations.js.map +1 -1
  195. package/dist/react/biblio-learning-membership.d.ts +1 -1
  196. package/dist/react/biblio-learning-membership.js +1 -1
  197. package/dist/react/biblio-learning-membership.js.map +1 -1
  198. package/dist/react/biblio-learning.d.ts +1 -1
  199. package/dist/react/biblio-learning.js +1 -1
  200. package/dist/react/biblio-learning.js.map +1 -1
  201. package/dist/react/biblio-library.d.ts +1 -1
  202. package/dist/react/biblio-library.js +1 -1
  203. package/dist/react/biblio-library.js.map +1 -1
  204. package/dist/react/biblio-nextory.d.ts +1 -1
  205. package/dist/react/biblio-nextory.js +1 -1
  206. package/dist/react/biblio-nextory.js.map +1 -1
  207. package/dist/react/biblio-press.d.ts +1 -1
  208. package/dist/react/biblio-press.js +1 -1
  209. package/dist/react/biblio-press.js.map +1 -1
  210. package/dist/react/biblio-search.d.ts +1 -1
  211. package/dist/react/biblio-search.js +1 -1
  212. package/dist/react/biblio-search.js.map +1 -1
  213. package/dist/react/biblio-telemetry.d.ts +1 -1
  214. package/dist/react/biblio-telemetry.js +1 -1
  215. package/dist/react/biblio-telemetry.js.map +1 -1
  216. package/dist/react/biblio-youscribe.d.ts +81 -0
  217. package/dist/react/biblio-youscribe.js +128 -0
  218. package/dist/react/biblio-youscribe.js.map +1 -0
  219. package/dist/react/chat.d.ts +1 -1
  220. package/dist/react/consumption.d.ts +1 -1
  221. package/dist/react/consumption.js +1 -1
  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 +1 -1
  227. package/dist/react/cvs-documents.js +1 -1
  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 +1 -1
  242. package/dist/react/cvs-streaming.js +1 -1
  243. package/dist/react/cvs-streaming.js.map +1 -1
  244. package/dist/react/index.d.ts +5 -3
  245. package/dist/react/index.js +5 -3
  246. package/dist/react/partner-catalogue.d.ts +48 -1
  247. package/dist/react/partner-catalogue.js +54 -2
  248. package/dist/react/partner-catalogue.js.map +1 -1
  249. package/dist/react/partner-reader-nextory.d.ts +127 -0
  250. package/dist/react/partner-reader-nextory.js +190 -0
  251. package/dist/react/partner-reader-nextory.js.map +1 -0
  252. package/dist/react/partner-reader-youscribe.d.ts +152 -0
  253. package/dist/react/partner-reader-youscribe.js +224 -0
  254. package/dist/react/partner-reader-youscribe.js.map +1 -0
  255. package/dist/react/profiles.d.ts +1 -1
  256. package/dist/react/profiles.js +1 -1
  257. package/dist/react/profiles.js.map +1 -1
  258. package/dist/react/search.d.ts +6 -1
  259. package/dist/react/search.js +11 -2
  260. package/dist/react/search.js.map +1 -1
  261. package/dist/react/tutoring-catalogue.d.ts +1 -1
  262. package/dist/react/tutoring-catalogue.js +1 -1
  263. package/dist/react/tutoring-catalogue.js.map +1 -1
  264. package/dist/react/tutoring-chat.d.ts +1 -1
  265. package/dist/react/tutoring-chat.js +1 -1
  266. package/dist/react/tutoring-chat.js.map +1 -1
  267. package/dist/react/tutoring-dispatch.d.ts +1 -1
  268. package/dist/react/tutoring-dispatch.js +1 -1
  269. package/dist/react/tutoring-dispatch.js.map +1 -1
  270. package/dist/react/tutoring-practitioner.d.ts +1 -1
  271. package/dist/react/tutoring-practitioner.js +1 -1
  272. package/dist/react/tutoring-practitioner.js.map +1 -1
  273. package/dist/react/tutoring-requests.d.ts +1 -1
  274. package/dist/react/tutoring-requests.js +1 -1
  275. package/dist/react/tutoring-requests.js.map +1 -1
  276. package/package.json +7 -7
  277. package/dist/api/partner-reader.d.ts +0 -96
  278. package/dist/api/partner-reader.js +0 -164
  279. package/dist/api/partner-reader.js.map +0 -1
  280. package/dist/react/partner-reader.d.ts +0 -261
  281. package/dist/react/partner-reader.js +0 -368
  282. package/dist/react/partner-reader.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"biblio-learning-finance.js","names":[],"sources":["../../src/api/biblio-learning-finance/biblio-learning-finance.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.14.2\n */\nimport type {\n LearningAssetRead,\n LearningChannelListRead,\n LearningChannelRead,\n LearningChannelWrite,\n LearningContractChannelWrite,\n LearningListPayeeAllocationsParams,\n LearningListPayeeSettlementsParams,\n LearningListPayeesParams,\n LearningListRoyaltyAllocationsParams,\n LearningListRoyaltyPeriodsParams,\n LearningPayeeDocumentPage,\n LearningPayeeDocumentUploadWrite,\n LearningPayeeDocumentsParams,\n LearningPayeePage,\n LearningPayeeRead,\n LearningPayeeWrite,\n LearningRoyaltyAdjustmentWrite,\n LearningRoyaltyAgreementEndWrite,\n LearningRoyaltyAgreementRead,\n LearningRoyaltyAgreementWrite,\n LearningRoyaltyAllocationPage,\n LearningRoyaltyApprovalWrite,\n LearningRoyaltyBudgetListRead,\n LearningRoyaltyBudgetRead,\n LearningRoyaltyBudgetWrite,\n LearningRoyaltyInvoiceRead,\n LearningRoyaltyInvoiceWrite,\n LearningRoyaltyPaidWrite,\n LearningRoyaltyPeriodPage,\n LearningRoyaltyPeriodRead,\n LearningRoyaltyPeriodWrite,\n LearningRoyaltySettlementPage,\n LearningRoyaltySettlementRead,\n LearningRoyaltySettlementWrite,\n LearningUploadRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getLearningEndRoyaltyAgreementUrl = (agreementId: number,) => {\n\n\n\n\n return `/learning/finance/agreements/${agreementId}/end`\n}\n\n/**\n * Set the inclusive final month using first-of-month dates. expectedEndsMonth must match the current end unless this exact end is already applied. The change cannot precede the start, overlap other terms, or invalidate approved accounting. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Set an agreement’s final covered month\n */\nexport const learningEndRoyaltyAgreement = async (agreementId: number,\n learningRoyaltyAgreementEndWrite: LearningRoyaltyAgreementEndWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyAgreementRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltyAgreementRead>(getLearningEndRoyaltyAgreementUrl(agreementId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyAgreementEndWrite)\n }\n);}\n\n\nexport const getLearningListDistributionChannelsUrl = (catalogueId: number,) => {\n\n\n\n\n return `/learning/finance/catalogues/${catalogueId}/channels`\n}\n\n/**\n * List every channel in the catalogue, including inactive channels, ordered by channel ID. Organic identifies the direct distribution pool; a channel does not grant course access. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary List catalogue distribution channels\n */\nexport const learningListDistributionChannels = async (catalogueId: number, options?: Parameters<typeof request>[1]): Promise<LearningChannelListRead> => {\n\n return request<LearningChannelListRead>(getLearningListDistributionChannelsUrl(catalogueId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningCreateDistributionChannelUrl = (catalogueId: number,) => {\n\n\n\n\n return `/learning/finance/catalogues/${catalogueId}/channels`\n}\n\n/**\n * Create an active organic or promotional accounting channel. At most one active organic channel is permitted per catalogue. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Create a distribution channel\n */\nexport const learningCreateDistributionChannel = async (catalogueId: number,\n learningChannelWrite: LearningChannelWrite, options?: Parameters<typeof request>[1]): Promise<LearningChannelRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningChannelRead>(getLearningCreateDistributionChannelUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningChannelWrite)\n }\n);}\n\n\nexport const getLearningCreatePayeeUrl = (catalogueId: number,) => {\n\n\n\n\n return `/learning/finance/catalogues/${catalogueId}/payees`\n}\n\n/**\n * Link an active independent account to one catalogue’s billing profile. The (catalogue, user) pair must be unique. expectedUpdatedAt is ignored on creation; optional legal details may be completed before invoicing. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Create a rightsholder billing profile\n */\nexport const learningCreatePayee = async (catalogueId: number,\n learningPayeeWrite: LearningPayeeWrite, options?: Parameters<typeof request>[1]): Promise<LearningPayeeRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningPayeeRead>(getLearningCreatePayeeUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPayeeWrite)\n }\n);}\n\n\nexport const getLearningListRoyaltyPeriodsUrl = (catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/finance/catalogues/${catalogueId}/periods?${stringifiedParams}` : `/learning/finance/catalogues/${catalogueId}/periods`\n}\n\n/**\n * List accounting periods for the catalogue, newest month then ID first. State and generation identify which inputs/results are current; historical accounting remains readable even when a catalogue closes. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary List catalogue accounting months\n */\nexport const learningListRoyaltyPeriods = async (catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodPage> => {\n\n return request<LearningRoyaltyPeriodPage>(getLearningListRoyaltyPeriodsUrl(catalogueId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningCreateRoyaltyPeriodUrl = (catalogueId: number,) => {\n\n\n\n\n return `/learning/finance/catalogues/${catalogueId}/periods`\n}\n\n/**\n * Create a draft period for one catalogue, calendar month and currency. month must be the first day; currency is three uppercase letters. A period may be opened before the month closes, but calculation must wait for its Europe/Paris month boundary. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Open a monthly royalty period\n */\nexport const learningCreateRoyaltyPeriod = async (catalogueId: number,\n learningRoyaltyPeriodWrite: LearningRoyaltyPeriodWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltyPeriodRead>(getLearningCreateRoyaltyPeriodUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyPeriodWrite)\n }\n);}\n\n\nexport const getLearningSetContractChannelUrl = (contractId: number,) => {\n\n\n\n\n return `/learning/finance/contracts/${contractId}/channel`\n}\n\n/**\n * Replace the contract’s distribution mapping and eligibility flag. The channel must be active; this mapping controls royalty attribution and does not grant reader access. Global commercial authority is required in addition to the channel catalogue scope. Success returns no body. Mutations require high authentication assurance.\n * @summary Assign a contract’s royalty channel\n */\nexport const learningSetContractChannel = async (contractId: number,\n learningContractChannelWrite: LearningContractChannelWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getLearningSetContractChannelUrl(contractId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningContractChannelWrite)\n }\n);}\n\n\nexport const getLearningCreateRoyaltyAgreementUrl = (courseId: number,) => {\n\n\n\n\n return `/learning/finance/courses/${courseId}/agreements`\n}\n\n/**\n * Create terms for an active rightsholder in the course’s financial catalogue. First-of-month bounds are inclusive; null endsMonth leaves the agreement open. Overlapping terms for the same course/payee are refused. share is a fraction; coefficients are negotiated multipliers. Calculation requires the course’s applicable shares to sum to one. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Create monthly rightsholder terms\n */\nexport const learningCreateRoyaltyAgreement = async (courseId: number,\n learningRoyaltyAgreementWrite: LearningRoyaltyAgreementWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyAgreementRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltyAgreementRead>(getLearningCreateRoyaltyAgreementUrl(courseId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyAgreementWrite)\n }\n);}\n\n\nexport const getLearningReadRoyaltyInvoiceUrl = (invoiceId: number,) => {\n\n\n\n\n return `/learning/finance/invoices/${invoiceId}`\n}\n\n/**\n * Read immutable issuance facts and the authenticated document endpoint. number is the native sequence; sourceNumber preserves an imported reference. Historical missing net/tax facts stay null and must not be reconstructed from current legal details. A source invoice without a settlement requires catalogue finance authority. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Read native or source invoice facts\n */\nexport const learningReadRoyaltyInvoice = async (invoiceId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyInvoiceRead> => {\n\n return request<LearningRoyaltyInvoiceRead>(getLearningReadRoyaltyInvoiceUrl(invoiceId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningDownloadRoyaltyInvoiceUrl = (invoiceId: number,) => {\n\n\n\n\n return `/learning/finance/invoices/${invoiceId}/document`\n}\n\n/**\n * Render the stored issuance snapshots as binary application/pdf. Returns Cache-Control: private, no-store and an attachment filename invoice-{invoice_id}.pdf. Missing original parties, amount, tax rate or supported layout prevents rendering; current billing details are never substituted into old invoices. A source invoice without a settlement requires catalogue finance authority. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Download a private invoice PDF\n */\nexport const learningDownloadRoyaltyInvoice = async (invoiceId: number, options?: Parameters<typeof request>[1]): Promise<Blob> => {\n\n return request<Blob>(getLearningDownloadRoyaltyInvoiceUrl(invoiceId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningListPayeesUrl = (params?: LearningListPayeesParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/finance/payees?${stringifiedParams}` : `/learning/finance/payees`\n}\n\n/**\n * List the caller’s linked rightsholders plus profiles in catalogues where they hold a finance grant; global commercial operators see all. Includes inactive and historical rows, ordered by ID. Public author attribution alone grants no finance access. Dependent profiles and support impersonation are refused.\n * @summary List accessible rightsholder billing profiles\n */\nexport const learningListPayees = async (params?: LearningListPayeesParams, options?: Parameters<typeof request>[1]): Promise<LearningPayeePage> => {\n\n return request<LearningPayeePage>(getLearningListPayeesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningReadPayeeUrl = (payeeId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}`\n}\n\n/**\n * Read current legal details and the updatedAt concurrency value needed for replacement. Historical null values remain unknown. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Read a rightsholder billing profile\n */\nexport const learningReadPayee = async (payeeId: number, options?: Parameters<typeof request>[1]): Promise<LearningPayeeRead> => {\n\n return request<LearningPayeeRead>(getLearningReadPayeeUrl(payeeId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningUpdatePayeeUrl = (payeeId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}`\n}\n\n/**\n * Replace all editable billing fields; omitted optional fields become null. Send the current updatedAt as expectedUpdatedAt and keep userId unchanged. Returns the new concurrency timestamp. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Replace a rightsholder’s legal details\n */\nexport const learningUpdatePayee = async (payeeId: number,\n learningPayeeWrite: LearningPayeeWrite, options?: Parameters<typeof request>[1]): Promise<LearningPayeeRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningPayeeRead>(getLearningUpdatePayeeUrl(payeeId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPayeeWrite)\n }\n);}\n\n\nexport const getLearningListPayeeAllocationsUrl = (payeeId: number,\n params?: LearningListPayeeAllocationsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/finance/payees/${payeeId}/allocations?${stringifiedParams}` : `/learning/finance/payees/${payeeId}/allocations`\n}\n\n/**\n * Page only this rightsholder’s allocations from approved months and each month’s current generation, newest month then allocation ID. Unapproved calculation output stays in the catalogue finance review endpoint. Amounts are decimal major currency units, not integer cents. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary List approved rightsholder allocations\n */\nexport const learningListPayeeAllocations = async (payeeId: number,\n params?: LearningListPayeeAllocationsParams, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyAllocationPage> => {\n\n return request<LearningRoyaltyAllocationPage>(getLearningListPayeeAllocationsUrl(payeeId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningReservePayeeDocumentUrl = (payeeId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}/document-uploads`\n}\n\n/**\n * Reserve legal evidence, then PUT exactly sizeBytes raw bytes to uploadUrl with the declared Content-Type. For this purpose only PDF, JPEG and PNG are accepted, with a 10 MiB (10,485,760 byte) maximum despite the broader shared upload schema. Reservation alone does not create a completed legal document; completion validates the bytes. At most ten unexpired pending uploads are allowed per profile. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Reserve a private rightsholder document upload\n */\nexport const learningReservePayeeDocument = async (payeeId: number,\n learningPayeeDocumentUploadWrite: LearningPayeeDocumentUploadWrite, options?: Parameters<typeof request>[1]): Promise<LearningUploadRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningUploadRead>(getLearningReservePayeeDocumentUrl(payeeId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPayeeDocumentUploadWrite)\n }\n);}\n\n\nexport const getLearningPayeeDocumentsUrl = (payeeId: number,\n params?: LearningPayeeDocumentsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/finance/payees/${payeeId}/documents?${stringifiedParams}` : `/learning/finance/payees/${payeeId}/documents`\n}\n\n/**\n * List completed document metadata, newest ID first. No file bytes or storage keys appear here; use the scoped document endpoint for delivery. Source creation dates may be unknown. This read also requires high authentication assurance. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary List private rightsholder legal documents\n */\nexport const learningPayeeDocuments = async (payeeId: number,\n params?: LearningPayeeDocumentsParams, options?: Parameters<typeof request>[1]): Promise<LearningPayeeDocumentPage> => {\n\n return request<LearningPayeeDocumentPage>(getLearningPayeeDocumentsUrl(payeeId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningDownloadPayeeDocumentUrl = (payeeId: number,\n documentId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}/documents/${documentId}`\n}\n\n/**\n * Authorize both the payee and its document, then return a JSON asset descriptor. Follow its url to retrieve PDF/image bytes; this operation itself does not return a binary file. Treat temporary signed delivery URLs as private capabilities. This read requires high authentication assurance. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Get delivery for a private legal document\n */\nexport const learningDownloadPayeeDocument = async (payeeId: number,\n documentId: number, options?: Parameters<typeof request>[1]): Promise<LearningAssetRead> => {\n\n return request<LearningAssetRead>(getLearningDownloadPayeeDocumentUrl(payeeId,documentId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningListPayeeSettlementsUrl = (payeeId: number,\n params?: LearningListPayeeSettlementsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/finance/payees/${payeeId}/settlements?${stringifiedParams}` : `/learning/finance/payees/${payeeId}/settlements`\n}\n\n/**\n * Page all settlements for this rightsholder, newest year/period/ID first. Each period covers two calendar months. Source component nulls remain unknown even when the displayed payable total applies zero-for-missing arithmetic; an unpaid flag alone is not complete source payment evidence. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary List a rightsholder’s settlements\n */\nexport const learningListPayeeSettlements = async (payeeId: number,\n params?: LearningListPayeeSettlementsParams, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltySettlementPage> => {\n\n return request<LearningRoyaltySettlementPage>(getLearningListPayeeSettlementsUrl(payeeId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningCreatePayeeSettlementUrl = (payeeId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}/settlements`\n}\n\n/**\n * Require both monthly periods in the same currency to be approved. period 1 means January–February and period 5 means September–October. Organic totals include slices, sales and bonuses; promotional totals include slices. Payable is max(0, organic + promotional + affiliate - advance), rounded half up to two decimals. Matching retries return the existing native settlement; source or conflicting settlements require review. Creation records accounting and initiates no transfer. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Create a two-month rightsholder settlement\n */\nexport const learningCreatePayeeSettlement = async (payeeId: number,\n learningRoyaltySettlementWrite: LearningRoyaltySettlementWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltySettlementRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltySettlementRead>(getLearningCreatePayeeSettlementUrl(payeeId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltySettlementWrite)\n }\n);}\n\n\nexport const getLearningReadRoyaltyPeriodUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}`\n}\n\n/**\n * Poll state, inputState and generation after requesting calculation. draft → calculating → calculated → approved; failed input preparation is reported by inputState and inputErrorCode. Read channel budgets for channel-specific failures. Approval requires complete inputs and all current budgets. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary Read calculation and approval state\n */\nexport const learningReadRoyaltyPeriod = async (periodId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\n\n return request<LearningRoyaltyPeriodRead>(getLearningReadRoyaltyPeriodUrl(periodId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningSetRoyaltyAdjustmentUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/adjustments`\n}\n\n/**\n * Replace the signed sale and bonus amounts for one course/payee in this period’s catalogue. Adjustments are attached only to the organic channel during calculation, which requires exactly one organic budget when adjustments exist. Historical, approved and running calculations cannot be edited. Success returns no body. Amounts are decimal major currency units, not integer cents. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Set monthly sales and bonus adjustments\n */\nexport const learningSetRoyaltyAdjustment = async (periodId: number,\n learningRoyaltyAdjustmentWrite: LearningRoyaltyAdjustmentWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getLearningSetRoyaltyAdjustmentUrl(periodId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyAdjustmentWrite)\n }\n);}\n\n\nexport const getLearningListRoyaltyAllocationsUrl = (periodId: number,\n params?: LearningListRoyaltyAllocationsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/finance/periods/${periodId}/allocations?${stringifiedParams}` : `/learning/finance/periods/${periodId}/allocations`\n}\n\n/**\n * Page allocations for the period’s current generation, ordered by allocation ID, including unapproved calculation output for review. Within a channel, each subject contributes one unit split across courses in proportion to eligible seconds; course weight sums those fractions. Native percentage is that weight divided by the budget’s subject count times 100. sliceAmount additionally applies rightsholder share and channel coefficient; sales/bonuses are separate organic adjustments. Imported unknown percentages remain null. Amounts are decimal major currency units, not integer cents. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary Inspect the month’s current allocations\n */\nexport const learningListRoyaltyAllocations = async (periodId: number,\n params?: LearningListRoyaltyAllocationsParams, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyAllocationPage> => {\n\n return request<LearningRoyaltyAllocationPage>(getLearningListRoyaltyAllocationsUrl(periodId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningApproveRoyaltyCalculationUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/approve`\n}\n\n/**\n * Make a native month immutable after the input snapshot and every channel budget complete in expectedGeneration. Repeating approval of that same generation returns its approved state. Only approved allocations are visible through payee allocation history and eligible for settlement. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Approve a completed royalty generation\n */\nexport const learningApproveRoyaltyCalculation = async (periodId: number,\n learningRoyaltyApprovalWrite: LearningRoyaltyApprovalWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltyPeriodRead>(getLearningApproveRoyaltyCalculationUrl(periodId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyApprovalWrite)\n }\n);}\n\n\nexport const getLearningListRoyaltyBudgetsUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/budgets`\n}\n\n/**\n * List every budget for the month, ordered by ID. Compare each budget generation with its period before reviewing results. inputSubjectCount is the distinct subject denominator of the frozen activity population, not minutes or lesson counts. Amounts are decimal major currency units, not integer cents. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary List channel budgets and calculation results\n */\nexport const learningListRoyaltyBudgets = async (periodId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyBudgetListRead> => {\n\n return request<LearningRoyaltyBudgetListRead>(getLearningListRoyaltyBudgetsUrl(periodId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningSetRoyaltyBudgetUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/budgets`\n}\n\n/**\n * Create or replace the channel budget for an editable period. amount is nonnegative with at most eight decimal places and 24 total digits, in the period’s currency. Editing calculated inputs advances the period generation and returns it to draft; historical, approved and running calculations cannot be edited. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Set a channel’s monthly royalty pool\n */\nexport const learningSetRoyaltyBudget = async (periodId: number,\n learningRoyaltyBudgetWrite: LearningRoyaltyBudgetWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyBudgetRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltyBudgetRead>(getLearningSetRoyaltyBudgetUrl(periodId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyBudgetWrite)\n }\n);}\n\n\nexport const getLearningRequestRoyaltyCalculationUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/calculate`\n}\n\n/**\n * Freeze applicable agreements, channels, adjustments and activity cutoff, then queue input and channel processing. The month must have closed in Europe/Paris and have at least one active channel budget. Poll the period and budgets. Repeating while calculating requeues failed work without replacing frozen facts; an already calculated period returns its current result. HTTP 202 is acceptance, not approval or payment. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Queue a closed month’s royalty calculation\n */\nexport const learningRequestRoyaltyCalculation = async (periodId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\n\n return request<LearningRoyaltyPeriodRead>(getLearningRequestRoyaltyCalculationUrl(periodId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getLearningResetRoyaltyCalculationUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/reset`\n}\n\n/**\n * Require the generation just reviewed, advance it, clear frozen inputs and worker claims, and reset channel budgets to draft. This permits corrected inputs after a failed or unwanted calculation. Historical and approved months are immutable. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Invalidate an unapproved calculation\n */\nexport const learningResetRoyaltyCalculation = async (periodId: number,\n learningRoyaltyApprovalWrite: LearningRoyaltyApprovalWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltyPeriodRead>(getLearningResetRoyaltyCalculationUrl(periodId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyApprovalWrite)\n }\n);}\n\n\nexport const getLearningReadRoyaltySettlementUrl = (settlementId: number,) => {\n\n\n\n\n return `/learning/finance/settlements/${settlementId}`\n}\n\n/**\n * Read the two-month components, computed payable amount and recorded payment status. A historical settlement without a resolved payee requires catalogue finance authority; otherwise the linked rightsholder may read it. Amounts are decimal major currency units, not integer cents. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Read a rightsholder settlement\n */\nexport const learningReadRoyaltySettlement = async (settlementId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltySettlementRead> => {\n\n return request<LearningRoyaltySettlementRead>(getLearningReadRoyaltySettlementUrl(settlementId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningIssueRoyaltyInvoiceUrl = (settlementId: number,) => {\n\n\n\n\n return `/learning/finance/settlements/${settlementId}/invoice`\n}\n\n/**\n * Snapshot the rightsholder’s complete billing address, recipient, settlement net amount and percentage tax rate. Generate a native number per payee/year. Matching recipient/tax retries return the existing invoice; issued facts cannot be replaced. The example EUR 590 net at 20% produces EUR 118 tax and EUR 708 total in the PDF. Issuance does not mark the settlement paid. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Issue an immutable royalty invoice\n */\nexport const learningIssueRoyaltyInvoice = async (settlementId: number,\n learningRoyaltyInvoiceWrite: LearningRoyaltyInvoiceWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyInvoiceRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltyInvoiceRead>(getLearningIssueRoyaltyInvoiceUrl(settlementId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyInvoiceWrite)\n }\n);}\n\n\nexport const getLearningRecordRoyaltyPaymentUrl = (settlementId: number,) => {\n\n\n\n\n return `/learning/finance/settlements/${settlementId}/paid`\n}\n\n/**\n * Mark the settlement paid using external accounting evidence and record the current time as paidAt. This operation never initiates a bank transfer or sends money. A matching paymentReference is idempotent; different existing evidence conflicts. Historical unresolved payee/payment facts must first be reconciled. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Record an observed royalty payment\n */\nexport const learningRecordRoyaltyPayment = async (settlementId: number,\n learningRoyaltyPaidWrite: LearningRoyaltyPaidWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltySettlementRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltySettlementRead>(getLearningRecordRoyaltyPaymentUrl(settlementId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyPaidWrite)\n }\n);}\n\n\n"],"mappings":";;;AA+CA,MAAa,qCAAqC,gBAAyB;CAKzE,OAAO,gCAAgC,YAAY;AACrD;;;;;AAMA,MAAa,8BAA8B,OAAO,aAC9C,kCAAoE,YAAmF;CAEvJ,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAsC,kCAAkC,WAAW,GACxF;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,gCAAgC;CACvD,CACF;AAAE;AAGF,MAAa,0CAA0C,gBAAyB;CAK9E,OAAO,gCAAgC,YAAY;AACrD;;;;;AAMA,MAAa,mCAAmC,OAAO,aAAqB,YAA8E;CAExJ,OAAO,QAAiC,uCAAuC,WAAW,GAC1F;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,2CAA2C,gBAAyB;CAK/E,OAAO,gCAAgC,YAA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KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAuC,mCAAmC,YAAY,GAC3F;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,wBAAwB;CAC/C,CACF;AAAE"}
1
+ {"version":3,"file":"biblio-learning-finance.js","names":[],"sources":["../../src/api/biblio-learning-finance/biblio-learning-finance.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.15.0\n */\nimport type {\n LearningAssetRead,\n LearningChannelListRead,\n LearningChannelRead,\n LearningChannelWrite,\n LearningContractChannelWrite,\n LearningListPayeeAllocationsParams,\n LearningListPayeeSettlementsParams,\n LearningListPayeesParams,\n LearningListRoyaltyAllocationsParams,\n LearningListRoyaltyPeriodsParams,\n LearningPayeeDocumentPage,\n LearningPayeeDocumentUploadWrite,\n LearningPayeeDocumentsParams,\n LearningPayeePage,\n LearningPayeeRead,\n LearningPayeeWrite,\n LearningRoyaltyAdjustmentWrite,\n LearningRoyaltyAgreementEndWrite,\n LearningRoyaltyAgreementRead,\n LearningRoyaltyAgreementWrite,\n LearningRoyaltyAllocationPage,\n LearningRoyaltyApprovalWrite,\n LearningRoyaltyBudgetListRead,\n LearningRoyaltyBudgetRead,\n LearningRoyaltyBudgetWrite,\n LearningRoyaltyInvoiceRead,\n LearningRoyaltyInvoiceWrite,\n LearningRoyaltyPaidWrite,\n LearningRoyaltyPeriodPage,\n LearningRoyaltyPeriodRead,\n LearningRoyaltyPeriodWrite,\n LearningRoyaltySettlementPage,\n LearningRoyaltySettlementRead,\n LearningRoyaltySettlementWrite,\n LearningUploadRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getLearningEndRoyaltyAgreementUrl = (agreementId: number,) => {\n\n\n\n\n return `/learning/finance/agreements/${agreementId}/end`\n}\n\n/**\n * Set the inclusive final month using first-of-month dates. expectedEndsMonth must match the current end unless this exact end is already applied. The change cannot precede the start, overlap other terms, or invalidate approved accounting. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Set an agreement’s final covered month\n */\nexport const learningEndRoyaltyAgreement = async (agreementId: number,\n learningRoyaltyAgreementEndWrite: LearningRoyaltyAgreementEndWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyAgreementRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltyAgreementRead>(getLearningEndRoyaltyAgreementUrl(agreementId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyAgreementEndWrite)\n }\n);}\n\n\nexport const getLearningListDistributionChannelsUrl = (catalogueId: number,) => {\n\n\n\n\n return `/learning/finance/catalogues/${catalogueId}/channels`\n}\n\n/**\n * List every channel in the catalogue, including inactive channels, ordered by channel ID. Organic identifies the direct distribution pool; a channel does not grant course access. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary List catalogue distribution channels\n */\nexport const learningListDistributionChannels = async (catalogueId: number, options?: Parameters<typeof request>[1]): Promise<LearningChannelListRead> => {\n\n return request<LearningChannelListRead>(getLearningListDistributionChannelsUrl(catalogueId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningCreateDistributionChannelUrl = (catalogueId: number,) => {\n\n\n\n\n return `/learning/finance/catalogues/${catalogueId}/channels`\n}\n\n/**\n * Create an active organic or promotional accounting channel. At most one active organic channel is permitted per catalogue. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Create a distribution channel\n */\nexport const learningCreateDistributionChannel = async (catalogueId: number,\n learningChannelWrite: LearningChannelWrite, options?: Parameters<typeof request>[1]): Promise<LearningChannelRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningChannelRead>(getLearningCreateDistributionChannelUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningChannelWrite)\n }\n);}\n\n\nexport const getLearningCreatePayeeUrl = (catalogueId: number,) => {\n\n\n\n\n return `/learning/finance/catalogues/${catalogueId}/payees`\n}\n\n/**\n * Link an active independent account to one catalogue’s billing profile. The (catalogue, user) pair must be unique. expectedUpdatedAt is ignored on creation; optional legal details may be completed before invoicing. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Create a rightsholder billing profile\n */\nexport const learningCreatePayee = async (catalogueId: number,\n learningPayeeWrite: LearningPayeeWrite, options?: Parameters<typeof request>[1]): Promise<LearningPayeeRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningPayeeRead>(getLearningCreatePayeeUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPayeeWrite)\n }\n);}\n\n\nexport const getLearningListRoyaltyPeriodsUrl = (catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/finance/catalogues/${catalogueId}/periods?${stringifiedParams}` : `/learning/finance/catalogues/${catalogueId}/periods`\n}\n\n/**\n * List accounting periods for the catalogue, newest month then ID first. State and generation identify which inputs/results are current; historical accounting remains readable even when a catalogue closes. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary List catalogue accounting months\n */\nexport const learningListRoyaltyPeriods = async (catalogueId: number,\n params?: LearningListRoyaltyPeriodsParams, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodPage> => {\n\n return request<LearningRoyaltyPeriodPage>(getLearningListRoyaltyPeriodsUrl(catalogueId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningCreateRoyaltyPeriodUrl = (catalogueId: number,) => {\n\n\n\n\n return `/learning/finance/catalogues/${catalogueId}/periods`\n}\n\n/**\n * Create a draft period for one catalogue, calendar month and currency. month must be the first day; currency is three uppercase letters. A period may be opened before the month closes, but calculation must wait for its Europe/Paris month boundary. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Open a monthly royalty period\n */\nexport const learningCreateRoyaltyPeriod = async (catalogueId: number,\n learningRoyaltyPeriodWrite: LearningRoyaltyPeriodWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltyPeriodRead>(getLearningCreateRoyaltyPeriodUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyPeriodWrite)\n }\n);}\n\n\nexport const getLearningSetContractChannelUrl = (contractId: number,) => {\n\n\n\n\n return `/learning/finance/contracts/${contractId}/channel`\n}\n\n/**\n * Replace the contract’s distribution mapping and eligibility flag. The channel must be active; this mapping controls royalty attribution and does not grant reader access. Global commercial authority is required in addition to the channel catalogue scope. Success returns no body. Mutations require high authentication assurance.\n * @summary Assign a contract’s royalty channel\n */\nexport const learningSetContractChannel = async (contractId: number,\n learningContractChannelWrite: LearningContractChannelWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getLearningSetContractChannelUrl(contractId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningContractChannelWrite)\n }\n);}\n\n\nexport const getLearningCreateRoyaltyAgreementUrl = (courseId: number,) => {\n\n\n\n\n return `/learning/finance/courses/${courseId}/agreements`\n}\n\n/**\n * Create terms for an active rightsholder in the course’s financial catalogue. First-of-month bounds are inclusive; null endsMonth leaves the agreement open. Overlapping terms for the same course/payee are refused. share is a fraction; coefficients are negotiated multipliers. Calculation requires the course’s applicable shares to sum to one. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Create monthly rightsholder terms\n */\nexport const learningCreateRoyaltyAgreement = async (courseId: number,\n learningRoyaltyAgreementWrite: LearningRoyaltyAgreementWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyAgreementRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltyAgreementRead>(getLearningCreateRoyaltyAgreementUrl(courseId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyAgreementWrite)\n }\n);}\n\n\nexport const getLearningReadRoyaltyInvoiceUrl = (invoiceId: number,) => {\n\n\n\n\n return `/learning/finance/invoices/${invoiceId}`\n}\n\n/**\n * Read immutable issuance facts and the authenticated document endpoint. number is the native sequence; sourceNumber preserves an imported reference. Historical missing net/tax facts stay null and must not be reconstructed from current legal details. A source invoice without a settlement requires catalogue finance authority. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Read native or source invoice facts\n */\nexport const learningReadRoyaltyInvoice = async (invoiceId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyInvoiceRead> => {\n\n return request<LearningRoyaltyInvoiceRead>(getLearningReadRoyaltyInvoiceUrl(invoiceId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningDownloadRoyaltyInvoiceUrl = (invoiceId: number,) => {\n\n\n\n\n return `/learning/finance/invoices/${invoiceId}/document`\n}\n\n/**\n * Render the stored issuance snapshots as binary application/pdf. Returns Cache-Control: private, no-store and an attachment filename invoice-{invoice_id}.pdf. Missing original parties, amount, tax rate or supported layout prevents rendering; current billing details are never substituted into old invoices. A source invoice without a settlement requires catalogue finance authority. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Download a private invoice PDF\n */\nexport const learningDownloadRoyaltyInvoice = async (invoiceId: number, options?: Parameters<typeof request>[1]): Promise<Blob> => {\n\n return request<Blob>(getLearningDownloadRoyaltyInvoiceUrl(invoiceId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningListPayeesUrl = (params?: LearningListPayeesParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/finance/payees?${stringifiedParams}` : `/learning/finance/payees`\n}\n\n/**\n * List the caller’s linked rightsholders plus profiles in catalogues where they hold a finance grant; global commercial operators see all. Includes inactive and historical rows, ordered by ID. Public author attribution alone grants no finance access. Dependent profiles and support impersonation are refused.\n * @summary List accessible rightsholder billing profiles\n */\nexport const learningListPayees = async (params?: LearningListPayeesParams, options?: Parameters<typeof request>[1]): Promise<LearningPayeePage> => {\n\n return request<LearningPayeePage>(getLearningListPayeesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningReadPayeeUrl = (payeeId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}`\n}\n\n/**\n * Read current legal details and the updatedAt concurrency value needed for replacement. Historical null values remain unknown. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Read a rightsholder billing profile\n */\nexport const learningReadPayee = async (payeeId: number, options?: Parameters<typeof request>[1]): Promise<LearningPayeeRead> => {\n\n return request<LearningPayeeRead>(getLearningReadPayeeUrl(payeeId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningUpdatePayeeUrl = (payeeId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}`\n}\n\n/**\n * Replace all editable billing fields; omitted optional fields become null. Send the current updatedAt as expectedUpdatedAt and keep userId unchanged. Returns the new concurrency timestamp. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Replace a rightsholder’s legal details\n */\nexport const learningUpdatePayee = async (payeeId: number,\n learningPayeeWrite: LearningPayeeWrite, options?: Parameters<typeof request>[1]): Promise<LearningPayeeRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningPayeeRead>(getLearningUpdatePayeeUrl(payeeId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPayeeWrite)\n }\n);}\n\n\nexport const getLearningListPayeeAllocationsUrl = (payeeId: number,\n params?: LearningListPayeeAllocationsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/finance/payees/${payeeId}/allocations?${stringifiedParams}` : `/learning/finance/payees/${payeeId}/allocations`\n}\n\n/**\n * Page only this rightsholder’s allocations from approved months and each month’s current generation, newest month then allocation ID. Unapproved calculation output stays in the catalogue finance review endpoint. Amounts are decimal major currency units, not integer cents. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary List approved rightsholder allocations\n */\nexport const learningListPayeeAllocations = async (payeeId: number,\n params?: LearningListPayeeAllocationsParams, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyAllocationPage> => {\n\n return request<LearningRoyaltyAllocationPage>(getLearningListPayeeAllocationsUrl(payeeId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningReservePayeeDocumentUrl = (payeeId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}/document-uploads`\n}\n\n/**\n * Reserve legal evidence, then PUT exactly sizeBytes raw bytes to uploadUrl with the declared Content-Type. For this purpose only PDF, JPEG and PNG are accepted, with a 10 MiB (10,485,760 byte) maximum despite the broader shared upload schema. Reservation alone does not create a completed legal document; completion validates the bytes. At most ten unexpired pending uploads are allowed per profile. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Reserve a private rightsholder document upload\n */\nexport const learningReservePayeeDocument = async (payeeId: number,\n learningPayeeDocumentUploadWrite: LearningPayeeDocumentUploadWrite, options?: Parameters<typeof request>[1]): Promise<LearningUploadRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningUploadRead>(getLearningReservePayeeDocumentUrl(payeeId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPayeeDocumentUploadWrite)\n }\n);}\n\n\nexport const getLearningPayeeDocumentsUrl = (payeeId: number,\n params?: LearningPayeeDocumentsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/finance/payees/${payeeId}/documents?${stringifiedParams}` : `/learning/finance/payees/${payeeId}/documents`\n}\n\n/**\n * List completed document metadata, newest ID first. No file bytes or storage keys appear here; use the scoped document endpoint for delivery. Source creation dates may be unknown. This read also requires high authentication assurance. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary List private rightsholder legal documents\n */\nexport const learningPayeeDocuments = async (payeeId: number,\n params?: LearningPayeeDocumentsParams, options?: Parameters<typeof request>[1]): Promise<LearningPayeeDocumentPage> => {\n\n return request<LearningPayeeDocumentPage>(getLearningPayeeDocumentsUrl(payeeId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningDownloadPayeeDocumentUrl = (payeeId: number,\n documentId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}/documents/${documentId}`\n}\n\n/**\n * Authorize both the payee and its document, then return a JSON asset descriptor. Follow its url to retrieve PDF/image bytes; this operation itself does not return a binary file. Treat temporary signed delivery URLs as private capabilities. This read requires high authentication assurance. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Get delivery for a private legal document\n */\nexport const learningDownloadPayeeDocument = async (payeeId: number,\n documentId: number, options?: Parameters<typeof request>[1]): Promise<LearningAssetRead> => {\n\n return request<LearningAssetRead>(getLearningDownloadPayeeDocumentUrl(payeeId,documentId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningListPayeeSettlementsUrl = (payeeId: number,\n params?: LearningListPayeeSettlementsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/finance/payees/${payeeId}/settlements?${stringifiedParams}` : `/learning/finance/payees/${payeeId}/settlements`\n}\n\n/**\n * Page all settlements for this rightsholder, newest year/period/ID first. Each period covers two calendar months. Source component nulls remain unknown even when the displayed payable total applies zero-for-missing arithmetic; an unpaid flag alone is not complete source payment evidence. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary List a rightsholder’s settlements\n */\nexport const learningListPayeeSettlements = async (payeeId: number,\n params?: LearningListPayeeSettlementsParams, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltySettlementPage> => {\n\n return request<LearningRoyaltySettlementPage>(getLearningListPayeeSettlementsUrl(payeeId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningCreatePayeeSettlementUrl = (payeeId: number,) => {\n\n\n\n\n return `/learning/finance/payees/${payeeId}/settlements`\n}\n\n/**\n * Require both monthly periods in the same currency to be approved. period 1 means January–February and period 5 means September–October. Organic totals include slices, sales and bonuses; promotional totals include slices. Payable is max(0, organic + promotional + affiliate - advance), rounded half up to two decimals. Matching retries return the existing native settlement; source or conflicting settlements require review. Creation records accounting and initiates no transfer. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Create a two-month rightsholder settlement\n */\nexport const learningCreatePayeeSettlement = async (payeeId: number,\n learningRoyaltySettlementWrite: LearningRoyaltySettlementWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltySettlementRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltySettlementRead>(getLearningCreatePayeeSettlementUrl(payeeId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltySettlementWrite)\n }\n);}\n\n\nexport const getLearningReadRoyaltyPeriodUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}`\n}\n\n/**\n * Poll state, inputState and generation after requesting calculation. draft → calculating → calculated → approved; failed input preparation is reported by inputState and inputErrorCode. Read channel budgets for channel-specific failures. Approval requires complete inputs and all current budgets. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary Read calculation and approval state\n */\nexport const learningReadRoyaltyPeriod = async (periodId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\n\n return request<LearningRoyaltyPeriodRead>(getLearningReadRoyaltyPeriodUrl(periodId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningSetRoyaltyAdjustmentUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/adjustments`\n}\n\n/**\n * Replace the signed sale and bonus amounts for one course/payee in this period’s catalogue. Adjustments are attached only to the organic channel during calculation, which requires exactly one organic budget when adjustments exist. Historical, approved and running calculations cannot be edited. Success returns no body. Amounts are decimal major currency units, not integer cents. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Set monthly sales and bonus adjustments\n */\nexport const learningSetRoyaltyAdjustment = async (periodId: number,\n learningRoyaltyAdjustmentWrite: LearningRoyaltyAdjustmentWrite, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<void>(getLearningSetRoyaltyAdjustmentUrl(periodId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyAdjustmentWrite)\n }\n);}\n\n\nexport const getLearningListRoyaltyAllocationsUrl = (periodId: number,\n params?: LearningListRoyaltyAllocationsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/finance/periods/${periodId}/allocations?${stringifiedParams}` : `/learning/finance/periods/${periodId}/allocations`\n}\n\n/**\n * Page allocations for the period’s current generation, ordered by allocation ID, including unapproved calculation output for review. Within a channel, each subject contributes one unit split across courses in proportion to eligible seconds; course weight sums those fractions. Native percentage is that weight divided by the budget’s subject count times 100. sliceAmount additionally applies rightsholder share and channel coefficient; sales/bonuses are separate organic adjustments. Imported unknown percentages remain null. Amounts are decimal major currency units, not integer cents. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary Inspect the month’s current allocations\n */\nexport const learningListRoyaltyAllocations = async (periodId: number,\n params?: LearningListRoyaltyAllocationsParams, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyAllocationPage> => {\n\n return request<LearningRoyaltyAllocationPage>(getLearningListRoyaltyAllocationsUrl(periodId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningApproveRoyaltyCalculationUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/approve`\n}\n\n/**\n * Make a native month immutable after the input snapshot and every channel budget complete in expectedGeneration. Repeating approval of that same generation returns its approved state. Only approved allocations are visible through payee allocation history and eligible for settlement. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Approve a completed royalty generation\n */\nexport const learningApproveRoyaltyCalculation = async (periodId: number,\n learningRoyaltyApprovalWrite: LearningRoyaltyApprovalWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltyPeriodRead>(getLearningApproveRoyaltyCalculationUrl(periodId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyApprovalWrite)\n }\n);}\n\n\nexport const getLearningListRoyaltyBudgetsUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/budgets`\n}\n\n/**\n * List every budget for the month, ordered by ID. Compare each budget generation with its period before reviewing results. inputSubjectCount is the distinct subject denominator of the frozen activity population, not minutes or lesson counts. Amounts are decimal major currency units, not integer cents. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused.\n * @summary List channel budgets and calculation results\n */\nexport const learningListRoyaltyBudgets = async (periodId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyBudgetListRead> => {\n\n return request<LearningRoyaltyBudgetListRead>(getLearningListRoyaltyBudgetsUrl(periodId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningSetRoyaltyBudgetUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/budgets`\n}\n\n/**\n * Create or replace the channel budget for an editable period. amount is nonnegative with at most eight decimal places and 24 total digits, in the period’s currency. Editing calculated inputs advances the period generation and returns it to draft; historical, approved and running calculations cannot be edited. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Set a channel’s monthly royalty pool\n */\nexport const learningSetRoyaltyBudget = async (periodId: number,\n learningRoyaltyBudgetWrite: LearningRoyaltyBudgetWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyBudgetRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltyBudgetRead>(getLearningSetRoyaltyBudgetUrl(periodId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyBudgetWrite)\n }\n);}\n\n\nexport const getLearningRequestRoyaltyCalculationUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/calculate`\n}\n\n/**\n * Freeze applicable agreements, channels, adjustments and activity cutoff, then queue input and channel processing. The month must have closed in Europe/Paris and have at least one active channel budget. Poll the period and budgets. Repeating while calculating requeues failed work without replacing frozen facts; an already calculated period returns its current result. HTTP 202 is acceptance, not approval or payment. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Queue a closed month’s royalty calculation\n */\nexport const learningRequestRoyaltyCalculation = async (periodId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\n\n return request<LearningRoyaltyPeriodRead>(getLearningRequestRoyaltyCalculationUrl(periodId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getLearningResetRoyaltyCalculationUrl = (periodId: number,) => {\n\n\n\n\n return `/learning/finance/periods/${periodId}/reset`\n}\n\n/**\n * Require the generation just reviewed, advance it, clear frozen inputs and worker claims, and reset channel budgets to draft. This permits corrected inputs after a failed or unwanted calculation. Historical and approved months are immutable. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Invalidate an unapproved calculation\n */\nexport const learningResetRoyaltyCalculation = async (periodId: number,\n learningRoyaltyApprovalWrite: LearningRoyaltyApprovalWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyPeriodRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltyPeriodRead>(getLearningResetRoyaltyCalculationUrl(periodId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyApprovalWrite)\n }\n);}\n\n\nexport const getLearningReadRoyaltySettlementUrl = (settlementId: number,) => {\n\n\n\n\n return `/learning/finance/settlements/${settlementId}`\n}\n\n/**\n * Read the two-month components, computed payable amount and recorded payment status. A historical settlement without a resolved payee requires catalogue finance authority; otherwise the linked rightsholder may read it. Amounts are decimal major currency units, not integer cents. Available to the linked independent rightsholder or catalogue finance/global commercial authority; support impersonation is refused.\n * @summary Read a rightsholder settlement\n */\nexport const learningReadRoyaltySettlement = async (settlementId: number, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltySettlementRead> => {\n\n return request<LearningRoyaltySettlementRead>(getLearningReadRoyaltySettlementUrl(settlementId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningIssueRoyaltyInvoiceUrl = (settlementId: number,) => {\n\n\n\n\n return `/learning/finance/settlements/${settlementId}/invoice`\n}\n\n/**\n * Snapshot the rightsholder’s complete billing address, recipient, settlement net amount and percentage tax rate. Generate a native number per payee/year. Matching recipient/tax retries return the existing invoice; issued facts cannot be replaced. The example EUR 590 net at 20% produces EUR 118 tax and EUR 708 total in the PDF. Issuance does not mark the settlement paid. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Issue an immutable royalty invoice\n */\nexport const learningIssueRoyaltyInvoice = async (settlementId: number,\n learningRoyaltyInvoiceWrite: LearningRoyaltyInvoiceWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltyInvoiceRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltyInvoiceRead>(getLearningIssueRoyaltyInvoiceUrl(settlementId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyInvoiceWrite)\n }\n);}\n\n\nexport const getLearningRecordRoyaltyPaymentUrl = (settlementId: number,) => {\n\n\n\n\n return `/learning/finance/settlements/${settlementId}/paid`\n}\n\n/**\n * Mark the settlement paid using external accounting evidence and record the current time as paidAt. This operation never initiates a bank transfer or sends money. A matching paymentReference is idempotent; different existing evidence conflicts. Historical unresolved payee/payment facts must first be reconciled. Available to an independent profile with this catalogue’s finance grant or global commercial authority; support impersonation is refused. Mutations require high authentication assurance.\n * @summary Record an observed royalty payment\n */\nexport const learningRecordRoyaltyPayment = async (settlementId: number,\n learningRoyaltyPaidWrite: LearningRoyaltyPaidWrite, options?: Parameters<typeof request>[1]): Promise<LearningRoyaltySettlementRead> => {\n\n const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {\n if (!h) return {};\n if (h instanceof Headers) return Object.fromEntries(h.entries());\n if (Symbol.iterator in h) {\n return Object.fromEntries(\n Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),\n );\n }\n const headers: Record<string, string | readonly string[]> = {};\n for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {\n if (value !== undefined) headers[name] = value;\n }\n return headers;\n };\nreturn request<LearningRoyaltySettlementRead>(getLearningRecordRoyaltyPaymentUrl(settlementId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningRoyaltyPaidWrite)\n }\n);}\n\n\n"],"mappings":";;;AA+CA,MAAa,qCAAqC,gBAAyB;CAKzE,OAAO,gCAAgC,YAAY;AACrD;;;;;AAMA,MAAa,8BAA8B,OAAO,aAC9C,kCAAoE,YAAmF;CAEvJ,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IAAI,OAAO,YAAY,GACrB,OAAO,OAAO,YACZ,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAsC,kCAAkC,WAAW,GACxF;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,gCAAgC;CACvD,CACF;AAAE;AAGF,MAAa,0CAA0C,gBAAyB;CAK9E,OAAO,gCAAgC,YAAY;AACrD;;;;;AAMA,MAAa,mCAAmC,OAAO,aAAqB,YAA8E;CAExJ,OAAO,QAAiC,uCAAuC,WAAW,GAC1F;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,2CAA2C,gBAAyB;CAK/E,OAAO,gCAAgC,YAAY;AACrD;;;;;AAMA,MAAa,oCAAoC,OAAO,aACpD,sBAA4C,YAA0E;CAEtH,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,C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,KAAK,UAAU,wBAAwB;CAC/C,CACF;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { Cs as LearningEngagementRead, Do as LearningPartnerFeedWrite, Fa as LearningSalesforceBindingWrite, Gs as LearningContractMemberRead, Ss as LearningEngagementWrite, _s as LearningIntegrationDeliveryRead, ah as CourseRevisionRead, hs as LearningIntegrationResolutionWrite, ma as LearningTypeformWebhookBody, wa as LearningSsoProofWrite } from "../chunks/index.js";
2
+ import { Cs as LearningEngagementWrite, Ia as LearningSalesforceBindingWrite, Ks as LearningContractMemberRead, Oo as LearningPartnerFeedWrite, Ta as LearningSsoProofWrite, gs as LearningIntegrationResolutionWrite, ha as LearningTypeformWebhookBody, sh as CourseRevisionRead, vs as LearningIntegrationDeliveryRead, ws as LearningEngagementRead } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/biblio-learning-integrations/biblio-learning-integrations.d.ts
5
5
  export declare const getLearningImportPartnerFeedUrl: (courseId: number, provider: 'codes-rousseau' | 'les-bons-profs' | 'loecsen') => string;
@@ -1 +1 @@
1
- {"version":3,"file":"biblio-learning-integrations.js","names":[],"sources":["../../src/api/biblio-learning-integrations/biblio-learning-integrations.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 CourseRevisionRead,\n LearningContractMemberRead,\n LearningEngagementRead,\n LearningEngagementWrite,\n LearningIntegrationDeliveryRead,\n LearningIntegrationResolutionWrite,\n LearningPartnerFeedWrite,\n LearningSalesforceBindingWrite,\n LearningSsoProofWrite,\n LearningTypeformWebhookBody\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getLearningImportPartnerFeedUrl = (courseId: number,\n provider: 'codes-rousseau' | 'les-bons-profs' | 'loecsen',) => {\n\n\n\n\n return `/learning/author/courses/${courseId}/imports/${provider}`\n}\n\n/**\n * Authors import content for an existing course they may edit. Select provider=codes-rousseau for a 17-column semicolon CSV (default skipRows=1, title required); les-bons-profs for JSON section objects encoded in the content string; or loecsen for a 20-column comma CSV (default skipRows=4), reviewed template, languageName, languageCode and templateAudio mappings. Examples set skipRows=0 because they contain data rows only. assetMap translates source references to already imported assets the caller may use. Import validates the entire definition, creates a draft and does not download media, publish the course or provision a provider account. The response describes the new revision; retrieve its author definition to inspect the generated chapters and lessons.\n * @summary Import a partner feed as a native draft revision\n */\nexport const learningImportPartnerFeed = async (courseId: number,\n provider: 'codes-rousseau' | 'les-bons-profs' | 'loecsen',\n learningPartnerFeedWrite: LearningPartnerFeedWrite, options?: Parameters<typeof request>[1]): Promise<CourseRevisionRead> => {\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<CourseRevisionRead>(getLearningImportPartnerFeedUrl(courseId,provider),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPartnerFeedWrite)\n }\n);}\n\n\nexport const getLearningDispatchEngagementUrl = (deliveryId: number,) => {\n\n\n\n\n return `/learning/integrations/braze/deliveries/${deliveryId}/dispatch`\n}\n\n/**\n * A global integration operator dispatches the existing pending delivery after checking current consent and earlier deliveries for the same profile. Nonpending rows are returned unchanged. The result can be sent, failed, uncertain or cancelled; HTTP 200 alone does not confirm delivery. A timeout or ambiguous provider acknowledgement becomes uncertain and is never blindly retried. Resolve uncertainty using external evidence before redispatching; newer deliveries wait for earlier unresolved rows.\n * @summary Dispatch one pending Braze delivery\n */\nexport const learningDispatchEngagement = async (deliveryId: number, options?: Parameters<typeof request>[1]): Promise<LearningIntegrationDeliveryRead> => {\n\n return request<LearningIntegrationDeliveryRead>(getLearningDispatchEngagementUrl(deliveryId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getLearningResolveEngagementUrl = (deliveryId: number,) => {\n\n\n\n\n return `/learning/integrations/braze/deliveries/${deliveryId}/resolve`\n}\n\n/**\n * A global integration operator records a reviewed provider outcome for a failed, uncertain or stale sending delivery. confirmed_sent marks it sent and clears stored properties; confirmed_not_sent returns it to pending for a later explicit dispatch. A sending claim younger than 120 seconds cannot be resolved. This operation records evidence and never sends to Braze itself.\n * @summary Resolve an uncertain or failed Braze delivery\n */\nexport const learningResolveEngagement = async (deliveryId: number,\n learningIntegrationResolutionWrite: LearningIntegrationResolutionWrite, options?: Parameters<typeof request>[1]): Promise<LearningIntegrationDeliveryRead> => {\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<LearningIntegrationDeliveryRead>(getLearningResolveEngagementUrl(deliveryId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningIntegrationResolutionWrite)\n }\n);}\n\n\nexport const getLearningBindSalesforceUrl = (tenantId: number,) => {\n\n\n\n\n return `/learning/integrations/salesforce/customers/${tenantId}`\n}\n\n/**\n * A global commercial operator maps one customer tenant to an exact Salesforce Account, community, catalogue and exclusive institution learning agreement. Repeating the same identity can update isActive and clockZone; moving an already bound identity or agreement returns 409. clockZone is the reviewed IANA source timezone used to interpret source access dates. Support impersonation and dependent profiles are refused. Returns 204 with no response body.\n * @summary Bind a reviewed Salesforce customer identity\n */\nexport const learningBindSalesforce = async (tenantId: number,\n learningSalesforceBindingWrite: LearningSalesforceBindingWrite, 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>(getLearningBindSalesforceUrl(tenantId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningSalesforceBindingWrite)\n }\n);}\n\n\nexport const getLearningEngagementPreferenceUrl = () => {\n\n\n\n\n return `/learning/me/engagement`\n}\n\n/**\n * Return the local engagement consent state without contacting Braze. An absent preference is enabled=false and emailOptIn=null. Null emailOptIn means no explicit email subscription preference was supplied; it is distinct from a confirmed opt-out.\n * @summary Read the current profile's engagement preference\n */\nexport const learningEngagementPreference = async ( options?: Parameters<typeof request>[1]): Promise<LearningEngagementRead> => {\n\n return request<LearningEngagementRead>(getLearningEngagementPreferenceUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningSetEngagementPreferenceUrl = () => {\n\n\n\n\n return `/learning/me/engagement`\n}\n\n/**\n * An independent profile explicitly enables or disables engagement and supplies an optional email opt-in. Enabling queues provider attributes; disabling cancels pending/failed deliveries and queues deletion when previously enabled. Personal email is sent only with emailOptIn=true. The response confirms local consent storage, not provider delivery. Repeating unchanged preferences queues no duplicate update. Support impersonation and dependent profiles are refused.\n * @summary Set engagement consent and email preference\n */\nexport const learningSetEngagementPreference = async (learningEngagementWrite: LearningEngagementWrite, options?: Parameters<typeof request>[1]): Promise<LearningEngagementRead> => {\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<LearningEngagementRead>(getLearningSetEngagementPreferenceUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningEngagementWrite)\n }\n);}\n\n\nexport const getLearningLinkPartnerIdentityUrl = (bindingKey: string,) => {\n\n\n\n\n return `/learning/me/integrations/sso/${bindingKey}/link`\n}\n\n/**\n * An already authenticated independent profile presents a one-use partner proof for a reviewed bindingKey. The configured CAS, Wizbii or Iguana protocol verifies the proof before linking the identity and bounded catalogue membership. Wizbii also requires username. This endpoint returns membership, not an OAuth token or a seamless login redirect. It cannot select another beneficiary, replace a revoked membership, or claim an identity linked to someone else. A stronger login with entitlement-change authority is required; support impersonation is refused. Proof replay is blocked for 24 hours.\n * @summary Link a verified partner identity to the current profile\n */\nexport const learningLinkPartnerIdentity = async (bindingKey: string,\n learningSsoProofWrite: LearningSsoProofWrite, options?: Parameters<typeof request>[1]): Promise<LearningContractMemberRead> => {\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<LearningContractMemberRead>(getLearningLinkPartnerIdentityUrl(bindingKey),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningSsoProofWrite)\n }\n);}\n\n\nexport const getLearningSalesforceWebhookUrl = () => {\n\n\n\n\n return `/learning/webhooks/salesforce`\n}\n\n/**\n * Accept a SOAP XML Account notification batch up to 1 MiB with 1–100 unique notification IDs. OrganizationId and EnterpriseUrl must exactly match the configured source. Salesforce Send Session ID must be enabled: the server verifies that session, then fetches authoritative Account snapshots before updating only reviewed customer bindings. Embedded notification fields do not themselves grant authority. Replay receipts prevent conflicting reuse; unknown bindings or ambiguous source data require review. Successful processing returns the Salesforce text/xml Ack envelope. The synthetic session below is a transport fixture and cannot authenticate against a real source.\n * @summary Receive a verified Salesforce SOAP notification\n */\nexport const learningSalesforceWebhook = async (learningSalesforceWebhookBody: string, options?: Parameters<typeof request>[1]): Promise<string> => {\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<string>(getLearningSalesforceWebhookUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'text/xml', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningSalesforceWebhookBody)\n }\n);}\n\n\nexport const getLearningTypeformWebhookUrl = () => {\n\n\n\n\n return `/learning/webhooks/typeform`\n}\n\n/**\n * Verify typeform-signature as sha256= followed by base64 HMAC-SHA256 of the exact raw request bytes using the configured shared secret. This callback authenticates the provider signature, not a user bearer token. form_response.hidden.mozaik_token must be the existing opaque 43-character invitation; it binds the profile, course, tenant and progress. The configured form ID and exactly one integer answer for the configured rating field are required; at most 100 answers and 1 MiB of raw body are accepted. Only configured text comment fields are collected. First acceptance consumes the invitation; an identical normalized response token/body retry is idempotent, a changed response conflicts, and an unconsumed expired invitation returns 410. Success returns no body.\n * @summary Accept a signed Typeform course survey\n */\nexport const learningTypeformWebhook = async (learningTypeformWebhookBody: LearningTypeformWebhookBody, 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>(getLearningTypeformWebhookUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningTypeformWebhookBody)\n }\n);}\n\n\n"],"mappings":";;;AAsBA,MAAa,mCAAmC,UAC5C,aAA+D;CAKjE,OAAO,4BAA4B,SAAS,WAAW;AACzD;;;;;AAMA,MAAa,4BAA4B,OAAO,UAC5C,UACA,0BAAoD,YAAyE;CAE7H,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,IAAk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K,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAgB,gCAAgC,GACrD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAY,GAAG,WAAW,SAAS,OAAO;EAAE;EACvE,MAAM,KAAK,UAAU,6BAA6B;CACpD,CACF;AAAE;AAGF,MAAa,sCAAsC;CAKjD,OAAO;AACT;;;;;AAMA,MAAa,0BAA0B,OAAO,6BAA0D,YAA2D;CAE/J,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,8BAA8B,GACjD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,2BAA2B;CAClD,CACF;AAAE"}
1
+ {"version":3,"file":"biblio-learning-integrations.js","names":[],"sources":["../../src/api/biblio-learning-integrations/biblio-learning-integrations.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.15.0\n */\nimport type {\n CourseRevisionRead,\n LearningContractMemberRead,\n LearningEngagementRead,\n LearningEngagementWrite,\n LearningIntegrationDeliveryRead,\n LearningIntegrationResolutionWrite,\n LearningPartnerFeedWrite,\n LearningSalesforceBindingWrite,\n LearningSsoProofWrite,\n LearningTypeformWebhookBody\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getLearningImportPartnerFeedUrl = (courseId: number,\n provider: 'codes-rousseau' | 'les-bons-profs' | 'loecsen',) => {\n\n\n\n\n return `/learning/author/courses/${courseId}/imports/${provider}`\n}\n\n/**\n * Authors import content for an existing course they may edit. Select provider=codes-rousseau for a 17-column semicolon CSV (default skipRows=1, title required); les-bons-profs for JSON section objects encoded in the content string; or loecsen for a 20-column comma CSV (default skipRows=4), reviewed template, languageName, languageCode and templateAudio mappings. Examples set skipRows=0 because they contain data rows only. assetMap translates source references to already imported assets the caller may use. Import validates the entire definition, creates a draft and does not download media, publish the course or provision a provider account. The response describes the new revision; retrieve its author definition to inspect the generated chapters and lessons.\n * @summary Import a partner feed as a native draft revision\n */\nexport const learningImportPartnerFeed = async (courseId: number,\n provider: 'codes-rousseau' | 'les-bons-profs' | 'loecsen',\n learningPartnerFeedWrite: LearningPartnerFeedWrite, options?: Parameters<typeof request>[1]): Promise<CourseRevisionRead> => {\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<CourseRevisionRead>(getLearningImportPartnerFeedUrl(courseId,provider),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningPartnerFeedWrite)\n }\n);}\n\n\nexport const getLearningDispatchEngagementUrl = (deliveryId: number,) => {\n\n\n\n\n return `/learning/integrations/braze/deliveries/${deliveryId}/dispatch`\n}\n\n/**\n * A global integration operator dispatches the existing pending delivery after checking current consent and earlier deliveries for the same profile. Nonpending rows are returned unchanged. The result can be sent, failed, uncertain or cancelled; HTTP 200 alone does not confirm delivery. A timeout or ambiguous provider acknowledgement becomes uncertain and is never blindly retried. Resolve uncertainty using external evidence before redispatching; newer deliveries wait for earlier unresolved rows.\n * @summary Dispatch one pending Braze delivery\n */\nexport const learningDispatchEngagement = async (deliveryId: number, options?: Parameters<typeof request>[1]): Promise<LearningIntegrationDeliveryRead> => {\n\n return request<LearningIntegrationDeliveryRead>(getLearningDispatchEngagementUrl(deliveryId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getLearningResolveEngagementUrl = (deliveryId: number,) => {\n\n\n\n\n return `/learning/integrations/braze/deliveries/${deliveryId}/resolve`\n}\n\n/**\n * A global integration operator records a reviewed provider outcome for a failed, uncertain or stale sending delivery. confirmed_sent marks it sent and clears stored properties; confirmed_not_sent returns it to pending for a later explicit dispatch. A sending claim younger than 120 seconds cannot be resolved. This operation records evidence and never sends to Braze itself.\n * @summary Resolve an uncertain or failed Braze delivery\n */\nexport const learningResolveEngagement = async (deliveryId: number,\n learningIntegrationResolutionWrite: LearningIntegrationResolutionWrite, options?: Parameters<typeof request>[1]): Promise<LearningIntegrationDeliveryRead> => {\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<LearningIntegrationDeliveryRead>(getLearningResolveEngagementUrl(deliveryId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningIntegrationResolutionWrite)\n }\n);}\n\n\nexport const getLearningBindSalesforceUrl = (tenantId: number,) => {\n\n\n\n\n return `/learning/integrations/salesforce/customers/${tenantId}`\n}\n\n/**\n * A global commercial operator maps one customer tenant to an exact Salesforce Account, community, catalogue and exclusive institution learning agreement. Repeating the same identity can update isActive and clockZone; moving an already bound identity or agreement returns 409. clockZone is the reviewed IANA source timezone used to interpret source access dates. Support impersonation and dependent profiles are refused. Returns 204 with no response body.\n * @summary Bind a reviewed Salesforce customer identity\n */\nexport const learningBindSalesforce = async (tenantId: number,\n learningSalesforceBindingWrite: LearningSalesforceBindingWrite, 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>(getLearningBindSalesforceUrl(tenantId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningSalesforceBindingWrite)\n }\n);}\n\n\nexport const getLearningEngagementPreferenceUrl = () => {\n\n\n\n\n return `/learning/me/engagement`\n}\n\n/**\n * Return the local engagement consent state without contacting Braze. An absent preference is enabled=false and emailOptIn=null. Null emailOptIn means no explicit email subscription preference was supplied; it is distinct from a confirmed opt-out.\n * @summary Read the current profile's engagement preference\n */\nexport const learningEngagementPreference = async ( options?: Parameters<typeof request>[1]): Promise<LearningEngagementRead> => {\n\n return request<LearningEngagementRead>(getLearningEngagementPreferenceUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningSetEngagementPreferenceUrl = () => {\n\n\n\n\n return `/learning/me/engagement`\n}\n\n/**\n * An independent profile explicitly enables or disables engagement and supplies an optional email opt-in. Enabling queues provider attributes; disabling cancels pending/failed deliveries and queues deletion when previously enabled. Personal email is sent only with emailOptIn=true. The response confirms local consent storage, not provider delivery. Repeating unchanged preferences queues no duplicate update. Support impersonation and dependent profiles are refused.\n * @summary Set engagement consent and email preference\n */\nexport const learningSetEngagementPreference = async (learningEngagementWrite: LearningEngagementWrite, options?: Parameters<typeof request>[1]): Promise<LearningEngagementRead> => {\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<LearningEngagementRead>(getLearningSetEngagementPreferenceUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningEngagementWrite)\n }\n);}\n\n\nexport const getLearningLinkPartnerIdentityUrl = (bindingKey: string,) => {\n\n\n\n\n return `/learning/me/integrations/sso/${bindingKey}/link`\n}\n\n/**\n * An already authenticated independent profile presents a one-use partner proof for a reviewed bindingKey. The configured CAS, Wizbii or Iguana protocol verifies the proof before linking the identity and bounded catalogue membership. Wizbii also requires username. This endpoint returns membership, not an OAuth token or a seamless login redirect. It cannot select another beneficiary, replace a revoked membership, or claim an identity linked to someone else. A stronger login with entitlement-change authority is required; support impersonation is refused. Proof replay is blocked for 24 hours.\n * @summary Link a verified partner identity to the current profile\n */\nexport const learningLinkPartnerIdentity = async (bindingKey: string,\n learningSsoProofWrite: LearningSsoProofWrite, options?: Parameters<typeof request>[1]): Promise<LearningContractMemberRead> => {\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<LearningContractMemberRead>(getLearningLinkPartnerIdentityUrl(bindingKey),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningSsoProofWrite)\n }\n);}\n\n\nexport const getLearningSalesforceWebhookUrl = () => {\n\n\n\n\n return `/learning/webhooks/salesforce`\n}\n\n/**\n * Accept a SOAP XML Account notification batch up to 1 MiB with 1–100 unique notification IDs. OrganizationId and EnterpriseUrl must exactly match the configured source. Salesforce Send Session ID must be enabled: the server verifies that session, then fetches authoritative Account snapshots before updating only reviewed customer bindings. Embedded notification fields do not themselves grant authority. Replay receipts prevent conflicting reuse; unknown bindings or ambiguous source data require review. Successful processing returns the Salesforce text/xml Ack envelope. The synthetic session below is a transport fixture and cannot authenticate against a real source.\n * @summary Receive a verified Salesforce SOAP notification\n */\nexport const learningSalesforceWebhook = async (learningSalesforceWebhookBody: string, options?: Parameters<typeof request>[1]): Promise<string> => {\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<string>(getLearningSalesforceWebhookUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'text/xml', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningSalesforceWebhookBody)\n }\n);}\n\n\nexport const getLearningTypeformWebhookUrl = () => {\n\n\n\n\n return `/learning/webhooks/typeform`\n}\n\n/**\n * Verify typeform-signature as sha256= followed by base64 HMAC-SHA256 of the exact raw request bytes using the configured shared secret. This callback authenticates the provider signature, not a user bearer token. form_response.hidden.mozaik_token must be the existing opaque 43-character invitation; it binds the profile, course, tenant and progress. The configured form ID and exactly one integer answer for the configured rating field are required; at most 100 answers and 1 MiB of raw body are accepted. Only configured text comment fields are collected. First acceptance consumes the invitation; an identical normalized response token/body retry is idempotent, a changed response conflicts, and an unconsumed expired invitation returns 410. Success returns no body.\n * @summary Accept a signed Typeform course survey\n */\nexport const learningTypeformWebhook = async (learningTypeformWebhookBody: LearningTypeformWebhookBody, 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>(getLearningTypeformWebhookUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningTypeformWebhookBody)\n }\n);}\n\n\n"],"mappings":";;;AAsBA,MAAa,mCAAmC,UAC5C,aAA+D;CAKjE,OAAO,4BAA4B,SAAS,WAAW;AACzD;;;;;AAMA,MAAa,4B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us as LearningContractMemberWrite, Ws as LearningContractMemberPage, zo as LearningOwnMembershipHistoryParams } from "../chunks/index.js";
2
+ import { Bo as LearningOwnMembershipHistoryParams, Gs as LearningContractMemberPage, Ks as LearningContractMemberRead, Uo as LearningMembershipHistoryPage, Ws as LearningContractMemberWrite, zo as LearningOwnMembershipsParams } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/biblio-learning-membership/biblio-learning-membership.d.ts
5
5
  export declare const getLearningAssignContractMemberUrl: (contractId: number) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"biblio-learning-membership.js","names":[],"sources":["../../src/api/biblio-learning-membership/biblio-learning-membership.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 LearningContractMemberPage,\n LearningContractMemberRead,\n LearningContractMemberWrite,\n LearningMembershipHistoryPage,\n LearningOwnMembershipHistoryParams,\n LearningOwnMembershipsParams\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getLearningAssignContractMemberUrl = (contractId: number,) => {\n\n\n\n\n return `/learning/administration/contracts/${contractId}/members`\n}\n\n/**\n * Upsert the (contract, catalogue, user) assignment. Requires an independent global commercial operator with high authentication assurance and refuses support impersonation. The contract must be a customer agreement, not a personally owned subscription, and must already contain an entitlement allocation qualified by this exact learning catalogue. An active assignment permits only grants under that same contract/catalogue; it does not expose unqualified allocations or other catalogues. All existing contract/grant windows, resource qualifiers, exclusions and profile gates still apply. Household inheritance is explicit and optional.\n * @summary Assign or revoke a customer agreement beneficiary\n */\nexport const learningAssignContractMember = async (contractId: number,\n learningContractMemberWrite: LearningContractMemberWrite, options?: Parameters<typeof request>[1]): Promise<LearningContractMemberRead> => {\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<LearningContractMemberRead>(getLearningAssignContractMemberUrl(contractId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningContractMemberWrite)\n }\n);}\n\n\nexport const getLearningOwnMembershipsUrl = (params?: LearningOwnMembershipsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/memberships?${stringifiedParams}` : `/learning/memberships`\n}\n\n/**\n * Page explicit assignments for the effective profile plus assignments belonging to its parent beneficiary when inheritHousehold is true. Includes inactive, future and expired assignments, ordered by membership ID; presence is not proof of current entitlement. Catalogue qualification applies to the same grant/contract and never opens unqualified allocations. Profile, contract, grant, exclusion and date checks determine actual reading rights.\n * @summary List the profile’s agreement assignments\n */\nexport const learningOwnMemberships = async (params?: LearningOwnMembershipsParams, options?: Parameters<typeof request>[1]): Promise<LearningContractMemberPage> => {\n\n return request<LearningContractMemberPage>(getLearningOwnMembershipsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningOwnMembershipHistoryUrl = (params?: LearningOwnMembershipHistoryParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/memberships/history?${stringifiedParams}` : `/learning/memberships/history`\n}\n\n/**\n * Page only this effective profile’s passive organisation history, newest known joinedAt first, null joinedAt last, then ID descending. Household inheritance does not expose another person’s history. Source local clock strings are evidence, not timezone-aware instants; unresolved dates and contract links remain null. History never creates or revives membership or reading authority.\n * @summary List the profile’s historical organisation evidence\n */\nexport const learningOwnMembershipHistory = async (params?: LearningOwnMembershipHistoryParams, options?: Parameters<typeof request>[1]): Promise<LearningMembershipHistoryPage> => {\n\n return request<LearningMembershipHistoryPage>(getLearningOwnMembershipHistoryUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAkBA,MAAa,sCAAsC,eAAwB;CAKzE,OAAO,sCAAsC,WAAW;AAC1D;;;;;AAMA,MAAa,+BAA+B,OAAO,YAC/C,6BAA0D,YAAiF;CAE3I,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,QAAoC,mCAAmC,UAAU,GACtF;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,2BAA2B;CAClD,CACF;AAAE;AAGF,MAAa,gCAAgC,WAA2C;CACtF,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,yBAAyB,sBAAsB;AACvF;;;;;AAMA,MAAa,yBAAyB,OAAO,QAAuC,YAAiF;CAEnK,OAAO,QAAoC,6BAA6B,MAAM,GAC9E;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,sCAAsC,WAAiD;CAClG,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,iCAAiC,sBAAsB;AAC/F;;;;;AAMA,MAAa,+BAA+B,OAAO,QAA6C,YAAoF;CAElL,OAAO,QAAuC,mCAAmC,MAAM,GACvF;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
1
+ {"version":3,"file":"biblio-learning-membership.js","names":[],"sources":["../../src/api/biblio-learning-membership/biblio-learning-membership.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.15.0\n */\nimport type {\n LearningContractMemberPage,\n LearningContractMemberRead,\n LearningContractMemberWrite,\n LearningMembershipHistoryPage,\n LearningOwnMembershipHistoryParams,\n LearningOwnMembershipsParams\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getLearningAssignContractMemberUrl = (contractId: number,) => {\n\n\n\n\n return `/learning/administration/contracts/${contractId}/members`\n}\n\n/**\n * Upsert the (contract, catalogue, user) assignment. Requires an independent global commercial operator with high authentication assurance and refuses support impersonation. The contract must be a customer agreement, not a personally owned subscription, and must already contain an entitlement allocation qualified by this exact learning catalogue. An active assignment permits only grants under that same contract/catalogue; it does not expose unqualified allocations or other catalogues. All existing contract/grant windows, resource qualifiers, exclusions and profile gates still apply. Household inheritance is explicit and optional.\n * @summary Assign or revoke a customer agreement beneficiary\n */\nexport const learningAssignContractMember = async (contractId: number,\n learningContractMemberWrite: LearningContractMemberWrite, options?: Parameters<typeof request>[1]): Promise<LearningContractMemberRead> => {\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<LearningContractMemberRead>(getLearningAssignContractMemberUrl(contractId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(learningContractMemberWrite)\n }\n);}\n\n\nexport const getLearningOwnMembershipsUrl = (params?: LearningOwnMembershipsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/memberships?${stringifiedParams}` : `/learning/memberships`\n}\n\n/**\n * Page explicit assignments for the effective profile plus assignments belonging to its parent beneficiary when inheritHousehold is true. Includes inactive, future and expired assignments, ordered by membership ID; presence is not proof of current entitlement. Catalogue qualification applies to the same grant/contract and never opens unqualified allocations. Profile, contract, grant, exclusion and date checks determine actual reading rights.\n * @summary List the profile’s agreement assignments\n */\nexport const learningOwnMemberships = async (params?: LearningOwnMembershipsParams, options?: Parameters<typeof request>[1]): Promise<LearningContractMemberPage> => {\n\n return request<LearningContractMemberPage>(getLearningOwnMembershipsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getLearningOwnMembershipHistoryUrl = (params?: LearningOwnMembershipHistoryParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/learning/memberships/history?${stringifiedParams}` : `/learning/memberships/history`\n}\n\n/**\n * Page only this effective profile’s passive organisation history, newest known joinedAt first, null joinedAt last, then ID descending. Household inheritance does not expose another person’s history. Source local clock strings are evidence, not timezone-aware instants; unresolved dates and contract links remain null. History never creates or revives membership or reading authority.\n * @summary List the profile’s historical organisation evidence\n */\nexport const learningOwnMembershipHistory = async (params?: LearningOwnMembershipHistoryParams, options?: Parameters<typeof request>[1]): Promise<LearningMembershipHistoryPage> => {\n\n return request<LearningMembershipHistoryPage>(getLearningOwnMembershipHistoryUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAkBA,MAAa,sCAAsC,eAAwB;CAKzE,OAAO,sCAAsC,WAAW;AAC1D;;;;;AAMA,MAAa,+BAA+B,OAAO,YAC/C,6BAA0D,YAAiF;CAE3I,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,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;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { Aa as LearningSelectionEvidenceRead, Ao as LearningPageEvidenceParams, Bc as LearningAnswerSelectionEvidenceParams, Da as LearningSelfRatingWrite, Ea as LearningSessionRead, Fo as LearningPageEvidenceDetailRead, Ic as LearningAssetRead, Na as LearningScoreSummaryPage, Oa as LearningSelfRatingRead, Om as LessonProgressRead, Rc as LearningAnswerWrite, Rs as LearningCourseRead, Sc as LearningAttemptRead, Ta as LearningSessionStartWrite, Wc as LearningActivityWrite, Wo as LearningListScoreHistoryParams, Xs as LearningCertificateRead, bo as LearningPathOpenWrite, da as LearningUploadWrite, ds as LearningLessonOpenRead, es as LearningListAttemptHistoryParams, fs as LearningVocabularyRead, gm as CourseEditionUpgradeWrite, i as VocabularyProgressRead, ja as LearningSelectedPagePage, jc as LearningAttemptEvidenceRead, jo as LearningPageEvidencePage, ka as LearningSelectionEvidencePage, mm as CourseEnrollmentPage, oo as LearningReadVocabularyParams, pa as LearningUploadRead, pm as CourseEnrollmentWrite, r as VocabularyProgressWrite, sa as LessonProgressWrite, so as LearningReadEnrollmentHistoryParams, ua as LearningVocabularyResourceParams, us as LearningLessonOpenWrite, vs as LearningHistoricalSelectedPagesParams, xc as LearningAttemptStartWrite, yc as LearningAttemptSummaryPage, yo as LearningPathProgressRead } from "../chunks/index.js";
2
+ import { Aa as LearningSelectionEvidencePage, Am as LessonProgressRead, Cc as LearningAttemptRead, Da as LearningSessionRead, Ea as LearningSessionStartWrite, Gc as LearningActivityWrite, Go as LearningListScoreHistoryParams, Io as LearningPageEvidenceDetailRead, Lc as LearningAssetRead, Ma as LearningSelectedPagePage, Mc as LearningAttemptEvidenceRead, Mo as LearningPageEvidencePage, Oa as LearningSelfRatingWrite, Pa as LearningScoreSummaryPage, Sc as LearningAttemptStartWrite, Vc as LearningAnswerSelectionEvidenceParams, Zs as LearningCertificateRead, bc as LearningAttemptSummaryPage, bo as LearningPathProgressRead, ca as LessonProgressWrite, co as LearningReadEnrollmentHistoryParams, da as LearningVocabularyResourceParams, ds as LearningLessonOpenWrite, fa as LearningUploadWrite, fs as LearningLessonOpenRead, gm as CourseEnrollmentPage, hm as CourseEnrollmentWrite, i as VocabularyProgressRead, ja as LearningSelectionEvidenceRead, jo as LearningPageEvidenceParams, ka as LearningSelfRatingRead, ma as LearningUploadRead, ps as LearningVocabularyRead, r as VocabularyProgressWrite, so as LearningReadVocabularyParams, ts as LearningListAttemptHistoryParams, vm as CourseEditionUpgradeWrite, xo as LearningPathOpenWrite, ys as LearningHistoricalSelectedPagesParams, zc as LearningAnswerWrite, zs as LearningCourseRead } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/biblio-learning/biblio-learning.d.ts
5
5
  export declare const getLearningStartAttemptUrl: (assessmentId: number) => string;