@learnorama/mozaik-sdk 0.7.0-staging.26.1 → 0.8.2-staging.31.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.
- package/dist/api/account.d.ts +1 -1
- package/dist/api/account.js.map +1 -1
- package/dist/api/admin-catalogue.d.ts +1 -1
- package/dist/api/admin-catalogue.js.map +1 -1
- package/dist/api/admin-consumption.d.ts +1 -1
- package/dist/api/admin-consumption.js.map +1 -1
- package/dist/api/admin-desk.d.ts +86 -1
- package/dist/api/admin-desk.js +280 -1
- package/dist/api/admin-desk.js.map +1 -1
- package/dist/api/admin-licenses.d.ts +1 -1
- package/dist/api/admin-licenses.js.map +1 -1
- package/dist/api/admin-patrons.d.ts +2 -7
- package/dist/api/admin-patrons.js +1 -6
- package/dist/api/admin-patrons.js.map +1 -1
- package/dist/api/admin-reviews.d.ts +1 -1
- package/dist/api/admin-reviews.js.map +1 -1
- package/dist/api/admin-roles.d.ts +1 -1
- package/dist/api/admin-roles.js.map +1 -1
- package/dist/api/admin-support.d.ts +1 -1
- package/dist/api/admin-support.js.map +1 -1
- package/dist/api/admin-tenants.d.ts +2 -2
- package/dist/api/admin-tenants.js +1 -1
- package/dist/api/admin-tenants.js.map +1 -1
- package/dist/api/admin-tutoring.d.ts +1 -1
- package/dist/api/admin-tutoring.js.map +1 -1
- package/dist/api/auth.d.ts +1 -1
- package/dist/api/auth.js.map +1 -1
- package/dist/api/biblio-catalogue.d.ts +1 -1
- package/dist/api/biblio-catalogue.js.map +1 -1
- package/dist/api/biblio-home.d.ts +1 -1
- package/dist/api/biblio-home.js.map +1 -1
- package/dist/api/biblio-library.d.ts +1 -1
- package/dist/api/biblio-library.js.map +1 -1
- package/dist/api/biblio-nextory.d.ts +1 -1
- package/dist/api/biblio-nextory.js.map +1 -1
- package/dist/api/biblio-press.d.ts +1 -1
- package/dist/api/biblio-press.js.map +1 -1
- package/dist/api/biblio-search.d.ts +1 -1
- package/dist/api/biblio-search.js.map +1 -1
- package/dist/api/biblio-telemetry.d.ts +1 -1
- package/dist/api/biblio-telemetry.js.map +1 -1
- package/dist/api/consumption.d.ts +1 -1
- package/dist/api/consumption.js.map +1 -1
- package/dist/api/cvs-app.d.ts +1 -1
- package/dist/api/cvs-app.js.map +1 -1
- package/dist/api/cvs-documents.d.ts +1 -1
- package/dist/api/cvs-documents.js.map +1 -1
- package/dist/api/cvs-favorites.d.ts +1 -1
- package/dist/api/cvs-favorites.js.map +1 -1
- package/dist/api/cvs-ils.d.ts +1 -1
- package/dist/api/cvs-ils.js.map +1 -1
- package/dist/api/cvs-loans.d.ts +1 -1
- package/dist/api/cvs-loans.js.map +1 -1
- package/dist/api/cvs-payments.d.ts +1 -1
- package/dist/api/cvs-payments.js.map +1 -1
- package/dist/api/cvs-streaming.d.ts +1 -1
- package/dist/api/cvs-streaming.js.map +1 -1
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.js +2 -2
- package/dist/api/partner-catalogue.d.ts +1 -1
- package/dist/api/partner-catalogue.js.map +1 -1
- package/dist/api/partner-reader.d.ts +1 -1
- package/dist/api/partner-reader.js.map +1 -1
- package/dist/api/profiles.d.ts +1 -1
- package/dist/api/profiles.js.map +1 -1
- package/dist/api/search.d.ts +1 -1
- package/dist/api/search.js.map +1 -1
- package/dist/api/tutoring-catalogue.d.ts +1 -1
- package/dist/api/tutoring-catalogue.js.map +1 -1
- package/dist/api/tutoring-chat.d.ts +1 -1
- package/dist/api/tutoring-chat.js.map +1 -1
- package/dist/api/tutoring-dispatch.d.ts +2 -2
- package/dist/api/tutoring-dispatch.js +1 -1
- package/dist/api/tutoring-dispatch.js.map +1 -1
- package/dist/api/tutoring-practitioner.d.ts +1 -1
- package/dist/api/tutoring-practitioner.js.map +1 -1
- package/dist/api/tutoring-requests.d.ts +1 -1
- package/dist/api/tutoring-requests.js.map +1 -1
- package/dist/chunks/client2.d.ts +1 -1
- package/dist/chunks/connection.d.ts +1 -1
- package/dist/chunks/index.d.ts +789 -223
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +2 -2
- package/dist/models.js +15 -1
- package/dist/models.js.map +1 -1
- package/dist/react/account.d.ts +1 -1
- package/dist/react/account.js +1 -1
- package/dist/react/account.js.map +1 -1
- package/dist/react/admin-catalogue.d.ts +1 -1
- package/dist/react/admin-catalogue.js +1 -1
- package/dist/react/admin-catalogue.js.map +1 -1
- package/dist/react/admin-consumption.d.ts +1 -1
- package/dist/react/admin-consumption.js +1 -1
- package/dist/react/admin-consumption.js.map +1 -1
- package/dist/react/admin-desk.d.ts +545 -1
- package/dist/react/admin-desk.js +689 -2
- package/dist/react/admin-desk.js.map +1 -1
- package/dist/react/admin-licenses.d.ts +1 -1
- package/dist/react/admin-licenses.js +1 -1
- package/dist/react/admin-licenses.js.map +1 -1
- package/dist/react/admin-patrons.d.ts +2 -7
- package/dist/react/admin-patrons.js +2 -7
- package/dist/react/admin-patrons.js.map +1 -1
- package/dist/react/admin-reviews.d.ts +1 -1
- package/dist/react/admin-reviews.js +1 -1
- package/dist/react/admin-reviews.js.map +1 -1
- package/dist/react/admin-roles.d.ts +1 -1
- package/dist/react/admin-roles.js +1 -1
- package/dist/react/admin-roles.js.map +1 -1
- package/dist/react/admin-support.d.ts +1 -1
- package/dist/react/admin-support.js +1 -1
- package/dist/react/admin-support.js.map +1 -1
- package/dist/react/admin-tenants.d.ts +2 -2
- package/dist/react/admin-tenants.js +2 -2
- package/dist/react/admin-tenants.js.map +1 -1
- package/dist/react/admin-tutoring.d.ts +1 -1
- package/dist/react/admin-tutoring.js +1 -1
- package/dist/react/admin-tutoring.js.map +1 -1
- package/dist/react/auth.d.ts +1 -1
- package/dist/react/auth.js +1 -1
- package/dist/react/auth.js.map +1 -1
- package/dist/react/biblio-catalogue.d.ts +1 -1
- package/dist/react/biblio-catalogue.js +1 -1
- package/dist/react/biblio-catalogue.js.map +1 -1
- package/dist/react/biblio-home.d.ts +1 -1
- package/dist/react/biblio-home.js +1 -1
- package/dist/react/biblio-home.js.map +1 -1
- package/dist/react/biblio-library.d.ts +1 -1
- package/dist/react/biblio-library.js +1 -1
- package/dist/react/biblio-library.js.map +1 -1
- package/dist/react/biblio-nextory.d.ts +1 -1
- package/dist/react/biblio-nextory.js +1 -1
- package/dist/react/biblio-nextory.js.map +1 -1
- package/dist/react/biblio-press.d.ts +1 -1
- package/dist/react/biblio-press.js +1 -1
- package/dist/react/biblio-press.js.map +1 -1
- package/dist/react/biblio-search.d.ts +1 -1
- package/dist/react/biblio-search.js +1 -1
- package/dist/react/biblio-search.js.map +1 -1
- package/dist/react/biblio-telemetry.d.ts +1 -1
- package/dist/react/biblio-telemetry.js +1 -1
- package/dist/react/biblio-telemetry.js.map +1 -1
- package/dist/react/chat.d.ts +1 -1
- package/dist/react/consumption.d.ts +1 -1
- package/dist/react/consumption.js +1 -1
- package/dist/react/consumption.js.map +1 -1
- package/dist/react/cvs-app.d.ts +1 -1
- package/dist/react/cvs-app.js +1 -1
- package/dist/react/cvs-app.js.map +1 -1
- package/dist/react/cvs-documents.d.ts +1 -1
- package/dist/react/cvs-documents.js +1 -1
- package/dist/react/cvs-documents.js.map +1 -1
- package/dist/react/cvs-favorites.d.ts +1 -1
- package/dist/react/cvs-favorites.js +1 -1
- package/dist/react/cvs-favorites.js.map +1 -1
- package/dist/react/cvs-ils.d.ts +1 -1
- package/dist/react/cvs-ils.js +1 -1
- package/dist/react/cvs-ils.js.map +1 -1
- package/dist/react/cvs-loans.d.ts +1 -1
- package/dist/react/cvs-loans.js +1 -1
- package/dist/react/cvs-loans.js.map +1 -1
- package/dist/react/cvs-payments.d.ts +1 -1
- package/dist/react/cvs-payments.js +1 -1
- package/dist/react/cvs-payments.js.map +1 -1
- package/dist/react/cvs-streaming.d.ts +1 -1
- package/dist/react/cvs-streaming.js +1 -1
- package/dist/react/cvs-streaming.js.map +1 -1
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +2 -2
- package/dist/react/partner-catalogue.d.ts +1 -1
- package/dist/react/partner-catalogue.js +1 -1
- package/dist/react/partner-catalogue.js.map +1 -1
- package/dist/react/partner-reader.d.ts +1 -1
- package/dist/react/partner-reader.js +1 -1
- package/dist/react/partner-reader.js.map +1 -1
- package/dist/react/profiles.d.ts +1 -1
- package/dist/react/profiles.js +1 -1
- package/dist/react/profiles.js.map +1 -1
- package/dist/react/search.d.ts +1 -1
- package/dist/react/search.js +1 -1
- package/dist/react/search.js.map +1 -1
- package/dist/react/tutoring-catalogue.d.ts +1 -1
- package/dist/react/tutoring-catalogue.js +1 -1
- package/dist/react/tutoring-catalogue.js.map +1 -1
- package/dist/react/tutoring-chat.d.ts +1 -1
- package/dist/react/tutoring-chat.js +1 -1
- package/dist/react/tutoring-chat.js.map +1 -1
- package/dist/react/tutoring-dispatch.d.ts +2 -2
- package/dist/react/tutoring-dispatch.js +2 -2
- package/dist/react/tutoring-dispatch.js.map +1 -1
- package/dist/react/tutoring-practitioner.d.ts +1 -1
- package/dist/react/tutoring-practitioner.js +1 -1
- package/dist/react/tutoring-practitioner.js.map +1 -1
- package/dist/react/tutoring-requests.d.ts +1 -1
- package/dist/react/tutoring-requests.js +1 -1
- package/dist/react/tutoring-requests.js.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partner-catalogue.js","names":[],"sources":["../../src/api/partner-catalogue/partner-catalogue.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.
|
|
1
|
+
{"version":3,"file":"partner-catalogue.js","names":[],"sources":["../../src/api/partner-catalogue/partner-catalogue.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.8.2\n */\nimport type {\n ListMediaParams,\n PartnerCategoryListRead,\n PartnerFavoriteListRead,\n PartnerMediaPage,\n PartnerMediaRead,\n PartnerProvider\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListPartnerCategoriesUrl = (provider: PartnerProvider,) => {\n\n\n\n\n return `/partners/${provider}/categories`\n}\n\n/**\n * The provider's taxonomy, with a count per node for this caller's slice.\n *\n * Counts come from ``partner_category_total`` and are summed across languages,\n * because the menu shows one number and the rollup is keyed per language. A\n * node with no matching rollup row reports ``0`` rather than being hidden: the\n * tree shape is stable, and a branch that vanishes because today's import found\n * nothing in it is harder to reason about than one that reads zero.\n * @summary List Partner Categories\n */\nexport const listPartnerCategories = async (provider: PartnerProvider, options?: Parameters<typeof request>[1]): Promise<PartnerCategoryListRead> => {\n\n return request<PartnerCategoryListRead>(getListPartnerCategoriesUrl(provider),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getListPartnerFavoritesUrl = (provider: PartnerProvider,) => {\n\n\n\n\n return `/partners/${provider}/favorites`\n}\n\n/**\n * This reader's bookmarks, filtered to what they may still see.\n *\n * The filter matters: a title can become adult-only, or leave the plan, between\n * being bookmarked and being listed. The legacy joined favourites to media with\n * no visibility predicate at all.\n * @summary List Partner Favorites\n */\nexport const listPartnerFavorites = async (provider: PartnerProvider, options?: Parameters<typeof request>[1]): Promise<PartnerFavoriteListRead> => {\n\n return request<PartnerFavoriteListRead>(getListPartnerFavoritesUrl(provider),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getRemovePartnerFavoriteUrl = (provider: PartnerProvider,\n mediaId: number,) => {\n\n\n\n\n return `/partners/${provider}/favorites/${mediaId}`\n}\n\n/**\n * Remove a bookmark. Idempotent, and deliberately not visibility-filtered.\n *\n * A reader must be able to unbookmark a title they can no longer see —\n * otherwise a media leaving their plan strands a row they have no way to\n * remove.\n * @summary Remove Partner Favorite\n */\nexport const removePartnerFavorite = async (provider: PartnerProvider,\n mediaId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getRemovePartnerFavoriteUrl(provider,mediaId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getAddPartnerFavoriteUrl = (provider: PartnerProvider,\n mediaId: number,) => {\n\n\n\n\n return `/partners/${provider}/favorites/${mediaId}`\n}\n\n/**\n * Bookmark a title. Idempotent.\n *\n * ``PUT``/``DELETE`` rather than the legacy's ``POST /toggle-favorite.json``. A\n * toggle is not idempotent, and the legacy's had no uniqueness behind it: two\n * tabs toggling at once left two rows, and un-toggling then removed one of\n * them, so the title stayed bookmarked.\n * @summary Add Partner Favorite\n */\nexport const addPartnerFavorite = async (provider: PartnerProvider,\n mediaId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getAddPartnerFavoriteUrl(provider,mediaId),\n {\n ...options,\n method: 'PUT'\n\n\n }\n);}\n\n\nexport const getListMediaUrl = (provider: PartnerProvider,\n params?: ListMediaParams,) => {\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 ? `/partners/${provider}/media?${stringifiedParams}` : `/partners/${provider}/media`\n}\n\n/**\n * A page of the catalogue.\n *\n * ``q`` ranks through Elasticsearch and then **intersects** with the same\n * visibility subquery as an unfiltered listing — the index knows nothing about\n * plans or ages, so authorisation happens here whatever the index returns. An\n * index that is missing or unreachable yields no candidates, which reads as an\n * empty page rather than an unfiltered one.\n *\n * A search result keeps the index's ranking rather than applying ``order``:\n * re-sorting relevance by publication date discards the only thing the search\n * contributed. That is why ``order`` is ignored when ``q`` is present, not\n * silently combined with it.\n * @summary List Media\n */\nexport const listMedia = async (provider: PartnerProvider,\n params?: ListMediaParams, options?: Parameters<typeof request>[1]): Promise<PartnerMediaPage> => {\n\n return request<PartnerMediaPage>(getListMediaUrl(provider,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getReadMediaUrl = (provider: PartnerProvider,\n mediaId: number,) => {\n\n\n\n\n return `/partners/${provider}/media/${mediaId}`\n}\n\n/**\n * One title.\n *\n * A media outside the caller's slice is ``404``, not ``403``: whether an adult\n * title exists is itself something a minor's client should not be able to\n * determine, and the legacy's detail page dereferenced an unknown id straight\n * into a 500.\n * @summary Read Media\n */\nexport const readMedia = async (provider: PartnerProvider,\n mediaId: number, options?: Parameters<typeof request>[1]): Promise<PartnerMediaRead> => {\n\n return request<PartnerMediaRead>(getReadMediaUrl(provider,mediaId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAkBA,MAAa,+BAA+B,aAA+B;CAKzE,OAAO,aAAa,SAAS;AAC/B;;;;;;;;;;;AAYA,MAAa,wBAAwB,OAAO,UAA2B,YAA8E;CAEnJ,OAAO,QAAiC,4BAA4B,QAAQ,GAC5E;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,8BAA8B,aAA+B;CAKxE,OAAO,aAAa,SAAS;AAC/B;;;;;;;;;AAUA,MAAa,uBAAuB,OAAO,UAA2B,YAA8E;CAElJ,OAAO,QAAiC,2BAA2B,QAAQ,GAC3E;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,+BAA+B,UACxC,YAAqB;CAKvB,OAAO,aAAa,SAAS,aAAa;AAC5C;;;;;;;;;AAUA,MAAa,wBAAwB,OAAO,UACxC,SAAiB,YAA2D;CAE9E,OAAO,QAAc,4BAA4B,UAAS,OAAO,GACjE;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,4BAA4B,UACrC,YAAqB;CAKvB,OAAO,aAAa,SAAS,aAAa;AAC5C;;;;;;;;;;AAWA,MAAa,qBAAqB,OAAO,UACrC,SAAiB,YAA2D;CAE9E,OAAO,QAAc,yBAAyB,UAAS,OAAO,GAC9D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,mBAAmB,UAC5B,WAA8B;CAChC,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,aAAa,SAAS,SAAS,sBAAsB,aAAa,SAAS;AACnH;;;;;;;;;;;;;;;;AAiBA,MAAa,YAAY,OAAO,UAC5B,QAA0B,YAAuE;CAEnG,OAAO,QAA0B,gBAAgB,UAAS,MAAM,GAChE;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,mBAAmB,UAC5B,YAAqB;CAKvB,OAAO,aAAa,SAAS,SAAS;AACxC;;;;;;;;;;AAWA,MAAa,YAAY,OAAO,UAC5B,SAAiB,YAAuE;CAE1F,OAAO,QAA0B,gBAAgB,UAAS,OAAO,GACjE;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { Zi as PartnerProvider, cs as CurrentReadingListRead, dt as ReadPackageParams, gt as ReadingPositionRead, mt as ReadingPositionWrite, yt as ReaderPackageRead } from "../chunks/index.js";
|
|
3
3
|
import { c as request } from "../chunks/client.js";
|
|
4
4
|
//#region src/api/partner-reader/partner-reader.d.ts
|
|
5
5
|
export declare const getReadPackageUrl: (provider: PartnerProvider, mediaId: number, params?: ReadPackageParams) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partner-reader.js","names":[],"sources":["../../src/api/partner-reader/partner-reader.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
|
+
{"version":3,"file":"partner-reader.js","names":[],"sources":["../../src/api/partner-reader/partner-reader.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.8.2\n */\nimport type {\n CurrentReadingListRead,\n PartnerProvider,\n ReadPackageParams,\n ReaderPackageRead,\n ReadingPositionRead,\n ReadingPositionWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getReadPackageUrl = (provider: PartnerProvider,\n mediaId: number,\n params?: ReadPackageParams,) => {\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 ? `/partners/${provider}/media/${mediaId}/package?${stringifiedParams}` : `/partners/${provider}/media/${mediaId}/package`\n}\n\n/**\n * Where to fetch the content itself.\n *\n * The returned URL is a short-lived DRM-wrapped credential. It is not cached\n * here and should not be stored by the client.\n *\n * Opens a consumption lease, so the read appears in the ledger and counts\n * against the establishment's live seats like any other. Its id comes back in\n * ``lease``: keep it alive with ``PUT /consumption/{eventId}`` and drop it with\n * ``DELETE`` when the reader closes. A client that does neither is not broken\n * — the reaper closes the lease about a minute after the last heartbeat — but\n * every such read is a seat held past the end of it.\n *\n * Re-opening the same title returns the lease already held rather than a\n * second one, so a page reload does not leak a seat.\n * @summary Read Package\n */\nexport const readPackage = async (provider: PartnerProvider,\n mediaId: number,\n params?: ReadPackageParams, options?: Parameters<typeof request>[1]): Promise<ReaderPackageRead> => {\n\n return request<ReaderPackageRead>(getReadPackageUrl(provider,mediaId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getReadPositionUrl = (provider: PartnerProvider,\n mediaId: number,) => {\n\n\n\n\n return `/partners/${provider}/media/${mediaId}/position`\n}\n\n/**\n * Where this reader last was, according to the partner.\n *\n * ``404`` when the partner holds no position — a book never opened has no\n * place to return to, and reporting zero would make a client jump a reader who\n * *is* mid-book back to the start if the call ever failed soft.\n * @summary Read Position\n */\nexport const readPosition = async (provider: PartnerProvider,\n mediaId: number, options?: Parameters<typeof request>[1]): Promise<ReadingPositionRead> => {\n\n return request<ReadingPositionRead>(getReadPositionUrl(provider,mediaId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getWritePositionUrl = (provider: PartnerProvider,\n mediaId: number,) => {\n\n\n\n\n return `/partners/${provider}/media/${mediaId}/position`\n}\n\n/**\n * Record progress, and report the partner's own metering alongside it.\n *\n * ``usage_blocks`` is forwarded first when present, because the legacy did and\n * the partner treats the two as one act: metering after a position update\n * records consumption against a page the reader has already left.\n * @summary Write Position\n */\nexport const writePosition = async (provider: PartnerProvider,\n mediaId: number,\n readingPositionWrite: ReadingPositionWrite, options?: Parameters<typeof request>[1]): Promise<ReadingPositionRead> => {\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<ReadingPositionRead>(getWritePositionUrl(provider,mediaId),\n {\n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(readingPositionWrite)\n }\n);}\n\n\nexport const getListCurrentReadingsUrl = (provider: PartnerProvider,) => {\n\n\n\n\n return `/partners/${provider}/readings`\n}\n\n/**\n * The partner's own \"continue reading\" list, joined back to our catalogue.\n *\n * Entries the partner knows and our catalogue does not are dropped rather than\n * surfaced with a null id: the import runs nightly and the partner's list is\n * live, so a title added today is genuinely not browsable here yet, and a card\n * that cannot be opened is worse than one that is absent.\n * @summary List Current Readings\n */\nexport const listCurrentReadings = async (provider: PartnerProvider, options?: Parameters<typeof request>[1]): Promise<CurrentReadingListRead> => {\n\n return request<CurrentReadingListRead>(getListCurrentReadingsUrl(provider),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAkBA,MAAa,qBAAqB,UAC9B,SACA,WAAgC;CAClC,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,aAAa,SAAS,SAAS,QAAQ,WAAW,sBAAsB,aAAa,SAAS,SAAS,QAAQ;AACvJ;;;;;;;;;;;;;;;;;;AAmBA,MAAa,cAAc,OAAO,UAC9B,SACA,QAA4B,YAAwE;CAEtG,OAAO,QAA2B,kBAAkB,UAAS,SAAQ,MAAM,GAC3E;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,sBAAsB,UAC/B,YAAqB;CAKvB,OAAO,aAAa,SAAS,SAAS,QAAQ;AAChD;;;;;;;;;AAUA,MAAa,eAAe,OAAO,UAC/B,SAAiB,YAA0E;CAE7F,OAAO,QAA6B,mBAAmB,UAAS,OAAO,GACvE;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,uBAAuB,UAChC,YAAqB;CAKvB,OAAO,aAAa,SAAS,SAAS,QAAQ;AAChD;;;;;;;;;AAUA,MAAa,gBAAgB,OAAO,UAChC,SACA,sBAA4C,YAA0E;CAEtH,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,QAA6B,oBAAoB,UAAS,OAAO,GACtE;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,oBAAoB;CAC3C,CACF;AAAE;AAGF,MAAa,6BAA6B,aAA+B;CAKvE,OAAO,aAAa,SAAS;AAC/B;;;;;;;;;;AAWA,MAAa,sBAAsB,OAAO,UAA2B,YAA6E;CAEhJ,OAAO,QAAgC,0BAA0B,QAAQ,GACzE;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
|
package/dist/api/profiles.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { Dt as ProfileCreateWrite, Et as ProfileRead, Tt as ProfileListRead, wt as ProfileUpdateWrite } from "../chunks/index.js";
|
|
3
3
|
import { c as request } from "../chunks/client.js";
|
|
4
4
|
//#region src/api/profiles/profiles.d.ts
|
|
5
5
|
export declare const getListProfilesUrl: () => string;
|
package/dist/api/profiles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.js","names":[],"sources":["../../src/api/profiles/profiles.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
|
+
{"version":3,"file":"profiles.js","names":[],"sources":["../../src/api/profiles/profiles.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.8.2\n */\nimport type {\n ProfileCreateWrite,\n ProfileListRead,\n ProfileRead,\n ProfileUpdateWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListProfilesUrl = () => {\n\n\n\n\n return `/me/profiles`\n}\n\n/**\n * Every profile on this account, the holder included (E20).\n *\n * Unpaginated: the cap is :data:`PROFILE_LIMIT`, so there is no page to turn.\n * One endpoint replaces two legacy routes that rendered the same collection\n * differently — the difference was presentation, which is the client's problem.\n * @summary List Profiles\n */\nexport const listProfiles = async ( options?: Parameters<typeof request>[1]): Promise<ProfileListRead> => {\n\n return request<ProfileListRead>(getListProfilesUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getCreateProfileUrl = () => {\n\n\n\n\n return `/me/profiles`\n}\n\n/**\n * Add a profile to this account (E21).\n *\n * The new row inherits ``tenant_id`` from the holder rather than accepting one:\n * a profile belongs to the same company as the account it hangs off, and\n * letting that be supplied would be a way into another tenant.\n *\n * A profile has no credential of its own. It has no ``login``, no ``email`` and\n * no password — it is reached by switching within an authenticated session, so\n * there is nothing for it to authenticate *with*.\n * @summary Create Profile\n */\nexport const createProfile = async (profileCreateWrite: ProfileCreateWrite, options?: Parameters<typeof request>[1]): Promise<ProfileRead> => {\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<ProfileRead>(getCreateProfileUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(profileCreateWrite)\n }\n);}\n\n\nexport const getDeleteProfileUrl = (profileId: number,) => {\n\n\n\n\n return `/me/profiles/${profileId}`\n}\n\n/**\n * Remove a profile (E24). Idempotent.\n *\n * Deleting a profile that is already gone is ``204``, not ``404``: the caller\n * asked for it to be absent and it is absent. A retried delete after a timeout\n * must not read as a failure.\n *\n * The account holder cannot be deleted this way — that is E17, which anonymises\n * the whole account and is a different decision with different consequences.\n * @summary Delete Profile\n */\nexport const deleteProfile = async (profileId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteProfileUrl(profileId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getReadProfileUrl = (profileId: number,) => {\n\n\n\n\n return `/me/profiles/${profileId}`\n}\n\n/**\n * One profile (E22). Returns the resource; the legacy rendered an edit form.\n * @summary Read Profile\n */\nexport const readProfile = async (profileId: number, options?: Parameters<typeof request>[1]): Promise<ProfileRead> => {\n\n return request<ProfileRead>(getReadProfileUrl(profileId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getUpdateProfileUrl = (profileId: number,) => {\n\n\n\n\n return `/me/profiles/${profileId}`\n}\n\n/**\n * Partially update a profile (E23).\n *\n * The target comes from the path and the row is re-read from the database\n * before anything is written, so nothing in the body can retarget the write.\n * That is the one habit worth keeping from the legacy handler, which overwrote\n * the identity fields from the trusted record for exactly this reason.\n *\n * ``exclude_unset`` is what makes this a PATCH rather than a PUT wearing the\n * wrong verb: a field the client did not send is untouched, which is not the\n * same as a field it sent as null.\n * @summary Update Profile\n */\nexport const updateProfile = async (profileId: number,\n profileUpdateWrite: ProfileUpdateWrite, options?: Parameters<typeof request>[1]): Promise<ProfileRead> => {\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<ProfileRead>(getUpdateProfileUrl(profileId),\n {\n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(profileUpdateWrite)\n }\n);}\n\n\n"],"mappings":";;;AAgBA,MAAa,2BAA2B;CAKtC,OAAO;AACT;;;;;;;;;AAUA,MAAa,eAAe,OAAQ,YAAsE;CAExG,OAAO,QAAyB,mBAAmB,GACnD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,4BAA4B;CAKvC,OAAO;AACT;;;;;;;;;;;;;AAcA,MAAa,gBAAgB,OAAO,oBAAwC,YAAkE;CAE1I,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC;EAC/D,IA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AA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAqB,oBAAoB,SAAS,GACvD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,kBAAkB;CACzC,CACF;AAAE"}
|
package/dist/api/search.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { Ss as CatalogueSearchRead, et as SearchEverythingParams } from "../chunks/index.js";
|
|
3
3
|
import { c as request } from "../chunks/client.js";
|
|
4
4
|
//#region src/api/search/search.d.ts
|
|
5
5
|
export declare const getSearchEverythingUrl: (params?: SearchEverythingParams) => string;
|
package/dist/api/search.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","names":[],"sources":["../../src/api/search/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
|
+
{"version":3,"file":"search.js","names":[],"sources":["../../src/api/search/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.8.2\n */\nimport type {\n CatalogueSearchRead,\n SearchEverythingParams\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getSearchEverythingUrl = (params?: SearchEverythingParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n const explodeParameters = [\"source\",\"kind\"];\n\n if (Array.isArray(value) && explodeParameters.includes(key)) {\n value.forEach((v) => {\n normalizedParams.append(key, v === null ? 'null' : String(v));\n });\n return;\n }\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 ? `/search?${stringifiedParams}` : `/search`\n}\n\n/**\n * Search every catalogue the caller can reach.\n *\n * Results are one blended list ordered by relevance, with ``popularity`` as\n * the tie-break. ``sources`` and ``kinds`` carry the same result set counted by\n * family, so a client can render tabs instead of a blend without asking twice.\n *\n * A query shorter than two characters returns an empty page with ``200``.\n * @summary Search Everything\n */\nexport const searchEverything = async (params?: SearchEverythingParams, options?: Parameters<typeof request>[1]): Promise<CatalogueSearchRead> => {\n\n return request<CatalogueSearchRead>(getSearchEverythingUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAcA,MAAa,0BAA0B,WAAqC;CAC1E,MAAM,mBAAmB,IAAI,gBAAgB;CAE7C,OAAO,QAAQ,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;EAGrD,IAAI,MAAM,QAAQ,KAAK,KAAK,CAFD,UAAS,MAEQ,CAAC,CAAC,SAAS,GAAG,GAAG;GAC3D,MAAM,SAAS,MAAM;IACnB,iBAAiB,OAAO,KAAK,MAAM,OAAO,SAAS,OAAO,CAAC,CAAC;GAC9D,CAAC;GACD;EACF;EAEA,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,WAAW,sBAAsB;AACzE;;;;;;;;;;;AAYA,MAAa,mBAAmB,OAAO,QAAiC,YAA0E;CAEhJ,OAAO,QAA6B,uBAAuB,MAAM,GACjE;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { $n as LevelListRead, H as SubjectListRead, Un as ListGoalsParams, Wr as EducationalGoalListRead } from "../chunks/index.js";
|
|
3
3
|
import { c as request } from "../chunks/client.js";
|
|
4
4
|
//#region src/api/tutoring-catalogue/tutoring-catalogue.d.ts
|
|
5
5
|
export declare const getListGoalsUrl: (params?: ListGoalsParams) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tutoring-catalogue.js","names":[],"sources":["../../src/api/tutoring-catalogue/tutoring-catalogue.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.
|
|
1
|
+
{"version":3,"file":"tutoring-catalogue.js","names":[],"sources":["../../src/api/tutoring-catalogue/tutoring-catalogue.ts"],"sourcesContent":["/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Mozaik backend\n * Four products behind one API — Biblio, Médiathèques, the partner catalogues (Nextory and YouScribe) and Prof Express. Authentication is Keycloak SSO only, once, for all of them: see the **auth** section below for the browser flow and the three failure modes.\n * OpenAPI spec version: 0.8.2\n */\nimport type {\n EducationalGoalListRead,\n LevelListRead,\n ListGoalsParams,\n SubjectListRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListGoalsUrl = (params?: ListGoalsParams,) => {\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 ? `/tutoring/goals?${stringifiedParams}` : `/tutoring/goals`\n}\n\n/**\n * Goals on offer, optionally narrowed to one request kind.\n *\n * The filter is a containment test against ``applies_to``, which is what the\n * GIN index on that column is for. The legacy asks the same question with four\n * boolean columns and a different ``WHERE`` per surface.\n * @summary List Goals\n */\nexport const listGoals = async (params?: ListGoalsParams, options?: Parameters<typeof request>[1]): Promise<EducationalGoalListRead> => {\n\n return request<EducationalGoalListRead>(getListGoalsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getListLevelsUrl = () => {\n\n\n\n\n return `/tutoring/levels`\n}\n\n/**\n * Every school level, in teaching order rather than alphabetical.\n * @summary List Levels\n */\nexport const listLevels = async ( options?: Parameters<typeof request>[1]): Promise<LevelListRead> => {\n\n return request<LevelListRead>(getListLevelsUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getListSubjectsUrl = () => {\n\n\n\n\n return `/tutoring/subjects`\n}\n\n/**\n * Every subject a pupil may ask about, in display order.\n *\n * Authenticated, though the data is not secret: the list differs by nothing\n * today, and leaving it open would make it the one tutoring endpoint that does\n * not establish a tenant. Cheap to relax later, expensive to tighten.\n * @summary List Subjects\n */\nexport const listSubjects = async ( options?: Parameters<typeof request>[1]): Promise<SubjectListRead> => {\n\n return request<SubjectListRead>(getListSubjectsUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAgBA,MAAa,mBAAmB,WAA8B;CAC5D,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,mBAAmB,sBAAsB;AACjF;;;;;;;;;AAUA,MAAa,YAAY,OAAO,QAA0B,YAA8E;CAEtI,OAAO,QAAiC,gBAAgB,MAAM,GAC9D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,yBAAyB;CAKpC,OAAO;AACT;;;;;AAMA,MAAa,aAAa,OAAQ,YAAoE;CAEpG,OAAO,QAAuB,iBAAiB,GAC/C;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,2BAA2B;CAKtC,OAAO;AACT;;;;;;;;;AAUA,MAAa,eAAe,OAAQ,YAAsE;CAExG,OAAO,QAAyB,mBAAmB,GACnD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { Ln as ListMessagesParams, bn as MessageRead, vn as MessageWrite, vs as ChatTicketRead, yn as MessagePage } from "../chunks/index.js";
|
|
3
3
|
import { c as request } from "../chunks/client.js";
|
|
4
4
|
//#region src/api/tutoring-chat/tutoring-chat.d.ts
|
|
5
5
|
export declare const getMintChatTicketUrl: (requestId: number) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tutoring-chat.js","names":[],"sources":["../../src/api/tutoring-chat/tutoring-chat.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
|
+
{"version":3,"file":"tutoring-chat.js","names":[],"sources":["../../src/api/tutoring-chat/tutoring-chat.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.8.2\n */\nimport type {\n ChatTicketRead,\n ListMessagesParams,\n MessagePage,\n MessageRead,\n MessageWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getMintChatTicketUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/chat/ticket`\n}\n\n/**\n * A single-use credential for opening the socket from a browser.\n *\n * Authenticated the ordinary way, with the ordinary bearer token, because this\n * is an ordinary HTTP request. What it returns is what goes in the socket URL.\n * @summary Mint Chat Ticket\n */\nexport const mintChatTicket = async (requestId: number, options?: Parameters<typeof request>[1]): Promise<ChatTicketRead> => {\n\n return request<ChatTicketRead>(getMintChatTicketUrl(requestId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getListMessagesUrl = (requestId: number,\n params?: ListMessagesParams,) => {\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 ? `/tutoring/requests/${requestId}/messages?${stringifiedParams}` : `/tutoring/requests/${requestId}/messages`\n}\n\n/**\n * The conversation so far, newest first.\n *\n * One extra row is fetched to answer ``hasMore`` without a second count. A\n * ``COUNT(*)`` over a thread on every scroll is a table scan for a number no\n * interface displays.\n * @summary List Messages\n */\nexport const listMessages = async (requestId: number,\n params?: ListMessagesParams, options?: Parameters<typeof request>[1]): Promise<MessagePage> => {\n\n return request<MessagePage>(getListMessagesUrl(requestId,params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getSendMessageUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/messages`\n}\n\n/**\n * Say something, without holding a socket open.\n * @summary Send Message\n */\nexport const sendMessage = async (requestId: number,\n messageWrite: MessageWrite, options?: Parameters<typeof request>[1]): Promise<MessageRead> => {\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<MessageRead>(getSendMessageUrl(requestId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(messageWrite)\n }\n);}\n\n\n"],"mappings":";;;AAiBA,MAAa,wBAAwB,cAAuB;CAK1D,OAAO,sBAAsB,UAAU;AACzC;;;;;;;;AASA,MAAa,iBAAiB,OAAO,WAAmB,YAAqE;CAE3H,OAAO,QAAwB,qBAAqB,SAAS,GAC7D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,sBAAsB,WAC/B,WAAiC;CACnC,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,UAAU,YAAY,sBAAsB,sBAAsB,UAAU;AAC1I;;;;;;;;;AAUA,MAAa,eAAe,OAAO,WAC/B,QAA6B,YAAkE;CAEjG,OAAO,QAAqB,mBAAmB,WAAU,MAAM,GAC/D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,qBAAqB,cAAuB;CAKvD,OAAO,sBAAsB,UAAU;AACzC;;;;;AAMA,MAAa,cAAc,OAAO,WAC9B,cAA4B,YAAkE;CAE9F,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,QAAqB,kBAAkB,SAAS,GACrD;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,YAAY;CACnC,CACF;AAAE"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { f as TutoringQueuePage, jn as ListQueueParams, y as TutoringDispatchWrite } from "../chunks/index.js";
|
|
3
3
|
import { c as request } from "../chunks/client.js";
|
|
4
4
|
//#region src/api/tutoring-dispatch/tutoring-dispatch.d.ts
|
|
5
5
|
export declare const getListQueueUrl: (params?: ListQueueParams) => string;
|
|
6
6
|
/**
|
|
7
7
|
* What is waiting, oldest first.
|
|
8
8
|
*
|
|
9
|
-
* Scoped to the dispatcher's tenant. Defaults to the four open statuses, which
|
|
9
|
+
* Scoped to the dispatcher's tenant and its descendants. Defaults to the four open statuses, which
|
|
10
10
|
* is what the partial index on the table is built for — pass ``?status=`` to
|
|
11
11
|
* look at something else and the query stops using it, which is the honest
|
|
12
12
|
* trade rather than a hidden one.
|
|
@@ -18,7 +18,7 @@ const getListQueueUrl = (params) => {
|
|
|
18
18
|
/**
|
|
19
19
|
* What is waiting, oldest first.
|
|
20
20
|
*
|
|
21
|
-
* Scoped to the dispatcher's tenant. Defaults to the four open statuses, which
|
|
21
|
+
* Scoped to the dispatcher's tenant and its descendants. Defaults to the four open statuses, which
|
|
22
22
|
* is what the partial index on the table is built for — pass ``?status=`` to
|
|
23
23
|
* look at something else and the query stops using it, which is the honest
|
|
24
24
|
* trade rather than a hidden one.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tutoring-dispatch.js","names":[],"sources":["../../src/api/tutoring-dispatch/tutoring-dispatch.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
|
+
{"version":3,"file":"tutoring-dispatch.js","names":[],"sources":["../../src/api/tutoring-dispatch/tutoring-dispatch.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.8.2\n */\nimport type {\n ListQueueParams,\n TutoringDispatchWrite,\n TutoringQueuePage\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListQueueUrl = (params?: ListQueueParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n const explodeParameters = [\"status\"];\n\n if (Array.isArray(value) && explodeParameters.includes(key)) {\n value.forEach((v) => {\n normalizedParams.append(key, v === null ? 'null' : String(v));\n });\n return;\n }\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 ? `/tutoring/queue?${stringifiedParams}` : `/tutoring/queue`\n}\n\n/**\n * What is waiting, oldest first.\n *\n * Scoped to the dispatcher's tenant and its descendants. Defaults to the four open statuses, which\n * is what the partial index on the table is built for — pass ``?status=`` to\n * look at something else and the query stops using it, which is the honest\n * trade rather than a hidden one.\n * @summary List Queue\n */\nexport const listQueue = async (params?: ListQueueParams, options?: Parameters<typeof request>[1]): Promise<TutoringQueuePage> => {\n\n return request<TutoringQueuePage>(getListQueueUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getDispatchRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/dispatch`\n}\n\n/**\n * Route it — to somebody named, or to the open pool.\n *\n * Changing the channel here is deliberate and common: pupils pick a classroom\n * and turn out to have no microphone, and the dispatcher is the person who\n * finds that out.\n * @summary Dispatch Request\n */\nexport const dispatchRequest = async (requestId: number,\n tutoringDispatchWrite: TutoringDispatchWrite, 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>(getDispatchRequestUrl(requestId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(tutoringDispatchWrite)\n }\n);}\n\n\nexport const getTriageRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/triage`\n}\n\n/**\n * Take a request off the queue to look at it.\n *\n * Separate from dispatching because the legacy's own timestamps separate them —\n * ``picked_by_switchman_at`` then ``validated_at`` — and the gap between the\n * two is the figure that tells you whether the queue is staffed.\n * @summary Triage Request\n */\nexport const triageRequest = async (requestId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getTriageRequestUrl(requestId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAeA,MAAa,mBAAmB,WAA8B;CAC5D,MAAM,mBA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AAM,KAAK,UAAU,qBAAqB;CAC5C,CACF;AAAE;AAGF,MAAa,uBAAuB,cAAuB;CAKzD,OAAO,sBAAsB,UAAU;AACzC;;;;;;;;;AAUA,MAAa,gBAAgB,OAAO,WAAmB,YAA2D;CAEhH,OAAO,QAAc,oBAAoB,SAAS,GAClD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { a as TutoringRoomRead, w as TutoringAnswerWrite, x as TutoringCloseWrite } from "../chunks/index.js";
|
|
3
3
|
import { c as request } from "../chunks/client.js";
|
|
4
4
|
//#region src/api/tutoring-practitioner/tutoring-practitioner.d.ts
|
|
5
5
|
export declare const getAnswerRequestUrl: (requestId: number) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tutoring-practitioner.js","names":[],"sources":["../../src/api/tutoring-practitioner/tutoring-practitioner.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
|
+
{"version":3,"file":"tutoring-practitioner.js","names":[],"sources":["../../src/api/tutoring-practitioner/tutoring-practitioner.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.8.2\n */\nimport type {\n TutoringAnswerWrite,\n TutoringCloseWrite,\n TutoringRoomRead\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getAnswerRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/answer`\n}\n\n/**\n * Deliver the answer.\n *\n * The body is stored as the answer and any named attachments are re-roled to\n * ``answer`` — they were uploaded against this request, so no id from another\n * request can be attached here.\n * @summary Answer Request\n */\nexport const answerRequest = async (requestId: number,\n tutoringAnswerWrite: TutoringAnswerWrite, 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>(getAnswerRequestUrl(requestId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(tutoringAnswerWrite)\n }\n);}\n\n\nexport const getClaimRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/claim`\n}\n\n/**\n * Take a dispatched request.\n *\n * ``409`` if somebody else already holds it. The check and the write are one\n * statement so that two practitioners hitting claim in the same instant cannot\n * both win — the legacy reads then writes, so both do.\n * @summary Claim Request\n */\nexport const claimRequest = async (requestId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getClaimRequestUrl(requestId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getCloseRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/close`\n}\n\n/**\n * Close a request that will not be answered, with a reason.\n *\n * A dispatcher's job rather than a practitioner's: giving up on a request is a\n * decision about the queue, and the person who could not answer it is not the\n * person who should decide nobody will.\n * @summary Close Request\n */\nexport const closeRequest = async (requestId: number,\n tutoringCloseWrite: TutoringCloseWrite, 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>(getCloseRequestUrl(requestId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(tutoringCloseWrite)\n }\n);}\n\n\nexport const getOpenRoomUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/room`\n}\n\n/**\n * Open the room for a live request. The practitioner decides when.\n *\n * Deliberately an explicit action rather than a side effect of claiming, which\n * is what Prof Express does: the teacher presses a button in their own queue,\n * and ``createTeacherVedamoClasssroom`` refuses unless a teacher is assigned.\n * A room provisioned at dispatch is a room the pupil joins alone.\n *\n * Only the assigned practitioner may open it, and only once — a second call\n * returns the room that is already open rather than provisioning another. The\n * legacy has no such check, so pressing its button twice orphans a room the\n * pupil may already hold a link to.\n *\n * ``409`` for a channel with nothing to join, and for a request nobody has\n * claimed.\n * @summary Open Room\n */\nexport const openRoom = async (requestId: number, options?: Parameters<typeof request>[1]): Promise<TutoringRoomRead> => {\n\n return request<TutoringRoomRead>(getOpenRoomUrl(requestId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\n"],"mappings":";;;AAeA,MAAa,uBAAuB,cAAuB;CAKzD,OAAO,sBAAsB,UAAU;AACzC;;;;;;;;;AAUA,MAAa,gBAAgB,OAAO,WAChC,qBAA0C,YAA2D;CAErG,MAAM,cAAc,MAAwF;EAC5G,IAAI,CAAC,GAAG,OAAO,CAAC;EAChB,IAAI,aAAa,SAAS,OAAO,OAAO,YAAY,EAAE,QAAQ,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;EAAE;EAC/E,MAAM,KAAK,UAAU,kBAAkB;CACzC,CACF;AAAE;AAGF,MAAa,kBAAkB,cAAuB;CAKpD,OAAO,sBAAsB,UAAU;AACzC;;;;;;;;;;;;;;;;;;AAmBA,MAAa,WAAW,OAAO,WAAmB,YAAuE;CAEvH,OAAO,QAA0B,eAAe,SAAS,GACzD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { C as TutoringAttachmentRead, In as ListMyRequestsParams, c as TutoringRequestPage, h as TutoringFeedbackWrite, l as TutoringRequestRead, o as TutoringRequestWrite, zs as BodyUploadAttachment } from "../chunks/index.js";
|
|
3
3
|
import { c as request } from "../chunks/client.js";
|
|
4
4
|
//#region src/api/tutoring-requests/tutoring-requests.d.ts
|
|
5
5
|
export declare const getListMyRequestsUrl: (params?: ListMyRequestsParams) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tutoring-requests.js","names":[],"sources":["../../src/api/tutoring-requests/tutoring-requests.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.7.0\n */\nimport type {\n BodyUploadAttachment,\n ListMyRequestsParams,\n TutoringAttachmentRead,\n TutoringFeedbackWrite,\n TutoringRequestPage,\n TutoringRequestRead,\n TutoringRequestWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListMyRequestsUrl = (params?: ListMyRequestsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n const explodeParameters = [\"status\"];\n\n if (Array.isArray(value) && explodeParameters.includes(key)) {\n value.forEach((v) => {\n normalizedParams.append(key, v === null ? 'null' : String(v));\n });\n return;\n }\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 ? `/tutoring/requests?${stringifiedParams}` : `/tutoring/requests`\n}\n\n/**\n * The caller's own requests, newest first.\n *\n * Includes requests they submitted for a child profile, which is what the\n * ``requested_by_id`` half of the predicate is for — a parent's list should not\n * go empty the moment they ask on somebody else's behalf.\n * @summary List My Requests\n */\nexport const listMyRequests = async (params?: ListMyRequestsParams, options?: Parameters<typeof request>[1]): Promise<TutoringRequestPage> => {\n\n return request<TutoringRequestPage>(getListMyRequestsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getSubmitRequestUrl = () => {\n\n\n\n\n return `/tutoring/requests`\n}\n\n/**\n * Ask for help.\n *\n * Debits the tenant's tutoring entitlement, which is what makes this a ``409``\n * when the allowance is spent rather than a queued request nobody may answer.\n * ``403`` from the entitlement layer is reported as ``404`` for the subject, per\n * the convention the loan routes already follow.\n *\n * ``onBehalfOfId`` must name a profile of the caller. Anything else is ``403``:\n * the legacy accepts a ``user_id`` in the body and trusts it, which is an\n * authorization decision made by whoever wrote the client.\n * @summary Submit Request\n */\nexport const submitRequest = async (tutoringRequestWrite: TutoringRequestWrite, options?: Parameters<typeof request>[1]): Promise<TutoringRequestRead> => {\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<TutoringRequestRead>(getSubmitRequestUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(tutoringRequestWrite)\n }\n);}\n\n\nexport const getGetRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}`\n}\n\n/**\n * One of the caller's own requests, with signed links to its files.\n * @summary Get Request\n */\nexport const getRequest = async (requestId: number, options?: Parameters<typeof request>[1]): Promise<TutoringRequestRead> => {\n\n return request<TutoringRequestRead>(getGetRequestUrl(requestId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getUploadAttachmentUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/attachments`\n}\n\n/**\n * Attach a file to a request. One per call.\n *\n * One per call rather than an array, deliberately. A pupil photographing four\n * pages on a phone connection wants three of them to survive the fourth\n * timing out, and the legacy's ``documents[]`` array is all-or-nothing — with\n * no cap on how many, so a single request can be arbitrarily large.\n *\n * The role follows from who is asking: the pupil is attaching to a question,\n * the assigned practitioner to an answer. Nobody declares it, so nobody can\n * claim the wrong one.\n *\n * ``415`` for a format we do not accept, ``413`` for a file over the ceiling,\n * ``409`` once the per-request cap is reached, and ``404`` for a request that\n * is not the caller's.\n * @summary Upload Attachment\n */\nexport const uploadAttachment = async (requestId: number,\n bodyUploadAttachment: BodyUploadAttachment, options?: Parameters<typeof request>[1]): Promise<TutoringAttachmentRead> => {\n const formData = new FormData();\nformData.append(`file`, bodyUploadAttachment.file);\n\n return request<TutoringAttachmentRead>(getUploadAttachmentUrl(requestId),\n {\n ...options,\n method: 'POST'\n ,\n body: formData\n }\n);}\n\n\nexport const getDeleteAttachmentUrl = (requestId: number,\n attachmentId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/attachments/${attachmentId}`\n}\n\n/**\n * Remove a file the caller uploaded.\n *\n * Only the uploader, and only while the request is still open — a file that\n * formed part of a delivered answer is part of the record.\n *\n * The object goes and the row goes with it: this is a mistaken upload being\n * withdrawn, not a retention event. Retention is the bucket's lifecycle rule,\n * which removes objects and leaves rows behind.\n * @summary Delete Attachment\n */\nexport const deleteAttachment = async (requestId: number,\n attachmentId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteAttachmentUrl(requestId,attachmentId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getCancelRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/cancel`\n}\n\n/**\n * Withdraw a request the caller asked.\n *\n * The debit is **not** reversed. A pupil who asks and withdraws has occupied a\n * dispatcher's attention, and refunding it would make cancel-and-resubmit a way\n * around the allowance. If a tenant should get the unit back, that is a credit\n * somebody grants, which is a different act with a different audit trail.\n * @summary Cancel Request\n */\nexport const cancelRequest = async (requestId: number, options?: Parameters<typeof request>[1]): Promise<TutoringRequestRead> => {\n\n return request<TutoringRequestRead>(getCancelRequestUrl(requestId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getRateRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/feedback`\n}\n\n/**\n * Rate the answer. One rating per request, enforced by the table.\n * @summary Rate Request\n */\nexport const rateRequest = async (requestId: number,\n tutoringFeedbackWrite: TutoringFeedbackWrite, 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>(getRateRequestUrl(requestId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(tutoringFeedbackWrite)\n }\n);}\n\n\n"],"mappings":";;;AAmB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,MAAM,KAAK,IAAkC,UAAU,MAAM,KAAK,KAAK,CAAqB,CAC9F;EAEF,MAAM,UAAsD,CAAC;EAC7D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAgD,CAAC,GAClF,IAAI,UAAU,KAAA,GAAW,QAAQ,QAAQ;EAE3C,OAAO;CACT;CACF,OAAO,QAAc,kBAAkB,SAAS,GAC9C;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,qBAAqB;CAC5C,CACF;AAAE"}
|
|
1
|
+
{"version":3,"file":"tutoring-requests.js","names":[],"sources":["../../src/api/tutoring-requests/tutoring-requests.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.8.2\n */\nimport type {\n BodyUploadAttachment,\n ListMyRequestsParams,\n TutoringAttachmentRead,\n TutoringFeedbackWrite,\n TutoringRequestPage,\n TutoringRequestRead,\n TutoringRequestWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListMyRequestsUrl = (params?: ListMyRequestsParams,) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n const explodeParameters = [\"status\"];\n\n if (Array.isArray(value) && explodeParameters.includes(key)) {\n value.forEach((v) => {\n normalizedParams.append(key, v === null ? 'null' : String(v));\n });\n return;\n }\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 ? `/tutoring/requests?${stringifiedParams}` : `/tutoring/requests`\n}\n\n/**\n * The caller's own requests, newest first.\n *\n * Includes requests they submitted for a child profile, which is what the\n * ``requested_by_id`` half of the predicate is for — a parent's list should not\n * go empty the moment they ask on somebody else's behalf.\n * @summary List My Requests\n */\nexport const listMyRequests = async (params?: ListMyRequestsParams, options?: Parameters<typeof request>[1]): Promise<TutoringRequestPage> => {\n\n return request<TutoringRequestPage>(getListMyRequestsUrl(params),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getSubmitRequestUrl = () => {\n\n\n\n\n return `/tutoring/requests`\n}\n\n/**\n * Ask for help.\n *\n * Debits the tenant's tutoring entitlement, which is what makes this a ``409``\n * when the allowance is spent rather than a queued request nobody may answer.\n * ``403`` from the entitlement layer is reported as ``404`` for the subject, per\n * the convention the loan routes already follow.\n *\n * ``onBehalfOfId`` must name a profile of the caller. Anything else is ``403``:\n * the legacy accepts a ``user_id`` in the body and trusts it, which is an\n * authorization decision made by whoever wrote the client.\n * @summary Submit Request\n */\nexport const submitRequest = async (tutoringRequestWrite: TutoringRequestWrite, options?: Parameters<typeof request>[1]): Promise<TutoringRequestRead> => {\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<TutoringRequestRead>(getSubmitRequestUrl(),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(tutoringRequestWrite)\n }\n);}\n\n\nexport const getGetRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}`\n}\n\n/**\n * One of the caller's own requests, with signed links to its files.\n * @summary Get Request\n */\nexport const getRequest = async (requestId: number, options?: Parameters<typeof request>[1]): Promise<TutoringRequestRead> => {\n\n return request<TutoringRequestRead>(getGetRequestUrl(requestId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getUploadAttachmentUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/attachments`\n}\n\n/**\n * Attach a file to a request. One per call.\n *\n * One per call rather than an array, deliberately. A pupil photographing four\n * pages on a phone connection wants three of them to survive the fourth\n * timing out, and the legacy's ``documents[]`` array is all-or-nothing — with\n * no cap on how many, so a single request can be arbitrarily large.\n *\n * The role follows from who is asking: the pupil is attaching to a question,\n * the assigned practitioner to an answer. Nobody declares it, so nobody can\n * claim the wrong one.\n *\n * ``415`` for a format we do not accept, ``413`` for a file over the ceiling,\n * ``409`` once the per-request cap is reached, and ``404`` for a request that\n * is not the caller's.\n * @summary Upload Attachment\n */\nexport const uploadAttachment = async (requestId: number,\n bodyUploadAttachment: BodyUploadAttachment, options?: Parameters<typeof request>[1]): Promise<TutoringAttachmentRead> => {\n const formData = new FormData();\nformData.append(`file`, bodyUploadAttachment.file);\n\n return request<TutoringAttachmentRead>(getUploadAttachmentUrl(requestId),\n {\n ...options,\n method: 'POST'\n ,\n body: formData\n }\n);}\n\n\nexport const getDeleteAttachmentUrl = (requestId: number,\n attachmentId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/attachments/${attachmentId}`\n}\n\n/**\n * Remove a file the caller uploaded.\n *\n * Only the uploader, and only while the request is still open — a file that\n * formed part of a delivered answer is part of the record.\n *\n * The object goes and the row goes with it: this is a mistaken upload being\n * withdrawn, not a retention event. Retention is the bucket's lifecycle rule,\n * which removes objects and leaves rows behind.\n * @summary Delete Attachment\n */\nexport const deleteAttachment = async (requestId: number,\n attachmentId: number, options?: Parameters<typeof request>[1]): Promise<void> => {\n\n return request<void>(getDeleteAttachmentUrl(requestId,attachmentId),\n {\n ...options,\n method: 'DELETE'\n\n\n }\n);}\n\n\nexport const getCancelRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/cancel`\n}\n\n/**\n * Withdraw a request the caller asked.\n *\n * The debit is **not** reversed. A pupil who asks and withdraws has occupied a\n * dispatcher's attention, and refunding it would make cancel-and-resubmit a way\n * around the allowance. If a tenant should get the unit back, that is a credit\n * somebody grants, which is a different act with a different audit trail.\n * @summary Cancel Request\n */\nexport const cancelRequest = async (requestId: number, options?: Parameters<typeof request>[1]): Promise<TutoringRequestRead> => {\n\n return request<TutoringRequestRead>(getCancelRequestUrl(requestId),\n {\n ...options,\n method: 'POST'\n\n\n }\n);}\n\n\nexport const getRateRequestUrl = (requestId: number,) => {\n\n\n\n\n return `/tutoring/requests/${requestId}/feedback`\n}\n\n/**\n * Rate the answer. One rating per request, enforced by the table.\n * @summary Rate Request\n */\nexport const rateRequest = async (requestId: number,\n tutoringFeedbackWrite: TutoringFeedbackWrite, 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>(getRateRequestUrl(requestId),\n {\n ...options,\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(tutoringFeedbackWrite)\n }\n);}\n\n\n"],"mappings":";;;AAmBA,MAAa,wBAAwB,WAAmC;CACtE,MAAM,mBAAmB,IAAI,gBAAgB;CAE7C,OAAO,QAAQ,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;EAGrD,IAAI,MAAM,QAAQ,KAAK,KAAK,CAFD,QAEiB,CAAC,CAAC,SAAS,GAAG,GAAG;GAC3D,MAAM,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SAAS,GAC9C;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,qBAAqB;CAC5C,CACF;AAAE"}
|
package/dist/chunks/client2.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { Cn as PrincipalRead, qs as AccountRead } from "./index.js";
|
|
3
3
|
import { i as ClientOptions, r as Client } from "./client.js";
|
|
4
4
|
//#region src/auth/client.d.ts
|
|
5
5
|
interface MozaikAuthOptions {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { bn as MessageRead } from "./index.js";
|
|
3
3
|
import { r as Client } from "./client.js";
|
|
4
4
|
//#region src/chat/connection.d.ts
|
|
5
5
|
type ChatStatus = 'connecting' | 'syncing' | 'connected' | 'reconnecting' | 'error' | 'closed';
|