import { getPlatformAdapter } from "../adapter/index.js"; import {
asOptionalObjectRecord as asRecord,
normalizeOptionalLowercaseString,
normalizeStringifiedOptionalString,
readStringField as readString,
} from "../utils/string-normalize.js";
function normalizeAppId(raw: unknown): string { if (typeof raw === "string") { return raw.trim();
} if (typeof raw === "number") { return String(raw);
} return"";
}
/** Check whether a QQBot account has been fully configured. */
export function isAccountConfigured(account: AccountSnapshot | undefined): boolean { returnBoolean(
account?.appId &&
(Boolean(account?.clientSecret) ||
getPlatformAdapter().hasConfiguredSecret(account?.config?.clientSecret) || Boolean(account?.config?.clientSecretFile?.trim())),
);
}
/** Build a summary description of an account. */
export function describeAccount(account: AccountSnapshot | undefined) { return {
accountId: account?.accountId ?? DEFAULT_ACCOUNT_ID,
name: account?.name,
enabled: account?.enabled ?? false,
configured: isAccountConfigured(account),
tokenSource: account?.secretSource,
};
}
/** Normalize allowFrom entries into uppercase strings without the qqbot: prefix. */
export function formatAllowFrom(allowFrom: Array<string | number> | undefined | null): string[] { return (allowFrom ?? [])
.map((entry) => normalizeStringifiedOptionalString(entry))
.filter((entry): entry is string => Boolean(entry))
.map((entry) => entry.replace(/^qqbot:/i, ""))
.map((entry) => entry.toUpperCase());
}
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.40Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.