|
Lines 179-207
const createClientProxy = loader => {
Link Here
|
| 179 |
return /** @type {T} */ (createProxy(client => client)); |
179 |
return /** @type {T} */ (createProxy(client => client)); |
| 180 |
}; |
180 |
}; |
| 181 |
|
181 |
|
| 182 |
export const APIClient = { |
182 |
const apiClientFiles = { |
| 183 |
article_request: createClientProxy( |
183 |
article_request: "./article-request-api-client.js", |
| 184 |
() => import("./article-request-api-client.js") |
184 |
authorised_values: "./authorised-values-api-client.js", |
| 185 |
), |
185 |
acquisition: "./acquisition-api-client.js", |
| 186 |
authorised_values: createClientProxy( |
186 |
cataloguing: "./cataloguing-api-client.js", |
| 187 |
() => import("./authorised-values-api-client.js") |
187 |
circulation: "./circulation-api-client.js", |
| 188 |
), |
188 |
club: "./club-api-client.js", |
| 189 |
acquisition: createClientProxy(() => import("./acquisition-api-client.js")), |
189 |
cover_image: "./cover-image-api-client.js", |
| 190 |
cataloguing: createClientProxy(() => import("./cataloguing-api-client.js")), |
190 |
localization: "./localization-api-client.js", |
| 191 |
circulation: createClientProxy(() => import("./circulation-api-client.js")), |
191 |
patron: "./patron-api-client.js", |
| 192 |
club: createClientProxy(() => import("./club-api-client.js")), |
192 |
patron_list: "./patron-list-api-client.js", |
| 193 |
cover_image: createClientProxy(() => import("./cover-image-api-client.js")), |
193 |
recall: "./recall-api-client.js", |
| 194 |
localization: createClientProxy( |
194 |
sysprefs: "./system-preferences-api-client.js", |
| 195 |
() => import("./localization-api-client.js") |
195 |
ticket: "./ticket-api-client.js", |
| 196 |
), |
196 |
default: "./default-api-client.js", |
| 197 |
patron: createClientProxy(() => import("./patron-api-client.js")), |
|
|
| 198 |
patron_list: createClientProxy(() => import("./patron-list-api-client.js")), |
| 199 |
recall: createClientProxy(() => import("./recall-api-client.js")), |
| 200 |
sysprefs: createClientProxy( |
| 201 |
() => import("./system-preferences-api-client.js") |
| 202 |
), |
| 203 |
ticket: createClientProxy(() => import("./ticket-api-client.js")), |
| 204 |
default: createClientProxy(() => import("./default-api-client.js")), |
| 205 |
}; |
197 |
}; |
| 206 |
|
198 |
|
|
|
199 |
export const APIClient = Object.fromEntries( |
| 200 |
Object.entries(apiClientFiles).map(([key, path]) => [ |
| 201 |
key, |
| 202 |
createClientProxy(() => import(path)), |
| 203 |
]) |
| 204 |
); |
| 205 |
|
| 207 |
export default APIClient; |
206 |
export default APIClient; |
| 208 |
- |
|
|