Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]
export const RESERVED_ADMIN_GATEWAY_METHOD_PREFIXES = [
"exec.approvals.",
"config.",
"wizard.",
"update.",
] as const;
export const RESERVED_ADMIN_GATEWAY_METHOD_SCOPE = "operator.admin" as const;
export function isReservedAdminGatewayMethod(method: string): boolean {
return RESERVED_ADMIN_GATEWAY_METHOD_PREFIXES.some((prefix) => method.startsWith(prefix));
}
export function resolveReservedGatewayMethodScope(
method: string,
): typeof RESERVED_ADMIN_GATEWAY_METHOD_SCOPE | undefined {
if (!isReservedAdminGatewayMethod(method)) {
return undefined;
}
return RESERVED_ADMIN_GATEWAY_METHOD_SCOPE;
}
export function normalizePluginGatewayMethodScope<TScope extends string>(
method: string,
scope: TScope | undefined,
): {
scope: TScope | typeof RESERVED_ADMIN_GATEWAY_METHOD_SCOPE | undefined;
coercedToReservedAdmin: boolean;
} {
const reservedScope = resolveReservedGatewayMethodScope(method);
if (!reservedScope || !scope || scope === reservedScope) {
return {
scope,
coercedToReservedAdmin: false,
};
}
return {
scope: reservedScope,
coercedToReservedAdmin: true,
};
}
¤ Dauer der Verarbeitung: 0.20 Sekunden
(vorverarbeitet am 2026-04-27)
¤
*© Formatika GbR, Deutschland