//! GENERATED FILE // IMPORTS import { DATA_FUNCTION } from "@idot-digital/function-generator/dist/function.js"; import { ExpressGet, ExpressGetClient } from "@idot-digital/function-generator/dist/index.client.js"; import * as Auth0 from ".././layer/Auth0/auth0.js"; import { Auth0Client } from ".././layer/Auth0/auth0.client.js" // DATA TYPE import z from "zod"; import { DATA_FROM_ZOD } from "@idot-digital/function-generator/dist/index.client.js"; import { url } from "../config.client.js"; const FUNC_ZOD = { REQ: z.object({}).strict(), OPT: z.object({ uid: z.string() }), RES: z.discriminatedUnion("code", [ z.object({ code: z.literal(200), data: z.array( z.object({ id: z.string(), name: z.string(), description: z.string(), }) ), }), z.object({ code: z.literal(500), data: z.literal("Internal server error"), }), ]), }; export type DATA = DATA_FROM_ZOD; const CLIENT_SETTINGS = { path: "/getRoles", url, }; // LAYER type Auth0ServerType = Auth0.SERVER_TRANSFORMER; type ExpressGetType = ExpressGet.TRANSPORT_TRANSFORMER; type Auth0ClientType = Auth0.CLIENT_TRANSFORMER; export type getRolesClientType = Auth0ClientType; const ExpressGetRun = ExpressGetClient.create(CLIENT_SETTINGS).run; const Auth0Run = Auth0Client.create(CLIENT_SETTINGS).attach(ExpressGetRun).run; export const getRoles = Auth0Run as DATA_FUNCTION;