@mushi-mushi/web 1.9.0 → 1.11.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 +401 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +401 -33
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -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,9 @@ interface WidgetCallbacks {
|
|
|
65
65
|
onReporterReportsRequest?(): Promise<MushiReporterReport[]>;
|
|
66
66
|
onReporterCommentsRequest?(reportId: string): Promise<MushiReporterComment[]>;
|
|
67
67
|
onReporterReply?(reportId: string, body: string): Promise<void>;
|
|
68
|
+
onReporterFeedback?(reportId: string, signal: string, note?: string): Promise<Record<string, unknown> | null>;
|
|
69
|
+
onReporterReopen?(reportId: string, note?: string): Promise<Record<string, unknown> | null>;
|
|
70
|
+
onLeaderboardOpen?(): void;
|
|
68
71
|
}
|
|
69
72
|
declare class MushiWidget {
|
|
70
73
|
private readonly sdkVersion;
|
|
@@ -121,6 +124,8 @@ declare class MushiWidget {
|
|
|
121
124
|
private successTimer;
|
|
122
125
|
private autoCloseTimer;
|
|
123
126
|
private rewardsState;
|
|
127
|
+
private leaderboardEntries;
|
|
128
|
+
private leaderboardLoading;
|
|
124
129
|
/** Server-confirmed id for the just-submitted report. Surfaces in
|
|
125
130
|
* the success step as a copyable receipt + optional deep link to
|
|
126
131
|
* the Mushi console (when `dashboardUrl` is configured). Cleared
|
|
@@ -178,6 +183,12 @@ declare class MushiWidget {
|
|
|
178
183
|
message?: string | null;
|
|
179
184
|
}): void;
|
|
180
185
|
setRewardsState(state: WidgetRewardsState | null): void;
|
|
186
|
+
setLeaderboard(entries: Array<{
|
|
187
|
+
display_name: string;
|
|
188
|
+
tier_name: string | null;
|
|
189
|
+
total_points: number;
|
|
190
|
+
points_30d: number;
|
|
191
|
+
}> | null, loading?: boolean): void;
|
|
181
192
|
destroy(): void;
|
|
182
193
|
/**
|
|
183
194
|
* Apply the SDK-owned pass-through layout to the host element so it is
|
|
@@ -277,6 +288,7 @@ declare class MushiWidget {
|
|
|
277
288
|
*/
|
|
278
289
|
private renderBetaStrip;
|
|
279
290
|
private renderReportsStep;
|
|
291
|
+
private renderLeaderboardStep;
|
|
280
292
|
private renderReportDetailStep;
|
|
281
293
|
private renderIntentStep;
|
|
282
294
|
private effectiveMinLength;
|
|
@@ -320,6 +332,7 @@ declare class MushiWidget {
|
|
|
320
332
|
private unreadCount;
|
|
321
333
|
private loadReporterReports;
|
|
322
334
|
private loadReporterComments;
|
|
335
|
+
private submitReporterFeedback;
|
|
323
336
|
private submitReporterReply;
|
|
324
337
|
getRecorderStep(): WidgetStep;
|
|
325
338
|
getRecorderTrigger(): Element | null;
|
|
@@ -331,6 +344,7 @@ declare class MushiWidget {
|
|
|
331
344
|
recorderSelectIntent(label: string): void;
|
|
332
345
|
recorderFocusDescription(): void;
|
|
333
346
|
recorderSubmit(): void;
|
|
347
|
+
recorderOpenMyReports(): void;
|
|
334
348
|
}
|
|
335
349
|
|
|
336
350
|
interface ConsoleCapture {
|
package/dist/index.d.ts
CHANGED
|
@@ -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,9 @@ interface WidgetCallbacks {
|
|
|
65
65
|
onReporterReportsRequest?(): Promise<MushiReporterReport[]>;
|
|
66
66
|
onReporterCommentsRequest?(reportId: string): Promise<MushiReporterComment[]>;
|
|
67
67
|
onReporterReply?(reportId: string, body: string): Promise<void>;
|
|
68
|
+
onReporterFeedback?(reportId: string, signal: string, note?: string): Promise<Record<string, unknown> | null>;
|
|
69
|
+
onReporterReopen?(reportId: string, note?: string): Promise<Record<string, unknown> | null>;
|
|
70
|
+
onLeaderboardOpen?(): void;
|
|
68
71
|
}
|
|
69
72
|
declare class MushiWidget {
|
|
70
73
|
private readonly sdkVersion;
|
|
@@ -121,6 +124,8 @@ declare class MushiWidget {
|
|
|
121
124
|
private successTimer;
|
|
122
125
|
private autoCloseTimer;
|
|
123
126
|
private rewardsState;
|
|
127
|
+
private leaderboardEntries;
|
|
128
|
+
private leaderboardLoading;
|
|
124
129
|
/** Server-confirmed id for the just-submitted report. Surfaces in
|
|
125
130
|
* the success step as a copyable receipt + optional deep link to
|
|
126
131
|
* the Mushi console (when `dashboardUrl` is configured). Cleared
|
|
@@ -178,6 +183,12 @@ declare class MushiWidget {
|
|
|
178
183
|
message?: string | null;
|
|
179
184
|
}): void;
|
|
180
185
|
setRewardsState(state: WidgetRewardsState | null): void;
|
|
186
|
+
setLeaderboard(entries: Array<{
|
|
187
|
+
display_name: string;
|
|
188
|
+
tier_name: string | null;
|
|
189
|
+
total_points: number;
|
|
190
|
+
points_30d: number;
|
|
191
|
+
}> | null, loading?: boolean): void;
|
|
181
192
|
destroy(): void;
|
|
182
193
|
/**
|
|
183
194
|
* Apply the SDK-owned pass-through layout to the host element so it is
|
|
@@ -277,6 +288,7 @@ declare class MushiWidget {
|
|
|
277
288
|
*/
|
|
278
289
|
private renderBetaStrip;
|
|
279
290
|
private renderReportsStep;
|
|
291
|
+
private renderLeaderboardStep;
|
|
280
292
|
private renderReportDetailStep;
|
|
281
293
|
private renderIntentStep;
|
|
282
294
|
private effectiveMinLength;
|
|
@@ -320,6 +332,7 @@ declare class MushiWidget {
|
|
|
320
332
|
private unreadCount;
|
|
321
333
|
private loadReporterReports;
|
|
322
334
|
private loadReporterComments;
|
|
335
|
+
private submitReporterFeedback;
|
|
323
336
|
private submitReporterReply;
|
|
324
337
|
getRecorderStep(): WidgetStep;
|
|
325
338
|
getRecorderTrigger(): Element | null;
|
|
@@ -331,6 +344,7 @@ declare class MushiWidget {
|
|
|
331
344
|
recorderSelectIntent(label: string): void;
|
|
332
345
|
recorderFocusDescription(): void;
|
|
333
346
|
recorderSubmit(): void;
|
|
347
|
+
recorderOpenMyReports(): void;
|
|
334
348
|
}
|
|
335
349
|
|
|
336
350
|
interface ConsoleCapture {
|