import type { StartParams } from "@erp/core/api"; import type { RequestHandler } from "express"; import type { IIdentityPublicServices } from "../../../application"; export function requireIdentityAuthenticated(params: StartParams): RequestHandler[] { const identityServices = params.getService("identity:general"); return [...identityServices.auth.authenticatedOnly()]; } export function requireIdentityTenant(params: StartParams): RequestHandler[] { const identityServices = params.getService("identity:general"); return [...identityServices.auth.tenantRequired()]; }