import { AsyncCreatable } from '@salesforce/kit'; import { Attributes } from '@salesforce/telemetry'; import { JsonMap } from '@salesforce/ts-types'; export declare type AnalyticsOptions = { cacheDir?: string; analyticsFilePath?: string; }; export declare type CI = 'circleci' | 'travisci' | 'jenkins' | 'github_actions' | 'azure_pipelines' | 'teamcity' | 'gitlab' | 'nevercode' | 'wercker' | 'buildkite' | 'semaphore' | 'bitrise' | 'buddy' | 'appveyor' | 'unknown'; export default class Analytics extends AsyncCreatable { /** * The name of event telemetry type. */ static EVENT: string; /** * The name of exception telemetry type. */ static EXCEPTION: string; /** * The temporary directory where analytic log files are stored. */ static tmpDir: string; /** * Tell the user they acknowledge data collection. */ static acknowledgeDataCollection(): Promise; static guessCISystem(): CI | undefined; private static cacheDir; private static analyticsTmpFile; private static acknowledged; private static generateRandomId; firstRun: boolean; private fileDescriptor; private cliId?; constructor(options: AnalyticsOptions); getAnalyticsLogFilePath(): string; getCLIId(): string; /** * Record data to the analytics file. Only valid properties will be recorded to the file, which * are strings, numbers, and booleans. All booleans get logged to App Insights as string representations. */ record(data: JsonMap): void; recordError(error: Error, data: JsonMap): void; clear(): Promise; read(): Promise; upload(): void; protected init(): Promise; }