Update selected item color in Pass menu
[ProtonMail-WebClient.git] / packages / pass / lib / telemetry / event.ts
blob3f6fec3bc4ade2b3a2e57a942a4e3a9a1968e430
1 import type {
2     BaseTelemetryEvent,
3     TelemetryEvent,
4     TelemetryEventName,
5     TelemetryPlatform,
6 } from '@proton/pass/types/data/telemetry';
8 export const createTelemetryEvent = <T extends TelemetryEventName>(
9     Event: T,
10     Values: TelemetryEvent<T>['Values'],
11     Dimensions: TelemetryEvent<T>['Dimensions'],
12     platform: TelemetryPlatform = 'any'
13 ) =>
14     ({
15         MeasurementGroup: `pass.${platform}.user_actions`,
16         Event,
17         Values,
18         Dimensions,
19     }) satisfies BaseTelemetryEvent<T> as TelemetryEvent<T>;