2024-10-07

This commit is contained in:
gcch 2024-10-07 15:58:56 +02:00
commit 03d86b3a64
41 changed files with 610 additions and 418 deletions

View file

@ -1,5 +1,11 @@
import { x } from "./chunk-7BKSRZNG.C39W3Wne.js";
import { z, N } from "./index.CeK6pfoJ.js";
import { p as parse } from "./index.DD7qm8S6.js";
import { d as ENTETE_WC_NONCE } from "./api2.js";
const postBackendWC = (args) => fetch(
import { a as leveBadRequestError, b as leveUnauthorizedError, c as leveNotFoundError, d as leveErreur, E as ErreurInconnue } from "./erreurs.js";
import { e as estWCError } from "./erreurs2.js";
import "./exports.DNZBdkMD.js";
const postBackend = (args) => fetch(
args.route,
{
body: args.corps,
@ -14,7 +20,9 @@ const postBackendWC = (args) => fetch(
signal: AbortSignal.timeout(5e3)
}
);
const traiteReponseBackendWCSelonCodesHTTP = (corpsReponse, schemaReponse) => z(corpsReponse).with({ body: N.select(), status: 400 }, estWCError, leveBadRequestError).with({ body: N.select(), status: 401 }, estWCError, leveUnauthorizedError).with({ body: N.select(), status: 404 }, estWCError, leveNotFoundError).with(N._, (corpsOkInconnu) => parse(schemaReponse, corpsOkInconnu)).otherwise((e) => x(e, ErreurInconnue, leveErreur));
export {
postBackendWC as p
postBackend as p,
traiteReponseBackendWCSelonCodesHTTP as t
};
//# sourceMappingURL=reseau.js.map