Skip to content

Commit 6015ebf

Browse files
committed
Report metric schema
1 parent f01d7ff commit 6015ebf

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

special-pages/pages/duckplayer/types/duckplayer.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @module Duckplayer Messages
77
*/
88

9+
export type ReportMetricEvent = ExceptionMetric;
910
export type YouTubeError = "age-restricted" | "sign-in-required" | "no-embed" | "unknown";
1011
export type PrivatePlayerMode =
1112
| {
@@ -26,6 +27,7 @@ export interface DuckplayerMessages {
2627
| OpenInfoNotification
2728
| OpenSettingsNotification
2829
| ReportInitExceptionNotification
30+
| ReportMetricNotification
2931
| ReportPageExceptionNotification
3032
| ReportYouTubeErrorNotification
3133
| TelemetryEventNotification;
@@ -54,6 +56,19 @@ export interface ReportInitExceptionNotification {
5456
export interface ReportInitExceptionNotify {
5557
message: string;
5658
}
59+
/**
60+
* Generated from @see "../messages/reportMetric.notify.json"
61+
*/
62+
export interface ReportMetricNotification {
63+
method: "reportMetric";
64+
params: ReportMetricEvent;
65+
}
66+
export interface ExceptionMetric {
67+
metricName: "exception";
68+
params: {
69+
message: string;
70+
};
71+
}
5772
/**
5873
* Generated from @see "../messages/reportPageException.notify.json"
5974
*/

0 commit comments

Comments
 (0)