@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.
Files changed (208) hide show
  1. package/README.md +94 -0
  2. package/dist/api/account.d.ts +75 -0
  3. package/dist/api/account.js +117 -0
  4. package/dist/api/account.js.map +1 -0
  5. package/dist/api/admin-catalogue.d.ts +68 -0
  6. package/dist/api/admin-catalogue.js +155 -0
  7. package/dist/api/admin-catalogue.js.map +1 -0
  8. package/dist/api/admin-consumption.d.ts +27 -0
  9. package/dist/api/admin-consumption.js +55 -0
  10. package/dist/api/admin-consumption.js.map +1 -0
  11. package/dist/api/admin-licenses.d.ts +21 -0
  12. package/dist/api/admin-licenses.js +34 -0
  13. package/dist/api/admin-licenses.js.map +1 -0
  14. package/dist/api/admin-patrons.d.ts +36 -0
  15. package/dist/api/admin-patrons.js +76 -0
  16. package/dist/api/admin-patrons.js.map +1 -0
  17. package/dist/api/admin-reviews.d.ts +30 -0
  18. package/dist/api/admin-reviews.js +63 -0
  19. package/dist/api/admin-reviews.js.map +1 -0
  20. package/dist/api/admin-roles.d.ts +34 -0
  21. package/dist/api/admin-roles.js +62 -0
  22. package/dist/api/admin-roles.js.map +1 -0
  23. package/dist/api/admin-support.d.ts +68 -0
  24. package/dist/api/admin-support.js +116 -0
  25. package/dist/api/admin-support.js.map +1 -0
  26. package/dist/api/admin-tenants.d.ts +33 -0
  27. package/dist/api/admin-tenants.js +68 -0
  28. package/dist/api/admin-tenants.js.map +1 -0
  29. package/dist/api/admin-tutoring.d.ts +159 -0
  30. package/dist/api/admin-tutoring.js +455 -0
  31. package/dist/api/admin-tutoring.js.map +1 -0
  32. package/dist/api/auth.d.ts +92 -0
  33. package/dist/api/auth.js +192 -0
  34. package/dist/api/auth.js.map +1 -0
  35. package/dist/api/biblio-catalogue.d.ts +122 -0
  36. package/dist/api/biblio-catalogue.js +223 -0
  37. package/dist/api/biblio-catalogue.js.map +1 -0
  38. package/dist/api/biblio-home.d.ts +18 -0
  39. package/dist/api/biblio-home.js +31 -0
  40. package/dist/api/biblio-home.js.map +1 -0
  41. package/dist/api/biblio-library.d.ts +94 -0
  42. package/dist/api/biblio-library.js +187 -0
  43. package/dist/api/biblio-library.js.map +1 -0
  44. package/dist/api/biblio-nextory.d.ts +43 -0
  45. package/dist/api/biblio-nextory.js +65 -0
  46. package/dist/api/biblio-nextory.js.map +1 -0
  47. package/dist/api/biblio-press.d.ts +38 -0
  48. package/dist/api/biblio-press.js +70 -0
  49. package/dist/api/biblio-press.js.map +1 -0
  50. package/dist/api/biblio-search.d.ts +17 -0
  51. package/dist/api/biblio-search.js +30 -0
  52. package/dist/api/biblio-search.js.map +1 -0
  53. package/dist/api/biblio-telemetry.d.ts +28 -0
  54. package/dist/api/biblio-telemetry.js +49 -0
  55. package/dist/api/biblio-telemetry.js.map +1 -0
  56. package/dist/api/consumption.d.ts +30 -0
  57. package/dist/api/consumption.js +45 -0
  58. package/dist/api/consumption.js.map +1 -0
  59. package/dist/api/cvs-app.d.ts +39 -0
  60. package/dist/api/cvs-app.js +72 -0
  61. package/dist/api/cvs-app.js.map +1 -0
  62. package/dist/api/cvs-documents.d.ts +106 -0
  63. package/dist/api/cvs-documents.js +208 -0
  64. package/dist/api/cvs-documents.js.map +1 -0
  65. package/dist/api/cvs-favorites.d.ts +53 -0
  66. package/dist/api/cvs-favorites.js +82 -0
  67. package/dist/api/cvs-favorites.js.map +1 -0
  68. package/dist/api/cvs-loans.d.ts +59 -0
  69. package/dist/api/cvs-loans.js +106 -0
  70. package/dist/api/cvs-loans.js.map +1 -0
  71. package/dist/api/cvs-streaming.d.ts +40 -0
  72. package/dist/api/cvs-streaming.js +68 -0
  73. package/dist/api/cvs-streaming.js.map +1 -0
  74. package/dist/api/index.d.ts +34 -0
  75. package/dist/api/index.js +34 -0
  76. package/dist/api/partner-catalogue.d.ts +77 -0
  77. package/dist/api/partner-catalogue.js +125 -0
  78. package/dist/api/partner-catalogue.js.map +1 -0
  79. package/dist/api/partner-reader.d.ts +56 -0
  80. package/dist/api/partner-reader.js +103 -0
  81. package/dist/api/partner-reader.js.map +1 -0
  82. package/dist/api/profiles.d.ts +64 -0
  83. package/dist/api/profiles.js +126 -0
  84. package/dist/api/profiles.js.map +1 -0
  85. package/dist/api/tutoring-catalogue.d.ts +32 -0
  86. package/dist/api/tutoring-catalogue.js +59 -0
  87. package/dist/api/tutoring-catalogue.js.map +1 -0
  88. package/dist/api/tutoring-chat.d.ts +31 -0
  89. package/dist/api/tutoring-chat.js +71 -0
  90. package/dist/api/tutoring-chat.js.map +1 -0
  91. package/dist/api/tutoring-dispatch.d.ts +37 -0
  92. package/dist/api/tutoring-dispatch.js +83 -0
  93. package/dist/api/tutoring-dispatch.js.map +1 -0
  94. package/dist/api/tutoring-practitioner.d.ts +55 -0
  95. package/dist/api/tutoring-practitioner.js +110 -0
  96. package/dist/api/tutoring-practitioner.js.map +1 -0
  97. package/dist/api/tutoring-requests.d.ts +86 -0
  98. package/dist/api/tutoring-requests.js +176 -0
  99. package/dist/api/tutoring-requests.js.map +1 -0
  100. package/dist/client-BDwBZYB0.d.ts +28 -0
  101. package/dist/client-D3kMOcIr.js +61 -0
  102. package/dist/client-D3kMOcIr.js.map +1 -0
  103. package/dist/index-wL_20vR8.d.ts +4566 -0
  104. package/dist/index.d.ts +9 -0
  105. package/dist/index.js +10 -0
  106. package/dist/index.js.map +1 -0
  107. package/dist/models.d.ts +3 -0
  108. package/dist/models.js +175 -0
  109. package/dist/models.js.map +1 -0
  110. package/dist/react/account.d.ts +163 -0
  111. package/dist/react/account.js +240 -0
  112. package/dist/react/account.js.map +1 -0
  113. package/dist/react/admin-catalogue.d.ts +196 -0
  114. package/dist/react/admin-catalogue.js +336 -0
  115. package/dist/react/admin-catalogue.js.map +1 -0
  116. package/dist/react/admin-consumption.d.ts +75 -0
  117. package/dist/react/admin-consumption.js +127 -0
  118. package/dist/react/admin-consumption.js.map +1 -0
  119. package/dist/react/admin-licenses.d.ts +50 -0
  120. package/dist/react/admin-licenses.js +78 -0
  121. package/dist/react/admin-licenses.js.map +1 -0
  122. package/dist/react/admin-patrons.d.ts +111 -0
  123. package/dist/react/admin-patrons.js +173 -0
  124. package/dist/react/admin-patrons.js.map +1 -0
  125. package/dist/react/admin-reviews.d.ts +78 -0
  126. package/dist/react/admin-reviews.js +135 -0
  127. package/dist/react/admin-reviews.js.map +1 -0
  128. package/dist/react/admin-roles.d.ts +82 -0
  129. package/dist/react/admin-roles.js +135 -0
  130. package/dist/react/admin-roles.js.map +1 -0
  131. package/dist/react/admin-support.d.ts +123 -0
  132. package/dist/react/admin-support.js +208 -0
  133. package/dist/react/admin-support.js.map +1 -0
  134. package/dist/react/admin-tenants.d.ts +108 -0
  135. package/dist/react/admin-tenants.js +165 -0
  136. package/dist/react/admin-tenants.js.map +1 -0
  137. package/dist/react/admin-tutoring.d.ts +556 -0
  138. package/dist/react/admin-tutoring.js +954 -0
  139. package/dist/react/admin-tutoring.js.map +1 -0
  140. package/dist/react/auth.d.ts +220 -0
  141. package/dist/react/auth.js +372 -0
  142. package/dist/react/auth.js.map +1 -0
  143. package/dist/react/biblio-catalogue.d.ts +374 -0
  144. package/dist/react/biblio-catalogue.js +498 -0
  145. package/dist/react/biblio-catalogue.js.map +1 -0
  146. package/dist/react/biblio-home.d.ts +47 -0
  147. package/dist/react/biblio-home.js +75 -0
  148. package/dist/react/biblio-home.js.map +1 -0
  149. package/dist/react/biblio-library.d.ts +285 -0
  150. package/dist/react/biblio-library.js +411 -0
  151. package/dist/react/biblio-library.js.map +1 -0
  152. package/dist/react/biblio-nextory.d.ts +100 -0
  153. package/dist/react/biblio-nextory.js +163 -0
  154. package/dist/react/biblio-nextory.js.map +1 -0
  155. package/dist/react/biblio-press.d.ts +121 -0
  156. package/dist/react/biblio-press.js +163 -0
  157. package/dist/react/biblio-press.js.map +1 -0
  158. package/dist/react/biblio-search.d.ts +46 -0
  159. package/dist/react/biblio-search.js +74 -0
  160. package/dist/react/biblio-search.js.map +1 -0
  161. package/dist/react/biblio-telemetry.d.ts +49 -0
  162. package/dist/react/biblio-telemetry.js +85 -0
  163. package/dist/react/biblio-telemetry.js.map +1 -0
  164. package/dist/react/consumption.d.ts +66 -0
  165. package/dist/react/consumption.js +109 -0
  166. package/dist/react/consumption.js.map +1 -0
  167. package/dist/react/cvs-app.d.ts +86 -0
  168. package/dist/react/cvs-app.js +144 -0
  169. package/dist/react/cvs-app.js.map +1 -0
  170. package/dist/react/cvs-documents.d.ts +254 -0
  171. package/dist/react/cvs-documents.js +418 -0
  172. package/dist/react/cvs-documents.js.map +1 -0
  173. package/dist/react/cvs-favorites.d.ts +143 -0
  174. package/dist/react/cvs-favorites.js +206 -0
  175. package/dist/react/cvs-favorites.js.map +1 -0
  176. package/dist/react/cvs-loans.d.ts +140 -0
  177. package/dist/react/cvs-loans.js +234 -0
  178. package/dist/react/cvs-loans.js.map +1 -0
  179. package/dist/react/cvs-streaming.d.ts +87 -0
  180. package/dist/react/cvs-streaming.js +141 -0
  181. package/dist/react/cvs-streaming.js.map +1 -0
  182. package/dist/react/index.d.ts +34 -0
  183. package/dist/react/index.js +34 -0
  184. package/dist/react/partner-catalogue.d.ts +223 -0
  185. package/dist/react/partner-catalogue.js +301 -0
  186. package/dist/react/partner-catalogue.js.map +1 -0
  187. package/dist/react/partner-reader.d.ts +159 -0
  188. package/dist/react/partner-reader.js +226 -0
  189. package/dist/react/partner-reader.js.map +1 -0
  190. package/dist/react/profiles.d.ts +174 -0
  191. package/dist/react/profiles.js +279 -0
  192. package/dist/react/profiles.js.map +1 -0
  193. package/dist/react/tutoring-catalogue.d.ts +115 -0
  194. package/dist/react/tutoring-catalogue.js +151 -0
  195. package/dist/react/tutoring-catalogue.js.map +1 -0
  196. package/dist/react/tutoring-chat.d.ts +96 -0
  197. package/dist/react/tutoring-chat.js +172 -0
  198. package/dist/react/tutoring-chat.js.map +1 -0
  199. package/dist/react/tutoring-dispatch.d.ts +102 -0
  200. package/dist/react/tutoring-dispatch.js +183 -0
  201. package/dist/react/tutoring-dispatch.js.map +1 -0
  202. package/dist/react/tutoring-practitioner.d.ts +129 -0
  203. package/dist/react/tutoring-practitioner.js +230 -0
  204. package/dist/react/tutoring-practitioner.js.map +1 -0
  205. package/dist/react/tutoring-requests.d.ts +233 -0
  206. package/dist/react/tutoring-requests.js +385 -0
  207. package/dist/react/tutoring-requests.js.map +1 -0
  208. package/package.json +58 -0
@@ -0,0 +1,68 @@
1
+
2
+ import { r as request } from "../client-D3kMOcIr.js";
3
+ //#region src/api/admin-tenants/admin-tenants.ts
4
+ const getListTenantsUrl = () => {
5
+ return `/admin/tenants`;
6
+ };
7
+ /**
8
+ * The tenants this operator administers.
9
+ *
10
+ * For a library administrator that is one row, and returning a list of one is
11
+ * better than a bare object: the client renders the same picker whether it is
12
+ * talking to a library, a consortium or the vendor.
13
+ * @summary List Tenants
14
+ */
15
+ const listTenants = async (options) => {
16
+ return request(getListTenantsUrl(), {
17
+ ...options,
18
+ method: "GET"
19
+ });
20
+ };
21
+ const getReadTenantUrl = (tenantId) => {
22
+ return `/admin/tenants/${tenantId}`;
23
+ };
24
+ /**
25
+ * One tenant's configuration.
26
+ * @summary Read Tenant
27
+ */
28
+ const readTenant = async (tenantId, options) => {
29
+ return request(getReadTenantUrl(tenantId), {
30
+ ...options,
31
+ method: "GET"
32
+ });
33
+ };
34
+ const getUpdateTenantUrl = (tenantId) => {
35
+ return `/admin/tenants/${tenantId}`;
36
+ };
37
+ /**
38
+ * Change a tenant's configuration. Audited.
39
+ *
40
+ * The two membership flags are mutually exclusive and the database says so —
41
+ * ``ck_tenant_individual_accounts_exclusive``. Checked here too, because a
42
+ * constraint violation surfaces as a 500 and this is a 422: the operator sent
43
+ * something contradictory and can fix it.
44
+ * @summary Update Tenant
45
+ */
46
+ const updateTenant = async (tenantId, tenantSettingsUpdateWrite, options) => {
47
+ const getHeaders = (h) => {
48
+ if (!h) return {};
49
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
50
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
51
+ const headers = {};
52
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
53
+ return headers;
54
+ };
55
+ return request(getUpdateTenantUrl(tenantId), {
56
+ ...options,
57
+ method: "PATCH",
58
+ headers: {
59
+ "Content-Type": "application/json",
60
+ ...getHeaders(options?.headers)
61
+ },
62
+ body: JSON.stringify(tenantSettingsUpdateWrite)
63
+ });
64
+ };
65
+ //#endregion
66
+ export { getListTenantsUrl, getReadTenantUrl, getUpdateTenantUrl, listTenants, readTenant, updateTenant };
67
+
68
+ //# sourceMappingURL=admin-tenants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-tenants.js","names":[],"sources":["../../src/api/admin-tenants/admin-tenants.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 TenantSettingsRead,\n TenantSettingsUpdateWrite\n} from '../../models';\n\nimport { request } from '../../client';\n\nexport const getListTenantsUrl = () => {\n\n\n\n\n return `/admin/tenants`\n}\n\n/**\n * The tenants this operator administers.\n *\n * For a library administrator that is one row, and returning a list of one is\n * better than a bare object: the client renders the same picker whether it is\n * talking to a library, a consortium or the vendor.\n * @summary List Tenants\n */\nexport const listTenants = async ( options?: Parameters<typeof request>[1]): Promise<TenantSettingsRead[]> => {\n\n return request<TenantSettingsRead[]>(getListTenantsUrl(),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getReadTenantUrl = (tenantId: number,) => {\n\n\n\n\n return `/admin/tenants/${tenantId}`\n}\n\n/**\n * One tenant's configuration.\n * @summary Read Tenant\n */\nexport const readTenant = async (tenantId: number, options?: Parameters<typeof request>[1]): Promise<TenantSettingsRead> => {\n\n return request<TenantSettingsRead>(getReadTenantUrl(tenantId),\n {\n ...options,\n method: 'GET'\n\n\n }\n);}\n\n\nexport const getUpdateTenantUrl = (tenantId: number,) => {\n\n\n\n\n return `/admin/tenants/${tenantId}`\n}\n\n/**\n * Change a tenant's configuration. Audited.\n *\n * The two membership flags are mutually exclusive and the database says so —\n * ``ck_tenant_individual_accounts_exclusive``. Checked here too, because a\n * constraint violation surfaces as a 500 and this is a 422: the operator sent\n * something contradictory and can fix it.\n * @summary Update Tenant\n */\nexport const updateTenant = async (tenantId: number,\n tenantSettingsUpdateWrite: TenantSettingsUpdateWrite, options?: Parameters<typeof request>[1]): Promise<TenantSettingsRead> => {\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<TenantSettingsRead>(getUpdateTenantUrl(tenantId),\n {\n ...options,\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },\n body: JSON.stringify(tenantSettingsUpdateWrite)\n }\n);}\n\n\n"],"mappings":";;;AAcA,MAAa,0BAA0B;CAKrC,OAAO;AACT;;;;;;;;;AAUA,MAAa,cAAc,OAAQ,YAA2E;CAE5G,OAAO,QAA8B,kBAAkB,GACvD;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,oBAAoB,aAAsB;CAKrD,OAAO,kBAAkB;AAC3B;;;;;AAMA,MAAa,aAAa,OAAO,UAAkB,YAAyE;CAE1H,OAAO,QAA4B,iBAAiB,QAAQ,GAC5D;EACE,GAAG;EACH,QAAQ;CAGV,CACF;AAAE;AAGF,MAAa,sBAAsB,aAAsB;CAKvD,OAAO,kBAAkB;AAC3B;;;;;;;;;;AAWA,MAAa,eAAe,OAAO,UAC/B,2BAAsD,YAAyE;CAE/H,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,QAAQ,GAC5D;EACE,GAAG;EACH,QAAQ;EACR,SAAS;GAAE,gBAAgB;GAAoB,GAAG,WAAW,SAAS,OAAO;EAAE;EAC/E,MAAM,KAAK,UAAU,yBAAyB;CAChD,CACF;AAAE"}
@@ -0,0 +1,159 @@
1
+
2
+ import { Cn as ListExpiringDocumentsParams, Dt as PractitionerDocumentListRead, En as ListAllRequestsParams, Et as PractitionerRead, F as SubjectRead, In as LevelRead, N as SubjectWrite, Pn as LevelWrite, Sn as ListFeedbackParams, Tt as PractitionerPage, Xr as AiDraftRead, Yr as AiDraftReviewWrite, cr as EducationalGoalRead, d as TutoringQueuePage, fn as ListPractitionersParams, g as TutoringFeedbackModerationWrite, l as TutoringRequestAdminWrite, m as TutoringFeedbackPage, o as TutoringRequestStaffRead, or as EducationalGoalWrite, u as TutoringRequestAdminCloseWrite, wt as PractitionerWrite } from "../index-wL_20vR8.js";
3
+ import { c as request } from "../client-BDwBZYB0.js";
4
+ //#region src/api/admin-tutoring/admin-tutoring.d.ts
5
+ export declare const getListExpiringDocumentsUrl: (params?: ListExpiringDocumentsParams) => string;
6
+ /**
7
+ * Whose attestation lapses soon, as a query rather than a filing cabinet.
8
+ *
9
+ * An URSSAF *attestation de vigilance* is valid for six months and a lapsed one
10
+ * is a compliance problem. The legacy stores it as a ``text`` column with one
11
+ * ``ursaff_date`` beside it, so this question has no answer there at all.
12
+ * @summary List Expiring Documents
13
+ */
14
+ export declare const listExpiringDocuments: (params?: ListExpiringDocumentsParams, options?: Parameters<typeof request>[1]) => Promise<PractitionerDocumentListRead>;
15
+ export declare const getListFeedbackUrl: (params?: ListFeedbackParams) => string;
16
+ /**
17
+ * Ratings, newest first. ``?publishable=false`` is the moderation queue.
18
+ *
19
+ * Tenant-scoped through the request it belongs to: a rating is a child's free
20
+ * text, so it is reachable only by an operator who reaches the tenant.
21
+ * @summary List Feedback
22
+ */
23
+ export declare const listFeedback: (params?: ListFeedbackParams, options?: Parameters<typeof request>[1]) => Promise<TutoringFeedbackPage>;
24
+ export declare const getModerateFeedbackUrl: (feedbackId: number) => string;
25
+ /**
26
+ * Clear a rating for the public showcase, or withhold it.
27
+ *
28
+ * ``PUT`` on a sub-resource rather than ``PATCH`` on the rating, mirroring
29
+ * ``/admin/reviews/{id}/moderation``: the decision is the resource, and it is
30
+ * idempotent.
31
+ * @summary Moderate Feedback
32
+ */
33
+ export declare const moderateFeedback: (feedbackId: number, tutoringFeedbackModerationWrite: TutoringFeedbackModerationWrite, options?: Parameters<typeof request>[1]) => Promise<void>;
34
+ export declare const getCreateGoalUrl: () => string;
35
+ /**
36
+ * @summary Create Goal
37
+ */
38
+ export declare const createGoal: (educationalGoalWrite: EducationalGoalWrite, options?: Parameters<typeof request>[1]) => Promise<EducationalGoalRead>;
39
+ export declare const getAmendGoalUrl: (goalId: number) => string;
40
+ /**
41
+ * @summary Amend Goal
42
+ */
43
+ export declare const amendGoal: (goalId: number, educationalGoalWrite: EducationalGoalWrite, options?: Parameters<typeof request>[1]) => Promise<EducationalGoalRead>;
44
+ export declare const getCreateLevelUrl: () => string;
45
+ /**
46
+ * @summary Create Level
47
+ */
48
+ export declare const createLevel: (levelWrite: LevelWrite, options?: Parameters<typeof request>[1]) => Promise<LevelRead>;
49
+ export declare const getAmendLevelUrl: (levelId: number) => string;
50
+ /**
51
+ * @summary Amend Level
52
+ */
53
+ export declare const amendLevel: (levelId: number, levelWrite: LevelWrite, options?: Parameters<typeof request>[1]) => Promise<LevelRead>;
54
+ export declare const getListPractitionersUrl: (params?: ListPractitionersParams) => string;
55
+ /**
56
+ * Who can take work, filtered the way the question is actually asked.
57
+ *
58
+ * ``role``, ``capability``, ``subjectId`` and ``levelId`` together answer "who
59
+ * can take *this* request", which is the only thing anybody wants from this
60
+ * list. The legacy answers it with a different screen per role — nine of them,
61
+ * plus two more for pelite.
62
+ * @summary List Practitioners
63
+ */
64
+ export declare const listPractitioners: (params?: ListPractitionersParams, options?: Parameters<typeof request>[1]) => Promise<PractitionerPage>;
65
+ export declare const getAmendPractitionerUrl: (userId: number) => string;
66
+ /**
67
+ * Availability, capabilities and competencies in one call.
68
+ *
69
+ * Competencies are replaced wholesale rather than diffed: the screen shows a
70
+ * checklist and submits it. Absent means unchanged; an empty list means none,
71
+ * which is a real instruction and has to be distinguishable from absence —
72
+ * hence ``exclude_unset``.
73
+ * @summary Amend Practitioner
74
+ */
75
+ export declare const amendPractitioner: (userId: number, practitionerWrite: PractitionerWrite, options?: Parameters<typeof request>[1]) => Promise<PractitionerRead>;
76
+ export declare const getListPractitionerDocumentsUrl: (userId: number) => string;
77
+ /**
78
+ * One practitioner's compliance paperwork. Metadata only, never the file.
79
+ * @summary List Practitioner Documents
80
+ */
81
+ export declare const listPractitionerDocuments: (userId: number, options?: Parameters<typeof request>[1]) => Promise<PractitionerDocumentListRead>;
82
+ export declare const getListAllRequestsUrl: (params?: ListAllRequestsParams) => string;
83
+ /**
84
+ * Every request in the tenants this operator reaches.
85
+ *
86
+ * Returns the queue shape rather than the staff shape on purpose: this is the
87
+ * list screen, and a list of five hundred requests should not carry five hundred
88
+ * statements. The staff detail shape is on the single-request route.
89
+ * @summary List All Requests
90
+ */
91
+ export declare const listAllRequests: (params?: ListAllRequestsParams, options?: Parameters<typeof request>[1]) => Promise<TutoringQueuePage>;
92
+ export declare const getReadRequestUrl: (requestId: number) => string;
93
+ /**
94
+ * One request in full, including provenance and the staff note.
95
+ * @summary Read Request
96
+ */
97
+ export declare const readRequest: (requestId: number, options?: Parameters<typeof request>[1]) => Promise<TutoringRequestStaffRead>;
98
+ export declare const getAmendRequestUrl: (requestId: number) => string;
99
+ /**
100
+ * Reassign a stalled request, and say why, in one call.
101
+ *
102
+ * Partial: only fields present in the body are applied, so a client that knows
103
+ * about one of them cannot blank the rest. Reassignment does **not** move the
104
+ * status — a request routed to somebody else is still dispatched, and pretending
105
+ * otherwise would corrupt the timestamp ladder every report reads.
106
+ * @summary Amend Request
107
+ */
108
+ export declare const amendRequest: (requestId: number, tutoringRequestAdminWrite: TutoringRequestAdminWrite, options?: Parameters<typeof request>[1]) => Promise<TutoringRequestStaffRead>;
109
+ export declare const getAdminCloseRequestUrl: (requestId: number) => string;
110
+ /**
111
+ * Close a request from the back office. Goes through the state machine.
112
+ * @summary Admin Close Request
113
+ */
114
+ export declare const adminCloseRequest: (requestId: number, tutoringRequestAdminCloseWrite: TutoringRequestAdminCloseWrite, options?: Parameters<typeof request>[1]) => Promise<void>;
115
+ export declare const getReadDraftUrl: (requestId: number) => string;
116
+ /**
117
+ * The latest draft for one request.
118
+ *
119
+ * ``404`` when there is none, which is the ordinary case: drafting is off by
120
+ * default, and even switched on it produces nothing when the provider is
121
+ * unreachable. A client must treat a missing draft as normal rather than as
122
+ * an error — the request is answerable by a person either way.
123
+ *
124
+ * Only the latest. Re-drafting is not a feature yet, and returning a list
125
+ * would promise one.
126
+ * @summary Read Draft
127
+ */
128
+ export declare const readDraft: (requestId: number, options?: Parameters<typeof request>[1]) => Promise<AiDraftRead>;
129
+ export declare const getReviewDraftUrl: (requestId: number) => string;
130
+ /**
131
+ * Score a draft, and optionally hand the request to a person.
132
+ *
133
+ * ``escalate`` stamps ``escalatedAt`` — the legacy's ``ai_to_live``. It is
134
+ * taken from the body rather than inferred from a low ``vote``: a reviewer may
135
+ * rate a draft poorly and still keep it as a starting point, or rate it well
136
+ * and escalate anyway because the pupil needs a conversation.
137
+ *
138
+ * Re-reviewing overwrites the score. Escalation does not un-stamp, because
139
+ * handing a request to a person is not a thing that gets taken back.
140
+ *
141
+ * The request's own status is untouched. A draft is not a state of the
142
+ * request, and moving it here would corrupt the timestamp ladder the reports
143
+ * read.
144
+ * @summary Review Draft
145
+ */
146
+ export declare const reviewDraft: (requestId: number, aiDraftReviewWrite: AiDraftReviewWrite, options?: Parameters<typeof request>[1]) => Promise<AiDraftRead>;
147
+ export declare const getCreateSubjectUrl: () => string;
148
+ /**
149
+ * Add a subject. Reference data, so ADMIN rather than SUPPORT.
150
+ * @summary Create Subject
151
+ */
152
+ export declare const createSubject: (subjectWrite: SubjectWrite, options?: Parameters<typeof request>[1]) => Promise<SubjectRead>;
153
+ export declare const getAmendSubjectUrl: (subjectId: number) => string;
154
+ /**
155
+ * @summary Amend Subject
156
+ */
157
+ export declare const amendSubject: (subjectId: number, subjectWrite: SubjectWrite, options?: Parameters<typeof request>[1]) => Promise<SubjectRead>;
158
+ //#endregion
159
+ //# sourceMappingURL=admin-tutoring.d.ts.map
@@ -0,0 +1,455 @@
1
+
2
+ import { r as request } from "../client-D3kMOcIr.js";
3
+ //#region src/api/admin-tutoring/admin-tutoring.ts
4
+ const getListExpiringDocumentsUrl = (params) => {
5
+ const normalizedParams = new URLSearchParams();
6
+ Object.entries(params || {}).forEach(([key, value]) => {
7
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
8
+ });
9
+ const stringifiedParams = normalizedParams.toString();
10
+ return stringifiedParams.length > 0 ? `/admin/tutoring/documents/expiring?${stringifiedParams}` : `/admin/tutoring/documents/expiring`;
11
+ };
12
+ /**
13
+ * Whose attestation lapses soon, as a query rather than a filing cabinet.
14
+ *
15
+ * An URSSAF *attestation de vigilance* is valid for six months and a lapsed one
16
+ * is a compliance problem. The legacy stores it as a ``text`` column with one
17
+ * ``ursaff_date`` beside it, so this question has no answer there at all.
18
+ * @summary List Expiring Documents
19
+ */
20
+ const listExpiringDocuments = async (params, options) => {
21
+ return request(getListExpiringDocumentsUrl(params), {
22
+ ...options,
23
+ method: "GET"
24
+ });
25
+ };
26
+ const getListFeedbackUrl = (params) => {
27
+ const normalizedParams = new URLSearchParams();
28
+ Object.entries(params || {}).forEach(([key, value]) => {
29
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
30
+ });
31
+ const stringifiedParams = normalizedParams.toString();
32
+ return stringifiedParams.length > 0 ? `/admin/tutoring/feedback?${stringifiedParams}` : `/admin/tutoring/feedback`;
33
+ };
34
+ /**
35
+ * Ratings, newest first. ``?publishable=false`` is the moderation queue.
36
+ *
37
+ * Tenant-scoped through the request it belongs to: a rating is a child's free
38
+ * text, so it is reachable only by an operator who reaches the tenant.
39
+ * @summary List Feedback
40
+ */
41
+ const listFeedback = async (params, options) => {
42
+ return request(getListFeedbackUrl(params), {
43
+ ...options,
44
+ method: "GET"
45
+ });
46
+ };
47
+ const getModerateFeedbackUrl = (feedbackId) => {
48
+ return `/admin/tutoring/feedback/${feedbackId}/moderation`;
49
+ };
50
+ /**
51
+ * Clear a rating for the public showcase, or withhold it.
52
+ *
53
+ * ``PUT`` on a sub-resource rather than ``PATCH`` on the rating, mirroring
54
+ * ``/admin/reviews/{id}/moderation``: the decision is the resource, and it is
55
+ * idempotent.
56
+ * @summary Moderate Feedback
57
+ */
58
+ const moderateFeedback = async (feedbackId, tutoringFeedbackModerationWrite, options) => {
59
+ const getHeaders = (h) => {
60
+ if (!h) return {};
61
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
62
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
63
+ const headers = {};
64
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
65
+ return headers;
66
+ };
67
+ return request(getModerateFeedbackUrl(feedbackId), {
68
+ ...options,
69
+ method: "PUT",
70
+ headers: {
71
+ "Content-Type": "application/json",
72
+ ...getHeaders(options?.headers)
73
+ },
74
+ body: JSON.stringify(tutoringFeedbackModerationWrite)
75
+ });
76
+ };
77
+ const getCreateGoalUrl = () => {
78
+ return `/admin/tutoring/goals`;
79
+ };
80
+ /**
81
+ * @summary Create Goal
82
+ */
83
+ const createGoal = async (educationalGoalWrite, options) => {
84
+ const getHeaders = (h) => {
85
+ if (!h) return {};
86
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
87
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
88
+ const headers = {};
89
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
90
+ return headers;
91
+ };
92
+ return request(getCreateGoalUrl(), {
93
+ ...options,
94
+ method: "POST",
95
+ headers: {
96
+ "Content-Type": "application/json",
97
+ ...getHeaders(options?.headers)
98
+ },
99
+ body: JSON.stringify(educationalGoalWrite)
100
+ });
101
+ };
102
+ const getAmendGoalUrl = (goalId) => {
103
+ return `/admin/tutoring/goals/${goalId}`;
104
+ };
105
+ /**
106
+ * @summary Amend Goal
107
+ */
108
+ const amendGoal = async (goalId, educationalGoalWrite, options) => {
109
+ const getHeaders = (h) => {
110
+ if (!h) return {};
111
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
112
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
113
+ const headers = {};
114
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
115
+ return headers;
116
+ };
117
+ return request(getAmendGoalUrl(goalId), {
118
+ ...options,
119
+ method: "PATCH",
120
+ headers: {
121
+ "Content-Type": "application/json",
122
+ ...getHeaders(options?.headers)
123
+ },
124
+ body: JSON.stringify(educationalGoalWrite)
125
+ });
126
+ };
127
+ const getCreateLevelUrl = () => {
128
+ return `/admin/tutoring/levels`;
129
+ };
130
+ /**
131
+ * @summary Create Level
132
+ */
133
+ const createLevel = async (levelWrite, options) => {
134
+ const getHeaders = (h) => {
135
+ if (!h) return {};
136
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
137
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
138
+ const headers = {};
139
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
140
+ return headers;
141
+ };
142
+ return request(getCreateLevelUrl(), {
143
+ ...options,
144
+ method: "POST",
145
+ headers: {
146
+ "Content-Type": "application/json",
147
+ ...getHeaders(options?.headers)
148
+ },
149
+ body: JSON.stringify(levelWrite)
150
+ });
151
+ };
152
+ const getAmendLevelUrl = (levelId) => {
153
+ return `/admin/tutoring/levels/${levelId}`;
154
+ };
155
+ /**
156
+ * @summary Amend Level
157
+ */
158
+ const amendLevel = async (levelId, levelWrite, options) => {
159
+ const getHeaders = (h) => {
160
+ if (!h) return {};
161
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
162
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
163
+ const headers = {};
164
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
165
+ return headers;
166
+ };
167
+ return request(getAmendLevelUrl(levelId), {
168
+ ...options,
169
+ method: "PATCH",
170
+ headers: {
171
+ "Content-Type": "application/json",
172
+ ...getHeaders(options?.headers)
173
+ },
174
+ body: JSON.stringify(levelWrite)
175
+ });
176
+ };
177
+ const getListPractitionersUrl = (params) => {
178
+ const normalizedParams = new URLSearchParams();
179
+ Object.entries(params || {}).forEach(([key, value]) => {
180
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
181
+ });
182
+ const stringifiedParams = normalizedParams.toString();
183
+ return stringifiedParams.length > 0 ? `/admin/tutoring/practitioners?${stringifiedParams}` : `/admin/tutoring/practitioners`;
184
+ };
185
+ /**
186
+ * Who can take work, filtered the way the question is actually asked.
187
+ *
188
+ * ``role``, ``capability``, ``subjectId`` and ``levelId`` together answer "who
189
+ * can take *this* request", which is the only thing anybody wants from this
190
+ * list. The legacy answers it with a different screen per role — nine of them,
191
+ * plus two more for pelite.
192
+ * @summary List Practitioners
193
+ */
194
+ const listPractitioners = async (params, options) => {
195
+ return request(getListPractitionersUrl(params), {
196
+ ...options,
197
+ method: "GET"
198
+ });
199
+ };
200
+ const getAmendPractitionerUrl = (userId) => {
201
+ return `/admin/tutoring/practitioners/${userId}`;
202
+ };
203
+ /**
204
+ * Availability, capabilities and competencies in one call.
205
+ *
206
+ * Competencies are replaced wholesale rather than diffed: the screen shows a
207
+ * checklist and submits it. Absent means unchanged; an empty list means none,
208
+ * which is a real instruction and has to be distinguishable from absence —
209
+ * hence ``exclude_unset``.
210
+ * @summary Amend Practitioner
211
+ */
212
+ const amendPractitioner = async (userId, practitionerWrite, options) => {
213
+ const getHeaders = (h) => {
214
+ if (!h) return {};
215
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
216
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
217
+ const headers = {};
218
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
219
+ return headers;
220
+ };
221
+ return request(getAmendPractitionerUrl(userId), {
222
+ ...options,
223
+ method: "PATCH",
224
+ headers: {
225
+ "Content-Type": "application/json",
226
+ ...getHeaders(options?.headers)
227
+ },
228
+ body: JSON.stringify(practitionerWrite)
229
+ });
230
+ };
231
+ const getListPractitionerDocumentsUrl = (userId) => {
232
+ return `/admin/tutoring/practitioners/${userId}/documents`;
233
+ };
234
+ /**
235
+ * One practitioner's compliance paperwork. Metadata only, never the file.
236
+ * @summary List Practitioner Documents
237
+ */
238
+ const listPractitionerDocuments = async (userId, options) => {
239
+ return request(getListPractitionerDocumentsUrl(userId), {
240
+ ...options,
241
+ method: "GET"
242
+ });
243
+ };
244
+ const getListAllRequestsUrl = (params) => {
245
+ const normalizedParams = new URLSearchParams();
246
+ Object.entries(params || {}).forEach(([key, value]) => {
247
+ if (Array.isArray(value) && ["status"].includes(key)) {
248
+ value.forEach((v) => {
249
+ normalizedParams.append(key, v === null ? "null" : String(v));
250
+ });
251
+ return;
252
+ }
253
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
254
+ });
255
+ const stringifiedParams = normalizedParams.toString();
256
+ return stringifiedParams.length > 0 ? `/admin/tutoring/requests?${stringifiedParams}` : `/admin/tutoring/requests`;
257
+ };
258
+ /**
259
+ * Every request in the tenants this operator reaches.
260
+ *
261
+ * Returns the queue shape rather than the staff shape on purpose: this is the
262
+ * list screen, and a list of five hundred requests should not carry five hundred
263
+ * statements. The staff detail shape is on the single-request route.
264
+ * @summary List All Requests
265
+ */
266
+ const listAllRequests = async (params, options) => {
267
+ return request(getListAllRequestsUrl(params), {
268
+ ...options,
269
+ method: "GET"
270
+ });
271
+ };
272
+ const getReadRequestUrl = (requestId) => {
273
+ return `/admin/tutoring/requests/${requestId}`;
274
+ };
275
+ /**
276
+ * One request in full, including provenance and the staff note.
277
+ * @summary Read Request
278
+ */
279
+ const readRequest = async (requestId, options) => {
280
+ return request(getReadRequestUrl(requestId), {
281
+ ...options,
282
+ method: "GET"
283
+ });
284
+ };
285
+ const getAmendRequestUrl = (requestId) => {
286
+ return `/admin/tutoring/requests/${requestId}`;
287
+ };
288
+ /**
289
+ * Reassign a stalled request, and say why, in one call.
290
+ *
291
+ * Partial: only fields present in the body are applied, so a client that knows
292
+ * about one of them cannot blank the rest. Reassignment does **not** move the
293
+ * status — a request routed to somebody else is still dispatched, and pretending
294
+ * otherwise would corrupt the timestamp ladder every report reads.
295
+ * @summary Amend Request
296
+ */
297
+ const amendRequest = async (requestId, tutoringRequestAdminWrite, options) => {
298
+ const getHeaders = (h) => {
299
+ if (!h) return {};
300
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
301
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
302
+ const headers = {};
303
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
304
+ return headers;
305
+ };
306
+ return request(getAmendRequestUrl(requestId), {
307
+ ...options,
308
+ method: "PATCH",
309
+ headers: {
310
+ "Content-Type": "application/json",
311
+ ...getHeaders(options?.headers)
312
+ },
313
+ body: JSON.stringify(tutoringRequestAdminWrite)
314
+ });
315
+ };
316
+ const getAdminCloseRequestUrl = (requestId) => {
317
+ return `/admin/tutoring/requests/${requestId}/close`;
318
+ };
319
+ /**
320
+ * Close a request from the back office. Goes through the state machine.
321
+ * @summary Admin Close Request
322
+ */
323
+ const adminCloseRequest = async (requestId, tutoringRequestAdminCloseWrite, options) => {
324
+ const getHeaders = (h) => {
325
+ if (!h) return {};
326
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
327
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
328
+ const headers = {};
329
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
330
+ return headers;
331
+ };
332
+ return request(getAdminCloseRequestUrl(requestId), {
333
+ ...options,
334
+ method: "POST",
335
+ headers: {
336
+ "Content-Type": "application/json",
337
+ ...getHeaders(options?.headers)
338
+ },
339
+ body: JSON.stringify(tutoringRequestAdminCloseWrite)
340
+ });
341
+ };
342
+ const getReadDraftUrl = (requestId) => {
343
+ return `/admin/tutoring/requests/${requestId}/draft`;
344
+ };
345
+ /**
346
+ * The latest draft for one request.
347
+ *
348
+ * ``404`` when there is none, which is the ordinary case: drafting is off by
349
+ * default, and even switched on it produces nothing when the provider is
350
+ * unreachable. A client must treat a missing draft as normal rather than as
351
+ * an error — the request is answerable by a person either way.
352
+ *
353
+ * Only the latest. Re-drafting is not a feature yet, and returning a list
354
+ * would promise one.
355
+ * @summary Read Draft
356
+ */
357
+ const readDraft = async (requestId, options) => {
358
+ return request(getReadDraftUrl(requestId), {
359
+ ...options,
360
+ method: "GET"
361
+ });
362
+ };
363
+ const getReviewDraftUrl = (requestId) => {
364
+ return `/admin/tutoring/requests/${requestId}/draft/review`;
365
+ };
366
+ /**
367
+ * Score a draft, and optionally hand the request to a person.
368
+ *
369
+ * ``escalate`` stamps ``escalatedAt`` — the legacy's ``ai_to_live``. It is
370
+ * taken from the body rather than inferred from a low ``vote``: a reviewer may
371
+ * rate a draft poorly and still keep it as a starting point, or rate it well
372
+ * and escalate anyway because the pupil needs a conversation.
373
+ *
374
+ * Re-reviewing overwrites the score. Escalation does not un-stamp, because
375
+ * handing a request to a person is not a thing that gets taken back.
376
+ *
377
+ * The request's own status is untouched. A draft is not a state of the
378
+ * request, and moving it here would corrupt the timestamp ladder the reports
379
+ * read.
380
+ * @summary Review Draft
381
+ */
382
+ const reviewDraft = async (requestId, aiDraftReviewWrite, options) => {
383
+ const getHeaders = (h) => {
384
+ if (!h) return {};
385
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
386
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
387
+ const headers = {};
388
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
389
+ return headers;
390
+ };
391
+ return request(getReviewDraftUrl(requestId), {
392
+ ...options,
393
+ method: "PUT",
394
+ headers: {
395
+ "Content-Type": "application/json",
396
+ ...getHeaders(options?.headers)
397
+ },
398
+ body: JSON.stringify(aiDraftReviewWrite)
399
+ });
400
+ };
401
+ const getCreateSubjectUrl = () => {
402
+ return `/admin/tutoring/subjects`;
403
+ };
404
+ /**
405
+ * Add a subject. Reference data, so ADMIN rather than SUPPORT.
406
+ * @summary Create Subject
407
+ */
408
+ const createSubject = async (subjectWrite, options) => {
409
+ const getHeaders = (h) => {
410
+ if (!h) return {};
411
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
412
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
413
+ const headers = {};
414
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
415
+ return headers;
416
+ };
417
+ return request(getCreateSubjectUrl(), {
418
+ ...options,
419
+ method: "POST",
420
+ headers: {
421
+ "Content-Type": "application/json",
422
+ ...getHeaders(options?.headers)
423
+ },
424
+ body: JSON.stringify(subjectWrite)
425
+ });
426
+ };
427
+ const getAmendSubjectUrl = (subjectId) => {
428
+ return `/admin/tutoring/subjects/${subjectId}`;
429
+ };
430
+ /**
431
+ * @summary Amend Subject
432
+ */
433
+ const amendSubject = async (subjectId, subjectWrite, options) => {
434
+ const getHeaders = (h) => {
435
+ if (!h) return {};
436
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
437
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
438
+ const headers = {};
439
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
440
+ return headers;
441
+ };
442
+ return request(getAmendSubjectUrl(subjectId), {
443
+ ...options,
444
+ method: "PATCH",
445
+ headers: {
446
+ "Content-Type": "application/json",
447
+ ...getHeaders(options?.headers)
448
+ },
449
+ body: JSON.stringify(subjectWrite)
450
+ });
451
+ };
452
+ //#endregion
453
+ export { adminCloseRequest, amendGoal, amendLevel, amendPractitioner, amendRequest, amendSubject, createGoal, createLevel, createSubject, getAdminCloseRequestUrl, getAmendGoalUrl, getAmendLevelUrl, getAmendPractitionerUrl, getAmendRequestUrl, getAmendSubjectUrl, getCreateGoalUrl, getCreateLevelUrl, getCreateSubjectUrl, getListAllRequestsUrl, getListExpiringDocumentsUrl, getListFeedbackUrl, getListPractitionerDocumentsUrl, getListPractitionersUrl, getModerateFeedbackUrl, getReadDraftUrl, getReadRequestUrl, getReviewDraftUrl, listAllRequests, listExpiringDocuments, listFeedback, listPractitionerDocuments, listPractitioners, moderateFeedback, readDraft, readRequest, reviewDraft };
454
+
455
+ //# sourceMappingURL=admin-tutoring.js.map