1 | import { BinaryLike } from 'crypto';
|
2 | declare type TelemetryEvent = {
|
3 | eventName: string;
|
4 | payload: object;
|
5 | };
|
6 | declare type RecordObject = {
|
7 | isFulfilled: boolean;
|
8 | isRejected: boolean;
|
9 | value?: any;
|
10 | reason?: any;
|
11 | };
|
12 | export declare class Telemetry {
|
13 | private conf;
|
14 | private sessionId;
|
15 | private rawProjectId;
|
16 | private NEXT_TELEMETRY_DISABLED;
|
17 | private NEXT_TELEMETRY_DEBUG;
|
18 | private queue;
|
19 | constructor({ distDir }: {
|
20 | distDir: string;
|
21 | });
|
22 | private notify;
|
23 | get anonymousId(): string;
|
24 | get salt(): string;
|
25 | private get isDisabled();
|
26 | setEnabled: (_enabled: boolean) => void;
|
27 | get isEnabled(): boolean;
|
28 | oneWayHash: (payload: BinaryLike) => string;
|
29 | private get projectId();
|
30 | record: (_events: TelemetryEvent | TelemetryEvent[]) => Promise<RecordObject>;
|
31 | flush: () => Promise<RecordObject[] | null>;
|
32 | private submitRecord;
|
33 | }
|
34 | export {};
|