@learnorama/mozaik-sdk 0.17.0-staging.56.1 → 0.17.2-staging.58.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 (290) hide show
  1. package/CVS-PLAYBACK.md +84 -124
  2. package/dist/api/account.d.ts +1 -1
  3. package/dist/api/account.js.map +1 -1
  4. package/dist/api/admin-catalogue.d.ts +1 -1
  5. package/dist/api/admin-catalogue.js.map +1 -1
  6. package/dist/api/admin-consumption.d.ts +1 -1
  7. package/dist/api/admin-consumption.js.map +1 -1
  8. package/dist/api/admin-contracts.d.ts +1 -1
  9. package/dist/api/admin-contracts.js.map +1 -1
  10. package/dist/api/admin-customer.d.ts +1 -1
  11. package/dist/api/admin-customer.js.map +1 -1
  12. package/dist/api/admin-desk.d.ts +1 -1
  13. package/dist/api/admin-desk.js.map +1 -1
  14. package/dist/api/admin-licenses.d.ts +1 -1
  15. package/dist/api/admin-licenses.js.map +1 -1
  16. package/dist/api/admin-partner-selections.d.ts +1 -1
  17. package/dist/api/admin-partner-selections.js.map +1 -1
  18. package/dist/api/admin-patrons.d.ts +1 -1
  19. package/dist/api/admin-patrons.js.map +1 -1
  20. package/dist/api/admin-reviews.d.ts +1 -1
  21. package/dist/api/admin-reviews.js.map +1 -1
  22. package/dist/api/admin-roles.d.ts +1 -1
  23. package/dist/api/admin-roles.js.map +1 -1
  24. package/dist/api/admin-support.d.ts +1 -1
  25. package/dist/api/admin-support.js.map +1 -1
  26. package/dist/api/admin-tenants.d.ts +1 -1
  27. package/dist/api/admin-tenants.js.map +1 -1
  28. package/dist/api/admin-tutoring.d.ts +1 -1
  29. package/dist/api/admin-tutoring.js.map +1 -1
  30. package/dist/api/admin-vod.d.ts +86 -0
  31. package/dist/api/admin-vod.js +194 -0
  32. package/dist/api/admin-vod.js.map +1 -0
  33. package/dist/api/auth-device.d.ts +1 -1
  34. package/dist/api/auth-device.js.map +1 -1
  35. package/dist/api/auth.d.ts +1 -1
  36. package/dist/api/auth.js.map +1 -1
  37. package/dist/api/biblio-billing-webhooks.d.ts +1 -1
  38. package/dist/api/biblio-billing-webhooks.js.map +1 -1
  39. package/dist/api/biblio-billing.d.ts +1 -1
  40. package/dist/api/biblio-billing.js.map +1 -1
  41. package/dist/api/biblio-catalogue.d.ts +1 -1
  42. package/dist/api/biblio-catalogue.js.map +1 -1
  43. package/dist/api/biblio-home.d.ts +1 -1
  44. package/dist/api/biblio-home.js.map +1 -1
  45. package/dist/api/biblio-learning-author-profiles.d.ts +1 -1
  46. package/dist/api/biblio-learning-author-profiles.js.map +1 -1
  47. package/dist/api/biblio-learning-authoring.d.ts +1 -1
  48. package/dist/api/biblio-learning-authoring.js.map +1 -1
  49. package/dist/api/biblio-learning-editorial.d.ts +1 -1
  50. package/dist/api/biblio-learning-editorial.js.map +1 -1
  51. package/dist/api/biblio-learning-feedback.d.ts +1 -1
  52. package/dist/api/biblio-learning-feedback.js.map +1 -1
  53. package/dist/api/biblio-learning-finance.d.ts +1 -1
  54. package/dist/api/biblio-learning-finance.js.map +1 -1
  55. package/dist/api/biblio-learning-integrations.d.ts +1 -1
  56. package/dist/api/biblio-learning-integrations.js.map +1 -1
  57. package/dist/api/biblio-learning-membership.d.ts +1 -1
  58. package/dist/api/biblio-learning-membership.js.map +1 -1
  59. package/dist/api/biblio-learning.d.ts +1 -1
  60. package/dist/api/biblio-learning.js.map +1 -1
  61. package/dist/api/biblio-library.d.ts +1 -1
  62. package/dist/api/biblio-library.js.map +1 -1
  63. package/dist/api/biblio-nextory.d.ts +1 -1
  64. package/dist/api/biblio-nextory.js.map +1 -1
  65. package/dist/api/biblio-press.d.ts +1 -1
  66. package/dist/api/biblio-press.js.map +1 -1
  67. package/dist/api/biblio-search.d.ts +1 -1
  68. package/dist/api/biblio-search.js.map +1 -1
  69. package/dist/api/biblio-telemetry.d.ts +1 -1
  70. package/dist/api/biblio-telemetry.js.map +1 -1
  71. package/dist/api/biblio-youscribe.js.map +1 -1
  72. package/dist/api/consumption.d.ts +1 -1
  73. package/dist/api/consumption.js.map +1 -1
  74. package/dist/api/cvs-app.d.ts +1 -1
  75. package/dist/api/cvs-app.js.map +1 -1
  76. package/dist/api/cvs-documents.d.ts +1 -1
  77. package/dist/api/cvs-documents.js.map +1 -1
  78. package/dist/api/cvs-favorites.d.ts +1 -1
  79. package/dist/api/cvs-favorites.js.map +1 -1
  80. package/dist/api/cvs-ils.d.ts +1 -1
  81. package/dist/api/cvs-ils.js.map +1 -1
  82. package/dist/api/cvs-loans.d.ts +1 -1
  83. package/dist/api/cvs-loans.js.map +1 -1
  84. package/dist/api/cvs-payments.d.ts +36 -1
  85. package/dist/api/cvs-payments.js +43 -1
  86. package/dist/api/cvs-payments.js.map +1 -1
  87. package/dist/api/cvs-streaming.d.ts +23 -32
  88. package/dist/api/cvs-streaming.js +43 -32
  89. package/dist/api/cvs-streaming.js.map +1 -1
  90. package/dist/api/index.d.ts +4 -3
  91. package/dist/api/index.js +4 -3
  92. package/dist/api/partner-catalogue.d.ts +1 -1
  93. package/dist/api/partner-catalogue.js.map +1 -1
  94. package/dist/api/partner-reader-nextory.d.ts +23 -27
  95. package/dist/api/partner-reader-nextory.js +21 -25
  96. package/dist/api/partner-reader-nextory.js.map +1 -1
  97. package/dist/api/partner-reader-youscribe.d.ts +1 -1
  98. package/dist/api/partner-reader-youscribe.js.map +1 -1
  99. package/dist/api/partner-reading.d.ts +1 -1
  100. package/dist/api/partner-reading.js.map +1 -1
  101. package/dist/api/profiles.d.ts +1 -1
  102. package/dist/api/profiles.js.map +1 -1
  103. package/dist/api/search.d.ts +1 -1
  104. package/dist/api/search.js.map +1 -1
  105. package/dist/api/tutoring-catalogue.d.ts +1 -1
  106. package/dist/api/tutoring-catalogue.js.map +1 -1
  107. package/dist/api/tutoring-chat.d.ts +1 -1
  108. package/dist/api/tutoring-chat.js.map +1 -1
  109. package/dist/api/tutoring-dispatch.d.ts +1 -1
  110. package/dist/api/tutoring-dispatch.js.map +1 -1
  111. package/dist/api/tutoring-practitioner.d.ts +1 -1
  112. package/dist/api/tutoring-practitioner.js.map +1 -1
  113. package/dist/api/tutoring-requests.d.ts +1 -1
  114. package/dist/api/tutoring-requests.js.map +1 -1
  115. package/dist/auth.d.ts +1 -1
  116. package/dist/chunks/client2.d.ts +1 -1
  117. package/dist/chunks/connection.d.ts +1 -1
  118. package/dist/chunks/index.d.ts +1130 -613
  119. package/dist/index.d.ts +3 -3
  120. package/dist/index.js +3 -3
  121. package/dist/index.js.map +1 -1
  122. package/dist/models.d.ts +2 -2
  123. package/dist/models.js +40 -2
  124. package/dist/models.js.map +1 -1
  125. package/dist/react/account.d.ts +1 -1
  126. package/dist/react/account.js +1 -1
  127. package/dist/react/account.js.map +1 -1
  128. package/dist/react/admin-catalogue.d.ts +1 -1
  129. package/dist/react/admin-catalogue.js +1 -1
  130. package/dist/react/admin-catalogue.js.map +1 -1
  131. package/dist/react/admin-consumption.d.ts +1 -1
  132. package/dist/react/admin-consumption.js +1 -1
  133. package/dist/react/admin-consumption.js.map +1 -1
  134. package/dist/react/admin-contracts.d.ts +1 -1
  135. package/dist/react/admin-contracts.js +1 -1
  136. package/dist/react/admin-contracts.js.map +1 -1
  137. package/dist/react/admin-customer.d.ts +1 -1
  138. package/dist/react/admin-customer.js +1 -1
  139. package/dist/react/admin-customer.js.map +1 -1
  140. package/dist/react/admin-desk.d.ts +1 -1
  141. package/dist/react/admin-desk.js +1 -1
  142. package/dist/react/admin-desk.js.map +1 -1
  143. package/dist/react/admin-licenses.d.ts +1 -1
  144. package/dist/react/admin-licenses.js +1 -1
  145. package/dist/react/admin-licenses.js.map +1 -1
  146. package/dist/react/admin-partner-selections.d.ts +1 -1
  147. package/dist/react/admin-partner-selections.js +1 -1
  148. package/dist/react/admin-partner-selections.js.map +1 -1
  149. package/dist/react/admin-patrons.d.ts +1 -1
  150. package/dist/react/admin-patrons.js +1 -1
  151. package/dist/react/admin-patrons.js.map +1 -1
  152. package/dist/react/admin-reviews.d.ts +1 -1
  153. package/dist/react/admin-reviews.js +1 -1
  154. package/dist/react/admin-reviews.js.map +1 -1
  155. package/dist/react/admin-roles.d.ts +1 -1
  156. package/dist/react/admin-roles.js +1 -1
  157. package/dist/react/admin-roles.js.map +1 -1
  158. package/dist/react/admin-support.d.ts +1 -1
  159. package/dist/react/admin-support.js +1 -1
  160. package/dist/react/admin-support.js.map +1 -1
  161. package/dist/react/admin-tenants.d.ts +1 -1
  162. package/dist/react/admin-tenants.js +1 -1
  163. package/dist/react/admin-tenants.js.map +1 -1
  164. package/dist/react/admin-tutoring.d.ts +1 -1
  165. package/dist/react/admin-tutoring.js +1 -1
  166. package/dist/react/admin-tutoring.js.map +1 -1
  167. package/dist/react/admin-vod.d.ts +285 -0
  168. package/dist/react/admin-vod.js +453 -0
  169. package/dist/react/admin-vod.js.map +1 -0
  170. package/dist/react/auth-device.d.ts +1 -1
  171. package/dist/react/auth-device.js +1 -1
  172. package/dist/react/auth-device.js.map +1 -1
  173. package/dist/react/auth.d.ts +1 -1
  174. package/dist/react/auth.js +1 -1
  175. package/dist/react/auth.js.map +1 -1
  176. package/dist/react/biblio-billing-webhooks.d.ts +1 -1
  177. package/dist/react/biblio-billing-webhooks.js +1 -1
  178. package/dist/react/biblio-billing-webhooks.js.map +1 -1
  179. package/dist/react/biblio-billing.d.ts +1 -1
  180. package/dist/react/biblio-billing.js +1 -1
  181. package/dist/react/biblio-billing.js.map +1 -1
  182. package/dist/react/biblio-catalogue.d.ts +1 -1
  183. package/dist/react/biblio-catalogue.js +1 -1
  184. package/dist/react/biblio-catalogue.js.map +1 -1
  185. package/dist/react/biblio-home.d.ts +1 -1
  186. package/dist/react/biblio-home.js +1 -1
  187. package/dist/react/biblio-home.js.map +1 -1
  188. package/dist/react/biblio-learning-author-profiles.d.ts +1 -1
  189. package/dist/react/biblio-learning-author-profiles.js +1 -1
  190. package/dist/react/biblio-learning-author-profiles.js.map +1 -1
  191. package/dist/react/biblio-learning-authoring.d.ts +1 -1
  192. package/dist/react/biblio-learning-authoring.js +1 -1
  193. package/dist/react/biblio-learning-authoring.js.map +1 -1
  194. package/dist/react/biblio-learning-editorial.d.ts +1 -1
  195. package/dist/react/biblio-learning-editorial.js +1 -1
  196. package/dist/react/biblio-learning-editorial.js.map +1 -1
  197. package/dist/react/biblio-learning-feedback.d.ts +1 -1
  198. package/dist/react/biblio-learning-feedback.js +1 -1
  199. package/dist/react/biblio-learning-feedback.js.map +1 -1
  200. package/dist/react/biblio-learning-finance.d.ts +1 -1
  201. package/dist/react/biblio-learning-finance.js +1 -1
  202. package/dist/react/biblio-learning-finance.js.map +1 -1
  203. package/dist/react/biblio-learning-integrations.d.ts +1 -1
  204. package/dist/react/biblio-learning-integrations.js +1 -1
  205. package/dist/react/biblio-learning-integrations.js.map +1 -1
  206. package/dist/react/biblio-learning-membership.d.ts +1 -1
  207. package/dist/react/biblio-learning-membership.js +1 -1
  208. package/dist/react/biblio-learning-membership.js.map +1 -1
  209. package/dist/react/biblio-learning.d.ts +1 -1
  210. package/dist/react/biblio-learning.js +1 -1
  211. package/dist/react/biblio-learning.js.map +1 -1
  212. package/dist/react/biblio-library.d.ts +1 -1
  213. package/dist/react/biblio-library.js +1 -1
  214. package/dist/react/biblio-library.js.map +1 -1
  215. package/dist/react/biblio-nextory.d.ts +1 -1
  216. package/dist/react/biblio-nextory.js +1 -1
  217. package/dist/react/biblio-nextory.js.map +1 -1
  218. package/dist/react/biblio-press.d.ts +1 -1
  219. package/dist/react/biblio-press.js +1 -1
  220. package/dist/react/biblio-press.js.map +1 -1
  221. package/dist/react/biblio-search.d.ts +1 -1
  222. package/dist/react/biblio-search.js +1 -1
  223. package/dist/react/biblio-search.js.map +1 -1
  224. package/dist/react/biblio-telemetry.d.ts +1 -1
  225. package/dist/react/biblio-telemetry.js +1 -1
  226. package/dist/react/biblio-telemetry.js.map +1 -1
  227. package/dist/react/biblio-youscribe.d.ts +1 -1
  228. package/dist/react/biblio-youscribe.js +1 -1
  229. package/dist/react/biblio-youscribe.js.map +1 -1
  230. package/dist/react/chat.d.ts +1 -1
  231. package/dist/react/consumption.d.ts +1 -1
  232. package/dist/react/consumption.js +1 -1
  233. package/dist/react/consumption.js.map +1 -1
  234. package/dist/react/cvs-app.d.ts +1 -1
  235. package/dist/react/cvs-app.js +1 -1
  236. package/dist/react/cvs-app.js.map +1 -1
  237. package/dist/react/cvs-documents.d.ts +1 -1
  238. package/dist/react/cvs-documents.js +1 -1
  239. package/dist/react/cvs-documents.js.map +1 -1
  240. package/dist/react/cvs-favorites.d.ts +1 -1
  241. package/dist/react/cvs-favorites.js +1 -1
  242. package/dist/react/cvs-favorites.js.map +1 -1
  243. package/dist/react/cvs-ils.d.ts +1 -1
  244. package/dist/react/cvs-ils.js +1 -1
  245. package/dist/react/cvs-ils.js.map +1 -1
  246. package/dist/react/cvs-loans.d.ts +1 -1
  247. package/dist/react/cvs-loans.js +1 -1
  248. package/dist/react/cvs-loans.js.map +1 -1
  249. package/dist/react/cvs-payments.d.ts +50 -1
  250. package/dist/react/cvs-payments.js +71 -2
  251. package/dist/react/cvs-payments.js.map +1 -1
  252. package/dist/react/cvs-streaming.d.ts +43 -32
  253. package/dist/react/cvs-streaming.js +72 -33
  254. package/dist/react/cvs-streaming.js.map +1 -1
  255. package/dist/react/index.d.ts +4 -3
  256. package/dist/react/index.js +4 -3
  257. package/dist/react/partner-catalogue.d.ts +1 -1
  258. package/dist/react/partner-catalogue.js +1 -1
  259. package/dist/react/partner-catalogue.js.map +1 -1
  260. package/dist/react/partner-reader-nextory.d.ts +23 -27
  261. package/dist/react/partner-reader-nextory.js +22 -26
  262. package/dist/react/partner-reader-nextory.js.map +1 -1
  263. package/dist/react/partner-reader-youscribe.d.ts +1 -1
  264. package/dist/react/partner-reader-youscribe.js +1 -1
  265. package/dist/react/partner-reader-youscribe.js.map +1 -1
  266. package/dist/react/partner-reading.d.ts +1 -1
  267. package/dist/react/partner-reading.js +1 -1
  268. package/dist/react/partner-reading.js.map +1 -1
  269. package/dist/react/profiles.d.ts +1 -1
  270. package/dist/react/profiles.js +1 -1
  271. package/dist/react/profiles.js.map +1 -1
  272. package/dist/react/search.d.ts +1 -1
  273. package/dist/react/search.js +1 -1
  274. package/dist/react/search.js.map +1 -1
  275. package/dist/react/tutoring-catalogue.d.ts +1 -1
  276. package/dist/react/tutoring-catalogue.js +1 -1
  277. package/dist/react/tutoring-catalogue.js.map +1 -1
  278. package/dist/react/tutoring-chat.d.ts +1 -1
  279. package/dist/react/tutoring-chat.js +1 -1
  280. package/dist/react/tutoring-chat.js.map +1 -1
  281. package/dist/react/tutoring-dispatch.d.ts +1 -1
  282. package/dist/react/tutoring-dispatch.js +1 -1
  283. package/dist/react/tutoring-dispatch.js.map +1 -1
  284. package/dist/react/tutoring-practitioner.d.ts +1 -1
  285. package/dist/react/tutoring-practitioner.js +1 -1
  286. package/dist/react/tutoring-practitioner.js.map +1 -1
  287. package/dist/react/tutoring-requests.d.ts +1 -1
  288. package/dist/react/tutoring-requests.js +1 -1
  289. package/dist/react/tutoring-requests.js.map +1 -1
  290. package/package.json +7 -7
@@ -0,0 +1,86 @@
1
+
2
+ import { a as VodAssetImportWrite, c as VodAssetRead, ga as ListVodAssetsParams, i as VodAssetListRead, o as VodAssetBackupRead, r as VodAssetWrite, s as VodEncryptionRead, u as VodAssetPublishWrite } from "../chunks/index.js";
3
+ import { c as request } from "../chunks/client.js";
4
+ //#region src/api/admin-vod/admin-vod.d.ts
5
+ export declare const getListVodAssetsUrl: (params: ListVodAssetsParams) => string;
6
+ /**
7
+ * List up to 100 revisions of one film; no key ciphertext is included.
8
+ * @summary List Vod Assets
9
+ */
10
+ export declare const listVodAssets: (params: ListVodAssetsParams, options?: Parameters<typeof request>[1]) => Promise<VodAssetListRead>;
11
+ export declare const getRegisterVodAssetUrl: () => string;
12
+ /**
13
+ * Reserve an immutable film revision and generate its KMS-wrapped AES-128 key.
14
+ *
15
+ * Repeating the same work/version/source/prefix returns the original record;
16
+ * it never replaces its key. The film remains on its existing playback path
17
+ * until an independently verified receipt is published and activation is explicit.
18
+ * No plaintext key is returned or stored in PostgreSQL.
19
+ * @summary Register Vod Asset
20
+ */
21
+ export declare const registerVodAsset: (vodAssetWrite: VodAssetWrite, options?: Parameters<typeof request>[1]) => Promise<VodAssetRead>;
22
+ export declare const getImportVodAssetUrl: () => string;
23
+ /**
24
+ * Import an existing package's KID, IV and KMS-encrypted key.
25
+ *
26
+ * The ciphertext must use the configured KMS key and the exact authenticated
27
+ * context documented in VOD.md. The backend verifies the context and AES-128
28
+ * key length before committing it. Existing revisions cannot change KID or IV.
29
+ * @summary Import Vod Asset
30
+ */
31
+ export declare const importVodAsset: (vodAssetImportWrite: VodAssetImportWrite, options?: Parameters<typeof request>[1]) => Promise<VodAssetRead>;
32
+ export declare const getReadVodAssetUrl: (assetId: string) => string;
33
+ /**
34
+ * Read one immutable packaging revision and its publication state.
35
+ * @summary Read Vod Asset
36
+ */
37
+ export declare const readVodAsset: (assetId: string, options?: Parameters<typeof request>[1]) => Promise<VodAssetRead>;
38
+ export declare const getActivateVodAssetUrl: (assetId: string) => string;
39
+ /**
40
+ * Atomically select a verified revision for new playback sessions.
41
+ *
42
+ * Requires owned playback configuration. Existing sessions retain their previous
43
+ * asset revision; switching versions does not change their content key.
44
+ * @summary Activate Vod Asset
45
+ */
46
+ export declare const activateVodAsset: (assetId: string, options?: Parameters<typeof request>[1]) => Promise<VodAssetRead>;
47
+ export declare const getExportVodAssetUrl: (assetId: string) => string;
48
+ /**
49
+ * Export encrypted key material, context and verification inventory for backup.
50
+ *
51
+ * KMS encrypt/decrypt access is not exercised by this read. Restoring the encrypted
52
+ * records requires continued access to their wrapping key; no master key is exported.
53
+ * @summary Export Vod Asset
54
+ */
55
+ export declare const exportVodAsset: (assetId: string, options?: Parameters<typeof request>[1]) => Promise<VodAssetBackupRead>;
56
+ export declare const getDisableVodAssetUrl: (assetId: string) => string;
57
+ /**
58
+ * Refuse new licence requests for this revision while preserving its key record.
59
+ *
60
+ * Already-issued DRM licences remain subject to their provider validity window;
61
+ * this endpoint cannot retract a licence already delivered to a device.
62
+ * @summary Disable Vod Asset
63
+ */
64
+ export declare const disableVodAsset: (assetId: string, options?: Parameters<typeof request>[1]) => Promise<VodAssetRead>;
65
+ export declare const getReadVodEncryptionUrl: (assetId: string) => string;
66
+ /**
67
+ * Read the wrapped key/context/IV for the authorized migration worker.
68
+ *
69
+ * This is a database read only. It neither creates a key nor calls KMS. The
70
+ * worker must independently have KMS decrypt permission and must pass the IV
71
+ * explicitly to the packager. No raw key endpoint exists.
72
+ * @summary Read Vod Encryption
73
+ */
74
+ export declare const readVodEncryption: (assetId: string, options?: Parameters<typeof request>[1]) => Promise<VodEncryptionRead>;
75
+ export declare const getPublishVodAssetUrl: (assetId: string) => string;
76
+ /**
77
+ * Record a trusted importer's verification receipt without changing playback.
78
+ *
79
+ * The importer attests complete destination read-back and whole-track integrity.
80
+ * The backend validates the inventory/key binding; it does not download the
81
+ * catalogue again. Repeated identical receipts are idempotent; changes conflict.
82
+ * @summary Publish Vod Asset
83
+ */
84
+ export declare const publishVodAsset: (assetId: string, vodAssetPublishWrite: VodAssetPublishWrite, options?: Parameters<typeof request>[1]) => Promise<VodAssetRead>;
85
+ //#endregion
86
+ //# sourceMappingURL=admin-vod.d.ts.map
@@ -0,0 +1,194 @@
1
+
2
+ import { r as request } from "../chunks/client.js";
3
+ //#region src/api/admin-vod/admin-vod.ts
4
+ const getListVodAssetsUrl = (params) => {
5
+ const normalizedParams = new URLSearchParams();
6
+ Object.entries(params || {}).forEach(([key, value]) => {
7
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
8
+ });
9
+ const stringifiedParams = normalizedParams.toString();
10
+ return stringifiedParams.length > 0 ? `/admin/vod/assets?${stringifiedParams}` : `/admin/vod/assets`;
11
+ };
12
+ /**
13
+ * List up to 100 revisions of one film; no key ciphertext is included.
14
+ * @summary List Vod Assets
15
+ */
16
+ const listVodAssets = async (params, options) => {
17
+ return request(getListVodAssetsUrl(params), {
18
+ ...options,
19
+ method: "GET"
20
+ });
21
+ };
22
+ const getRegisterVodAssetUrl = () => {
23
+ return `/admin/vod/assets`;
24
+ };
25
+ /**
26
+ * Reserve an immutable film revision and generate its KMS-wrapped AES-128 key.
27
+ *
28
+ * Repeating the same work/version/source/prefix returns the original record;
29
+ * it never replaces its key. The film remains on its existing playback path
30
+ * until an independently verified receipt is published and activation is explicit.
31
+ * No plaintext key is returned or stored in PostgreSQL.
32
+ * @summary Register Vod Asset
33
+ */
34
+ const registerVodAsset = async (vodAssetWrite, options) => {
35
+ const getHeaders = (h) => {
36
+ if (!h) return {};
37
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
38
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
39
+ const headers = {};
40
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
41
+ return headers;
42
+ };
43
+ return request(getRegisterVodAssetUrl(), {
44
+ ...options,
45
+ method: "POST",
46
+ headers: {
47
+ "Content-Type": "application/json",
48
+ ...getHeaders(options?.headers)
49
+ },
50
+ body: JSON.stringify(vodAssetWrite)
51
+ });
52
+ };
53
+ const getImportVodAssetUrl = () => {
54
+ return `/admin/vod/assets/import`;
55
+ };
56
+ /**
57
+ * Import an existing package's KID, IV and KMS-encrypted key.
58
+ *
59
+ * The ciphertext must use the configured KMS key and the exact authenticated
60
+ * context documented in VOD.md. The backend verifies the context and AES-128
61
+ * key length before committing it. Existing revisions cannot change KID or IV.
62
+ * @summary Import Vod Asset
63
+ */
64
+ const importVodAsset = async (vodAssetImportWrite, options) => {
65
+ const getHeaders = (h) => {
66
+ if (!h) return {};
67
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
68
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
69
+ const headers = {};
70
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
71
+ return headers;
72
+ };
73
+ return request(getImportVodAssetUrl(), {
74
+ ...options,
75
+ method: "POST",
76
+ headers: {
77
+ "Content-Type": "application/json",
78
+ ...getHeaders(options?.headers)
79
+ },
80
+ body: JSON.stringify(vodAssetImportWrite)
81
+ });
82
+ };
83
+ const getReadVodAssetUrl = (assetId) => {
84
+ return `/admin/vod/assets/${assetId}`;
85
+ };
86
+ /**
87
+ * Read one immutable packaging revision and its publication state.
88
+ * @summary Read Vod Asset
89
+ */
90
+ const readVodAsset = async (assetId, options) => {
91
+ return request(getReadVodAssetUrl(assetId), {
92
+ ...options,
93
+ method: "GET"
94
+ });
95
+ };
96
+ const getActivateVodAssetUrl = (assetId) => {
97
+ return `/admin/vod/assets/${assetId}/activation`;
98
+ };
99
+ /**
100
+ * Atomically select a verified revision for new playback sessions.
101
+ *
102
+ * Requires owned playback configuration. Existing sessions retain their previous
103
+ * asset revision; switching versions does not change their content key.
104
+ * @summary Activate Vod Asset
105
+ */
106
+ const activateVodAsset = async (assetId, options) => {
107
+ return request(getActivateVodAssetUrl(assetId), {
108
+ ...options,
109
+ method: "PUT"
110
+ });
111
+ };
112
+ const getExportVodAssetUrl = (assetId) => {
113
+ return `/admin/vod/assets/${assetId}/backup`;
114
+ };
115
+ /**
116
+ * Export encrypted key material, context and verification inventory for backup.
117
+ *
118
+ * KMS encrypt/decrypt access is not exercised by this read. Restoring the encrypted
119
+ * records requires continued access to their wrapping key; no master key is exported.
120
+ * @summary Export Vod Asset
121
+ */
122
+ const exportVodAsset = async (assetId, options) => {
123
+ return request(getExportVodAssetUrl(assetId), {
124
+ ...options,
125
+ method: "GET"
126
+ });
127
+ };
128
+ const getDisableVodAssetUrl = (assetId) => {
129
+ return `/admin/vod/assets/${assetId}/disable`;
130
+ };
131
+ /**
132
+ * Refuse new licence requests for this revision while preserving its key record.
133
+ *
134
+ * Already-issued DRM licences remain subject to their provider validity window;
135
+ * this endpoint cannot retract a licence already delivered to a device.
136
+ * @summary Disable Vod Asset
137
+ */
138
+ const disableVodAsset = async (assetId, options) => {
139
+ return request(getDisableVodAssetUrl(assetId), {
140
+ ...options,
141
+ method: "PUT"
142
+ });
143
+ };
144
+ const getReadVodEncryptionUrl = (assetId) => {
145
+ return `/admin/vod/assets/${assetId}/encryption`;
146
+ };
147
+ /**
148
+ * Read the wrapped key/context/IV for the authorized migration worker.
149
+ *
150
+ * This is a database read only. It neither creates a key nor calls KMS. The
151
+ * worker must independently have KMS decrypt permission and must pass the IV
152
+ * explicitly to the packager. No raw key endpoint exists.
153
+ * @summary Read Vod Encryption
154
+ */
155
+ const readVodEncryption = async (assetId, options) => {
156
+ return request(getReadVodEncryptionUrl(assetId), {
157
+ ...options,
158
+ method: "GET"
159
+ });
160
+ };
161
+ const getPublishVodAssetUrl = (assetId) => {
162
+ return `/admin/vod/assets/${assetId}/publication`;
163
+ };
164
+ /**
165
+ * Record a trusted importer's verification receipt without changing playback.
166
+ *
167
+ * The importer attests complete destination read-back and whole-track integrity.
168
+ * The backend validates the inventory/key binding; it does not download the
169
+ * catalogue again. Repeated identical receipts are idempotent; changes conflict.
170
+ * @summary Publish Vod Asset
171
+ */
172
+ const publishVodAsset = async (assetId, vodAssetPublishWrite, options) => {
173
+ const getHeaders = (h) => {
174
+ if (!h) return {};
175
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
176
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
177
+ const headers = {};
178
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
179
+ return headers;
180
+ };
181
+ return request(getPublishVodAssetUrl(assetId), {
182
+ ...options,
183
+ method: "PUT",
184
+ headers: {
185
+ "Content-Type": "application/json",
186
+ ...getHeaders(options?.headers)
187
+ },
188
+ body: JSON.stringify(vodAssetPublishWrite)
189
+ });
190
+ };
191
+ //#endregion
192
+ export { activateVodAsset, disableVodAsset, exportVodAsset, getActivateVodAssetUrl, getDisableVodAssetUrl, getExportVodAssetUrl, getImportVodAssetUrl, getListVodAssetsUrl, getPublishVodAssetUrl, getReadVodAssetUrl, getReadVodEncryptionUrl, getRegisterVodAssetUrl, importVodAsset, listVodAssets, publishVodAsset, readVodAsset, readVodEncryption, registerVodAsset };
193
+
194
+ //# sourceMappingURL=admin-vod.js.map
@@ -0,0 +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.17.2\n */\nimport type {\n ListVodAssetsParams,\n VodAssetBackupRead,\n VodAssetImportWrite,\n VodAssetListRead,\n VodAssetPublishWrite,\n VodAssetRead,\n VodAssetWrite,\n VodEncryptionRead\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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;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,2BAA2B,YAAqB;CAK3D,OAAO,qBAAqB,QAAQ;AACtC;;;;;;;;;AAUA,MAAa,oBAAoB,OAAO,SAAiB,YAAwE;CAE/H,OAAO,QAA2B,wBAAwB,OAAO,GACjE;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,yBAAyB,YAAqB;CAKzD,OAAO,qBAAqB,QAAQ;AACtC;;;;;;;;;AAUA,MAAa,kBAAkB,OAAO,SAClC,sBAA4C,YAAmE;CAE/G,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,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"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { $u as DeviceVerificationRead, Qu as DeviceVerificationWrite, ad as DeviceAuthorizedRead, cd as DeviceAuthorizationWrite, ed as DeviceRefusedRead, ld as DeviceAuthorizationRead, nd as DevicePollWrite, rd as DevicePendingRead } from "../chunks/index.js";
2
+ import { Cd as DeviceRefusedRead, Ed as DevicePendingRead, Md as DeviceAuthorizationRead, Od as DeviceAuthorizedRead, Sd as DeviceVerificationRead, Td as DevicePollWrite, jd as DeviceAuthorizationWrite, xd as DeviceVerificationWrite } from "../chunks/index.js";
3
3
  import { c as request } from "../chunks/client.js";
4
4
  //#region src/api/auth-device/auth-device.d.ts
5
5
  export declare const getCreateDeviceAuthorizationUrl: () => string;
@@ -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.17.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,O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UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,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
+ {"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.17.2\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;E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,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,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 { Dh as CredentialsWrite, Hi as LogoutWrite, Hv as AuthorizationRead, Lg as CodeExchangeWrite, Ol as InvitationSetupWrite, Uv as AuthorizationParams, Vi as MeRead, bt as RefreshWrite, kl as InvitationSetupRead, od as SessionRead } from "../chunks/index.js";
2
+ import { Nt as RefreshWrite, Xh as CredentialsWrite, Xl as InvitationSetupWrite, Zl as InvitationSetupRead, ca as MeRead, hy as AuthorizationParams, kd as SessionRead, la as LogoutWrite, my as AuthorizationRead, o_ as CodeExchangeWrite } 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.17.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} 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\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,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,CAAC,GAClF,IAAI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Aa,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"}
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.17.2\n */\nimport type {\n AuthorizationParams,\n AuthorizationRead,\n CodeExchangeWrite,\n CredentialsWrite,\n InvitationSetupRead,\n InvitationSetupWrite,\n LogoutWrite,\n MeRead,\n RefreshWrite,\n SessionRead\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\n"],"mappings":";;;AAsBA,MAAa,uBAAuB,WAAiC;CACnE,MAAM,mBAAmB,IAAI,gBAAgB;CAE7C,OAAO,QAAQ,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK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 -1,5 +1,5 @@
1
1
 
2
- import { F_ as BillingWebhookRead, G_ as BillingRevenuecatWebhookBody, wv as BillingBraintreeWebhookBody } from "../chunks/index.js";
2
+ import { Xv as BillingBraintreeWebhookBody, _v as BillingRevenuecatWebhookBody, sv as BillingWebhookRead } 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.17.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);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+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.17.2\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,4B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1
 
2
- import { $_ as BillingProductPage, B_ as BillingSubscriptionRead, H_ as BillingSubscriptionHistoryParams, I_ as BillingTransactionPage, J_ as BillingQuoteWrite, L_ as BillingTransactionRead, Q_ as BillingProductWrite, Sn as PromotionCapacityRead, Sv as BillingCancellationFeedbackPage, U_ as BillingSubscriptionHistoryPage, X_ as BillingPromotionRedemptionsParams, Y_ as BillingProviderProductWrite, Z_ as BillingPromotionGeneratorsParams, _v as BillingCheckoutSubmitWrite, an as PromotionRedeemWrite, av as BillingPaymentMethodWrite, bn as PromotionCodeRead, bv as BillingCancelWrite, cn as PromotionWrite, cv as BillingListSubscriptionsParams, dv as BillingIdentityWrite, ev as BillingProductRead, fv as BillingIdentityRead, gn as PromotionCreatedRead, hv as BillingClientTokenRead, ln as PromotionGeneratorPage, lv as BillingListPromotionsParams, mn as PromotionExportRead, mv as BillingClientTokenWrite, nn as PromotionRedemptionRead, on as PromotionPage, pn as PromotionExportWrite, rn as PromotionRedemptionHistoryPage, rv as BillingProductAvailabilityWrite, sn as PromotionGeneratorWrite, sv as BillingListTransactionsParams, tn as PromotionRevealWrite, un as PromotionGeneratorRead, uv as BillingListProductsParams, vv as BillingCheckoutRead, xn as PromotionCodeListRead, xv as BillingCancellationFeedbackParams, z_ as BillingSubscriptionPage } from "../chunks/index.js";
2
+ import { Bv as BillingClientTokenWrite, Cn as PromotionGeneratorRead, Cv as BillingPromotionGeneratorsParams, Dn as PromotionExportRead, En as PromotionExportWrite, Ev as BillingProductRead, Fn as PromotionCapacityRead, Fv as BillingListPromotionsParams, Iv as BillingListProductsParams, Jv as BillingCancellationFeedbackPage, Kv as BillingCancelWrite, Lv as BillingIdentityWrite, Nn as PromotionCodeRead, Nv as BillingListTransactionsParams, Pn as PromotionCodeListRead, Pv as BillingListSubscriptionsParams, Rv as BillingIdentityRead, Sn as PromotionGeneratorPage, Sv as BillingPromotionRedemptionsParams, Tv as BillingProductPage, Uv as BillingCheckoutSubmitWrite, Vv as BillingClientTokenRead, Wv as BillingCheckoutRead, bn as PromotionGeneratorWrite, bv as BillingQuoteWrite, cv as BillingTransactionPage, dv as BillingSubscriptionPage, fv as BillingSubscriptionRead, gn as PromotionRedemptionHistoryPage, hn as PromotionRedemptionRead, hv as BillingSubscriptionHistoryPage, jv as BillingPaymentMethodWrite, kn as PromotionCreatedRead, kv as BillingProductAvailabilityWrite, lv as BillingTransactionRead, mn as PromotionRevealWrite, mv as BillingSubscriptionHistoryParams, qv as BillingCancellationFeedbackParams, vn as PromotionRedeemWrite, wv as BillingProductWrite, xn as PromotionWrite, xv as BillingProviderProductWrite, yn as PromotionPage } 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;