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 ,
};
}
Messung V0.5 in Prozent C=100 H=97 G=98
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-10)
¤
*© Formatika GbR, Deutschland