/** * 格式化 API 主机地址。 * * 根据传入的 host 判断是否需要在其末尾加 `/v1/`。 * - 不加:host 以 `/` 结尾,或以 `volces.com/api/v3` 结尾。 * - 要加:其余情况。 * * @param {string} host - 需要格式化的 API 主机地址。 * @returns {string} 格式化后的 API 主机地址。 */ export declare function formatApiHost(host: string): string; /** * API key 脱敏函数。仅保留部分前后字符,中间用星号代替。 * * - 长度大于 24,保留前、后 8 位。 * - 长度大于 16,保留前、后 4 位。 * - 长度大于 8,保留前、后 2 位。 * - 其余情况,返回原始密钥。 * * @param {string} key - 需要脱敏的 API 密钥。 * @returns {string} 脱敏后的密钥字符串。 */ export declare function maskApiKey(key: string): string; /** * Returns the index of the start of the searchedText in the text, or null if it * is not found. */ export declare function getPotentialStartIndex(text: string, searchedText: string): number | null;