Service Library - auth

This document provides a complete reference of the custom code library for the auth service. It includes all library functions, edge functions with their REST endpoints, templates, and assets.

Edge Functions

Edge functions are custom HTTP endpoint handlers that run outside the standard Business API pipeline. Each edge function is paired with an Edge Controller that defines its REST endpoint.

getNextCodenameForCompany.js

Edge Controller:

module.exports = async (request) => {
        const { getNextCodenameForCompany }  = require("dbLayer");
        const name = request.query?.name ?? null;
        if (!name) return { status: 400, message: "Name is required" };
        const result = await getNextCodenameForCompany(name?.toLowerCase());
        return { status: 200, codename:result };
      }

Edge Controllers Summary

Function Name Method Path Login Required
getNextCodenameForCompany GET /getNextCodenameForCompany No

This document was generated from the service library configuration and should be kept in sync with design changes.