/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ /** * Redacts a string value, optionally allowing a peek at the beginning of the string for context. * @param value The string value to redact. * @param peek Whether to allow a peek at the beginning of the string (default: false). If true and the string is long enough, the first few characters of the string will be included in the redacted output for context before `''`. * @returns The redacted string, or undefined if the input value was undefined. */ export declare function redactString(value: string | undefined, peek?: boolean): string | undefined; /** * Redacts sensitive information from a URL by removing path segments and query parameters. * @param value The URL string to redact. * @returns The redacted URL string, which includes only the origin and an indication of how many path segments were redacted, or just the origin if there are no path segments. Query parameters are not included in the output to avoid exposing sensitive information. If the input value is not a valid URL, the function returns a fully redacted placeholder. */ export declare function redactUrl(value: string | undefined): string | undefined; /** * Redacts sensitive information from an array of scopes. * @param scopes The array of scopes to redact. * @returns The redacted scopes string, which includes an indication of how many scopes were redacted. If the input value is undefined, it will be returned as undefined. */ export declare function redactScopes(scopes: string[] | undefined): string | undefined; /** * Returns a stable, non-reversible identifier for diagnostic correlation. * @param conversationId The conversation ID to pseudonymize. * @param key Optional secret used to keep pseudonyms stable across restarts. * @returns A pseudonymized conversation ID, or undefined when no ID is supplied. */ export declare function pseudonymizeConversationId(conversationId: string | undefined, key?: string): string | undefined; /** * Creates a redacted copy of an object for diagnostic logging. * Conversation IDs, activity text, and URL-valued properties are redacted while all other values are preserved. * @param value The value to sanitize for diagnostics. * @param diagnosticsPseudonymKey Optional secret used to keep conversation pseudonyms stable across restarts. * @returns A non-mutating, redacted copy of the value. */ export declare function redactDiagnosticObject(value: unknown, diagnosticsPseudonymKey?: string): unknown;