@learnorama/mozaik-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -0
- package/dist/api/account.d.ts +75 -0
- package/dist/api/account.js +117 -0
- package/dist/api/account.js.map +1 -0
- package/dist/api/admin-catalogue.d.ts +68 -0
- package/dist/api/admin-catalogue.js +155 -0
- package/dist/api/admin-catalogue.js.map +1 -0
- package/dist/api/admin-consumption.d.ts +27 -0
- package/dist/api/admin-consumption.js +55 -0
- package/dist/api/admin-consumption.js.map +1 -0
- package/dist/api/admin-licenses.d.ts +21 -0
- package/dist/api/admin-licenses.js +34 -0
- package/dist/api/admin-licenses.js.map +1 -0
- package/dist/api/admin-patrons.d.ts +36 -0
- package/dist/api/admin-patrons.js +76 -0
- package/dist/api/admin-patrons.js.map +1 -0
- package/dist/api/admin-reviews.d.ts +30 -0
- package/dist/api/admin-reviews.js +63 -0
- package/dist/api/admin-reviews.js.map +1 -0
- package/dist/api/admin-roles.d.ts +34 -0
- package/dist/api/admin-roles.js +62 -0
- package/dist/api/admin-roles.js.map +1 -0
- package/dist/api/admin-support.d.ts +68 -0
- package/dist/api/admin-support.js +116 -0
- package/dist/api/admin-support.js.map +1 -0
- package/dist/api/admin-tenants.d.ts +33 -0
- package/dist/api/admin-tenants.js +68 -0
- package/dist/api/admin-tenants.js.map +1 -0
- package/dist/api/admin-tutoring.d.ts +159 -0
- package/dist/api/admin-tutoring.js +455 -0
- package/dist/api/admin-tutoring.js.map +1 -0
- package/dist/api/auth.d.ts +92 -0
- package/dist/api/auth.js +192 -0
- package/dist/api/auth.js.map +1 -0
- package/dist/api/biblio-catalogue.d.ts +122 -0
- package/dist/api/biblio-catalogue.js +223 -0
- package/dist/api/biblio-catalogue.js.map +1 -0
- package/dist/api/biblio-home.d.ts +18 -0
- package/dist/api/biblio-home.js +31 -0
- package/dist/api/biblio-home.js.map +1 -0
- package/dist/api/biblio-library.d.ts +94 -0
- package/dist/api/biblio-library.js +187 -0
- package/dist/api/biblio-library.js.map +1 -0
- package/dist/api/biblio-nextory.d.ts +43 -0
- package/dist/api/biblio-nextory.js +65 -0
- package/dist/api/biblio-nextory.js.map +1 -0
- package/dist/api/biblio-press.d.ts +38 -0
- package/dist/api/biblio-press.js +70 -0
- package/dist/api/biblio-press.js.map +1 -0
- package/dist/api/biblio-search.d.ts +17 -0
- package/dist/api/biblio-search.js +30 -0
- package/dist/api/biblio-search.js.map +1 -0
- package/dist/api/biblio-telemetry.d.ts +28 -0
- package/dist/api/biblio-telemetry.js +49 -0
- package/dist/api/biblio-telemetry.js.map +1 -0
- package/dist/api/consumption.d.ts +30 -0
- package/dist/api/consumption.js +45 -0
- package/dist/api/consumption.js.map +1 -0
- package/dist/api/cvs-app.d.ts +39 -0
- package/dist/api/cvs-app.js +72 -0
- package/dist/api/cvs-app.js.map +1 -0
- package/dist/api/cvs-documents.d.ts +106 -0
- package/dist/api/cvs-documents.js +208 -0
- package/dist/api/cvs-documents.js.map +1 -0
- package/dist/api/cvs-favorites.d.ts +53 -0
- package/dist/api/cvs-favorites.js +82 -0
- package/dist/api/cvs-favorites.js.map +1 -0
- package/dist/api/cvs-loans.d.ts +59 -0
- package/dist/api/cvs-loans.js +106 -0
- package/dist/api/cvs-loans.js.map +1 -0
- package/dist/api/cvs-streaming.d.ts +40 -0
- package/dist/api/cvs-streaming.js +68 -0
- package/dist/api/cvs-streaming.js.map +1 -0
- package/dist/api/index.d.ts +34 -0
- package/dist/api/index.js +34 -0
- package/dist/api/partner-catalogue.d.ts +77 -0
- package/dist/api/partner-catalogue.js +125 -0
- package/dist/api/partner-catalogue.js.map +1 -0
- package/dist/api/partner-reader.d.ts +56 -0
- package/dist/api/partner-reader.js +103 -0
- package/dist/api/partner-reader.js.map +1 -0
- package/dist/api/profiles.d.ts +64 -0
- package/dist/api/profiles.js +126 -0
- package/dist/api/profiles.js.map +1 -0
- package/dist/api/tutoring-catalogue.d.ts +32 -0
- package/dist/api/tutoring-catalogue.js +59 -0
- package/dist/api/tutoring-catalogue.js.map +1 -0
- package/dist/api/tutoring-chat.d.ts +31 -0
- package/dist/api/tutoring-chat.js +71 -0
- package/dist/api/tutoring-chat.js.map +1 -0
- package/dist/api/tutoring-dispatch.d.ts +37 -0
- package/dist/api/tutoring-dispatch.js +83 -0
- package/dist/api/tutoring-dispatch.js.map +1 -0
- package/dist/api/tutoring-practitioner.d.ts +55 -0
- package/dist/api/tutoring-practitioner.js +110 -0
- package/dist/api/tutoring-practitioner.js.map +1 -0
- package/dist/api/tutoring-requests.d.ts +86 -0
- package/dist/api/tutoring-requests.js +176 -0
- package/dist/api/tutoring-requests.js.map +1 -0
- package/dist/client-BDwBZYB0.d.ts +28 -0
- package/dist/client-D3kMOcIr.js +61 -0
- package/dist/client-D3kMOcIr.js.map +1 -0
- package/dist/index-wL_20vR8.d.ts +4566 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/models.d.ts +3 -0
- package/dist/models.js +175 -0
- package/dist/models.js.map +1 -0
- package/dist/react/account.d.ts +163 -0
- package/dist/react/account.js +240 -0
- package/dist/react/account.js.map +1 -0
- package/dist/react/admin-catalogue.d.ts +196 -0
- package/dist/react/admin-catalogue.js +336 -0
- package/dist/react/admin-catalogue.js.map +1 -0
- package/dist/react/admin-consumption.d.ts +75 -0
- package/dist/react/admin-consumption.js +127 -0
- package/dist/react/admin-consumption.js.map +1 -0
- package/dist/react/admin-licenses.d.ts +50 -0
- package/dist/react/admin-licenses.js +78 -0
- package/dist/react/admin-licenses.js.map +1 -0
- package/dist/react/admin-patrons.d.ts +111 -0
- package/dist/react/admin-patrons.js +173 -0
- package/dist/react/admin-patrons.js.map +1 -0
- package/dist/react/admin-reviews.d.ts +78 -0
- package/dist/react/admin-reviews.js +135 -0
- package/dist/react/admin-reviews.js.map +1 -0
- package/dist/react/admin-roles.d.ts +82 -0
- package/dist/react/admin-roles.js +135 -0
- package/dist/react/admin-roles.js.map +1 -0
- package/dist/react/admin-support.d.ts +123 -0
- package/dist/react/admin-support.js +208 -0
- package/dist/react/admin-support.js.map +1 -0
- package/dist/react/admin-tenants.d.ts +108 -0
- package/dist/react/admin-tenants.js +165 -0
- package/dist/react/admin-tenants.js.map +1 -0
- package/dist/react/admin-tutoring.d.ts +556 -0
- package/dist/react/admin-tutoring.js +954 -0
- package/dist/react/admin-tutoring.js.map +1 -0
- package/dist/react/auth.d.ts +220 -0
- package/dist/react/auth.js +372 -0
- package/dist/react/auth.js.map +1 -0
- package/dist/react/biblio-catalogue.d.ts +374 -0
- package/dist/react/biblio-catalogue.js +498 -0
- package/dist/react/biblio-catalogue.js.map +1 -0
- package/dist/react/biblio-home.d.ts +47 -0
- package/dist/react/biblio-home.js +75 -0
- package/dist/react/biblio-home.js.map +1 -0
- package/dist/react/biblio-library.d.ts +285 -0
- package/dist/react/biblio-library.js +411 -0
- package/dist/react/biblio-library.js.map +1 -0
- package/dist/react/biblio-nextory.d.ts +100 -0
- package/dist/react/biblio-nextory.js +163 -0
- package/dist/react/biblio-nextory.js.map +1 -0
- package/dist/react/biblio-press.d.ts +121 -0
- package/dist/react/biblio-press.js +163 -0
- package/dist/react/biblio-press.js.map +1 -0
- package/dist/react/biblio-search.d.ts +46 -0
- package/dist/react/biblio-search.js +74 -0
- package/dist/react/biblio-search.js.map +1 -0
- package/dist/react/biblio-telemetry.d.ts +49 -0
- package/dist/react/biblio-telemetry.js +85 -0
- package/dist/react/biblio-telemetry.js.map +1 -0
- package/dist/react/consumption.d.ts +66 -0
- package/dist/react/consumption.js +109 -0
- package/dist/react/consumption.js.map +1 -0
- package/dist/react/cvs-app.d.ts +86 -0
- package/dist/react/cvs-app.js +144 -0
- package/dist/react/cvs-app.js.map +1 -0
- package/dist/react/cvs-documents.d.ts +254 -0
- package/dist/react/cvs-documents.js +418 -0
- package/dist/react/cvs-documents.js.map +1 -0
- package/dist/react/cvs-favorites.d.ts +143 -0
- package/dist/react/cvs-favorites.js +206 -0
- package/dist/react/cvs-favorites.js.map +1 -0
- package/dist/react/cvs-loans.d.ts +140 -0
- package/dist/react/cvs-loans.js +234 -0
- package/dist/react/cvs-loans.js.map +1 -0
- package/dist/react/cvs-streaming.d.ts +87 -0
- package/dist/react/cvs-streaming.js +141 -0
- package/dist/react/cvs-streaming.js.map +1 -0
- package/dist/react/index.d.ts +34 -0
- package/dist/react/index.js +34 -0
- package/dist/react/partner-catalogue.d.ts +223 -0
- package/dist/react/partner-catalogue.js +301 -0
- package/dist/react/partner-catalogue.js.map +1 -0
- package/dist/react/partner-reader.d.ts +159 -0
- package/dist/react/partner-reader.js +226 -0
- package/dist/react/partner-reader.js.map +1 -0
- package/dist/react/profiles.d.ts +174 -0
- package/dist/react/profiles.js +279 -0
- package/dist/react/profiles.js.map +1 -0
- package/dist/react/tutoring-catalogue.d.ts +115 -0
- package/dist/react/tutoring-catalogue.js +151 -0
- package/dist/react/tutoring-catalogue.js.map +1 -0
- package/dist/react/tutoring-chat.d.ts +96 -0
- package/dist/react/tutoring-chat.js +172 -0
- package/dist/react/tutoring-chat.js.map +1 -0
- package/dist/react/tutoring-dispatch.d.ts +102 -0
- package/dist/react/tutoring-dispatch.js +183 -0
- package/dist/react/tutoring-dispatch.js.map +1 -0
- package/dist/react/tutoring-practitioner.d.ts +129 -0
- package/dist/react/tutoring-practitioner.js +230 -0
- package/dist/react/tutoring-practitioner.js.map +1 -0
- package/dist/react/tutoring-requests.d.ts +233 -0
- package/dist/react/tutoring-requests.js +385 -0
- package/dist/react/tutoring-requests.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
import { Mn as LicenseRead } from "../index-wL_20vR8.js";
|
|
3
|
+
import { c as request } from "../client-BDwBZYB0.js";
|
|
4
|
+
//#region src/api/biblio-nextory/biblio-nextory.d.ts
|
|
5
|
+
export declare const getDeleteLicenseUrl: () => string;
|
|
6
|
+
/**
|
|
7
|
+
* Release this member's seat back to the household pool.
|
|
8
|
+
*
|
|
9
|
+
* Not in the legacy's member surface — releasing was staff-only, so a household
|
|
10
|
+
* at its cap had to call support. The seat stays claimed by this member rather
|
|
11
|
+
* than orphaned, so their next allocation gets the same number back and their
|
|
12
|
+
* reading positions with it.
|
|
13
|
+
*
|
|
14
|
+
* ``204`` whether or not a licence was held: the desired end state is "no
|
|
15
|
+
* seat", and reporting ``404`` would only tell a caller something they cannot
|
|
16
|
+
* act on.
|
|
17
|
+
* @summary Delete License
|
|
18
|
+
*/
|
|
19
|
+
export declare const deleteLicense: (options?: Parameters<typeof request>[1]) => Promise<void>;
|
|
20
|
+
export declare const getReadLicenseUrl: () => string;
|
|
21
|
+
/**
|
|
22
|
+
* The seat this member holds (E49). ``404`` when they hold none.
|
|
23
|
+
*
|
|
24
|
+
* Safe, and that is the entire point of the endpoint existing separately.
|
|
25
|
+
* @summary Read License
|
|
26
|
+
*/
|
|
27
|
+
export declare const readLicense: (options?: Parameters<typeof request>[1]) => Promise<LicenseRead>;
|
|
28
|
+
export declare const getCreateLicenseUrl: () => string;
|
|
29
|
+
/**
|
|
30
|
+
* Allocate or reactivate this member's seat (E50).
|
|
31
|
+
*
|
|
32
|
+
* Idempotent: a member who already holds one gets it back with ``200``, and the
|
|
33
|
+
* call doubles as a repair — a subscription that lapsed at the partner is
|
|
34
|
+
* reopened against the same number, so reading positions survive.
|
|
35
|
+
*
|
|
36
|
+
* Medium assurance: this creates an account for the member at a third party
|
|
37
|
+
* under their identity, which is not something a session established by a
|
|
38
|
+
* partner handing over a static URL key should be able to do.
|
|
39
|
+
* @summary Create License
|
|
40
|
+
*/
|
|
41
|
+
export declare const createLicense: (options?: Parameters<typeof request>[1]) => Promise<LicenseRead>;
|
|
42
|
+
//#endregion
|
|
43
|
+
//# sourceMappingURL=biblio-nextory.d.ts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
|
|
2
|
+
import { r as request } from "../client-D3kMOcIr.js";
|
|
3
|
+
//#region src/api/biblio-nextory/biblio-nextory.ts
|
|
4
|
+
const getDeleteLicenseUrl = () => {
|
|
5
|
+
return `/biblio/me/nextory/license`;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Release this member's seat back to the household pool.
|
|
9
|
+
*
|
|
10
|
+
* Not in the legacy's member surface — releasing was staff-only, so a household
|
|
11
|
+
* at its cap had to call support. The seat stays claimed by this member rather
|
|
12
|
+
* than orphaned, so their next allocation gets the same number back and their
|
|
13
|
+
* reading positions with it.
|
|
14
|
+
*
|
|
15
|
+
* ``204`` whether or not a licence was held: the desired end state is "no
|
|
16
|
+
* seat", and reporting ``404`` would only tell a caller something they cannot
|
|
17
|
+
* act on.
|
|
18
|
+
* @summary Delete License
|
|
19
|
+
*/
|
|
20
|
+
const deleteLicense = async (options) => {
|
|
21
|
+
return request(getDeleteLicenseUrl(), {
|
|
22
|
+
...options,
|
|
23
|
+
method: "DELETE"
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
const getReadLicenseUrl = () => {
|
|
27
|
+
return `/biblio/me/nextory/license`;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The seat this member holds (E49). ``404`` when they hold none.
|
|
31
|
+
*
|
|
32
|
+
* Safe, and that is the entire point of the endpoint existing separately.
|
|
33
|
+
* @summary Read License
|
|
34
|
+
*/
|
|
35
|
+
const readLicense = async (options) => {
|
|
36
|
+
return request(getReadLicenseUrl(), {
|
|
37
|
+
...options,
|
|
38
|
+
method: "GET"
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const getCreateLicenseUrl = () => {
|
|
42
|
+
return `/biblio/me/nextory/license`;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Allocate or reactivate this member's seat (E50).
|
|
46
|
+
*
|
|
47
|
+
* Idempotent: a member who already holds one gets it back with ``200``, and the
|
|
48
|
+
* call doubles as a repair — a subscription that lapsed at the partner is
|
|
49
|
+
* reopened against the same number, so reading positions survive.
|
|
50
|
+
*
|
|
51
|
+
* Medium assurance: this creates an account for the member at a third party
|
|
52
|
+
* under their identity, which is not something a session established by a
|
|
53
|
+
* partner handing over a static URL key should be able to do.
|
|
54
|
+
* @summary Create License
|
|
55
|
+
*/
|
|
56
|
+
const createLicense = async (options) => {
|
|
57
|
+
return request(getCreateLicenseUrl(), {
|
|
58
|
+
...options,
|
|
59
|
+
method: "POST"
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { createLicense, deleteLicense, getCreateLicenseUrl, getDeleteLicenseUrl, getReadLicenseUrl, readLicense };
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=biblio-nextory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"biblio-nextory.js","names":[],"sources":["../../src/api/biblio-nextory/biblio-nextory.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.1.0\n */\nimport type {\n LicenseRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getDeleteLicenseUrl = () => {\n\n\n\n\n return `/biblio/me/nextory/license`\n}\n\n/**\n * Release this member's seat back to the household pool.\n *\n * Not in the legacy's member surface — releasing was staff-only, so a household\n * at its cap had to call support. The seat stays claimed by this member rather\n * than orphaned, so their next allocation gets the same number back and their\n * reading positions with it.\n *\n * ``204`` whether or not a licence was held: the desired end state is \"no\n * seat\", and reporting ``404`` would only tell a caller something they cannot\n * act on.\n * @summary Delete License\n */\nexport const deleteLicense = async ( options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteLicenseUrl(),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getReadLicenseUrl = () => {\n\n\n\n\n return `/biblio/me/nextory/license`\n}\n\n/**\n * The seat this member holds (E49). ``404`` when they hold none.\n *\n * Safe, and that is the entire point of the endpoint existing separately.\n * @summary Read License\n */\nexport const readLicense = async ( options?: Parameters<typeof request>[1]): Promise<LicenseRead> => {\n\n return request<LicenseRead>(getReadLicenseUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getCreateLicenseUrl = () => {\n\n\n\n\n return `/biblio/me/nextory/license`\n}\n\n/**\n * Allocate or reactivate this member's seat (E50).\n *\n * Idempotent: a member who already holds one gets it back with ``200``, and the\n * call doubles as a repair — a subscription that lapsed at the partner is\n * reopened against the same number, so reading positions survive.\n *\n * Medium assurance: this creates an account for the member at a third party\n * under their identity, which is not something a session established by a\n * partner handing over a static URL key should be able to do.\n * @summary Create License\n */\nexport const createLicense = async ( options?: Parameters<typeof request>[1]): Promise<LicenseRead> => {\n\n return request<LicenseRead>(getCreateLicenseUrl(),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAaA,MAAa,4BAA4B;CAKvC,OAAO;AACT;;;;;;;;;;;;;;AAeA,MAAa,gBAAgB,OAAQ,YAA2D;CAE9F,OAAO,QAAc,oBAAoB,GACzC;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,0BAA0B;CAKrC,OAAO;AACT;;;;;;;AAQA,MAAa,cAAc,OAAQ,YAAkE;CAEnG,OAAO,QAAqB,kBAAkB,GAC9C;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,4BAA4B;CAKvC,OAAO;AACT;;;;;;;;;;;;;AAcA,MAAa,gBAAgB,OAAQ,YAAkE;CAErG,OAAO,QAAqB,oBAAoB,GAChD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
import { Q as ReadPressReviewParams, bt as PressArticleRead, dn as ListPressArticlesParams, qn as PressReviewRead, xt as PressArticleListRead } from "../index-wL_20vR8.js";
|
|
3
|
+
import { c as request } from "../client-BDwBZYB0.js";
|
|
4
|
+
//#region src/api/biblio-press/biblio-press.d.ts
|
|
5
|
+
export declare const getListPressArticlesUrl: (params?: ListPressArticlesParams) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Press articles, filtered (E41).
|
|
8
|
+
*
|
|
9
|
+
* ``theme_id`` unifies the legacy's two separate parameters ``themeId`` and
|
|
10
|
+
* ``themePk``, which named the same thing. ``order`` is resolved against a
|
|
11
|
+
* whitelist; anything else is ``422`` rather than a surprise ordering.
|
|
12
|
+
* @summary List Press Articles
|
|
13
|
+
*/
|
|
14
|
+
export declare const listPressArticles: (params?: ListPressArticlesParams, options?: Parameters<typeof request>[1]) => Promise<PressArticleListRead>;
|
|
15
|
+
export declare const getReadPressArticleUrl: (articleId: number) => string;
|
|
16
|
+
/**
|
|
17
|
+
* One press article (E42). ``404`` when unknown *or* not entitled.
|
|
18
|
+
* @summary Read Press Article
|
|
19
|
+
*/
|
|
20
|
+
export declare const readPressArticle: (articleId: number, options?: Parameters<typeof request>[1]) => Promise<PressArticleRead>;
|
|
21
|
+
export declare const getReadPressReviewUrl: (params?: ReadPressReviewParams) => string;
|
|
22
|
+
/**
|
|
23
|
+
* The curated press review (E43). An explicit aggregate (§5.2).
|
|
24
|
+
*
|
|
25
|
+
* New as an endpoint; the legacy composed it into two pages and never exposed
|
|
26
|
+
* it. There is no curation table, so a section is a theme and its members are
|
|
27
|
+
* that theme's most recent entitled articles — which is what the rendered page
|
|
28
|
+
* amounted to. When a real curation model appears this is the one place that has
|
|
29
|
+
* to change.
|
|
30
|
+
*
|
|
31
|
+
* A theme with nothing the caller may read is omitted rather than returned
|
|
32
|
+
* empty: an empty section is a hole in a page, and the client cannot tell
|
|
33
|
+
* "nothing new" from "not licensed".
|
|
34
|
+
* @summary Read Press Review
|
|
35
|
+
*/
|
|
36
|
+
export declare const readPressReview: (params?: ReadPressReviewParams, options?: Parameters<typeof request>[1]) => Promise<PressReviewRead>;
|
|
37
|
+
//#endregion
|
|
38
|
+
//# sourceMappingURL=biblio-press.d.ts.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
|
|
2
|
+
import { r as request } from "../client-D3kMOcIr.js";
|
|
3
|
+
//#region src/api/biblio-press/biblio-press.ts
|
|
4
|
+
const getListPressArticlesUrl = (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 ? `/biblio/press-articles?${stringifiedParams}` : `/biblio/press-articles`;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Press articles, filtered (E41).
|
|
14
|
+
*
|
|
15
|
+
* ``theme_id`` unifies the legacy's two separate parameters ``themeId`` and
|
|
16
|
+
* ``themePk``, which named the same thing. ``order`` is resolved against a
|
|
17
|
+
* whitelist; anything else is ``422`` rather than a surprise ordering.
|
|
18
|
+
* @summary List Press Articles
|
|
19
|
+
*/
|
|
20
|
+
const listPressArticles = async (params, options) => {
|
|
21
|
+
return request(getListPressArticlesUrl(params), {
|
|
22
|
+
...options,
|
|
23
|
+
method: "GET"
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
const getReadPressArticleUrl = (articleId) => {
|
|
27
|
+
return `/biblio/press-articles/${articleId}`;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* One press article (E42). ``404`` when unknown *or* not entitled.
|
|
31
|
+
* @summary Read Press Article
|
|
32
|
+
*/
|
|
33
|
+
const readPressArticle = async (articleId, options) => {
|
|
34
|
+
return request(getReadPressArticleUrl(articleId), {
|
|
35
|
+
...options,
|
|
36
|
+
method: "GET"
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
const getReadPressReviewUrl = (params) => {
|
|
40
|
+
const normalizedParams = new URLSearchParams();
|
|
41
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
42
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
43
|
+
});
|
|
44
|
+
const stringifiedParams = normalizedParams.toString();
|
|
45
|
+
return stringifiedParams.length > 0 ? `/biblio/press-review?${stringifiedParams}` : `/biblio/press-review`;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* The curated press review (E43). An explicit aggregate (§5.2).
|
|
49
|
+
*
|
|
50
|
+
* New as an endpoint; the legacy composed it into two pages and never exposed
|
|
51
|
+
* it. There is no curation table, so a section is a theme and its members are
|
|
52
|
+
* that theme's most recent entitled articles — which is what the rendered page
|
|
53
|
+
* amounted to. When a real curation model appears this is the one place that has
|
|
54
|
+
* to change.
|
|
55
|
+
*
|
|
56
|
+
* A theme with nothing the caller may read is omitted rather than returned
|
|
57
|
+
* empty: an empty section is a hole in a page, and the client cannot tell
|
|
58
|
+
* "nothing new" from "not licensed".
|
|
59
|
+
* @summary Read Press Review
|
|
60
|
+
*/
|
|
61
|
+
const readPressReview = async (params, options) => {
|
|
62
|
+
return request(getReadPressReviewUrl(params), {
|
|
63
|
+
...options,
|
|
64
|
+
method: "GET"
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { getListPressArticlesUrl, getReadPressArticleUrl, getReadPressReviewUrl, listPressArticles, readPressArticle, readPressReview };
|
|
69
|
+
|
|
70
|
+
//# sourceMappingURL=biblio-press.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"biblio-press.js","names":[],"sources":["../../src/api/biblio-press/biblio-press.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.1.0\n */\nimport type {\n ListPressArticlesParams,\n PressArticleListRead,\n PressArticleRead,\n PressReviewRead,\n ReadPressReviewParams\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListPressArticlesUrl = (params?: ListPressArticlesParams,) => {\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 ? `/biblio/press-articles?${stringifiedParams}` : `/biblio/press-articles`\n}\n\n/**\n * Press articles, filtered (E41).\n *\n * ``theme_id`` unifies the legacy's two separate parameters ``themeId`` and\n * ``themePk``, which named the same thing. ``order`` is resolved against a\n * whitelist; anything else is ``422`` rather than a surprise ordering.\n * @summary List Press Articles\n */\nexport const listPressArticles = async (params?: ListPressArticlesParams, options?: Parameters<typeof request>[1]): Promise<PressArticleListRead> => {\n\n return request<PressArticleListRead>(getListPressArticlesUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getReadPressArticleUrl = (articleId: number,) => {\n\n\n\n\n return `/biblio/press-articles/${articleId}`\n}\n\n/**\n * One press article (E42). ``404`` when unknown *or* not entitled.\n * @summary Read Press Article\n */\nexport const readPressArticle = async (articleId: number, options?: Parameters<typeof request>[1]): Promise<PressArticleRead> => {\n\n return request<PressArticleRead>(getReadPressArticleUrl(articleId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getReadPressReviewUrl = (params?: ReadPressReviewParams,) => {\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 ? `/biblio/press-review?${stringifiedParams}` : `/biblio/press-review`\n}\n\n/**\n * The curated press review (E43). An explicit aggregate (§5.2).\n *\n * New as an endpoint; the legacy composed it into two pages and never exposed\n * it. There is no curation table, so a section is a theme and its members are\n * that theme's most recent entitled articles — which is what the rendered page\n * amounted to. When a real curation model appears this is the one place that has\n * to change.\n *\n * A theme with nothing the caller may read is omitted rather than returned\n * empty: an empty section is a hole in a page, and the client cannot tell\n * \"nothing new\" from \"not licensed\".\n * @summary Read Press Review\n */\nexport const readPressReview = async (params?: ReadPressReviewParams, options?: Parameters<typeof request>[1]): Promise<PressReviewRead> => {\n\n return request<PressReviewRead>(getReadPressReviewUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAiBA,MAAa,2BAA2B,WAAsC;CAC5E,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,0BAA0B,sBAAsB;AACxF;;;;;;;;;AAUA,MAAa,oBAAoB,OAAO,QAAkC,YAA2E;CAEnJ,OAAO,QAA8B,wBAAwB,MAAM,GACnE;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,0BAA0B,cAAuB;CAK5D,OAAO,0BAA0B;AACnC;;;;;AAMA,MAAa,mBAAmB,OAAO,WAAmB,YAAuE;CAE/H,OAAO,QAA0B,uBAAuB,SAAS,GACjE;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,yBAAyB,WAAoC;CACxE,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,wBAAwB,sBAAsB;AACtF;;;;;;;;;;;;;;;AAgBA,MAAa,kBAAkB,OAAO,QAAgC,YAAsE;CAE1I,OAAO,QAAyB,sBAAsB,MAAM,GAC5D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
import { H as SearchResultsRead, U as SearchParams } from "../index-wL_20vR8.js";
|
|
3
|
+
import { c as request } from "../client-BDwBZYB0.js";
|
|
4
|
+
//#region src/api/biblio-search/biblio-search.d.ts
|
|
5
|
+
export declare const getSearchUrl: (params?: SearchParams) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Search the catalogue (E46).
|
|
8
|
+
*
|
|
9
|
+
* An empty ``q`` returns an empty ``data`` with ``200``. It is not an error: a
|
|
10
|
+
* client clearing its search box should get an empty result, not a failure.
|
|
11
|
+
*
|
|
12
|
+
* An unrecognised ``type`` is ``422``, naming the families that exist.
|
|
13
|
+
* @summary Search
|
|
14
|
+
*/
|
|
15
|
+
export declare const search: (params?: SearchParams, options?: Parameters<typeof request>[1]) => Promise<SearchResultsRead>;
|
|
16
|
+
//#endregion
|
|
17
|
+
//# sourceMappingURL=biblio-search.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
import { r as request } from "../client-D3kMOcIr.js";
|
|
3
|
+
//#region src/api/biblio-search/biblio-search.ts
|
|
4
|
+
const getSearchUrl = (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 ? `/biblio/search?${stringifiedParams}` : `/biblio/search`;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Search the catalogue (E46).
|
|
14
|
+
*
|
|
15
|
+
* An empty ``q`` returns an empty ``data`` with ``200``. It is not an error: a
|
|
16
|
+
* client clearing its search box should get an empty result, not a failure.
|
|
17
|
+
*
|
|
18
|
+
* An unrecognised ``type`` is ``422``, naming the families that exist.
|
|
19
|
+
* @summary Search
|
|
20
|
+
*/
|
|
21
|
+
const search = async (params, options) => {
|
|
22
|
+
return request(getSearchUrl(params), {
|
|
23
|
+
...options,
|
|
24
|
+
method: "GET"
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { getSearchUrl, search };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=biblio-search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"biblio-search.js","names":[],"sources":["../../src/api/biblio-search/biblio-search.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.1.0\n */\nimport type {\n SearchParams,\n SearchResultsRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getSearchUrl = (params?: SearchParams,) => {\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 ? `/biblio/search?${stringifiedParams}` : `/biblio/search`\n}\n\n/**\n * Search the catalogue (E46).\n *\n * An empty ``q`` returns an empty ``data`` with ``200``. It is not an error: a\n * client clearing its search box should get an empty result, not a failure.\n *\n * An unrecognised ``type`` is ``422``, naming the families that exist.\n * @summary Search\n */\nexport const search = async (params?: SearchParams, options?: Parameters<typeof request>[1]): Promise<SearchResultsRead> => {\n\n return request<SearchResultsRead>(getSearchUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAcA,MAAa,gBAAgB,WAA2B;CACtD,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,kBAAkB,sBAAsB;AAChF;;;;;;;;;;AAWA,MAAa,SAAS,OAAO,QAAuB,YAAwE;CAE1H,OAAO,QAA2B,aAAa,MAAM,GACrD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
import { nt as ReadingSessionWrite, rt as ReadingSessionRead } from "../index-wL_20vR8.js";
|
|
3
|
+
import { c as request } from "../client-BDwBZYB0.js";
|
|
4
|
+
//#region src/api/biblio-telemetry/biblio-telemetry.d.ts
|
|
5
|
+
export declare const getRecordReadingSessionUrl: (sessionTag: string) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Record one content-consumption session (E54). Idempotent on ``session_tag``.
|
|
8
|
+
*
|
|
9
|
+
* **There is no ``user_id`` and no ``client_id`` in the body, and there must
|
|
10
|
+
* never be.** The legacy endpoint was unauthenticated and took both from the
|
|
11
|
+
* request without checking either against a credential, so consumption records
|
|
12
|
+
* — which is to say the billing record — were forgeable for any account
|
|
13
|
+
* (defect D3). Both come from the token here.
|
|
14
|
+
*
|
|
15
|
+
* ``PUT`` because the legacy handler already checked whether the tag existed and
|
|
16
|
+
* returned success rather than duplicating: that is an upsert keyed by a
|
|
17
|
+
* client-supplied identifier, and the verb now says so. The tag becomes
|
|
18
|
+
* ``ConsumptionEvent.request_key``, so a retried request after a timeout costs
|
|
19
|
+
* one unit rather than two — enforced by a partial unique index, not by
|
|
20
|
+
* checking first and hoping.
|
|
21
|
+
*
|
|
22
|
+
* ``201`` on the first write for a tag, ``200`` when it already existed. Never
|
|
23
|
+
* an error for a repeat: that is what idempotent means (§2.6).
|
|
24
|
+
* @summary Record Reading Session
|
|
25
|
+
*/
|
|
26
|
+
export declare const recordReadingSession: (sessionTag: string, readingSessionWrite: ReadingSessionWrite, options?: Parameters<typeof request>[1]) => Promise<ReadingSessionRead>;
|
|
27
|
+
//#endregion
|
|
28
|
+
//# sourceMappingURL=biblio-telemetry.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
import { r as request } from "../client-D3kMOcIr.js";
|
|
3
|
+
//#region src/api/biblio-telemetry/biblio-telemetry.ts
|
|
4
|
+
const getRecordReadingSessionUrl = (sessionTag) => {
|
|
5
|
+
return `/biblio/reading-sessions/${sessionTag}`;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Record one content-consumption session (E54). Idempotent on ``session_tag``.
|
|
9
|
+
*
|
|
10
|
+
* **There is no ``user_id`` and no ``client_id`` in the body, and there must
|
|
11
|
+
* never be.** The legacy endpoint was unauthenticated and took both from the
|
|
12
|
+
* request without checking either against a credential, so consumption records
|
|
13
|
+
* — which is to say the billing record — were forgeable for any account
|
|
14
|
+
* (defect D3). Both come from the token here.
|
|
15
|
+
*
|
|
16
|
+
* ``PUT`` because the legacy handler already checked whether the tag existed and
|
|
17
|
+
* returned success rather than duplicating: that is an upsert keyed by a
|
|
18
|
+
* client-supplied identifier, and the verb now says so. The tag becomes
|
|
19
|
+
* ``ConsumptionEvent.request_key``, so a retried request after a timeout costs
|
|
20
|
+
* one unit rather than two — enforced by a partial unique index, not by
|
|
21
|
+
* checking first and hoping.
|
|
22
|
+
*
|
|
23
|
+
* ``201`` on the first write for a tag, ``200`` when it already existed. Never
|
|
24
|
+
* an error for a repeat: that is what idempotent means (§2.6).
|
|
25
|
+
* @summary Record Reading Session
|
|
26
|
+
*/
|
|
27
|
+
const recordReadingSession = async (sessionTag, readingSessionWrite, options) => {
|
|
28
|
+
const getHeaders = (h) => {
|
|
29
|
+
if (!h) return {};
|
|
30
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
31
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
32
|
+
const headers = {};
|
|
33
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
34
|
+
return headers;
|
|
35
|
+
};
|
|
36
|
+
return request(getRecordReadingSessionUrl(sessionTag), {
|
|
37
|
+
...options,
|
|
38
|
+
method: "PUT",
|
|
39
|
+
headers: {
|
|
40
|
+
"Content-Type": "application/json",
|
|
41
|
+
...getHeaders(options?.headers)
|
|
42
|
+
},
|
|
43
|
+
body: JSON.stringify(readingSessionWrite)
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { getRecordReadingSessionUrl, recordReadingSession };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=biblio-telemetry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"biblio-telemetry.js","names":[],"sources":["../../src/api/biblio-telemetry/biblio-telemetry.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.1.0\n */\nimport type {\n ReadingSessionRead,\n ReadingSessionWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getRecordReadingSessionUrl = (sessionTag: string,) => {\n\n\n\n\n return `/biblio/reading-sessions/${sessionTag}`\n}\n\n/**\n * Record one content-consumption session (E54). Idempotent on ``session_tag``.\n *\n * **There is no ``user_id`` and no ``client_id`` in the body, and there must\n * never be.** The legacy endpoint was unauthenticated and took both from the\n * request without checking either against a credential, so consumption records\n * — which is to say the billing record — were forgeable for any account\n * (defect D3). Both come from the token here.\n *\n * ``PUT`` because the legacy handler already checked whether the tag existed and\n * returned success rather than duplicating: that is an upsert keyed by a\n * client-supplied identifier, and the verb now says so. The tag becomes\n * ``ConsumptionEvent.request_key``, so a retried request after a timeout costs\n * one unit rather than two — enforced by a partial unique index, not by\n * checking first and hoping.\n *\n * ``201`` on the first write for a tag, ``200`` when it already existed. Never\n * an error for a repeat: that is what idempotent means (§2.6).\n * @summary Record Reading Session\n */\nexport const recordReadingSession = async (sessionTag: string,\n readingSessionWrite: ReadingSessionWrite, options?: Parameters<typeof request>[1]): Promise<ReadingSessionRead> => {\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<ReadingSessionRead>(getRecordReadingSessionUrl(sessionTag),\n {\n ...options,\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(readingSessionWrite)\n }\n);}\n\n\n"],"mappings":";;;AAcA,MAAa,8BAA8B,eAAwB;CAKjE,OAAO,4BAA4B;AACrC;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAa,uBAAuB,OAAO,YACvC,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,UAAU,GACtE;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,mBAAmB;CAC1C,CACF;AAAE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
import { Rn as LeaseRead } from "../index-wL_20vR8.js";
|
|
3
|
+
import { c as request } from "../client-BDwBZYB0.js";
|
|
4
|
+
//#region src/api/consumption/consumption.d.ts
|
|
5
|
+
export declare const getCloseLeaseUrl: (eventId: number) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Finish reading. Returns the seat immediately rather than at lapse.
|
|
8
|
+
*
|
|
9
|
+
* ``204`` whether or not the lease was still open: the desired end state is
|
|
10
|
+
* "closed", and a client that lost its connection and retried should not get an
|
|
11
|
+
* error for succeeding twice.
|
|
12
|
+
* @summary Close Lease
|
|
13
|
+
*/
|
|
14
|
+
export declare const closeLease: (eventId: number, options?: Parameters<typeof request>[1]) => Promise<void>;
|
|
15
|
+
export declare const getRenewLeaseUrl: (eventId: number) => string;
|
|
16
|
+
/**
|
|
17
|
+
* Heartbeat. Push the lease out; the client repeats before it lapses.
|
|
18
|
+
*
|
|
19
|
+
* ``404`` when the lease is closed, reaped, or somebody else's — the three are
|
|
20
|
+
* deliberately indistinguishable, because a lease id is a bare integer and
|
|
21
|
+
* guessing one must not reveal whether it exists.
|
|
22
|
+
*
|
|
23
|
+
* This does not write the ledger. A reader refreshing every thirty seconds for
|
|
24
|
+
* an hour would be 120 UPDATEs on the table we bill from, for a value that only
|
|
25
|
+
* matters while it is current; the durable extent is settled once, at close.
|
|
26
|
+
* @summary Renew Lease
|
|
27
|
+
*/
|
|
28
|
+
export declare const renewLease: (eventId: number, options?: Parameters<typeof request>[1]) => Promise<LeaseRead>;
|
|
29
|
+
//#endregion
|
|
30
|
+
//# sourceMappingURL=consumption.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
import { r as request } from "../client-D3kMOcIr.js";
|
|
3
|
+
//#region src/api/consumption/consumption.ts
|
|
4
|
+
const getCloseLeaseUrl = (eventId) => {
|
|
5
|
+
return `/consumption/${eventId}`;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Finish reading. Returns the seat immediately rather than at lapse.
|
|
9
|
+
*
|
|
10
|
+
* ``204`` whether or not the lease was still open: the desired end state is
|
|
11
|
+
* "closed", and a client that lost its connection and retried should not get an
|
|
12
|
+
* error for succeeding twice.
|
|
13
|
+
* @summary Close Lease
|
|
14
|
+
*/
|
|
15
|
+
const closeLease = async (eventId, options) => {
|
|
16
|
+
return request(getCloseLeaseUrl(eventId), {
|
|
17
|
+
...options,
|
|
18
|
+
method: "DELETE"
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
const getRenewLeaseUrl = (eventId) => {
|
|
22
|
+
return `/consumption/${eventId}`;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Heartbeat. Push the lease out; the client repeats before it lapses.
|
|
26
|
+
*
|
|
27
|
+
* ``404`` when the lease is closed, reaped, or somebody else's — the three are
|
|
28
|
+
* deliberately indistinguishable, because a lease id is a bare integer and
|
|
29
|
+
* guessing one must not reveal whether it exists.
|
|
30
|
+
*
|
|
31
|
+
* This does not write the ledger. A reader refreshing every thirty seconds for
|
|
32
|
+
* an hour would be 120 UPDATEs on the table we bill from, for a value that only
|
|
33
|
+
* matters while it is current; the durable extent is settled once, at close.
|
|
34
|
+
* @summary Renew Lease
|
|
35
|
+
*/
|
|
36
|
+
const renewLease = async (eventId, options) => {
|
|
37
|
+
return request(getRenewLeaseUrl(eventId), {
|
|
38
|
+
...options,
|
|
39
|
+
method: "PUT"
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { closeLease, getCloseLeaseUrl, getRenewLeaseUrl, renewLease };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=consumption.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consumption.js","names":[],"sources":["../../src/api/consumption/consumption.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.1.0\n */\nimport type {\n LeaseRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getCloseLeaseUrl = (eventId: number,) => {\n\n\n\n\n return `/consumption/${eventId}`\n}\n\n/**\n * Finish reading. Returns the seat immediately rather than at lapse.\n *\n * ``204`` whether or not the lease was still open: the desired end state is\n * \"closed\", and a client that lost its connection and retried should not get an\n * error for succeeding twice.\n * @summary Close Lease\n */\nexport const closeLease = async (eventId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getCloseLeaseUrl(eventId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getRenewLeaseUrl = (eventId: number,) => {\n\n\n\n\n return `/consumption/${eventId}`\n}\n\n/**\n * Heartbeat. Push the lease out; the client repeats before it lapses.\n *\n * ``404`` when the lease is closed, reaped, or somebody else's — the three are\n * deliberately indistinguishable, because a lease id is a bare integer and\n * guessing one must not reveal whether it exists.\n *\n * This does not write the ledger. A reader refreshing every thirty seconds for\n * an hour would be 120 UPDATEs on the table we bill from, for a value that only\n * matters while it is current; the durable extent is settled once, at close.\n * @summary Renew Lease\n */\nexport const renewLease = async (eventId: number, options?: Parameters<typeof request>[1]): Promise<LeaseRead> => {\n\n return request<LeaseRead>(getRenewLeaseUrl(eventId),\n {\n ...options,\n method: 'PUT'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAaA,MAAa,oBAAoB,YAAqB;CAKpD,OAAO,gBAAgB;AACzB;;;;;;;;;AAUA,MAAa,aAAa,OAAO,SAAiB,YAA2D;CAE3G,OAAO,QAAc,iBAAiB,OAAO,GAC7C;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,oBAAoB,YAAqB;CAKpD,OAAO,gBAAgB;AACzB;;;;;;;;;;;;;AAcA,MAAa,aAAa,OAAO,SAAiB,YAAgE;CAEhH,OAAO,QAAmB,iBAAiB,OAAO,GAClD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
import { At as PlaybackReportWrite, Kt as NotificationListRead, jt as PlaybackReportRead, mn as ListNotificationsParams } from "../index-wL_20vR8.js";
|
|
3
|
+
import { c as request } from "../client-BDwBZYB0.js";
|
|
4
|
+
//#region src/api/cvs-app/cvs-app.d.ts
|
|
5
|
+
export declare const getListNotificationsUrl: (params?: ListNotificationsParams) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Notifications published to this caller's library.
|
|
8
|
+
*
|
|
9
|
+
* **These are tenant broadcasts, not a per-user inbox.** ``app_notification``
|
|
10
|
+
* has no user column and no read state — ``app_notification_bm`` links a
|
|
11
|
+
* notification to a library and that is the whole model. So ``unread_count`` is
|
|
12
|
+
* always ``0`` here and every notification is returned every time.
|
|
13
|
+
*
|
|
14
|
+
* Giving each member their own read state is a schema change (a
|
|
15
|
+
* ``notification_read`` row per user and notification), not a query change. It
|
|
16
|
+
* is worth doing — a broadcast list that never shrinks is one people stop
|
|
17
|
+
* opening — but it is a decision rather than a port, so it is not made here.
|
|
18
|
+
* @summary List Notifications
|
|
19
|
+
*/
|
|
20
|
+
export declare const listNotifications: (params?: ListNotificationsParams, options?: Parameters<typeof request>[1]) => Promise<NotificationListRead>;
|
|
21
|
+
export declare const getCreateReportUrl: () => string;
|
|
22
|
+
/**
|
|
23
|
+
* Report a playback problem.
|
|
24
|
+
*
|
|
25
|
+
* The identifying fields are taken from the credential, not the body. The
|
|
26
|
+
* legacy took ``adhId``, ``bmId`` and ``bmBibLocaleId`` from the query string
|
|
27
|
+
* and declared no ``Authorization`` at all, so anyone holding the shared
|
|
28
|
+
* ``api_key`` — which every deployed app binary contains — could file a report
|
|
29
|
+
* in any patron's name, at any library. The DTO still carries those three
|
|
30
|
+
* fields, marked transition-only, and this handler ignores every one of them.
|
|
31
|
+
*
|
|
32
|
+
* ``email`` is free text that ends up in a message. Authenticated and
|
|
33
|
+
* rate-limited it is a support channel; unauthenticated it is a spam relay with
|
|
34
|
+
* the library's return address on it.
|
|
35
|
+
* @summary Create Report
|
|
36
|
+
*/
|
|
37
|
+
export declare const createReport: (playbackReportWrite: PlaybackReportWrite, options?: Parameters<typeof request>[1]) => Promise<PlaybackReportRead>;
|
|
38
|
+
//#endregion
|
|
39
|
+
//# sourceMappingURL=cvs-app.d.ts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
|
|
2
|
+
import { r as request } from "../client-D3kMOcIr.js";
|
|
3
|
+
//#region src/api/cvs-app/cvs-app.ts
|
|
4
|
+
const getListNotificationsUrl = (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 ? `/cvs/notifications?${stringifiedParams}` : `/cvs/notifications`;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Notifications published to this caller's library.
|
|
14
|
+
*
|
|
15
|
+
* **These are tenant broadcasts, not a per-user inbox.** ``app_notification``
|
|
16
|
+
* has no user column and no read state — ``app_notification_bm`` links a
|
|
17
|
+
* notification to a library and that is the whole model. So ``unread_count`` is
|
|
18
|
+
* always ``0`` here and every notification is returned every time.
|
|
19
|
+
*
|
|
20
|
+
* Giving each member their own read state is a schema change (a
|
|
21
|
+
* ``notification_read`` row per user and notification), not a query change. It
|
|
22
|
+
* is worth doing — a broadcast list that never shrinks is one people stop
|
|
23
|
+
* opening — but it is a decision rather than a port, so it is not made here.
|
|
24
|
+
* @summary List Notifications
|
|
25
|
+
*/
|
|
26
|
+
const listNotifications = async (params, options) => {
|
|
27
|
+
return request(getListNotificationsUrl(params), {
|
|
28
|
+
...options,
|
|
29
|
+
method: "GET"
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
const getCreateReportUrl = () => {
|
|
33
|
+
return `/cvs/reports`;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Report a playback problem.
|
|
37
|
+
*
|
|
38
|
+
* The identifying fields are taken from the credential, not the body. The
|
|
39
|
+
* legacy took ``adhId``, ``bmId`` and ``bmBibLocaleId`` from the query string
|
|
40
|
+
* and declared no ``Authorization`` at all, so anyone holding the shared
|
|
41
|
+
* ``api_key`` — which every deployed app binary contains — could file a report
|
|
42
|
+
* in any patron's name, at any library. The DTO still carries those three
|
|
43
|
+
* fields, marked transition-only, and this handler ignores every one of them.
|
|
44
|
+
*
|
|
45
|
+
* ``email`` is free text that ends up in a message. Authenticated and
|
|
46
|
+
* rate-limited it is a support channel; unauthenticated it is a spam relay with
|
|
47
|
+
* the library's return address on it.
|
|
48
|
+
* @summary Create Report
|
|
49
|
+
*/
|
|
50
|
+
const createReport = async (playbackReportWrite, options) => {
|
|
51
|
+
const getHeaders = (h) => {
|
|
52
|
+
if (!h) return {};
|
|
53
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
54
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
55
|
+
const headers = {};
|
|
56
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
57
|
+
return headers;
|
|
58
|
+
};
|
|
59
|
+
return request(getCreateReportUrl(), {
|
|
60
|
+
...options,
|
|
61
|
+
method: "POST",
|
|
62
|
+
headers: {
|
|
63
|
+
"Content-Type": "application/json",
|
|
64
|
+
...getHeaders(options?.headers)
|
|
65
|
+
},
|
|
66
|
+
body: JSON.stringify(playbackReportWrite)
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
//#endregion
|
|
70
|
+
export { createReport, getCreateReportUrl, getListNotificationsUrl, listNotifications };
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=cvs-app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cvs-app.js","names":[],"sources":["../../src/api/cvs-app/cvs-app.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.1.0\n */\nimport type {\n ListNotificationsParams,\n NotificationListRead,\n PlaybackReportRead,\n PlaybackReportWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListNotificationsUrl = (params?: ListNotificationsParams,) => {\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 ? `/cvs/notifications?${stringifiedParams}` : `/cvs/notifications`\n}\n\n/**\n * Notifications published to this caller's library.\n *\n * **These are tenant broadcasts, not a per-user inbox.** ``app_notification``\n * has no user column and no read state — ``app_notification_bm`` links a\n * notification to a library and that is the whole model. So ``unread_count`` is\n * always ``0`` here and every notification is returned every time.\n *\n * Giving each member their own read state is a schema change (a\n * ``notification_read`` row per user and notification), not a query change. It\n * is worth doing — a broadcast list that never shrinks is one people stop\n * opening — but it is a decision rather than a port, so it is not made here.\n * @summary List Notifications\n */\nexport const listNotifications = async (params?: ListNotificationsParams, options?: Parameters<typeof request>[1]): Promise<NotificationListRead> => {\n\n return request<NotificationListRead>(getListNotificationsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getCreateReportUrl = () => {\n\n\n\n\n return `/cvs/reports`\n}\n\n/**\n * Report a playback problem.\n *\n * The identifying fields are taken from the credential, not the body. The\n * legacy took ``adhId``, ``bmId`` and ``bmBibLocaleId`` from the query string\n * and declared no ``Authorization`` at all, so anyone holding the shared\n * ``api_key`` — which every deployed app binary contains — could file a report\n * in any patron's name, at any library. The DTO still carries those three\n * fields, marked transition-only, and this handler ignores every one of them.\n *\n * ``email`` is free text that ends up in a message. Authenticated and\n * rate-limited it is a support channel; unauthenticated it is a spam relay with\n * the library's return address on it.\n * @summary Create Report\n */\nexport const createReport = async (playbackReportWrite: PlaybackReportWrite, options?: Parameters<typeof request>[1]): Promise<PlaybackReportRead> => {\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<PlaybackReportRead>(getCreateReportUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(playbackReportWrite)\n }\n);}\n\n\n"],"mappings":";;;AAgBA,MAAa,2BAA2B,WAAsC;CAC5E,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,sBAAsB,sBAAsB;AACpF;;;;;;;;;;;;;;;AAgBA,MAAa,oBAAoB,OAAO,QAAkC,YAA2E;CAEnJ,OAAO,QAA8B,wBAAwB,MAAM,GACnE;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,2BAA2B;CAKtC,OAAO;AACT;;;;;;;;;;;;;;;;AAiBA,MAAa,eAAe,OAAO,qBAA0C,YAAyE;CAElJ,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,mBAAmB,GACpD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,mBAAmB;CAC1C,CACF;AAAE"}
|