@mushi-mushi/web 1.8.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +383 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -2
- package/dist/index.d.ts +15 -2
- package/dist/index.js +383 -37
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MushiConfig, MushiSDKInstance, MushiDiagnosticsResult, MushiWidgetConfig, MushiReportCategory, MushiReporterReport, MushiReporterComment, MushiConsoleEntry, MushiNetworkEntry, MushiUrlMatcher, MushiPrivacyConfig, MushiPerformanceMetrics, MushiSelectedElement, MushiTimelineEntry, MushiApiCascadeConfig } from '@mushi-mushi/core';
|
|
1
|
+
import { MushiConfig, MushiSDKInstance, MushiDiagnosticsResult, MushiWidgetConfig, MushiReportCategory, MushiReporterReport, MushiReporterComment, MushiConsoleEntry, MushiNetworkEntry, MushiUrlMatcher, MushiTracePropagationConfig, MushiPrivacyConfig, MushiPerformanceMetrics, MushiSelectedElement, MushiTimelineEntry, MushiApiCascadeConfig } from '@mushi-mushi/core';
|
|
2
2
|
export { MushiApiCascadeConfig, MushiConfig, MushiConsoleEntry, MushiDiagnosticsResult, MushiEnvironment, MushiEventHandler, MushiEventType, MushiNetworkEntry, MushiPerformanceMetrics, MushiReport, MushiReportCategory, MushiSDKInstance, MushiTimelineEntry, MushiTimelineKind, MushiUrlMatcher, MushiWidgetConfig } from '@mushi-mushi/core';
|
|
3
3
|
|
|
4
4
|
declare class Mushi {
|
|
@@ -21,7 +21,7 @@ declare class Mushi {
|
|
|
21
21
|
* user-facing ARIA / keyboard wiring.
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
-
type WidgetStep = 'category' | 'intent' | 'details' | 'success' | 'reports' | 'report-detail';
|
|
24
|
+
type WidgetStep = 'category' | 'intent' | 'details' | 'success' | 'reports' | 'report-detail' | 'leaderboard';
|
|
25
25
|
interface WidgetRewardsState {
|
|
26
26
|
tier: {
|
|
27
27
|
slug: string;
|
|
@@ -65,6 +65,7 @@ interface WidgetCallbacks {
|
|
|
65
65
|
onReporterReportsRequest?(): Promise<MushiReporterReport[]>;
|
|
66
66
|
onReporterCommentsRequest?(reportId: string): Promise<MushiReporterComment[]>;
|
|
67
67
|
onReporterReply?(reportId: string, body: string): Promise<void>;
|
|
68
|
+
onLeaderboardOpen?(): void;
|
|
68
69
|
}
|
|
69
70
|
declare class MushiWidget {
|
|
70
71
|
private readonly sdkVersion;
|
|
@@ -121,6 +122,8 @@ declare class MushiWidget {
|
|
|
121
122
|
private successTimer;
|
|
122
123
|
private autoCloseTimer;
|
|
123
124
|
private rewardsState;
|
|
125
|
+
private leaderboardEntries;
|
|
126
|
+
private leaderboardLoading;
|
|
124
127
|
/** Server-confirmed id for the just-submitted report. Surfaces in
|
|
125
128
|
* the success step as a copyable receipt + optional deep link to
|
|
126
129
|
* the Mushi console (when `dashboardUrl` is configured). Cleared
|
|
@@ -178,6 +181,12 @@ declare class MushiWidget {
|
|
|
178
181
|
message?: string | null;
|
|
179
182
|
}): void;
|
|
180
183
|
setRewardsState(state: WidgetRewardsState | null): void;
|
|
184
|
+
setLeaderboard(entries: Array<{
|
|
185
|
+
display_name: string;
|
|
186
|
+
tier_name: string | null;
|
|
187
|
+
total_points: number;
|
|
188
|
+
points_30d: number;
|
|
189
|
+
}> | null, loading?: boolean): void;
|
|
181
190
|
destroy(): void;
|
|
182
191
|
/**
|
|
183
192
|
* Apply the SDK-owned pass-through layout to the host element so it is
|
|
@@ -277,6 +286,7 @@ declare class MushiWidget {
|
|
|
277
286
|
*/
|
|
278
287
|
private renderBetaStrip;
|
|
279
288
|
private renderReportsStep;
|
|
289
|
+
private renderLeaderboardStep;
|
|
280
290
|
private renderReportDetailStep;
|
|
281
291
|
private renderIntentStep;
|
|
282
292
|
private effectiveMinLength;
|
|
@@ -331,6 +341,7 @@ declare class MushiWidget {
|
|
|
331
341
|
recorderSelectIntent(label: string): void;
|
|
332
342
|
recorderFocusDescription(): void;
|
|
333
343
|
recorderSubmit(): void;
|
|
344
|
+
recorderOpenMyReports(): void;
|
|
334
345
|
}
|
|
335
346
|
|
|
336
347
|
interface ConsoleCapture {
|
|
@@ -349,6 +360,8 @@ interface NetworkCapture {
|
|
|
349
360
|
interface NetworkCaptureOptions {
|
|
350
361
|
apiEndpoint?: string;
|
|
351
362
|
ignoreUrls?: MushiUrlMatcher[];
|
|
363
|
+
tracePropagation?: MushiTracePropagationConfig;
|
|
364
|
+
sessionId?: string;
|
|
352
365
|
}
|
|
353
366
|
declare function createNetworkCapture(options?: NetworkCaptureOptions): NetworkCapture;
|
|
354
367
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MushiConfig, MushiSDKInstance, MushiDiagnosticsResult, MushiWidgetConfig, MushiReportCategory, MushiReporterReport, MushiReporterComment, MushiConsoleEntry, MushiNetworkEntry, MushiUrlMatcher, MushiPrivacyConfig, MushiPerformanceMetrics, MushiSelectedElement, MushiTimelineEntry, MushiApiCascadeConfig } from '@mushi-mushi/core';
|
|
1
|
+
import { MushiConfig, MushiSDKInstance, MushiDiagnosticsResult, MushiWidgetConfig, MushiReportCategory, MushiReporterReport, MushiReporterComment, MushiConsoleEntry, MushiNetworkEntry, MushiUrlMatcher, MushiTracePropagationConfig, MushiPrivacyConfig, MushiPerformanceMetrics, MushiSelectedElement, MushiTimelineEntry, MushiApiCascadeConfig } from '@mushi-mushi/core';
|
|
2
2
|
export { MushiApiCascadeConfig, MushiConfig, MushiConsoleEntry, MushiDiagnosticsResult, MushiEnvironment, MushiEventHandler, MushiEventType, MushiNetworkEntry, MushiPerformanceMetrics, MushiReport, MushiReportCategory, MushiSDKInstance, MushiTimelineEntry, MushiTimelineKind, MushiUrlMatcher, MushiWidgetConfig } from '@mushi-mushi/core';
|
|
3
3
|
|
|
4
4
|
declare class Mushi {
|
|
@@ -21,7 +21,7 @@ declare class Mushi {
|
|
|
21
21
|
* user-facing ARIA / keyboard wiring.
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
-
type WidgetStep = 'category' | 'intent' | 'details' | 'success' | 'reports' | 'report-detail';
|
|
24
|
+
type WidgetStep = 'category' | 'intent' | 'details' | 'success' | 'reports' | 'report-detail' | 'leaderboard';
|
|
25
25
|
interface WidgetRewardsState {
|
|
26
26
|
tier: {
|
|
27
27
|
slug: string;
|
|
@@ -65,6 +65,7 @@ interface WidgetCallbacks {
|
|
|
65
65
|
onReporterReportsRequest?(): Promise<MushiReporterReport[]>;
|
|
66
66
|
onReporterCommentsRequest?(reportId: string): Promise<MushiReporterComment[]>;
|
|
67
67
|
onReporterReply?(reportId: string, body: string): Promise<void>;
|
|
68
|
+
onLeaderboardOpen?(): void;
|
|
68
69
|
}
|
|
69
70
|
declare class MushiWidget {
|
|
70
71
|
private readonly sdkVersion;
|
|
@@ -121,6 +122,8 @@ declare class MushiWidget {
|
|
|
121
122
|
private successTimer;
|
|
122
123
|
private autoCloseTimer;
|
|
123
124
|
private rewardsState;
|
|
125
|
+
private leaderboardEntries;
|
|
126
|
+
private leaderboardLoading;
|
|
124
127
|
/** Server-confirmed id for the just-submitted report. Surfaces in
|
|
125
128
|
* the success step as a copyable receipt + optional deep link to
|
|
126
129
|
* the Mushi console (when `dashboardUrl` is configured). Cleared
|
|
@@ -178,6 +181,12 @@ declare class MushiWidget {
|
|
|
178
181
|
message?: string | null;
|
|
179
182
|
}): void;
|
|
180
183
|
setRewardsState(state: WidgetRewardsState | null): void;
|
|
184
|
+
setLeaderboard(entries: Array<{
|
|
185
|
+
display_name: string;
|
|
186
|
+
tier_name: string | null;
|
|
187
|
+
total_points: number;
|
|
188
|
+
points_30d: number;
|
|
189
|
+
}> | null, loading?: boolean): void;
|
|
181
190
|
destroy(): void;
|
|
182
191
|
/**
|
|
183
192
|
* Apply the SDK-owned pass-through layout to the host element so it is
|
|
@@ -277,6 +286,7 @@ declare class MushiWidget {
|
|
|
277
286
|
*/
|
|
278
287
|
private renderBetaStrip;
|
|
279
288
|
private renderReportsStep;
|
|
289
|
+
private renderLeaderboardStep;
|
|
280
290
|
private renderReportDetailStep;
|
|
281
291
|
private renderIntentStep;
|
|
282
292
|
private effectiveMinLength;
|
|
@@ -331,6 +341,7 @@ declare class MushiWidget {
|
|
|
331
341
|
recorderSelectIntent(label: string): void;
|
|
332
342
|
recorderFocusDescription(): void;
|
|
333
343
|
recorderSubmit(): void;
|
|
344
|
+
recorderOpenMyReports(): void;
|
|
334
345
|
}
|
|
335
346
|
|
|
336
347
|
interface ConsoleCapture {
|
|
@@ -349,6 +360,8 @@ interface NetworkCapture {
|
|
|
349
360
|
interface NetworkCaptureOptions {
|
|
350
361
|
apiEndpoint?: string;
|
|
351
362
|
ignoreUrls?: MushiUrlMatcher[];
|
|
363
|
+
tracePropagation?: MushiTracePropagationConfig;
|
|
364
|
+
sessionId?: string;
|
|
352
365
|
}
|
|
353
366
|
declare function createNetworkCapture(options?: NetworkCaptureOptions): NetworkCapture;
|
|
354
367
|
|