@learnorama/mozaik-sdk 0.21.0-staging.66.1 → 0.22.10-staging.78.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 (223) hide show
  1. package/dist/api/account.d.ts +1 -1
  2. package/dist/api/account.js.map +1 -1
  3. package/dist/api/admin-catalogue.js.map +1 -1
  4. package/dist/api/admin-consumption.js.map +1 -1
  5. package/dist/api/admin-contracts.d.ts +1 -1
  6. package/dist/api/admin-contracts.js.map +1 -1
  7. package/dist/api/admin-customer.d.ts +1 -1
  8. package/dist/api/admin-customer.js.map +1 -1
  9. package/dist/api/admin-desk.d.ts +1 -1
  10. package/dist/api/admin-desk.js +6 -0
  11. package/dist/api/admin-desk.js.map +1 -1
  12. package/dist/api/admin-licenses.js.map +1 -1
  13. package/dist/api/admin-partner-selections.d.ts +1 -1
  14. package/dist/api/admin-partner-selections.js.map +1 -1
  15. package/dist/api/admin-patrons.js.map +1 -1
  16. package/dist/api/admin-reviews.js.map +1 -1
  17. package/dist/api/admin-roles.js.map +1 -1
  18. package/dist/api/admin-support.d.ts +1 -1
  19. package/dist/api/admin-support.js.map +1 -1
  20. package/dist/api/admin-tenants.d.ts +1 -1
  21. package/dist/api/admin-tenants.js.map +1 -1
  22. package/dist/api/admin-tutoring.d.ts +1 -1
  23. package/dist/api/admin-tutoring.js.map +1 -1
  24. package/dist/api/admin-vod.js.map +1 -1
  25. package/dist/api/auth-device.js.map +1 -1
  26. package/dist/api/auth.d.ts +1 -1
  27. package/dist/api/auth.js.map +1 -1
  28. package/dist/api/biblio-billing-webhooks.d.ts +1 -1
  29. package/dist/api/biblio-billing-webhooks.js.map +1 -1
  30. package/dist/api/biblio-billing.d.ts +1 -1
  31. package/dist/api/biblio-billing.js.map +1 -1
  32. package/dist/api/biblio-catalogue.d.ts +1 -1
  33. package/dist/api/biblio-catalogue.js.map +1 -1
  34. package/dist/api/biblio-home.js.map +1 -1
  35. package/dist/api/biblio-learning-author-profiles.d.ts +1 -1
  36. package/dist/api/biblio-learning-author-profiles.js.map +1 -1
  37. package/dist/api/biblio-learning-authoring.d.ts +1 -1
  38. package/dist/api/biblio-learning-authoring.js.map +1 -1
  39. package/dist/api/biblio-learning-editorial.js.map +1 -1
  40. package/dist/api/biblio-learning-feedback.js.map +1 -1
  41. package/dist/api/biblio-learning-finance.js.map +1 -1
  42. package/dist/api/biblio-learning-integrations.d.ts +1 -1
  43. package/dist/api/biblio-learning-integrations.js.map +1 -1
  44. package/dist/api/biblio-learning-membership.js.map +1 -1
  45. package/dist/api/biblio-learning.d.ts +1 -1
  46. package/dist/api/biblio-learning.js.map +1 -1
  47. package/dist/api/biblio-library.d.ts +1 -1
  48. package/dist/api/biblio-library.js.map +1 -1
  49. package/dist/api/biblio-nextory.js.map +1 -1
  50. package/dist/api/biblio-press.js.map +1 -1
  51. package/dist/api/biblio-search.js.map +1 -1
  52. package/dist/api/biblio-telemetry.js.map +1 -1
  53. package/dist/api/biblio-youscribe.js.map +1 -1
  54. package/dist/api/consumption.js.map +1 -1
  55. package/dist/api/cvs-app.js.map +1 -1
  56. package/dist/api/cvs-documents.d.ts +1 -1
  57. package/dist/api/cvs-documents.js.map +1 -1
  58. package/dist/api/cvs-favorites.js.map +1 -1
  59. package/dist/api/cvs-ils.js.map +1 -1
  60. package/dist/api/cvs-loans.d.ts +1 -1
  61. package/dist/api/cvs-loans.js.map +1 -1
  62. package/dist/api/cvs-payments.js.map +1 -1
  63. package/dist/api/cvs-streaming.js.map +1 -1
  64. package/dist/api/partner-catalogue.d.ts +4 -1
  65. package/dist/api/partner-catalogue.js +3 -0
  66. package/dist/api/partner-catalogue.js.map +1 -1
  67. package/dist/api/partner-reader-nextory.d.ts +1 -1
  68. package/dist/api/partner-reader-nextory.js.map +1 -1
  69. package/dist/api/partner-reader-youscribe.js.map +1 -1
  70. package/dist/api/partner-reading.d.ts +1 -1
  71. package/dist/api/partner-reading.js.map +1 -1
  72. package/dist/api/profiles.js.map +1 -1
  73. package/dist/api/search.d.ts +1 -1
  74. package/dist/api/search.js.map +1 -1
  75. package/dist/api/tutoring-catalogue.js.map +1 -1
  76. package/dist/api/tutoring-chat.d.ts +1 -1
  77. package/dist/api/tutoring-chat.js.map +1 -1
  78. package/dist/api/tutoring-dispatch.js.map +1 -1
  79. package/dist/api/tutoring-practitioner.js.map +1 -1
  80. package/dist/api/tutoring-requests.d.ts +1 -1
  81. package/dist/api/tutoring-requests.js.map +1 -1
  82. package/dist/chunks/client2.d.ts +1 -1
  83. package/dist/chunks/index.d.ts +714 -684
  84. package/dist/index.d.ts +3 -3
  85. package/dist/index.js +3 -3
  86. package/dist/index.js.map +1 -1
  87. package/dist/models.d.ts +2 -2
  88. package/dist/models.js +12 -2
  89. package/dist/models.js.map +1 -1
  90. package/dist/react/account.d.ts +1 -1
  91. package/dist/react/account.js +1 -1
  92. package/dist/react/account.js.map +1 -1
  93. package/dist/react/admin-catalogue.js +1 -1
  94. package/dist/react/admin-catalogue.js.map +1 -1
  95. package/dist/react/admin-consumption.js +1 -1
  96. package/dist/react/admin-consumption.js.map +1 -1
  97. package/dist/react/admin-contracts.d.ts +1 -1
  98. package/dist/react/admin-contracts.js +1 -1
  99. package/dist/react/admin-contracts.js.map +1 -1
  100. package/dist/react/admin-customer.d.ts +1 -1
  101. package/dist/react/admin-customer.js +1 -1
  102. package/dist/react/admin-customer.js.map +1 -1
  103. package/dist/react/admin-desk.d.ts +1 -1
  104. package/dist/react/admin-desk.js +7 -1
  105. package/dist/react/admin-desk.js.map +1 -1
  106. package/dist/react/admin-licenses.js +1 -1
  107. package/dist/react/admin-licenses.js.map +1 -1
  108. package/dist/react/admin-partner-selections.d.ts +1 -1
  109. package/dist/react/admin-partner-selections.js +1 -1
  110. package/dist/react/admin-partner-selections.js.map +1 -1
  111. package/dist/react/admin-patrons.js +1 -1
  112. package/dist/react/admin-patrons.js.map +1 -1
  113. package/dist/react/admin-reviews.js +1 -1
  114. package/dist/react/admin-reviews.js.map +1 -1
  115. package/dist/react/admin-roles.js +1 -1
  116. package/dist/react/admin-roles.js.map +1 -1
  117. package/dist/react/admin-support.d.ts +1 -1
  118. package/dist/react/admin-support.js +1 -1
  119. package/dist/react/admin-support.js.map +1 -1
  120. package/dist/react/admin-tenants.d.ts +1 -1
  121. package/dist/react/admin-tenants.js +1 -1
  122. package/dist/react/admin-tenants.js.map +1 -1
  123. package/dist/react/admin-tutoring.d.ts +1 -1
  124. package/dist/react/admin-tutoring.js +1 -1
  125. package/dist/react/admin-tutoring.js.map +1 -1
  126. package/dist/react/admin-vod.js +1 -1
  127. package/dist/react/admin-vod.js.map +1 -1
  128. package/dist/react/auth-device.js +1 -1
  129. package/dist/react/auth-device.js.map +1 -1
  130. package/dist/react/auth.d.ts +1 -1
  131. package/dist/react/auth.js +1 -1
  132. package/dist/react/auth.js.map +1 -1
  133. package/dist/react/biblio-billing-webhooks.d.ts +1 -1
  134. package/dist/react/biblio-billing-webhooks.js +1 -1
  135. package/dist/react/biblio-billing-webhooks.js.map +1 -1
  136. package/dist/react/biblio-billing.d.ts +1 -1
  137. package/dist/react/biblio-billing.js +1 -1
  138. package/dist/react/biblio-billing.js.map +1 -1
  139. package/dist/react/biblio-catalogue.d.ts +1 -1
  140. package/dist/react/biblio-catalogue.js +1 -1
  141. package/dist/react/biblio-catalogue.js.map +1 -1
  142. package/dist/react/biblio-home.js +1 -1
  143. package/dist/react/biblio-home.js.map +1 -1
  144. package/dist/react/biblio-learning-author-profiles.d.ts +1 -1
  145. package/dist/react/biblio-learning-author-profiles.js +1 -1
  146. package/dist/react/biblio-learning-author-profiles.js.map +1 -1
  147. package/dist/react/biblio-learning-authoring.d.ts +1 -1
  148. package/dist/react/biblio-learning-authoring.js +1 -1
  149. package/dist/react/biblio-learning-authoring.js.map +1 -1
  150. package/dist/react/biblio-learning-editorial.js +1 -1
  151. package/dist/react/biblio-learning-editorial.js.map +1 -1
  152. package/dist/react/biblio-learning-feedback.js +1 -1
  153. package/dist/react/biblio-learning-feedback.js.map +1 -1
  154. package/dist/react/biblio-learning-finance.js +1 -1
  155. package/dist/react/biblio-learning-finance.js.map +1 -1
  156. package/dist/react/biblio-learning-integrations.d.ts +1 -1
  157. package/dist/react/biblio-learning-integrations.js +1 -1
  158. package/dist/react/biblio-learning-integrations.js.map +1 -1
  159. package/dist/react/biblio-learning-membership.js +1 -1
  160. package/dist/react/biblio-learning-membership.js.map +1 -1
  161. package/dist/react/biblio-learning.d.ts +1 -1
  162. package/dist/react/biblio-learning.js +1 -1
  163. package/dist/react/biblio-learning.js.map +1 -1
  164. package/dist/react/biblio-library.d.ts +1 -1
  165. package/dist/react/biblio-library.js +1 -1
  166. package/dist/react/biblio-library.js.map +1 -1
  167. package/dist/react/biblio-nextory.js +1 -1
  168. package/dist/react/biblio-nextory.js.map +1 -1
  169. package/dist/react/biblio-press.js +1 -1
  170. package/dist/react/biblio-press.js.map +1 -1
  171. package/dist/react/biblio-search.js +1 -1
  172. package/dist/react/biblio-search.js.map +1 -1
  173. package/dist/react/biblio-telemetry.js +1 -1
  174. package/dist/react/biblio-telemetry.js.map +1 -1
  175. package/dist/react/biblio-youscribe.js +1 -1
  176. package/dist/react/biblio-youscribe.js.map +1 -1
  177. package/dist/react/consumption.js +1 -1
  178. package/dist/react/consumption.js.map +1 -1
  179. package/dist/react/cvs-app.js +1 -1
  180. package/dist/react/cvs-app.js.map +1 -1
  181. package/dist/react/cvs-documents.d.ts +1 -1
  182. package/dist/react/cvs-documents.js +1 -1
  183. package/dist/react/cvs-documents.js.map +1 -1
  184. package/dist/react/cvs-favorites.js +1 -1
  185. package/dist/react/cvs-favorites.js.map +1 -1
  186. package/dist/react/cvs-ils.js +1 -1
  187. package/dist/react/cvs-ils.js.map +1 -1
  188. package/dist/react/cvs-loans.d.ts +1 -1
  189. package/dist/react/cvs-loans.js +1 -1
  190. package/dist/react/cvs-loans.js.map +1 -1
  191. package/dist/react/cvs-payments.js +1 -1
  192. package/dist/react/cvs-payments.js.map +1 -1
  193. package/dist/react/cvs-streaming.js +1 -1
  194. package/dist/react/cvs-streaming.js.map +1 -1
  195. package/dist/react/partner-catalogue.d.ts +4 -1
  196. package/dist/react/partner-catalogue.js +4 -1
  197. package/dist/react/partner-catalogue.js.map +1 -1
  198. package/dist/react/partner-reader-nextory.d.ts +1 -1
  199. package/dist/react/partner-reader-nextory.js +1 -1
  200. package/dist/react/partner-reader-nextory.js.map +1 -1
  201. package/dist/react/partner-reader-youscribe.js +1 -1
  202. package/dist/react/partner-reader-youscribe.js.map +1 -1
  203. package/dist/react/partner-reading.d.ts +1 -1
  204. package/dist/react/partner-reading.js +1 -1
  205. package/dist/react/partner-reading.js.map +1 -1
  206. package/dist/react/profiles.js +1 -1
  207. package/dist/react/profiles.js.map +1 -1
  208. package/dist/react/search.d.ts +1 -1
  209. package/dist/react/search.js +1 -1
  210. package/dist/react/search.js.map +1 -1
  211. package/dist/react/tutoring-catalogue.js +1 -1
  212. package/dist/react/tutoring-catalogue.js.map +1 -1
  213. package/dist/react/tutoring-chat.d.ts +1 -1
  214. package/dist/react/tutoring-chat.js +1 -1
  215. package/dist/react/tutoring-chat.js.map +1 -1
  216. package/dist/react/tutoring-dispatch.js +1 -1
  217. package/dist/react/tutoring-dispatch.js.map +1 -1
  218. package/dist/react/tutoring-practitioner.js +1 -1
  219. package/dist/react/tutoring-practitioner.js.map +1 -1
  220. package/dist/react/tutoring-requests.d.ts +1 -1
  221. package/dist/react/tutoring-requests.js +1 -1
  222. package/dist/react/tutoring-requests.js.map +1 -1
  223. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"admin-vod.js","names":[],"sources":["../../src/api/admin-vod/admin-vod.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.21.0\n */\nimport type {\n ListVodAssetsParams,\n VodAssetBackupRead,\n VodAssetImportWrite,\n VodAssetListRead,\n VodAssetPublishWrite,\n VodAssetRead,\n VodAssetWrite,\n VodEncryptionRead,\n VodPreviewImportWrite,\n VodPreviewRegistryRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListVodAssetsUrl = (params: ListVodAssetsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/admin/vod/assets?${stringifiedParams}` : `/admin/vod/assets`\n}\n\n/**\n * List up to 100 revisions of one film; no key ciphertext is included.\n * @summary List Vod Assets\n */\nexport const listVodAssets = async (params: ListVodAssetsParams, options?: Parameters<typeof request>[1]): Promise<VodAssetListRead> => {\n\n return request<VodAssetListRead>(getListVodAssetsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getRegisterVodAssetUrl = () => {\n\n\n\n\n return `/admin/vod/assets`\n}\n\n/**\n * Reserve an immutable film revision and generate its KMS-wrapped AES-128 key.\n *\n * Repeating the same work/version/source/prefix returns the original record;\n * it never replaces its key. The film remains on its existing playback path\n * until an independently verified receipt is published and activation is explicit.\n * No plaintext key is returned or stored in PostgreSQL.\n * @summary Register Vod Asset\n */\nexport const registerVodAsset = async (vodAssetWrite: VodAssetWrite, options?: Parameters<typeof request>[1]): Promise<VodAssetRead> => {\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<VodAssetRead>(getRegisterVodAssetUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(vodAssetWrite)\n }\n);}\n\n\nexport const getImportVodAssetUrl = () => {\n\n\n\n\n return `/admin/vod/assets/import`\n}\n\n/**\n * Import an existing package's KID, IV and KMS-encrypted key.\n *\n * The ciphertext must use the configured KMS key and the exact authenticated\n * context documented in VOD.md. The backend verifies the context and AES-128\n * key length before committing it. Existing revisions cannot change KID or IV.\n * @summary Import Vod Asset\n */\nexport const importVodAsset = async (vodAssetImportWrite: VodAssetImportWrite, options?: Parameters<typeof request>[1]): Promise<VodAssetRead> => {\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<VodAssetRead>(getImportVodAssetUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(vodAssetImportWrite)\n }\n);}\n\n\nexport const getReadVodAssetUrl = (assetId: string,) => {\n\n\n\n\n return `/admin/vod/assets/${assetId}`\n}\n\n/**\n * Read one immutable packaging revision and its publication state.\n * @summary Read Vod Asset\n */\nexport const readVodAsset = async (assetId: string, options?: Parameters<typeof request>[1]): Promise<VodAssetRead> => {\n\n return request<VodAssetRead>(getReadVodAssetUrl(assetId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getActivateVodAssetUrl = (assetId: string,) => {\n\n\n\n\n return `/admin/vod/assets/${assetId}/activation`\n}\n\n/**\n * Atomically select a verified revision for new playback sessions.\n *\n * Requires owned playback configuration. Existing sessions retain their previous\n * asset revision; switching versions does not change their content key.\n * @summary Activate Vod Asset\n */\nexport const activateVodAsset = async (assetId: string, options?: Parameters<typeof request>[1]): Promise<VodAssetRead> => {\n\n return request<VodAssetRead>(getActivateVodAssetUrl(assetId),\n {\n ...options,\n method: 'PUT'\n\n\n }\n);}\n\n\nexport const getExportVodAssetUrl = (assetId: string,) => {\n\n\n\n\n return `/admin/vod/assets/${assetId}/backup`\n}\n\n/**\n * Export encrypted key material, context and verification inventory for backup.\n *\n * KMS encrypt/decrypt access is not exercised by this read. Restoring the encrypted\n * records requires continued access to their wrapping key; no master key is exported.\n * @summary Export Vod Asset\n */\nexport const exportVodAsset = async (assetId: string, options?: Parameters<typeof request>[1]): Promise<VodAssetBackupRead> => {\n\n return request<VodAssetBackupRead>(getExportVodAssetUrl(assetId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getDisableVodAssetUrl = (assetId: string,) => {\n\n\n\n\n return `/admin/vod/assets/${assetId}/disable`\n}\n\n/**\n * Refuse new licence requests for this revision while preserving its key record.\n *\n * Already-issued DRM licences remain subject to their provider validity window;\n * this endpoint cannot retract a licence already delivered to a device.\n * @summary Disable Vod Asset\n */\nexport const disableVodAsset = async (assetId: string, options?: Parameters<typeof request>[1]): Promise<VodAssetRead> => {\n\n return request<VodAssetRead>(getDisableVodAssetUrl(assetId),\n {\n ...options,\n method: 'PUT'\n\n\n }\n);}\n\n\nexport const getReadVodEncryptionUrl = (assetId: string,) => {\n\n\n\n\n return `/admin/vod/assets/${assetId}/encryption`\n}\n\n/**\n * Read the wrapped key/context/IV for the authorized migration worker.\n *\n * This is a database read only. It neither creates a key nor calls KMS. The\n * worker must independently have KMS decrypt permission and must pass the IV\n * explicitly to the packager. No raw key endpoint exists.\n * @summary Read Vod Encryption\n */\nexport const readVodEncryption = async (assetId: string, options?: Parameters<typeof request>[1]): Promise<VodEncryptionRead> => {\n\n return request<VodEncryptionRead>(getReadVodEncryptionUrl(assetId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getPublishVodAssetUrl = (assetId: string,) => {\n\n\n\n\n return `/admin/vod/assets/${assetId}/publication`\n}\n\n/**\n * Record a trusted importer's verification receipt without changing playback.\n *\n * The importer attests complete destination read-back and whole-track integrity.\n * The backend validates the inventory/key binding; it does not download the\n * catalogue again. Repeated identical receipts are idempotent; changes conflict.\n * @summary Publish Vod Asset\n */\nexport const publishVodAsset = async (assetId: string,\n vodAssetPublishWrite: VodAssetPublishWrite, options?: Parameters<typeof request>[1]): Promise<VodAssetRead> => {\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<VodAssetRead>(getPublishVodAssetUrl(assetId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(vodAssetPublishWrite)\n }\n);}\n\n\nexport const getImportVodPreviewUrl = () => {\n\n\n\n\n return `/admin/vod/previews/import`\n}\n\n/**\n * Register a verified free, clear trailer. No key, licence or credit is created.\n * @summary Import Vod Preview\n */\nexport const importVodPreview = async (vodPreviewImportWrite: VodPreviewImportWrite, options?: Parameters<typeof request>[1]): Promise<VodPreviewRegistryRead> => {\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<VodPreviewRegistryRead>(getImportVodPreviewUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(vodPreviewImportWrite)\n }\n);}\n\n\nexport const getDisableVodPreviewUrl = (previewId: string,) => {\n\n\n\n\n return `/admin/vod/previews/${previewId}`\n}\n\n/**\n * Stop exposing a trailer in catalogue reads without deleting source media.\n * @summary Disable Vod Preview\n */\nexport const disableVodPreview = async (previewId: string, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDisableVodPreviewUrl(previewId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAsBA,MAAa,uBAAuB,WAAiC;CACnE,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,qBAAqB,sBAAsB;AACnF;;;;;AAMA,MAAa,gBAAgB,OAAO,QAA6B,YAAuE;CAEtI,OAAO,QAA0B,oBAAoB,MAAM,GAC3D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,+BAA+B;CAK1C,OAAO;AACT;;;;;;;;;;AAWA,MAAa,mBAAmB,OAAO,eAA8B,YAAmE;CAEpI,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC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AAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAsB,sBAAsB,OAAO,GACxD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,oBAAoB;CAC3C,CACF;AAAE;AAGF,MAAa,+BAA+B;CAK1C,OAAO;AACT;;;;;AAMA,MAAa,mBAAmB,OAAO,uBAA8C,YAA6E;CAE9J,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,QAAgC,uBAAuB,GAC5D;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,qBAAqB;CAC5C,CACF;AAAE;AAGF,MAAa,2BAA2B,cAAuB;CAK7D,OAAO,uBAAuB;AAChC;;;;;AAMA,MAAa,oBAAoB,OAAO,WAAmB,YAA2D;CAEpH,OAAO,QAAc,wBAAwB,SAAS,GACtD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
1
+ {"version":3,"file":"admin-vod.js","names":[],"sources":["../../src/api/admin-vod/admin-vod.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.22.10\n */\nimport type {\n ListVodAssetsParams,\n VodAssetBackupRead,\n VodAssetImportWrite,\n VodAssetListRead,\n VodAssetPublishWrite,\n VodAssetRead,\n VodAssetWrite,\n VodEncryptionRead,\n VodPreviewImportWrite,\n VodPreviewRegistryRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListVodAssetsUrl = (params: ListVodAssetsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : String(value))\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/admin/vod/assets?${stringifiedParams}` : `/admin/vod/assets`\n}\n\n/**\n * List up to 100 revisions of one film; no key ciphertext is included.\n * @summary List Vod Assets\n */\nexport const listVodAssets = async (params: ListVodAssetsParams, options?: Parameters<typeof request>[1]): Promise<VodAssetListRead> => {\n\n return request<VodAssetListRead>(getListVodAssetsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getRegisterVodAssetUrl = () => {\n\n\n\n\n return `/admin/vod/assets`\n}\n\n/**\n * Reserve an immutable film revision and generate its KMS-wrapped AES-128 key.\n *\n * Repeating the same work/version/source/prefix returns the original record;\n * it never replaces its key. The film remains on its existing playback path\n * until an independently verified receipt is published and activation is explicit.\n * No plaintext key is returned or stored in PostgreSQL.\n * @summary Register Vod Asset\n */\nexport const registerVodAsset = async (vodAssetWrite: VodAssetWrite, options?: Parameters<typeof request>[1]): Promise<VodAssetRead> => {\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<VodAssetRead>(getRegisterVodAssetUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(vodAssetWrite)\n }\n);}\n\n\nexport const getImportVodAssetUrl = () => {\n\n\n\n\n return `/admin/vod/assets/import`\n}\n\n/**\n * Import an existing package's KID, IV and KMS-encrypted key.\n *\n * The ciphertext must use the configured KMS key and the exact authenticated\n * context documented in VOD.md. The backend verifies the context and AES-128\n * key length before committing it. Existing revisions cannot change KID or IV.\n * @summary Import Vod Asset\n */\nexport const importVodAsset = async (vodAssetImportWrite: VodAssetImportWrite, options?: Parameters<typeof request>[1]): Promise<VodAssetRead> => {\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<VodAssetRead>(getImportVodAssetUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(vodAssetImportWrite)\n }\n);}\n\n\nexport const getReadVodAssetUrl = (assetId: string,) => {\n\n\n\n\n return `/admin/vod/assets/${assetId}`\n}\n\n/**\n * Read one immutable packaging revision and its publication state.\n * @summary Read Vod Asset\n */\nexport const readVodAsset = async (assetId: string, options?: Parameters<typeof request>[1]): Promise<VodAssetRead> => {\n\n return request<VodAssetRead>(getReadVodAssetUrl(assetId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getActivateVodAssetUrl = (assetId: string,) => {\n\n\n\n\n return `/admin/vod/assets/${assetId}/activation`\n}\n\n/**\n * Atomically select a verified revision for new playback sessions.\n *\n * Requires owned playback configuration. Existing sessions retain their previous\n * asset revision; switching versions does not change their content key.\n * @summary Activate Vod Asset\n */\nexport const activateVodAsset = async (assetId: string, options?: Parameters<typeof request>[1]): Promise<VodAssetRead> => {\n\n return request<VodAssetRead>(getActivateVodAssetUrl(assetId),\n {\n ...options,\n method: 'PUT'\n\n\n }\n);}\n\n\nexport const getExportVodAssetUrl = (assetId: string,) => {\n\n\n\n\n return `/admin/vod/assets/${assetId}/backup`\n}\n\n/**\n * Export encrypted key material, context and verification inventory for backup.\n *\n * KMS encrypt/decrypt access is not exercised by this read. Restoring the encrypted\n * records requires continued access to their wrapping key; no master key is exported.\n * @summary Export Vod Asset\n */\nexport const exportVodAsset = async (assetId: string, options?: Parameters<typeof request>[1]): Promise<VodAssetBackupRead> => {\n\n return request<VodAssetBackupRead>(getExportVodAssetUrl(assetId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getDisableVodAssetUrl = (assetId: string,) => {\n\n\n\n\n return `/admin/vod/assets/${assetId}/disable`\n}\n\n/**\n * Refuse new licence requests for this revision while preserving its key record.\n *\n * Already-issued DRM licences remain subject to their provider validity window;\n * this endpoint cannot retract a licence already delivered to a device.\n * @summary Disable Vod Asset\n */\nexport const disableVodAsset = async (assetId: string, options?: Parameters<typeof request>[1]): Promise<VodAssetRead> => {\n\n return request<VodAssetRead>(getDisableVodAssetUrl(assetId),\n {\n ...options,\n method: 'PUT'\n\n\n }\n);}\n\n\nexport const getReadVodEncryptionUrl = (assetId: string,) => {\n\n\n\n\n return `/admin/vod/assets/${assetId}/encryption`\n}\n\n/**\n * Read the wrapped key/context/IV for the authorized migration worker.\n *\n * This is a database read only. It neither creates a key nor calls KMS. The\n * worker must independently have KMS decrypt permission and must pass the IV\n * explicitly to the packager. No raw key endpoint exists.\n * @summary Read Vod Encryption\n */\nexport const readVodEncryption = async (assetId: string, options?: Parameters<typeof request>[1]): Promise<VodEncryptionRead> => {\n\n return request<VodEncryptionRead>(getReadVodEncryptionUrl(assetId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getPublishVodAssetUrl = (assetId: string,) => {\n\n\n\n\n return `/admin/vod/assets/${assetId}/publication`\n}\n\n/**\n * Record a trusted importer's verification receipt without changing playback.\n *\n * The importer attests complete destination read-back and whole-track integrity.\n * The backend validates the inventory/key binding; it does not download the\n * catalogue again. Repeated identical receipts are idempotent; changes conflict.\n * @summary Publish Vod Asset\n */\nexport const publishVodAsset = async (assetId: string,\n vodAssetPublishWrite: VodAssetPublishWrite, options?: Parameters<typeof request>[1]): Promise<VodAssetRead> => {\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<VodAssetRead>(getPublishVodAssetUrl(assetId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(vodAssetPublishWrite)\n }\n);}\n\n\nexport const getImportVodPreviewUrl = () => {\n\n\n\n\n return `/admin/vod/previews/import`\n}\n\n/**\n * Register a verified free, clear trailer. No key, licence or credit is created.\n * @summary Import Vod Preview\n */\nexport const importVodPreview = async (vodPreviewImportWrite: VodPreviewImportWrite, options?: Parameters<typeof request>[1]): Promise<VodPreviewRegistryRead> => {\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<VodPreviewRegistryRead>(getImportVodPreviewUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(vodPreviewImportWrite)\n }\n);}\n\n\nexport const getDisableVodPreviewUrl = (previewId: string,) => {\n\n\n\n\n return `/admin/vod/previews/${previewId}`\n}\n\n/**\n * Stop exposing a trailer in catalogue reads without deleting source media.\n * @summary Disable Vod Preview\n */\nexport const disableVodPreview = async (previewId: string, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDisableVodPreviewUrl(previewId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAsBA,MAAa,uBAAuB,WAAiC;CACnE,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,qBAAqB,sBAAsB;AACnF;;;;;AAMA,MAAa,gBAAgB,OAAO,QAA6B,YAAuE;CAEtI,OAAO,QAA0B,oBAAoB,MAAM,GAC3D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,+BAA+B;CAK1C,OAAO;AACT;;;;;;;;;;AAWA,MAAa,mBAAmB,OAAO,eAA8B,YAAmE;CAEpI,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC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AAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAsB,sBAAsB,OAAO,GACxD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,oBAAoB;CAC3C,CACF;AAAE;AAGF,MAAa,+BAA+B;CAK1C,OAAO;AACT;;;;;AAMA,MAAa,mBAAmB,OAAO,uBAA8C,YAA6E;CAE9J,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,QAAgC,uBAAuB,GAC5D;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,qBAAqB;CAC5C,CACF;AAAE;AAGF,MAAa,2BAA2B,cAAuB;CAK7D,OAAO,uBAAuB;AAChC;;;;;AAMA,MAAa,oBAAoB,OAAO,WAAmB,YAA2D;CAEpH,OAAO,QAAc,wBAAwB,SAAS,GACtD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"auth-device.js","names":[],"sources":["../../src/api/auth-device/auth-device.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.21.0\n */\nimport type {\n DeviceAuthorizationRead,\n DeviceAuthorizationWrite,\n DeviceAuthorizedRead,\n DevicePendingRead,\n DevicePollWrite,\n DeviceRefusedRead,\n DeviceVerificationRead,\n DeviceVerificationWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getCreateDeviceAuthorizationUrl = () => {\n\n\n\n\n return `/auth/device-authorizations`\n}\n\n/**\n * Start TV login and return its QR, manual code and private polling credential.\n *\n * The TV generates a PKCE verifier, keeps it secret and sends its S256 challenge.\n * Show the QR image and userCode beside verificationUri. The QR opens the\n * frontend's /activate page with user_code prefilled. That page signs the user\n * in through the existing SSO flow and then requests the Keycloak verification\n * URL. Keycloak asks for explicit confirmation before releasing any tokens.\n *\n * Neither the private deviceCode nor the verifier belongs in the displayed QR.\n * Wait at least interval seconds before polling POST /auth/sessions/device.\n * @summary Create Device Authorization\n */\nexport const createDeviceAuthorization = async (deviceAuthorizationWrite: DeviceAuthorizationWrite, options?: Parameters<typeof request>[1]): Promise<DeviceAuthorizationRead> => {\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<DeviceAuthorizationRead>(getCreateDeviceAuthorizationUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(deviceAuthorizationWrite)\n }\n);}\n\n\nexport const getPrepareDeviceVerificationUrl = () => {\n\n\n\n\n return `/auth/device-authorizations/verification`\n}\n\n/**\n * Continue from the signed-in web activation page to Keycloak confirmation.\n *\n * Call from /activate after normal sign-in (preserving user_code across the\n * login redirect). Open verificationUrl in that same browser. Keycloak checks\n * the code, displays the requesting TV client and asks the user to approve or\n * deny it. This endpoint returns navigation only: it never approves a device\n * or exchanges the browser's tokens. Invalid/expired codes are shown by Keycloak.\n *\n * A support impersonation or dependent profile cannot initiate verification.\n * @summary Prepare Device Verification\n */\nexport const prepareDeviceVerification = async (deviceVerificationWrite: DeviceVerificationWrite, options?: Parameters<typeof request>[1]): Promise<DeviceVerificationRead> => {\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<DeviceVerificationRead>(getPrepareDeviceVerificationUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(deviceVerificationWrite)\n }\n);}\n\n\nexport const getPollDeviceAuthorizationUrl = () => {\n\n\n\n\n return `/auth/sessions/device`\n}\n\n/**\n * Poll TV login without blocking the request or bypassing broker approval.\n *\n * pending: wait the advertised interval. slow_down: increase the previous\n * interval by at least five seconds and keep that longer interval. denied and\n * expired are terminal: stop polling. authorized contains the ordinary verified\n * SessionRead; store it on the TV and use clientId=mozaik-tv for refresh/logout.\n *\n * Keycloak enforces expiry, polling limits, PKCE and single-use redemption.\n * A lost successful response cannot be replayed; start a new pairing in that\n * case. No token is returned until the normal local-account checks also pass.\n * @summary Poll Device Authorization\n */\nexport const pollDeviceAuthorization = async (devicePollWrite: DevicePollWrite, options?: Parameters<typeof request>[1]): Promise<DevicePendingRead | DeviceRefusedRead | DeviceAuthorizedRead> => {\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<DevicePendingRead | DeviceRefusedRead | DeviceAuthorizedRead>(getPollDeviceAuthorizationUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(devicePollWrite)\n }\n);}\n\n\n"],"mappings":";;;AAoBA,MAAa,wCAAwC;CAKnD,OAAO;AACT;;;;;;;;;;;;;;AAeA,MAAa,4BAA4B,OAAO,0BAAoD,YAA8E;CAE9K,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,QAAiC,gCAAgC,GACtE;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,wBAAwB;CAC/C,CACF;AAAE;AAGF,MAA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AM,KAAK,UAAU,eAAe;CACtC,CACF;AAAE"}
1
+ {"version":3,"file":"auth-device.js","names":[],"sources":["../../src/api/auth-device/auth-device.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.22.10\n */\nimport type {\n DeviceAuthorizationRead,\n DeviceAuthorizationWrite,\n DeviceAuthorizedRead,\n DevicePendingRead,\n DevicePollWrite,\n DeviceRefusedRead,\n DeviceVerificationRead,\n DeviceVerificationWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getCreateDeviceAuthorizationUrl = () => {\n\n\n\n\n return `/auth/device-authorizations`\n}\n\n/**\n * Start TV login and return its QR, manual code and private polling credential.\n *\n * The TV generates a PKCE verifier, keeps it secret and sends its S256 challenge.\n * Show the QR image and userCode beside verificationUri. The QR opens the\n * frontend's /activate page with user_code prefilled. That page signs the user\n * in through the existing SSO flow and then requests the Keycloak verification\n * URL. Keycloak asks for explicit confirmation before releasing any tokens.\n *\n * Neither the private deviceCode nor the verifier belongs in the displayed QR.\n * Wait at least interval seconds before polling POST /auth/sessions/device.\n * @summary Create Device Authorization\n */\nexport const createDeviceAuthorization = async (deviceAuthorizationWrite: DeviceAuthorizationWrite, options?: Parameters<typeof request>[1]): Promise<DeviceAuthorizationRead> => {\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<DeviceAuthorizationRead>(getCreateDeviceAuthorizationUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(deviceAuthorizationWrite)\n }\n);}\n\n\nexport const getPrepareDeviceVerificationUrl = () => {\n\n\n\n\n return `/auth/device-authorizations/verification`\n}\n\n/**\n * Continue from the signed-in web activation page to Keycloak confirmation.\n *\n * Call from /activate after normal sign-in (preserving user_code across the\n * login redirect). Open verificationUrl in that same browser. Keycloak checks\n * the code, displays the requesting TV client and asks the user to approve or\n * deny it. This endpoint returns navigation only: it never approves a device\n * or exchanges the browser's tokens. Invalid/expired codes are shown by Keycloak.\n *\n * A support impersonation or dependent profile cannot initiate verification.\n * @summary Prepare Device Verification\n */\nexport const prepareDeviceVerification = async (deviceVerificationWrite: DeviceVerificationWrite, options?: Parameters<typeof request>[1]): Promise<DeviceVerificationRead> => {\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<DeviceVerificationRead>(getPrepareDeviceVerificationUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(deviceVerificationWrite)\n }\n);}\n\n\nexport const getPollDeviceAuthorizationUrl = () => {\n\n\n\n\n return `/auth/sessions/device`\n}\n\n/**\n * Poll TV login without blocking the request or bypassing broker approval.\n *\n * pending: wait the advertised interval. slow_down: increase the previous\n * interval by at least five seconds and keep that longer interval. denied and\n * expired are terminal: stop polling. authorized contains the ordinary verified\n * SessionRead; store it on the TV and use clientId=mozaik-tv for refresh/logout.\n *\n * Keycloak enforces expiry, polling limits, PKCE and single-use redemption.\n * A lost successful response cannot be replayed; start a new pairing in that\n * case. No token is returned until the normal local-account checks also pass.\n * @summary Poll Device Authorization\n */\nexport const pollDeviceAuthorization = async (devicePollWrite: DevicePollWrite, options?: Parameters<typeof request>[1]): Promise<DevicePendingRead | DeviceRefusedRead | DeviceAuthorizedRead> => {\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<DevicePendingRead | DeviceRefusedRead | DeviceAuthorizedRead>(getPollDeviceAuthorizationUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(devicePollWrite)\n }\n);}\n\n\n"],"mappings":";;;AAoBA,MAAa,wCAAwC;CAKnD,OAAO;AACT;;;;;;;;;;;;;;AAeA,MAAa,4BAA4B,OAAO,0BAAoD,YAA8E;CAE9K,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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AA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAsE,8BAA8B,GACzG;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,eAAe;CACtC,CACF;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { Gy as CodeExchangeWrite, Kf as SessionRead, a as WorkforceAdmissionRead, ad as InvitationSetupRead, eS as AuthorizationRead, id as InvitationSetupWrite, kv as CredentialsWrite, ln as RefreshWrite, lo as MeRead, tS as AuthorizationParams, uo as LogoutWrite } from "../chunks/index.js";
2
+ import { Av as CredentialsWrite, Kf as SessionRead, a as WorkforceAdmissionRead, ad as InvitationSetupRead, id as InvitationSetupWrite, ln as RefreshWrite, lo as MeRead, nS as AuthorizationRead, qy as CodeExchangeWrite, rS as AuthorizationParams, uo as LogoutWrite } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/auth/auth.d.ts
5
5
  export declare const getAuthorizationUrl: (params: AuthorizationParams) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"auth.js","names":[],"sources":["../../src/api/auth/auth.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.21.0\n */\nimport type {\n AuthorizationParams,\n AuthorizationRead,\n CodeExchangeWrite,\n CredentialsWrite,\n InvitationSetupRead,\n InvitationSetupWrite,\n LogoutWrite,\n MeRead,\n RefreshWrite,\n SessionRead,\n WorkforceAdmissionRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getAuthorizationUrl = (params: AuthorizationParams,) => {\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 ? `/auth/authorization?${stringifiedParams}` : `/auth/authorization`\n}\n\n/**\n * Build the Keycloak authorization URL for this client and this tenant.\n *\n * Everything cryptographic belongs to the caller: it generates ``state``, the\n * PKCE verifier and the ``nonce``, and only ever sends the challenge. This\n * endpoint contributes the one thing the caller cannot know — which identity\n * provider to route to — and refuses an unsafe ``redirect_uri``.\n *\n * ``client_id`` defaults to ``mozaik-web``. Native apps select ``mozaik-mobile``\n * and keep that client ID for code exchange, refresh and logout. Only these\n * public clients are supported; each has its own callback allow-list.\n *\n * ``S256`` is hardcoded. ``plain`` is a valid PKCE method and provides no\n * protection, so making it selectable would only ever be used by mistake.\n *\n * A resolved provider is passed as ``kc_idp_hint``. Aliases are case-sensitive\n * at the broker and an unknown one silently falls back to the login form, which\n * is why :func:`_resolve_provider_alias` validates against the registry instead\n * of forwarding whatever arrived.\n * @summary Authorization\n */\nexport const authorization = async (params: AuthorizationParams, options?: Parameters<typeof request>[1]): Promise<AuthorizationRead> => {\n\n return request<AuthorizationRead>(getAuthorizationUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getSetupInvitationUrl = () => {\n\n\n\n\n return `/auth/invitations/setup`\n}\n\n/**\n * Send broker setup instructions only for a live matching invitation.\n *\n * Knowing the invitation code proves neither email ownership nor household\n * membership. Verification and password setup happen at Keycloak; subsequent\n * PKCE code exchange must include ``invitationCode`` to accept the invitation.\n * @summary Setup Invitation\n */\nexport const setupInvitation = async (invitationSetupWrite: InvitationSetupWrite, options?: Parameters<typeof request>[1]): Promise<InvitationSetupRead> => {\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<InvitationSetupRead>(getSetupInvitationUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(invitationSetupWrite)\n }\n);}\n\n\nexport const getReadMeUrl = () => {\n\n\n\n\n return `/auth/me`\n}\n\n/**\n * Who the bearer of this token is, and what the session may do.\n *\n * No tokens in the response — this endpoint reissues nothing, and a shape with\n * empty token fields would invite a client to store them. It is also the\n * cheapest liveness check a client has: it exercises verification,\n * tenant resolution and the account link in one call, so a 200 here means the\n * whole chain is intact.\n * @summary Read Me\n */\nexport const readMe = async ( options?: Parameters<typeof request>[1]): Promise<MeRead> => {\n\n return request<MeRead>(getReadMeUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getDeleteSessionUrl = () => {\n\n\n\n\n return `/auth/sessions`\n}\n\n/**\n * Sign out, revoking the refresh token at the broker.\n *\n * For a supported client, always 204. There is nothing useful for the caller\n * to do about an unreachable broker — it is\n * discarding its tokens either way. The failure is logged, not returned.\n *\n * The access token stays valid until it expires. That is inherent to verifying\n * tokens offline, and it is why the realm keeps access-token lifetimes short\n * rather than why this endpoint should pretend otherwise.\n * @summary Delete Session\n */\nexport const deleteSession = async (logoutWrite: LogoutWrite, 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>(getDeleteSessionUrl(),\n {\n ...options,\n method: 'DELETE',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(logoutWrite)\n }\n);}\n\n\nexport const getCreateSessionFromCredentialsUrl = () => {\n\n\n\n\n return `/auth/sessions`\n}\n\n/**\n * Log in with a username and password, via the broker's direct grant.\n *\n * Off unless ``AUTH_ALLOW_PASSWORD_GRANT`` says otherwise, and it should stay\n * off wherever the client fleet allows: the grant defeats MFA, cannot reach a\n * brokered partner, and puts the password through this process. It exists for\n * the native apps already in the field.\n *\n * Rate limited on both the submitted username and the client address. Keyed on\n * the lower-cased username so that case variation is not a way around the\n * counter, and on the address so that spraying many usernames is bounded too.\n * @summary Create Session From Credentials\n */\nexport const createSessionFromCredentials = async (credentialsWrite: CredentialsWrite, options?: Parameters<typeof request>[1]): Promise<SessionRead> => {\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<SessionRead>(getCreateSessionFromCredentialsUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(credentialsWrite)\n }\n);}\n\n\nexport const getRefreshSessionUrl = () => {\n\n\n\n\n return `/auth/sessions`\n}\n\n/**\n * Exchange a refresh token for a new pair.\n *\n * Public: the refresh token *is* the credential, so requiring a valid access\n * token as well would make the endpoint useless at the moment it is needed.\n * Rotation happens at the broker, so the presented token stops working as the\n * new one is issued.\n *\n * Returns the account as well as the tokens. That costs one indexed lookup and\n * means a client resuming from cold storage does not need a second call to\n * discover whether the account is still active — which it checks, because\n * deactivation is a local decision Keycloak knows nothing about.\n * @summary Refresh Session\n */\nexport const refreshSession = async (refreshWrite: RefreshWrite, options?: Parameters<typeof request>[1]): Promise<SessionRead> => {\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<SessionRead>(getRefreshSessionUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(refreshWrite)\n }\n);}\n\n\nexport const getCreateSessionFromCodeUrl = () => {\n\n\n\n\n return `/auth/sessions/code`\n}\n\n/**\n * Finish a brokered login: code plus verifier in, session out.\n *\n * Rate limited on the client address rather than on a user, because at this\n * point there is no user — the code has not been exchanged yet. The limit is\n * what stops a stolen code being brute-forced alongside a guessed verifier.\n * @summary Create Session From Code\n */\nexport const createSessionFromCode = async (codeExchangeWrite: CodeExchangeWrite, options?: Parameters<typeof request>[1]): Promise<SessionRead> => {\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<SessionRead>(getCreateSessionFromCodeUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(codeExchangeWrite)\n }\n);}\n\n\nexport const getReadWorkforceAdmissionUrl = () => {\n\n\n\n\n return `/auth/workforce`\n}\n\n/**\n * Return this verified Workspace session's backend-owned role.\n * @summary Read Workforce Admission\n */\nexport const readWorkforceAdmission = async ( options?: Parameters<typeof request>[1]): Promise<WorkforceAdmissionRead> => {\n\n return request<WorkforceAdmissionRead>(getReadWorkforceAdmissionUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAuBA,MAAa,uBAAuB,WAAiC;CACnE,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,uBAAuB,sBAAsB;AACrF;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,gBAAgB,OAAO,QAA6B,YAAwE;CAEvI,OAAO,QAA2B,oBAAoB,MAAM,GAC5D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,8BAA8B;CAKzC,OAAO;AACT;;;;;;;;;AAUA,MAAa,kBAAkB,OAAO,sBAA4C,YAA0E;CAExJ,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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C5G,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,QAAqB,4BAA4B,GACtD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,iBAAiB;CACxC,CACF;AAAE;AAGF,MAAa,qCAAqC;CAKhD,OAAO;AACT;;;;;AAMA,MAAa,yBAAyB,OAAQ,YAA6E;CAEzH,OAAO,QAAgC,6BAA6B,GACpE;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
1
+ {"version":3,"file":"auth.js","names":[],"sources":["../../src/api/auth/auth.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.22.10\n */\nimport type {\n AuthorizationParams,\n AuthorizationRead,\n CodeExchangeWrite,\n CredentialsWrite,\n InvitationSetupRead,\n InvitationSetupWrite,\n LogoutWrite,\n MeRead,\n RefreshWrite,\n SessionRead,\n WorkforceAdmissionRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getAuthorizationUrl = (params: AuthorizationParams,) => {\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 ? `/auth/authorization?${stringifiedParams}` : `/auth/authorization`\n}\n\n/**\n * Build the Keycloak authorization URL for this client and this tenant.\n *\n * Everything cryptographic belongs to the caller: it generates ``state``, the\n * PKCE verifier and the ``nonce``, and only ever sends the challenge. This\n * endpoint contributes the one thing the caller cannot know — which identity\n * provider to route to — and refuses an unsafe ``redirect_uri``.\n *\n * ``client_id`` defaults to ``mozaik-web``. Native apps select ``mozaik-mobile``\n * and keep that client ID for code exchange, refresh and logout. Only these\n * public clients are supported; each has its own callback allow-list.\n *\n * ``S256`` is hardcoded. ``plain`` is a valid PKCE method and provides no\n * protection, so making it selectable would only ever be used by mistake.\n *\n * A resolved provider is passed as ``kc_idp_hint``. Aliases are case-sensitive\n * at the broker and an unknown one silently falls back to the login form, which\n * is why :func:`_resolve_provider_alias` validates against the registry instead\n * of forwarding whatever arrived.\n * @summary Authorization\n */\nexport const authorization = async (params: AuthorizationParams, options?: Parameters<typeof request>[1]): Promise<AuthorizationRead> => {\n\n return request<AuthorizationRead>(getAuthorizationUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getSetupInvitationUrl = () => {\n\n\n\n\n return `/auth/invitations/setup`\n}\n\n/**\n * Send broker setup instructions only for a live matching invitation.\n *\n * Knowing the invitation code proves neither email ownership nor household\n * membership. Verification and password setup happen at Keycloak; subsequent\n * PKCE code exchange must include ``invitationCode`` to accept the invitation.\n * @summary Setup Invitation\n */\nexport const setupInvitation = async (invitationSetupWrite: InvitationSetupWrite, options?: Parameters<typeof request>[1]): Promise<InvitationSetupRead> => {\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<InvitationSetupRead>(getSetupInvitationUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(invitationSetupWrite)\n }\n);}\n\n\nexport const getReadMeUrl = () => {\n\n\n\n\n return `/auth/me`\n}\n\n/**\n * Who the bearer of this token is, and what the session may do.\n *\n * No tokens in the response — this endpoint reissues nothing, and a shape with\n * empty token fields would invite a client to store them. It is also the\n * cheapest liveness check a client has: it exercises verification,\n * tenant resolution and the account link in one call, so a 200 here means the\n * whole chain is intact.\n * @summary Read Me\n */\nexport const readMe = async ( options?: Parameters<typeof request>[1]): Promise<MeRead> => {\n\n return request<MeRead>(getReadMeUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getDeleteSessionUrl = () => {\n\n\n\n\n return `/auth/sessions`\n}\n\n/**\n * Sign out, revoking the refresh token at the broker.\n *\n * For a supported client, always 204. There is nothing useful for the caller\n * to do about an unreachable broker — it is\n * discarding its tokens either way. The failure is logged, not returned.\n *\n * The access token stays valid until it expires. That is inherent to verifying\n * tokens offline, and it is why the realm keeps access-token lifetimes short\n * rather than why this endpoint should pretend otherwise.\n * @summary Delete Session\n */\nexport const deleteSession = async (logoutWrite: LogoutWrite, 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>(getDeleteSessionUrl(),\n {\n ...options,\n method: 'DELETE',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(logoutWrite)\n }\n);}\n\n\nexport const getCreateSessionFromCredentialsUrl = () => {\n\n\n\n\n return `/auth/sessions`\n}\n\n/**\n * Log in with a username and password, via the broker's direct grant.\n *\n * Off unless ``AUTH_ALLOW_PASSWORD_GRANT`` says otherwise, and it should stay\n * off wherever the client fleet allows: the grant defeats MFA, cannot reach a\n * brokered partner, and puts the password through this process. It exists for\n * the native apps already in the field.\n *\n * Rate limited on both the submitted username and the client address. Keyed on\n * the lower-cased username so that case variation is not a way around the\n * counter, and on the address so that spraying many usernames is bounded too.\n * @summary Create Session From Credentials\n */\nexport const createSessionFromCredentials = async (credentialsWrite: CredentialsWrite, options?: Parameters<typeof request>[1]): Promise<SessionRead> => {\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<SessionRead>(getCreateSessionFromCredentialsUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(credentialsWrite)\n }\n);}\n\n\nexport const getRefreshSessionUrl = () => {\n\n\n\n\n return `/auth/sessions`\n}\n\n/**\n * Exchange a refresh token for a new pair.\n *\n * Public: the refresh token *is* the credential, so requiring a valid access\n * token as well would make the endpoint useless at the moment it is needed.\n * Rotation happens at the broker, so the presented token stops working as the\n * new one is issued.\n *\n * Returns the account as well as the tokens. That costs one indexed lookup and\n * means a client resuming from cold storage does not need a second call to\n * discover whether the account is still active — which it checks, because\n * deactivation is a local decision Keycloak knows nothing about.\n * @summary Refresh Session\n */\nexport const refreshSession = async (refreshWrite: RefreshWrite, options?: Parameters<typeof request>[1]): Promise<SessionRead> => {\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<SessionRead>(getRefreshSessionUrl(),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(refreshWrite)\n }\n);}\n\n\nexport const getCreateSessionFromCodeUrl = () => {\n\n\n\n\n return `/auth/sessions/code`\n}\n\n/**\n * Finish a brokered login: code plus verifier in, session out.\n *\n * Rate limited on the client address rather than on a user, because at this\n * point there is no user — the code has not been exchanged yet. The limit is\n * what stops a stolen code being brute-forced alongside a guessed verifier.\n * @summary Create Session From Code\n */\nexport const createSessionFromCode = async (codeExchangeWrite: CodeExchangeWrite, options?: Parameters<typeof request>[1]): Promise<SessionRead> => {\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<SessionRead>(getCreateSessionFromCodeUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(codeExchangeWrite)\n }\n);}\n\n\nexport const getReadWorkforceAdmissionUrl = () => {\n\n\n\n\n return `/auth/workforce`\n}\n\n/**\n * Return this verified Workspace session's backend-owned role.\n * @summary Read Workforce Admission\n */\nexport const readWorkforceAdmission = async ( options?: Parameters<typeof request>[1]): Promise<WorkforceAdmissionRead> => {\n\n return request<WorkforceAdmissionRead>(getReadWorkforceAdmissionUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAuBA,MAAa,uBAAuB,WAAiC;CACnE,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,uBAAuB,sBAAsB;AACrF;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,gBAAgB,OAAO,QAA6B,YAAwE;CAEvI,OAAO,QAA2B,oBAAoB,MAAM,GAC5D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,8BAA8B;CAKzC,OAAO;AACT;;;;;;;;;AAUA,MAAa,kBAAkB,OAAO,sBAA4C,YAA0E;CAExJ,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,CAA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AChB,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,QAAqB,4BAA4B,GACtD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,iBAAiB;CACxC,CACF;AAAE;AAGF,MAAa,qCAAqC;CAKhD,OAAO;AACT;;;;;AAMA,MAAa,yBAAyB,OAAQ,YAA6E;CAEzH,OAAO,QAAgC,6BAA6B,GACpE;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { Ix as BillingBraintreeWebhookBody, qb as BillingWebhookRead, rx as BillingRevenuecatWebhookBody } from "../chunks/index.js";
2
+ import { Rx as BillingBraintreeWebhookBody, Yb as BillingWebhookRead, ax as BillingRevenuecatWebhookBody } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/biblio-billing-webhooks/biblio-billing-webhooks.d.ts
5
5
  export declare const getBillingBraintreeWebhookUrl: () => string;
@@ -1 +1 @@
1
- {"version":3,"file":"biblio-billing-webhooks.js","names":[],"sources":["../../src/api/biblio-billing-webhooks/biblio-billing-webhooks.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.21.0\n */\nimport type {\n BillingBraintreeWebhookBody,\n BillingRevenuecatWebhookBody,\n BillingWebhookRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getBillingBraintreeWebhookUrl = () => {\n\n\n\n\n return `/billing/webhooks/braintree`\n}\n\n/**\n * Accept application/x-www-form-urlencoded bt_signature and bt_payload, exactly once each, up to 512 KiB. Verify the provider signature, reconcile the existing subscription receipt and deduplicate events. No user login is used. Synthetic fixture values below illustrate transport only and cannot pass signature verification. An accepted response confirms processing, not a new purchase request.\n * @summary Receive a signed Braintree notification\n */\nexport const billingBraintreeWebhook = async (billingBraintreeWebhookBody: BillingBraintreeWebhookBody, options?: Parameters<typeof request>[1]): Promise<BillingWebhookRead> => {\n const formUrlEncoded = new URLSearchParams();\nformUrlEncoded.append(`bt_payload`, billingBraintreeWebhookBody.bt_payload);\nformUrlEncoded.append(`bt_signature`, billingBraintreeWebhookBody.bt_signature);\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<BillingWebhookRead>(getBillingBraintreeWebhookUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/x-www-form-urlencoded', ...getHeaders(options?.headers) },\n body: formUrlEncoded\n }\n);}\n\n\nexport const getBillingRevenuecatWebhookUrl = () => {\n\n\n\n\n return `/billing/webhooks/revenuecat`\n}\n\n/**\n * Accept a JSON provider event up to 512 KiB with Authorization: Bearer <configured webhook token>. This credential is separate from user authentication. Deduplicate event IDs within provider/environment, resolve the server-issued app_user_id and require reviewed product mappings. Purchases use price_in_purchased_currency for non-USD amounts; the event's price is not a EUR fallback. Events cannot grant another profile's receipt. TEST events may omit purchase-specific fields.\n * @summary Receive an authenticated RevenueCat store event\n */\nexport const billingRevenuecatWebhook = async (billingRevenuecatWebhookBody: BillingRevenuecatWebhookBody, options?: Parameters<typeof request>[1]): Promise<BillingWebhookRead> => {\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<BillingWebhookRead>(getBillingRevenuecatWebhookUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingRevenuecatWebhookBody)\n }\n);}\n\n\n"],"mappings":";;;AAeA,MAAa,sCAAsC;CAKjD,OAAO;AACT;;;;;AAMA,MAAa,0BAA0B,OAAO,6BAA0D,YAAyE;CAC7K,MAAM,iBAAiB,IAAI,gBAAgB;CAC/C,eAAe,OAAO,cAAc,4BAA4B,UAAU;CAC1E,eAAe,OAAO,gBAAgB,4BAA4B,YAAY;CAE1E,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,QAA4B,8BAA8B,GAC/D;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAqC,GAAG,WAAW,SAAS,OAAO;EAAE;EAChG,MAAM;CACR,CACF;AAAE;AAGF,MAAa,uCAAuC;CAKlD,OAAO;AACT;;;;;AAMA,MAAa,2BAA2B,OAAO,8BAA4D,YAAyE;CAEhL,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,QAA4B,+BAA+B,GAChE;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,4BAA4B;CACnD,CACF;AAAE"}
1
+ {"version":3,"file":"biblio-billing-webhooks.js","names":[],"sources":["../../src/api/biblio-billing-webhooks/biblio-billing-webhooks.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.22.10\n */\nimport type {\n BillingBraintreeWebhookBody,\n BillingRevenuecatWebhookBody,\n BillingWebhookRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getBillingBraintreeWebhookUrl = () => {\n\n\n\n\n return `/billing/webhooks/braintree`\n}\n\n/**\n * Accept application/x-www-form-urlencoded bt_signature and bt_payload, exactly once each, up to 512 KiB. Verify the provider signature, reconcile the existing subscription receipt and deduplicate events. No user login is used. Synthetic fixture values below illustrate transport only and cannot pass signature verification. An accepted response confirms processing, not a new purchase request.\n * @summary Receive a signed Braintree notification\n */\nexport const billingBraintreeWebhook = async (billingBraintreeWebhookBody: BillingBraintreeWebhookBody, options?: Parameters<typeof request>[1]): Promise<BillingWebhookRead> => {\n const formUrlEncoded = new URLSearchParams();\nformUrlEncoded.append(`bt_payload`, billingBraintreeWebhookBody.bt_payload);\nformUrlEncoded.append(`bt_signature`, billingBraintreeWebhookBody.bt_signature);\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<BillingWebhookRead>(getBillingBraintreeWebhookUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/x-www-form-urlencoded', ...getHeaders(options?.headers) },\n body: formUrlEncoded\n }\n);}\n\n\nexport const getBillingRevenuecatWebhookUrl = () => {\n\n\n\n\n return `/billing/webhooks/revenuecat`\n}\n\n/**\n * Accept a JSON provider event up to 512 KiB with Authorization: Bearer <configured webhook token>. This credential is separate from user authentication. Deduplicate event IDs within provider/environment, resolve the server-issued app_user_id and require reviewed product mappings. Purchases use price_in_purchased_currency for non-USD amounts; the event's price is not a EUR fallback. Events cannot grant another profile's receipt. TEST events may omit purchase-specific fields.\n * @summary Receive an authenticated RevenueCat store event\n */\nexport const billingRevenuecatWebhook = async (billingRevenuecatWebhookBody: BillingRevenuecatWebhookBody, options?: Parameters<typeof request>[1]): Promise<BillingWebhookRead> => {\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<BillingWebhookRead>(getBillingRevenuecatWebhookUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingRevenuecatWebhookBody)\n }\n);}\n\n\n"],"mappings":";;;AAeA,MAAa,sCAAsC;CAKjD,OAAO;AACT;;;;;AAMA,MAAa,0BAA0B,OAAO,6BAA0D,YAAyE;CAC7K,MAAM,iBAAiB,IAAI,gBAAgB;CAC/C,eAAe,OAAO,cAAc,4BAA4B,UAAU;CAC1E,eAAe,OAAO,gBAAgB,4BAA4B,YAAY;CAE1E,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,QAA4B,8BAA8B,GAC/D;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAqC,GAAG,WAAW,SAAS,OAAO;EAAE;EAChG,MAAM;CACR,CACF;AAAE;AAGF,MAAa,uCAAuC;CAKlD,OAAO;AACT;;;;;AAMA,MAAa,2BAA2B,OAAO,8BAA4D,YAAyE;CAEhL,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,QAA4B,+BAA+B,GAChE;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,4BAA4B;CACnD,CACF;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { $n as PromotionGeneratorPage, Ax as BillingCheckoutRead, Cx as BillingIdentityWrite, Dx as BillingClientTokenRead, Ex as BillingClientTokenWrite, Gn as PromotionRevealWrite, Jb as BillingTransactionPage, Kn as PromotionRedemptionRead, Mx as BillingCancelWrite, Nx as BillingCancellationFeedbackParams, Px as BillingCancellationFeedbackPage, Qb as BillingSubscriptionRead, Qn as PromotionWrite, Sx as BillingListProductsParams, Xn as PromotionPage, Yb as BillingTransactionRead, Yn as PromotionRedeemWrite, Zb as BillingSubscriptionPage, Zn as PromotionGeneratorWrite, _x as BillingPaymentMethodWrite, bx as BillingListSubscriptionsParams, cx as BillingPromotionRedemptionsParams, dr as PromotionCodeListRead, dx as BillingProductPage, er as PromotionGeneratorRead, ex as BillingSubscriptionHistoryParams, fr as PromotionCapacityRead, fx as BillingProductRead, hx as BillingProductAvailabilityWrite, ir as PromotionExportRead, kx as BillingCheckoutSubmitWrite, lx as BillingPromotionGeneratorsParams, or as PromotionCreatedRead, ox as BillingQuoteWrite, qn as PromotionRedemptionHistoryPage, rr as PromotionExportWrite, sx as BillingProviderProductWrite, tx as BillingSubscriptionHistoryPage, ur as PromotionCodeRead, ux as BillingProductWrite, wx as BillingIdentityRead, xx as BillingListPromotionsParams, yx as BillingListTransactionsParams } from "../chunks/index.js";
2
+ import { $b as BillingSubscriptionPage, $n as PromotionGeneratorPage, Cx as BillingListPromotionsParams, Ex as BillingIdentityRead, Fx as BillingCancellationFeedbackParams, Gn as PromotionRevealWrite, Ix as BillingCancellationFeedbackPage, Kn as PromotionRedemptionRead, Mx as BillingCheckoutRead, Ox as BillingClientTokenWrite, Px as BillingCancelWrite, Qn as PromotionWrite, Sx as BillingListSubscriptionsParams, Tx as BillingIdentityWrite, Xb as BillingTransactionPage, Xn as PromotionPage, Yn as PromotionRedeemWrite, Zb as BillingTransactionRead, Zn as PromotionGeneratorWrite, _x as BillingProductAvailabilityWrite, cx as BillingQuoteWrite, dr as PromotionCodeListRead, dx as BillingPromotionGeneratorsParams, er as PromotionGeneratorRead, ex as BillingSubscriptionRead, fr as PromotionCapacityRead, fx as BillingProductWrite, ir as PromotionExportRead, jx as BillingCheckoutSubmitWrite, kx as BillingClientTokenRead, lx as BillingProviderProductWrite, mx as BillingProductRead, nx as BillingSubscriptionHistoryParams, or as PromotionCreatedRead, px as BillingProductPage, qn as PromotionRedemptionHistoryPage, rr as PromotionExportWrite, rx as BillingSubscriptionHistoryPage, ur as PromotionCodeRead, ux as BillingPromotionRedemptionsParams, wx as BillingListProductsParams, xx as BillingListTransactionsParams, yx as BillingPaymentMethodWrite } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/biblio-billing/biblio-billing.d.ts
5
5
  export declare const getBillingCreateProductUrl: (catalogueId: number) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"biblio-billing.js","names":[],"sources":["../../src/api/biblio-billing/biblio-billing.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.21.0\n */\nimport type {\n BillingCancelWrite,\n BillingCancellationFeedbackPage,\n BillingCancellationFeedbackParams,\n BillingCheckoutRead,\n BillingCheckoutSubmitWrite,\n BillingClientTokenRead,\n BillingClientTokenWrite,\n BillingIdentityRead,\n BillingIdentityWrite,\n BillingListProductsParams,\n BillingListPromotionsParams,\n BillingListSubscriptionsParams,\n BillingListTransactionsParams,\n BillingPaymentMethodWrite,\n BillingProductAvailabilityWrite,\n BillingProductPage,\n BillingProductRead,\n BillingProductWrite,\n BillingPromotionGeneratorsParams,\n BillingPromotionRedemptionsParams,\n BillingProviderProductWrite,\n BillingQuoteWrite,\n BillingSubscriptionHistoryPage,\n BillingSubscriptionHistoryParams,\n BillingSubscriptionPage,\n BillingSubscriptionRead,\n BillingTransactionPage,\n BillingTransactionRead,\n PromotionCapacityRead,\n PromotionCodeListRead,\n PromotionCodeRead,\n PromotionCreatedRead,\n PromotionExportRead,\n PromotionExportWrite,\n PromotionGeneratorPage,\n PromotionGeneratorRead,\n PromotionGeneratorWrite,\n PromotionPage,\n PromotionRedeemWrite,\n PromotionRedemptionHistoryPage,\n PromotionRedemptionRead,\n PromotionRevealWrite,\n PromotionWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getBillingCreateProductUrl = (catalogueId: number,) => {\n\n\n\n\n return `/billing/catalogues/${catalogueId}/products`\n}\n\n/**\n * A global commercial operator creates an offer and its server-owned net price/tax. New offers default to inactive. Fixed offers need accessMonths or an institutional template; recurring offers cannot use a template. Retention offers require the customer's dated agreement. Requires high-assurance authentication.\n * @summary Create a catalogue billing offer\n */\nexport const billingCreateProduct = async (catalogueId: number,\n billingProductWrite: BillingProductWrite, options?: Parameters<typeof request>[1]): Promise<BillingProductRead> => {\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<BillingProductRead>(getBillingCreateProductUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingProductWrite)\n }\n);}\n\n\nexport const getBillingGeneratePromotionsUrl = (catalogueId: number,) => {\n\n\n\n\n return `/billing/catalogues/${catalogueId}/promotion-batches`\n}\n\n/**\n * Create 1–500 independent rules and encrypted distribution codes atomically from one reviewed template. Each code is the optional prefix followed by 20 unambiguous characters; rule.code must be null. rule.quantity is stock per generated rule, not the number of codes. Requires global commercial authority. Requires high-assurance authentication.\n * @summary Generate a bounded promotion-code batch\n */\nexport const billingGeneratePromotions = async (catalogueId: number,\n promotionGeneratorWrite: PromotionGeneratorWrite, options?: Parameters<typeof request>[1]): Promise<PromotionCodeListRead> => {\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<PromotionCodeListRead>(getBillingGeneratePromotionsUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(promotionGeneratorWrite)\n }\n);}\n\n\nexport const getBillingPromotionGeneratorsUrl = (catalogueId: number,\n params?: BillingPromotionGeneratorsParams,) => {\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 ? `/billing/catalogues/${catalogueId}/promotion-generators?${stringifiedParams}` : `/billing/catalogues/${catalogueId}/promotion-generators`\n}\n\n/**\n * Global commercial operators list safe generator definitions, newest first. Includes historical sourceMask and partial rule fields when known; codes and private source metadata require a separate audited export.\n * @summary List catalogue promotion generators\n */\nexport const billingPromotionGenerators = async (catalogueId: number,\n params?: BillingPromotionGeneratorsParams, options?: Parameters<typeof request>[1]): Promise<PromotionGeneratorPage> => {\n\n return request<PromotionGeneratorPage>(getBillingPromotionGeneratorsUrl(catalogueId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingListPromotionsUrl = (catalogueId: number,\n params?: BillingListPromotionsParams,) => {\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 ? `/billing/catalogues/${catalogueId}/promotions?${stringifiedParams}` : `/billing/catalogues/${catalogueId}/promotions`\n}\n\n/**\n * Catalogue finance operators list rule metadata, including inactive rules, ordered by promotion ID. Codes are deliberately omitted; explicit audited reveal or export is required to distribute codes.\n * @summary List catalogue promotion rules\n */\nexport const billingListPromotions = async (catalogueId: number,\n params?: BillingListPromotionsParams, options?: Parameters<typeof request>[1]): Promise<PromotionPage> => {\n\n return request<PromotionPage>(getBillingListPromotionsUrl(catalogueId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingCreatePromotionUrl = (catalogueId: number,) => {\n\n\n\n\n return `/billing/catalogues/${catalogueId}/promotions`\n}\n\n/**\n * A global commercial operator creates bounded promotion stock for a catalogue. Discounts apply to explicit checkouts; benefits without payment-method requirements can be redeemed directly. Null code generates three groups of six unambiguous characters. Explicit codes retain their display form; lookup uses NFKC, trim and casefold normalization. Targets must belong to the catalogue. Requires high-assurance authentication.\n * @summary Create a discount or access benefit\n */\nexport const billingCreatePromotion = async (catalogueId: number,\n promotionWrite: PromotionWrite, options?: Parameters<typeof request>[1]): Promise<PromotionCreatedRead> => {\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<PromotionCreatedRead>(getBillingCreatePromotionUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(promotionWrite)\n }\n);}\n\n\nexport const getBillingExportPromotionCodesUrl = (catalogueId: number,) => {\n\n\n\n\n return `/billing/catalogues/${catalogueId}/promotions/export`\n}\n\n/**\n * Global commercial operators decrypt selected catalogue codes in one audited transaction. Supply unique promotionIds and a reason; all IDs must belong to the selected catalogue or the entire export is refused. The JSON data is ordered by promotion ID. Responses are private, no-store. Requires high-assurance authentication.\n * @summary Export selected promotion codes with an audit reason\n */\nexport const billingExportPromotionCodes = async (catalogueId: number,\n promotionExportWrite: PromotionExportWrite, options?: Parameters<typeof request>[1]): Promise<PromotionExportRead> => {\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<PromotionExportRead>(getBillingExportPromotionCodesUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(promotionExportWrite)\n }\n);}\n\n\nexport const getBillingQuoteCheckoutUrl = () => {\n\n\n\n\n return `/billing/checkouts`\n}\n\n/**\n * Freeze server-priced purchase and renewal terms for 15 minutes and reserve promotion stock. Reuse requestKey with the same product and normalized promotion set to retrieve the same checkout; changing either under the same key returns 409. No payment is submitted by quoting. Display recurring, renewalAmount and expiresAt before obtaining consent. A fully discounted offer without a required payment method can become fixed access without renewal. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Quote a personal checkout\n */\nexport const billingQuoteCheckout = async (billingQuoteWrite: BillingQuoteWrite, options?: Parameters<typeof request>[1]): Promise<BillingCheckoutRead> => {\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<BillingCheckoutRead>(getBillingQuoteCheckoutUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingQuoteWrite)\n }\n);}\n\n\nexport const getBillingReadCheckoutUrl = (checkoutId: number,) => {\n\n\n\n\n return `/billing/checkouts/${checkoutId}`\n}\n\n/**\n * Return persisted quote and outcome without contacting the payment provider. A submitting or unknown checkout requires the explicit reconcile operation; reading it does not retry payment. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached.\n * @summary Read the current profile's checkout\n */\nexport const billingReadCheckout = async (checkoutId: number, options?: Parameters<typeof request>[1]): Promise<BillingCheckoutRead> => {\n\n return request<BillingCheckoutRead>(getBillingReadCheckoutUrl(checkoutId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingReconcileCheckoutUrl = (checkoutId: number,) => {\n\n\n\n\n return `/billing/checkouts/${checkoutId}/reconcile`\n}\n\n/**\n * Look up provider evidence using the checkout's existing operation identity and complete the same purchase when a matching receipt is found. This never resubmits payment. An absent receipt leaves the checkout submitting or unknown; terminal and quoted states are returned unchanged. Environment and quote integrity must match before access can be granted. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Reconcile an uncertain checkout\n */\nexport const billingReconcileCheckout = async (checkoutId: number, options?: Parameters<typeof request>[1]): Promise<BillingCheckoutRead> => {\n\n return request<BillingCheckoutRead>(getBillingReconcileCheckoutUrl(checkoutId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getBillingSubmitCheckoutUrl = (checkoutId: number,) => {\n\n\n\n\n return `/billing/checkouts/${checkoutId}/submit`\n}\n\n/**\n * Submit the owned quote with acceptedTerms=true and a single-use provider nonce when payment or renewal requires it. Completed, submitting and unknown checkouts are returned without another charge. HTTP 200 alone does not mean payment succeeded: complete confirms the receipt, failed records a refusal, and unknown preserves an ambiguous provider outcome. Reconcile the same checkout after uncertainty; do not create a replacement payment. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Submit an accepted checkout\n */\nexport const billingSubmitCheckout = async (checkoutId: number,\n billingCheckoutSubmitWrite: BillingCheckoutSubmitWrite, options?: Parameters<typeof request>[1]): Promise<BillingCheckoutRead> => {\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<BillingCheckoutRead>(getBillingSubmitCheckoutUrl(checkoutId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingCheckoutSubmitWrite)\n }\n);}\n\n\nexport const getBillingCreateClientTokenUrl = () => {\n\n\n\n\n return `/billing/client-token`\n}\n\n/**\n * Obtain a Braintree client token for an owned, unexpired quoted checkout in the current environment. Pass it to the provider SDK to collect a single-use paymentMethodNonce, then submit the checkout. The token is sensitive and must not be logged or persisted in client analytics. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Create a checkout payment client token\n */\nexport const billingCreateClientToken = async (billingClientTokenWrite: BillingClientTokenWrite, options?: Parameters<typeof request>[1]): Promise<BillingClientTokenRead> => {\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<BillingClientTokenRead>(getBillingCreateClientTokenUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingClientTokenWrite)\n }\n);}\n\n\nexport const getBillingPrepareIdentityUrl = () => {\n\n\n\n\n return `/billing/identity`\n}\n\n/**\n * Return or create the stable server-issued billing subject for the selected provider in the configured environment. Supply this subject to the mobile billing SDK; never substitute a profile ID or email. This explicit request does not grant course access or charge a payment method. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Prepare the current profile's billing identity\n */\nexport const billingPrepareIdentity = async (billingIdentityWrite: BillingIdentityWrite, options?: Parameters<typeof request>[1]): Promise<BillingIdentityRead> => {\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<BillingIdentityRead>(getBillingPrepareIdentityUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingIdentityWrite)\n }\n);}\n\n\nexport const getBillingListProductsUrl = (params?: BillingListProductsParams,) => {\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 ? `/billing/products?${stringifiedParams}` : `/billing/products`\n}\n\n/**\n * List active offers visible to the profile, with server-calculated tax-inclusive prices. Retention offers appear only within seven days of their exact institution agreement's end. checkoutAvailable reflects configured web payment capability; providerProducts identifies active mappings in the current billing environment. Listing never starts a purchase. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached.\n * @summary List personal purchase offers\n */\nexport const billingListProducts = async (params?: BillingListProductsParams, options?: Parameters<typeof request>[1]): Promise<BillingProductPage> => {\n\n return request<BillingProductPage>(getBillingListProductsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingSetOfferAvailabilityUrl = (productId: number,) => {\n\n\n\n\n return `/billing/products/${productId}/availability`\n}\n\n/**\n * Set offer availability after commercial review and record the reason in the audit trail. Requires catalogue finance and global commercial authority. Returns 204 with no response body. Requires high-assurance authentication.\n * @summary Activate or withdraw an offer\n */\nexport const billingSetOfferAvailability = async (productId: number,\n billingProductAvailabilityWrite: BillingProductAvailabilityWrite, 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>(getBillingSetOfferAvailabilityUrl(productId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingProductAvailabilityWrite)\n }\n);}\n\n\nexport const getBillingBindProviderProductUrl = (productId: number,) => {\n\n\n\n\n return `/billing/products/${productId}/provider`\n}\n\n/**\n * Catalogue finance operators associate an offer with an exact provider product and sandbox or production environment. A provider/environment/product identifier cannot be shared by different offers. Store products must be public recurring offers. Returns 204 with no response body. Requires high-assurance authentication.\n * @summary Bind an offer to a provider product\n */\nexport const billingBindProviderProduct = async (productId: number,\n billingProviderProductWrite: BillingProviderProductWrite, 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>(getBillingBindProviderProductUrl(productId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingProviderProductWrite)\n }\n);}\n\n\nexport const getBillingPromotionGeneratorUrl = (generatorId: number,) => {\n\n\n\n\n return `/billing/promotion-generators/${generatorId}`\n}\n\n/**\n * Return a safe definition to a global commercial operator. batchSize counts generated codes while rule.quantity describes permitted uses of each code. Historical missing rule values stay null.\n * @summary Read a promotion generator definition\n */\nexport const billingPromotionGenerator = async (generatorId: number, options?: Parameters<typeof request>[1]): Promise<PromotionGeneratorRead> => {\n\n return request<PromotionGeneratorRead>(getBillingPromotionGeneratorUrl(generatorId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingRedeemPromotionUrl = () => {\n\n\n\n\n return `/billing/promotions/redeem`\n}\n\n/**\n * Redeem a usable benefit code that does not require a payment method, atomically consuming stock and creating personal access through shared contracts. Discounts use checkout instead. Reusing requestKey for the same promotion returns the previous redemption; reuse for another code returns 409. Case/Unicode-normalized lookup, per-user stock and access-window limits apply. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Redeem an access benefit for the current profile\n */\nexport const billingRedeemPromotion = async (promotionRedeemWrite: PromotionRedeemWrite, options?: Parameters<typeof request>[1]): Promise<PromotionRedemptionRead> => {\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<PromotionRedemptionRead>(getBillingRedeemPromotionUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(promotionRedeemWrite)\n }\n);}\n\n\nexport const getBillingPromotionCapacityUrl = (promotionId: number,) => {\n\n\n\n\n return `/billing/promotions/${promotionId}/capacity`\n}\n\n/**\n * Global commercial operators inspect total and per-user limits, redeemed stock and live reservations. Submitting or unknown checkouts keep reservations even after quote expiry. remaining is max(0, quantity - redeemed - reserved); a positive count alone does not prove a rule is active or usable.\n * @summary Inspect promotion stock and payment reservations\n */\nexport const billingPromotionCapacity = async (promotionId: number, options?: Parameters<typeof request>[1]): Promise<PromotionCapacityRead> => {\n\n return request<PromotionCapacityRead>(getBillingPromotionCapacityUrl(promotionId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingRevealPromotionCodeUrl = (promotionId: number,) => {\n\n\n\n\n return `/billing/promotions/${promotionId}/code`\n}\n\n/**\n * A catalogue finance operator decrypts one distribution code and records the supplied reason. The response is private, no-store; do not expose it in public reports. Requires high-assurance authentication.\n * @summary Reveal one promotion code with an audit reason\n */\nexport const billingRevealPromotionCode = async (promotionId: number,\n promotionRevealWrite: PromotionRevealWrite, options?: Parameters<typeof request>[1]): Promise<PromotionCodeRead> => {\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<PromotionCodeRead>(getBillingRevealPromotionCodeUrl(promotionId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(promotionRevealWrite)\n }\n);}\n\n\nexport const getBillingPromotionRedemptionsUrl = (promotionId: number,\n params?: BillingPromotionRedemptionsParams,) => {\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 ? `/billing/promotions/${promotionId}/redemptions?${stringifiedParams}` : `/billing/promotions/${promotionId}/redemptions`\n}\n\n/**\n * Global commercial operators list a promotion's native and imported redemptions, newest first. Historical beneficiary, contract, transaction, discount and time references can be null; do not infer a payment from a redemption. Codes and raw source identifiers are omitted.\n * @summary List promotion redemption evidence\n */\nexport const billingPromotionRedemptions = async (promotionId: number,\n params?: BillingPromotionRedemptionsParams, options?: Parameters<typeof request>[1]): Promise<PromotionRedemptionHistoryPage> => {\n\n return request<PromotionRedemptionHistoryPage>(getBillingPromotionRedemptionsUrl(promotionId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingRestoreStorePurchasesUrl = () => {\n\n\n\n\n return `/billing/store/restore`\n}\n\n/**\n * Fetch RevenueCat evidence for the server-issued billing subject and reconcile supported store receipts in the current environment with active provider mappings. Receipts belonging to another profile are refused. Unknown receipt price, tax or renewal values stay unknown. The returned page contains restored subscriptions and can be empty; there is no client-supplied receipt-owner ID. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Restore the current profile's mobile purchases\n */\nexport const billingRestoreStorePurchases = async (billingIdentityWrite: BillingIdentityWrite, options?: Parameters<typeof request>[1]): Promise<BillingSubscriptionPage> => {\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<BillingSubscriptionPage>(getBillingRestoreStorePurchasesUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingIdentityWrite)\n }\n);}\n\n\nexport const getBillingListSubscriptionsUrl = (params?: BillingListSubscriptionsParams,) => {\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 ? `/billing/subscriptions?${stringifiedParams}` : `/billing/subscriptions`\n}\n\n/**\n * List local subscription projections, newest first. No provider refresh occurs. autoRenew=null means renewal is unknown, and unknown historical price/currency remain null; use explicit reconciliation or store restoration to obtain current evidence. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached.\n * @summary List the current profile's subscriptions\n */\nexport const billingListSubscriptions = async (params?: BillingListSubscriptionsParams, options?: Parameters<typeof request>[1]): Promise<BillingSubscriptionPage> => {\n\n return request<BillingSubscriptionPage>(getBillingListSubscriptionsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingReadSubscriptionUrl = (subscriptionId: number,) => {\n\n\n\n\n return `/billing/subscriptions/${subscriptionId}`\n}\n\n/**\n * Read the local subscription and its known access, price and renewal terms. managementUrl is provided for mobile store subscriptions. This GET neither refreshes receipts nor changes renewal. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached.\n * @summary Read the current profile's subscription\n */\nexport const billingReadSubscription = async (subscriptionId: number, options?: Parameters<typeof request>[1]): Promise<BillingSubscriptionRead> => {\n\n return request<BillingSubscriptionRead>(getBillingReadSubscriptionUrl(subscriptionId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingCancelSubscriptionUrl = (subscriptionId: number,) => {\n\n\n\n\n return `/billing/subscriptions/${subscriptionId}/cancel`\n}\n\n/**\n * Cancel Braintree renewal and project the provider-confirmed access end, or cancel a local fixed subscription. Existing paid access follows the confirmed period. Optional feedback is stored separately. Mobile store renewal must be managed through managementUrl; this operation returns 409 for stores. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Cancel a personal subscription's renewal\n */\nexport const billingCancelSubscription = async (subscriptionId: number,\n billingCancelWrite: BillingCancelWrite, options?: Parameters<typeof request>[1]): Promise<BillingSubscriptionRead> => {\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<BillingSubscriptionRead>(getBillingCancelSubscriptionUrl(subscriptionId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingCancelWrite)\n }\n);}\n\n\nexport const getBillingCancellationFeedbackUrl = (subscriptionId: number,\n params?: BillingCancellationFeedbackParams,) => {\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 ? `/billing/subscriptions/${subscriptionId}/cancellation-feedback?${stringifiedParams}` : `/billing/subscriptions/${subscriptionId}/cancellation-feedback`\n}\n\n/**\n * List only this profile's recorded cancellation feedback for the owned subscription, newest first. Missing historical answers and dates stay null. Feedback is not evidence of current provider renewal state. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached.\n * @summary List an owned subscription's cancellation feedback\n */\nexport const billingCancellationFeedback = async (subscriptionId: number,\n params?: BillingCancellationFeedbackParams, options?: Parameters<typeof request>[1]): Promise<BillingCancellationFeedbackPage> => {\n\n return request<BillingCancellationFeedbackPage>(getBillingCancellationFeedbackUrl(subscriptionId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingSubscriptionClientTokenUrl = (subscriptionId: number,) => {\n\n\n\n\n return `/billing/subscriptions/${subscriptionId}/client-token`\n}\n\n/**\n * Initialize payment-method collection for an owned Braintree subscription whose renewal is confirmed active. Unknown renewal must be reconciled first; store and nonrenewing subscriptions are not editable here. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Create a subscription payment-method token\n */\nexport const billingSubscriptionClientToken = async (subscriptionId: number, options?: Parameters<typeof request>[1]): Promise<BillingClientTokenRead> => {\n\n return request<BillingClientTokenRead>(getBillingSubscriptionClientTokenUrl(subscriptionId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getBillingSubscriptionHistoryUrl = (subscriptionId: number,\n params?: BillingSubscriptionHistoryParams,) => {\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 ? `/billing/subscriptions/${subscriptionId}/history?${stringifiedParams}` : `/billing/subscriptions/${subscriptionId}/history`\n}\n\n/**\n * List preserved subscription events, newest local identifier first. Source status and transactionType are evidence labels, not current renewal guarantees. Unknown source times remain null with clockBasis; amount may also be null and this projection does not supply a currency. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached.\n * @summary List an owned subscription's source events\n */\nexport const billingSubscriptionHistory = async (subscriptionId: number,\n params?: BillingSubscriptionHistoryParams, options?: Parameters<typeof request>[1]): Promise<BillingSubscriptionHistoryPage> => {\n\n return request<BillingSubscriptionHistoryPage>(getBillingSubscriptionHistoryUrl(subscriptionId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingUpdatePaymentMethodUrl = (subscriptionId: number,) => {\n\n\n\n\n return `/billing/subscriptions/${subscriptionId}/payment-method`\n}\n\n/**\n * Use a new provider SDK nonce to update the current profile's renewing Braintree subscription and apply the returned receipt. acceptedOutstandingBalance explicitly allows collection of an outstanding balance; it defaults to false. Store subscriptions use their original provider. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Update a renewing subscription's payment method\n */\nexport const billingUpdatePaymentMethod = async (subscriptionId: number,\n billingPaymentMethodWrite: BillingPaymentMethodWrite, options?: Parameters<typeof request>[1]): Promise<BillingSubscriptionRead> => {\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<BillingSubscriptionRead>(getBillingUpdatePaymentMethodUrl(subscriptionId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingPaymentMethodWrite)\n }\n);}\n\n\nexport const getBillingReconcileSubscriptionUrl = (subscriptionId: number,) => {\n\n\n\n\n return `/billing/subscriptions/${subscriptionId}/reconcile`\n}\n\n/**\n * Read the existing Braintree subscription, refresh authoritative renewal/access terms and project shared contract access. The existing provider identity and current billing environment must match. Use store restoration for App Store and Play Store subscriptions. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Refresh a Braintree subscription from its receipt\n */\nexport const billingReconcileSubscription = async (subscriptionId: number, options?: Parameters<typeof request>[1]): Promise<BillingSubscriptionRead> => {\n\n return request<BillingSubscriptionRead>(getBillingReconcileSubscriptionUrl(subscriptionId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getBillingListTransactionsUrl = (params?: BillingListTransactionsParams,) => {\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 ? `/billing/transactions?${stringifiedParams}` : `/billing/transactions`\n}\n\n/**\n * List private native and imported transactions, newest local identifier first. Historical timestamps, money and currency remain null when unverified. amountBasis distinguishes verified_receipt, historical_provider_evidence and unknown. listedAmountBeforeDiscount and calculatedAmountAfterDiscount preserve source arithmetic; they must not be presented as confirmed paid amounts. clockBasis describes time evidence. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached.\n * @summary List the current profile's payment history\n */\nexport const billingListTransactions = async (params?: BillingListTransactionsParams, options?: Parameters<typeof request>[1]): Promise<BillingTransactionPage> => {\n\n return request<BillingTransactionPage>(getBillingListTransactionsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingReadTransactionUrl = (transactionId: number,) => {\n\n\n\n\n return `/billing/transactions/${transactionId}`\n}\n\n/**\n * Return one transaction belonging to the authenticated profile. Historical timestamps, money and currency remain null when unverified. amountBasis distinguishes verified_receipt, historical_provider_evidence and unknown. listedAmountBeforeDiscount and calculatedAmountAfterDiscount preserve source arithmetic; they must not be presented as confirmed paid amounts. clockBasis describes time evidence. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached.\n * @summary Read an owned transaction's payment evidence\n */\nexport const billingReadTransaction = async (transactionId: number, options?: Parameters<typeof request>[1]): Promise<BillingTransactionRead> => {\n\n return request<BillingTransactionRead>(getBillingReadTransactionUrl(transactionId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAuDA,MAAa,8BAA8B,gBAAyB;CAKlE,OAAO,uBAAuB,YAAY;AAC5C;;;;;AAMA,MAAa,uBAAuB,OAAO,aACvC,qBAA0C,YAAyE;CAEnH,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,QAA4B,2BAA2B,WAAW,GACvE;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/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A,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAiC,iCAAiC,cAAc,GACrF;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,yBAAyB;CAChD,CACF;AAAE;AAGF,MAAa,sCAAsC,mBAA4B;CAK7E,OAAO,0BAA0B,eAAe;AAClD;;;;;AAMA,MAAa,+BAA+B,OAAO,gBAAwB,YAA8E;CAEvJ,OAAO,QAAiC,mCAAmC,cAAc,GACzF;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,iCAAiC,WAA4C;CACxF,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,0BAA0B,OAAO,QAAwC,YAA6E;CAEjK,OAAO,QAAgC,8BAA8B,MAAM,GAC3E;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,gCAAgC,kBAA2B;CAKtE,OAAO,yBAAyB;AAClC;;;;;AAMA,MAAa,yBAAyB,OAAO,eAAuB,YAA6E;CAE/I,OAAO,QAAgC,6BAA6B,aAAa,GACjF;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
1
+ {"version":3,"file":"biblio-billing.js","names":[],"sources":["../../src/api/biblio-billing/biblio-billing.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.22.10\n */\nimport type {\n BillingCancelWrite,\n BillingCancellationFeedbackPage,\n BillingCancellationFeedbackParams,\n BillingCheckoutRead,\n BillingCheckoutSubmitWrite,\n BillingClientTokenRead,\n BillingClientTokenWrite,\n BillingIdentityRead,\n BillingIdentityWrite,\n BillingListProductsParams,\n BillingListPromotionsParams,\n BillingListSubscriptionsParams,\n BillingListTransactionsParams,\n BillingPaymentMethodWrite,\n BillingProductAvailabilityWrite,\n BillingProductPage,\n BillingProductRead,\n BillingProductWrite,\n BillingPromotionGeneratorsParams,\n BillingPromotionRedemptionsParams,\n BillingProviderProductWrite,\n BillingQuoteWrite,\n BillingSubscriptionHistoryPage,\n BillingSubscriptionHistoryParams,\n BillingSubscriptionPage,\n BillingSubscriptionRead,\n BillingTransactionPage,\n BillingTransactionRead,\n PromotionCapacityRead,\n PromotionCodeListRead,\n PromotionCodeRead,\n PromotionCreatedRead,\n PromotionExportRead,\n PromotionExportWrite,\n PromotionGeneratorPage,\n PromotionGeneratorRead,\n PromotionGeneratorWrite,\n PromotionPage,\n PromotionRedeemWrite,\n PromotionRedemptionHistoryPage,\n PromotionRedemptionRead,\n PromotionRevealWrite,\n PromotionWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getBillingCreateProductUrl = (catalogueId: number,) => {\n\n\n\n\n return `/billing/catalogues/${catalogueId}/products`\n}\n\n/**\n * A global commercial operator creates an offer and its server-owned net price/tax. New offers default to inactive. Fixed offers need accessMonths or an institutional template; recurring offers cannot use a template. Retention offers require the customer's dated agreement. Requires high-assurance authentication.\n * @summary Create a catalogue billing offer\n */\nexport const billingCreateProduct = async (catalogueId: number,\n billingProductWrite: BillingProductWrite, options?: Parameters<typeof request>[1]): Promise<BillingProductRead> => {\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<BillingProductRead>(getBillingCreateProductUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingProductWrite)\n }\n);}\n\n\nexport const getBillingGeneratePromotionsUrl = (catalogueId: number,) => {\n\n\n\n\n return `/billing/catalogues/${catalogueId}/promotion-batches`\n}\n\n/**\n * Create 1–500 independent rules and encrypted distribution codes atomically from one reviewed template. Each code is the optional prefix followed by 20 unambiguous characters; rule.code must be null. rule.quantity is stock per generated rule, not the number of codes. Requires global commercial authority. Requires high-assurance authentication.\n * @summary Generate a bounded promotion-code batch\n */\nexport const billingGeneratePromotions = async (catalogueId: number,\n promotionGeneratorWrite: PromotionGeneratorWrite, options?: Parameters<typeof request>[1]): Promise<PromotionCodeListRead> => {\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<PromotionCodeListRead>(getBillingGeneratePromotionsUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(promotionGeneratorWrite)\n }\n);}\n\n\nexport const getBillingPromotionGeneratorsUrl = (catalogueId: number,\n params?: BillingPromotionGeneratorsParams,) => {\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 ? `/billing/catalogues/${catalogueId}/promotion-generators?${stringifiedParams}` : `/billing/catalogues/${catalogueId}/promotion-generators`\n}\n\n/**\n * Global commercial operators list safe generator definitions, newest first. Includes historical sourceMask and partial rule fields when known; codes and private source metadata require a separate audited export.\n * @summary List catalogue promotion generators\n */\nexport const billingPromotionGenerators = async (catalogueId: number,\n params?: BillingPromotionGeneratorsParams, options?: Parameters<typeof request>[1]): Promise<PromotionGeneratorPage> => {\n\n return request<PromotionGeneratorPage>(getBillingPromotionGeneratorsUrl(catalogueId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingListPromotionsUrl = (catalogueId: number,\n params?: BillingListPromotionsParams,) => {\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 ? `/billing/catalogues/${catalogueId}/promotions?${stringifiedParams}` : `/billing/catalogues/${catalogueId}/promotions`\n}\n\n/**\n * Catalogue finance operators list rule metadata, including inactive rules, ordered by promotion ID. Codes are deliberately omitted; explicit audited reveal or export is required to distribute codes.\n * @summary List catalogue promotion rules\n */\nexport const billingListPromotions = async (catalogueId: number,\n params?: BillingListPromotionsParams, options?: Parameters<typeof request>[1]): Promise<PromotionPage> => {\n\n return request<PromotionPage>(getBillingListPromotionsUrl(catalogueId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingCreatePromotionUrl = (catalogueId: number,) => {\n\n\n\n\n return `/billing/catalogues/${catalogueId}/promotions`\n}\n\n/**\n * A global commercial operator creates bounded promotion stock for a catalogue. Discounts apply to explicit checkouts; benefits without payment-method requirements can be redeemed directly. Null code generates three groups of six unambiguous characters. Explicit codes retain their display form; lookup uses NFKC, trim and casefold normalization. Targets must belong to the catalogue. Requires high-assurance authentication.\n * @summary Create a discount or access benefit\n */\nexport const billingCreatePromotion = async (catalogueId: number,\n promotionWrite: PromotionWrite, options?: Parameters<typeof request>[1]): Promise<PromotionCreatedRead> => {\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<PromotionCreatedRead>(getBillingCreatePromotionUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(promotionWrite)\n }\n);}\n\n\nexport const getBillingExportPromotionCodesUrl = (catalogueId: number,) => {\n\n\n\n\n return `/billing/catalogues/${catalogueId}/promotions/export`\n}\n\n/**\n * Global commercial operators decrypt selected catalogue codes in one audited transaction. Supply unique promotionIds and a reason; all IDs must belong to the selected catalogue or the entire export is refused. The JSON data is ordered by promotion ID. Responses are private, no-store. Requires high-assurance authentication.\n * @summary Export selected promotion codes with an audit reason\n */\nexport const billingExportPromotionCodes = async (catalogueId: number,\n promotionExportWrite: PromotionExportWrite, options?: Parameters<typeof request>[1]): Promise<PromotionExportRead> => {\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<PromotionExportRead>(getBillingExportPromotionCodesUrl(catalogueId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(promotionExportWrite)\n }\n);}\n\n\nexport const getBillingQuoteCheckoutUrl = () => {\n\n\n\n\n return `/billing/checkouts`\n}\n\n/**\n * Freeze server-priced purchase and renewal terms for 15 minutes and reserve promotion stock. Reuse requestKey with the same product and normalized promotion set to retrieve the same checkout; changing either under the same key returns 409. No payment is submitted by quoting. Display recurring, renewalAmount and expiresAt before obtaining consent. A fully discounted offer without a required payment method can become fixed access without renewal. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Quote a personal checkout\n */\nexport const billingQuoteCheckout = async (billingQuoteWrite: BillingQuoteWrite, options?: Parameters<typeof request>[1]): Promise<BillingCheckoutRead> => {\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<BillingCheckoutRead>(getBillingQuoteCheckoutUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingQuoteWrite)\n }\n);}\n\n\nexport const getBillingReadCheckoutUrl = (checkoutId: number,) => {\n\n\n\n\n return `/billing/checkouts/${checkoutId}`\n}\n\n/**\n * Return persisted quote and outcome without contacting the payment provider. A submitting or unknown checkout requires the explicit reconcile operation; reading it does not retry payment. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached.\n * @summary Read the current profile's checkout\n */\nexport const billingReadCheckout = async (checkoutId: number, options?: Parameters<typeof request>[1]): Promise<BillingCheckoutRead> => {\n\n return request<BillingCheckoutRead>(getBillingReadCheckoutUrl(checkoutId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingReconcileCheckoutUrl = (checkoutId: number,) => {\n\n\n\n\n return `/billing/checkouts/${checkoutId}/reconcile`\n}\n\n/**\n * Look up provider evidence using the checkout's existing operation identity and complete the same purchase when a matching receipt is found. This never resubmits payment. An absent receipt leaves the checkout submitting or unknown; terminal and quoted states are returned unchanged. Environment and quote integrity must match before access can be granted. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Reconcile an uncertain checkout\n */\nexport const billingReconcileCheckout = async (checkoutId: number, options?: Parameters<typeof request>[1]): Promise<BillingCheckoutRead> => {\n\n return request<BillingCheckoutRead>(getBillingReconcileCheckoutUrl(checkoutId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getBillingSubmitCheckoutUrl = (checkoutId: number,) => {\n\n\n\n\n return `/billing/checkouts/${checkoutId}/submit`\n}\n\n/**\n * Submit the owned quote with acceptedTerms=true and a single-use provider nonce when payment or renewal requires it. Completed, submitting and unknown checkouts are returned without another charge. HTTP 200 alone does not mean payment succeeded: complete confirms the receipt, failed records a refusal, and unknown preserves an ambiguous provider outcome. Reconcile the same checkout after uncertainty; do not create a replacement payment. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Submit an accepted checkout\n */\nexport const billingSubmitCheckout = async (checkoutId: number,\n billingCheckoutSubmitWrite: BillingCheckoutSubmitWrite, options?: Parameters<typeof request>[1]): Promise<BillingCheckoutRead> => {\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<BillingCheckoutRead>(getBillingSubmitCheckoutUrl(checkoutId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingCheckoutSubmitWrite)\n }\n);}\n\n\nexport const getBillingCreateClientTokenUrl = () => {\n\n\n\n\n return `/billing/client-token`\n}\n\n/**\n * Obtain a Braintree client token for an owned, unexpired quoted checkout in the current environment. Pass it to the provider SDK to collect a single-use paymentMethodNonce, then submit the checkout. The token is sensitive and must not be logged or persisted in client analytics. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Create a checkout payment client token\n */\nexport const billingCreateClientToken = async (billingClientTokenWrite: BillingClientTokenWrite, options?: Parameters<typeof request>[1]): Promise<BillingClientTokenRead> => {\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<BillingClientTokenRead>(getBillingCreateClientTokenUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingClientTokenWrite)\n }\n);}\n\n\nexport const getBillingPrepareIdentityUrl = () => {\n\n\n\n\n return `/billing/identity`\n}\n\n/**\n * Return or create the stable server-issued billing subject for the selected provider in the configured environment. Supply this subject to the mobile billing SDK; never substitute a profile ID or email. This explicit request does not grant course access or charge a payment method. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Prepare the current profile's billing identity\n */\nexport const billingPrepareIdentity = async (billingIdentityWrite: BillingIdentityWrite, options?: Parameters<typeof request>[1]): Promise<BillingIdentityRead> => {\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<BillingIdentityRead>(getBillingPrepareIdentityUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingIdentityWrite)\n }\n);}\n\n\nexport const getBillingListProductsUrl = (params?: BillingListProductsParams,) => {\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 ? `/billing/products?${stringifiedParams}` : `/billing/products`\n}\n\n/**\n * List active offers visible to the profile, with server-calculated tax-inclusive prices. Retention offers appear only within seven days of their exact institution agreement's end. checkoutAvailable reflects configured web payment capability; providerProducts identifies active mappings in the current billing environment. Listing never starts a purchase. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached.\n * @summary List personal purchase offers\n */\nexport const billingListProducts = async (params?: BillingListProductsParams, options?: Parameters<typeof request>[1]): Promise<BillingProductPage> => {\n\n return request<BillingProductPage>(getBillingListProductsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingSetOfferAvailabilityUrl = (productId: number,) => {\n\n\n\n\n return `/billing/products/${productId}/availability`\n}\n\n/**\n * Set offer availability after commercial review and record the reason in the audit trail. Requires catalogue finance and global commercial authority. Returns 204 with no response body. Requires high-assurance authentication.\n * @summary Activate or withdraw an offer\n */\nexport const billingSetOfferAvailability = async (productId: number,\n billingProductAvailabilityWrite: BillingProductAvailabilityWrite, 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>(getBillingSetOfferAvailabilityUrl(productId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingProductAvailabilityWrite)\n }\n);}\n\n\nexport const getBillingBindProviderProductUrl = (productId: number,) => {\n\n\n\n\n return `/billing/products/${productId}/provider`\n}\n\n/**\n * Catalogue finance operators associate an offer with an exact provider product and sandbox or production environment. A provider/environment/product identifier cannot be shared by different offers. Store products must be public recurring offers. Returns 204 with no response body. Requires high-assurance authentication.\n * @summary Bind an offer to a provider product\n */\nexport const billingBindProviderProduct = async (productId: number,\n billingProviderProductWrite: BillingProviderProductWrite, 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>(getBillingBindProviderProductUrl(productId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingProviderProductWrite)\n }\n);}\n\n\nexport const getBillingPromotionGeneratorUrl = (generatorId: number,) => {\n\n\n\n\n return `/billing/promotion-generators/${generatorId}`\n}\n\n/**\n * Return a safe definition to a global commercial operator. batchSize counts generated codes while rule.quantity describes permitted uses of each code. Historical missing rule values stay null.\n * @summary Read a promotion generator definition\n */\nexport const billingPromotionGenerator = async (generatorId: number, options?: Parameters<typeof request>[1]): Promise<PromotionGeneratorRead> => {\n\n return request<PromotionGeneratorRead>(getBillingPromotionGeneratorUrl(generatorId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingRedeemPromotionUrl = () => {\n\n\n\n\n return `/billing/promotions/redeem`\n}\n\n/**\n * Redeem a usable benefit code that does not require a payment method, atomically consuming stock and creating personal access through shared contracts. Discounts use checkout instead. Reusing requestKey for the same promotion returns the previous redemption; reuse for another code returns 409. Case/Unicode-normalized lookup, per-user stock and access-window limits apply. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Redeem an access benefit for the current profile\n */\nexport const billingRedeemPromotion = async (promotionRedeemWrite: PromotionRedeemWrite, options?: Parameters<typeof request>[1]): Promise<PromotionRedemptionRead> => {\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<PromotionRedemptionRead>(getBillingRedeemPromotionUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(promotionRedeemWrite)\n }\n);}\n\n\nexport const getBillingPromotionCapacityUrl = (promotionId: number,) => {\n\n\n\n\n return `/billing/promotions/${promotionId}/capacity`\n}\n\n/**\n * Global commercial operators inspect total and per-user limits, redeemed stock and live reservations. Submitting or unknown checkouts keep reservations even after quote expiry. remaining is max(0, quantity - redeemed - reserved); a positive count alone does not prove a rule is active or usable.\n * @summary Inspect promotion stock and payment reservations\n */\nexport const billingPromotionCapacity = async (promotionId: number, options?: Parameters<typeof request>[1]): Promise<PromotionCapacityRead> => {\n\n return request<PromotionCapacityRead>(getBillingPromotionCapacityUrl(promotionId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingRevealPromotionCodeUrl = (promotionId: number,) => {\n\n\n\n\n return `/billing/promotions/${promotionId}/code`\n}\n\n/**\n * A catalogue finance operator decrypts one distribution code and records the supplied reason. The response is private, no-store; do not expose it in public reports. Requires high-assurance authentication.\n * @summary Reveal one promotion code with an audit reason\n */\nexport const billingRevealPromotionCode = async (promotionId: number,\n promotionRevealWrite: PromotionRevealWrite, options?: Parameters<typeof request>[1]): Promise<PromotionCodeRead> => {\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<PromotionCodeRead>(getBillingRevealPromotionCodeUrl(promotionId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(promotionRevealWrite)\n }\n);}\n\n\nexport const getBillingPromotionRedemptionsUrl = (promotionId: number,\n params?: BillingPromotionRedemptionsParams,) => {\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 ? `/billing/promotions/${promotionId}/redemptions?${stringifiedParams}` : `/billing/promotions/${promotionId}/redemptions`\n}\n\n/**\n * Global commercial operators list a promotion's native and imported redemptions, newest first. Historical beneficiary, contract, transaction, discount and time references can be null; do not infer a payment from a redemption. Codes and raw source identifiers are omitted.\n * @summary List promotion redemption evidence\n */\nexport const billingPromotionRedemptions = async (promotionId: number,\n params?: BillingPromotionRedemptionsParams, options?: Parameters<typeof request>[1]): Promise<PromotionRedemptionHistoryPage> => {\n\n return request<PromotionRedemptionHistoryPage>(getBillingPromotionRedemptionsUrl(promotionId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingRestoreStorePurchasesUrl = () => {\n\n\n\n\n return `/billing/store/restore`\n}\n\n/**\n * Fetch RevenueCat evidence for the server-issued billing subject and reconcile supported store receipts in the current environment with active provider mappings. Receipts belonging to another profile are refused. Unknown receipt price, tax or renewal values stay unknown. The returned page contains restored subscriptions and can be empty; there is no client-supplied receipt-owner ID. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Restore the current profile's mobile purchases\n */\nexport const billingRestoreStorePurchases = async (billingIdentityWrite: BillingIdentityWrite, options?: Parameters<typeof request>[1]): Promise<BillingSubscriptionPage> => {\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<BillingSubscriptionPage>(getBillingRestoreStorePurchasesUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingIdentityWrite)\n }\n);}\n\n\nexport const getBillingListSubscriptionsUrl = (params?: BillingListSubscriptionsParams,) => {\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 ? `/billing/subscriptions?${stringifiedParams}` : `/billing/subscriptions`\n}\n\n/**\n * List local subscription projections, newest first. No provider refresh occurs. autoRenew=null means renewal is unknown, and unknown historical price/currency remain null; use explicit reconciliation or store restoration to obtain current evidence. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached.\n * @summary List the current profile's subscriptions\n */\nexport const billingListSubscriptions = async (params?: BillingListSubscriptionsParams, options?: Parameters<typeof request>[1]): Promise<BillingSubscriptionPage> => {\n\n return request<BillingSubscriptionPage>(getBillingListSubscriptionsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingReadSubscriptionUrl = (subscriptionId: number,) => {\n\n\n\n\n return `/billing/subscriptions/${subscriptionId}`\n}\n\n/**\n * Read the local subscription and its known access, price and renewal terms. managementUrl is provided for mobile store subscriptions. This GET neither refreshes receipts nor changes renewal. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached.\n * @summary Read the current profile's subscription\n */\nexport const billingReadSubscription = async (subscriptionId: number, options?: Parameters<typeof request>[1]): Promise<BillingSubscriptionRead> => {\n\n return request<BillingSubscriptionRead>(getBillingReadSubscriptionUrl(subscriptionId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingCancelSubscriptionUrl = (subscriptionId: number,) => {\n\n\n\n\n return `/billing/subscriptions/${subscriptionId}/cancel`\n}\n\n/**\n * Cancel Braintree renewal and project the provider-confirmed access end, or cancel a local fixed subscription. Existing paid access follows the confirmed period. Optional feedback is stored separately. Mobile store renewal must be managed through managementUrl; this operation returns 409 for stores. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Cancel a personal subscription's renewal\n */\nexport const billingCancelSubscription = async (subscriptionId: number,\n billingCancelWrite: BillingCancelWrite, options?: Parameters<typeof request>[1]): Promise<BillingSubscriptionRead> => {\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<BillingSubscriptionRead>(getBillingCancelSubscriptionUrl(subscriptionId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingCancelWrite)\n }\n);}\n\n\nexport const getBillingCancellationFeedbackUrl = (subscriptionId: number,\n params?: BillingCancellationFeedbackParams,) => {\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 ? `/billing/subscriptions/${subscriptionId}/cancellation-feedback?${stringifiedParams}` : `/billing/subscriptions/${subscriptionId}/cancellation-feedback`\n}\n\n/**\n * List only this profile's recorded cancellation feedback for the owned subscription, newest first. Missing historical answers and dates stay null. Feedback is not evidence of current provider renewal state. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached.\n * @summary List an owned subscription's cancellation feedback\n */\nexport const billingCancellationFeedback = async (subscriptionId: number,\n params?: BillingCancellationFeedbackParams, options?: Parameters<typeof request>[1]): Promise<BillingCancellationFeedbackPage> => {\n\n return request<BillingCancellationFeedbackPage>(getBillingCancellationFeedbackUrl(subscriptionId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingSubscriptionClientTokenUrl = (subscriptionId: number,) => {\n\n\n\n\n return `/billing/subscriptions/${subscriptionId}/client-token`\n}\n\n/**\n * Initialize payment-method collection for an owned Braintree subscription whose renewal is confirmed active. Unknown renewal must be reconciled first; store and nonrenewing subscriptions are not editable here. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Create a subscription payment-method token\n */\nexport const billingSubscriptionClientToken = async (subscriptionId: number, options?: Parameters<typeof request>[1]): Promise<BillingClientTokenRead> => {\n\n return request<BillingClientTokenRead>(getBillingSubscriptionClientTokenUrl(subscriptionId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getBillingSubscriptionHistoryUrl = (subscriptionId: number,\n params?: BillingSubscriptionHistoryParams,) => {\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 ? `/billing/subscriptions/${subscriptionId}/history?${stringifiedParams}` : `/billing/subscriptions/${subscriptionId}/history`\n}\n\n/**\n * List preserved subscription events, newest local identifier first. Source status and transactionType are evidence labels, not current renewal guarantees. Unknown source times remain null with clockBasis; amount may also be null and this projection does not supply a currency. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached.\n * @summary List an owned subscription's source events\n */\nexport const billingSubscriptionHistory = async (subscriptionId: number,\n params?: BillingSubscriptionHistoryParams, options?: Parameters<typeof request>[1]): Promise<BillingSubscriptionHistoryPage> => {\n\n return request<BillingSubscriptionHistoryPage>(getBillingSubscriptionHistoryUrl(subscriptionId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingUpdatePaymentMethodUrl = (subscriptionId: number,) => {\n\n\n\n\n return `/billing/subscriptions/${subscriptionId}/payment-method`\n}\n\n/**\n * Use a new provider SDK nonce to update the current profile's renewing Braintree subscription and apply the returned receipt. acceptedOutstandingBalance explicitly allows collection of an outstanding balance; it defaults to false. Store subscriptions use their original provider. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Update a renewing subscription's payment method\n */\nexport const billingUpdatePaymentMethod = async (subscriptionId: number,\n billingPaymentMethodWrite: BillingPaymentMethodWrite, options?: Parameters<typeof request>[1]): Promise<BillingSubscriptionRead> => {\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<BillingSubscriptionRead>(getBillingUpdatePaymentMethodUrl(subscriptionId),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(billingPaymentMethodWrite)\n }\n);}\n\n\nexport const getBillingReconcileSubscriptionUrl = (subscriptionId: number,) => {\n\n\n\n\n return `/billing/subscriptions/${subscriptionId}/reconcile`\n}\n\n/**\n * Read the existing Braintree subscription, refresh authoritative renewal/access terms and project shared contract access. The existing provider identity and current billing environment must match. Use store restoration for App Store and Play Store subscriptions. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached. Requires high-assurance authentication.\n * @summary Refresh a Braintree subscription from its receipt\n */\nexport const billingReconcileSubscription = async (subscriptionId: number, options?: Parameters<typeof request>[1]): Promise<BillingSubscriptionRead> => {\n\n return request<BillingSubscriptionRead>(getBillingReconcileSubscriptionUrl(subscriptionId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getBillingListTransactionsUrl = (params?: BillingListTransactionsParams,) => {\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 ? `/billing/transactions?${stringifiedParams}` : `/billing/transactions`\n}\n\n/**\n * List private native and imported transactions, newest local identifier first. Historical timestamps, money and currency remain null when unverified. amountBasis distinguishes verified_receipt, historical_provider_evidence and unknown. listedAmountBeforeDiscount and calculatedAmountAfterDiscount preserve source arithmetic; they must not be presented as confirmed paid amounts. clockBasis describes time evidence. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached.\n * @summary List the current profile's payment history\n */\nexport const billingListTransactions = async (params?: BillingListTransactionsParams, options?: Parameters<typeof request>[1]): Promise<BillingTransactionPage> => {\n\n return request<BillingTransactionPage>(getBillingListTransactionsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getBillingReadTransactionUrl = (transactionId: number,) => {\n\n\n\n\n return `/billing/transactions/${transactionId}`\n}\n\n/**\n * Return one transaction belonging to the authenticated profile. Historical timestamps, money and currency remain null when unverified. amountBasis distinguishes verified_receipt, historical_provider_evidence and unknown. listedAmountBeforeDiscount and calculatedAmountAfterDiscount preserve source arithmetic; they must not be presented as confirmed paid amounts. clockBasis describes time evidence. Uses the authenticated independent profile in the Biblio product context; support impersonation is refused. Responses are private and must not be cached.\n * @summary Read an owned transaction's payment evidence\n */\nexport const billingReadTransaction = async (transactionId: number, options?: Parameters<typeof request>[1]): Promise<BillingTransactionRead> => {\n\n return request<BillingTransactionRead>(getBillingReadTransactionUrl(transactionId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAuDA,MAAa,8BAA8B,gBAAyB;CAKlE,OAAO,uBAAuB,YAAY;AAC5C;;;;;AAMA,MAAa,uBAAuB,OAAO,aACvC,qBAA0C,YAAyE;CAEnH,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,QAA4B,2BAA2B,WAAW,GACvE;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,mBAAmB;CAC1C,CACF;AAAE;AAGF,MAAa,mCAAmC,gBAAyB;CAKvE,OAAO,uBAAuB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AAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,yBAAyB;CAChD,CACF;AAAE;AAGF,MAAa,sCAAsC,mBAA4B;CAK7E,OAAO,0BAA0B,eAAe;AAClD;;;;;AAMA,MAAa,+BAA+B,OAAO,gBAAwB,YAA8E;CAEvJ,OAAO,QAAiC,mCAAmC,cAAc,GACzF;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,iCAAiC,WAA4C;CACxF,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,0BAA0B,OAAO,QAAwC,YAA6E;CAEjK,OAAO,QAAgC,8BAA8B,MAAM,GAC3E;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,gCAAgC,kBAA2B;CAKtE,OAAO,yBAAyB;AAClC;;;;;AAMA,MAAa,yBAAyB,OAAO,eAAuB,YAA6E;CAE/I,OAAO,QAAgC,6BAA6B,aAAa,GACjF;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { Cf as EditorListRead, Ef as EditorDetailRead, Hn as ReadCatalogThemeParams, In as ReadEditorParams, My as ContentRead, Nc as LearningPathDetailRead, Oa as PackDetailRead, Ry as ContentPage, Un as ReadCatalogParams, Xo as ListEditorsParams, fn as ReadRecommendationsParams, fs as LikeRead, is as ListContentsParams, kb as CatalogRead, o as WebCourseAccessRead, un as RecommendationsRead, vn as ReadPackParams } from "../chunks/index.js";
2
+ import { Cf as EditorListRead, Ef as EditorDetailRead, Hn as ReadCatalogThemeParams, In as ReadEditorParams, Nc as LearningPathDetailRead, Ny as ContentRead, Oa as PackDetailRead, Un as ReadCatalogParams, Xo as ListEditorsParams, fn as ReadRecommendationsParams, fs as LikeRead, is as ListContentsParams, jb as CatalogRead, o as WebCourseAccessRead, un as RecommendationsRead, vn as ReadPackParams, zy as ContentPage } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/biblio-catalogue/biblio-catalogue.d.ts
5
5
  export declare const getListContentsUrl: (params?: ListContentsParams) => string;