@mushi-mushi/core 1.10.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 +10 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -1
- package/dist/index.d.ts +22 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1081,6 +1081,19 @@ interface MushiSDKInstance {
|
|
|
1081
1081
|
* Returns the newly created comment, or null on failure.
|
|
1082
1082
|
*/
|
|
1083
1083
|
replyToReport(reportId: string, body: string): Promise<MushiReporterComment | null>;
|
|
1084
|
+
/**
|
|
1085
|
+
* Submit a structured feedback chip (confirms / not_fixed / …) on a report.
|
|
1086
|
+
* Drives the verify/reopen lifecycle when the report is in a fixed state.
|
|
1087
|
+
*/
|
|
1088
|
+
submitFeedbackSignal(reportId: string, signal: string, note?: string): Promise<Record<string, unknown> | null>;
|
|
1089
|
+
/**
|
|
1090
|
+
* Reporter-initiated regression reopen with an optional note.
|
|
1091
|
+
*/
|
|
1092
|
+
reopenReport(reportId: string, note?: string): Promise<Record<string, unknown> | null>;
|
|
1093
|
+
/**
|
|
1094
|
+
* Open the reporter inbox ("my reports") view in the widget.
|
|
1095
|
+
*/
|
|
1096
|
+
openMyReports(): void;
|
|
1084
1097
|
/**
|
|
1085
1098
|
* Returns the global contributor hall-of-fame ranked by total points.
|
|
1086
1099
|
* Safe to call without an authenticated user; uses public endpoint.
|
|
@@ -1147,8 +1160,12 @@ interface MushiApiClient {
|
|
|
1147
1160
|
listReporterComments(reportId: string, reporterToken: string): Promise<MushiApiResponse<{
|
|
1148
1161
|
comments: MushiReporterComment[];
|
|
1149
1162
|
}>>;
|
|
1150
|
-
replyToReporterReport(reportId: string, reporterToken: string, body: string): Promise<MushiApiResponse<{
|
|
1163
|
+
replyToReporterReport(reportId: string, reporterToken: string, body: string, feedbackSignal?: string): Promise<MushiApiResponse<{
|
|
1151
1164
|
comment: MushiReporterComment;
|
|
1165
|
+
feedback?: Record<string, unknown>;
|
|
1166
|
+
}>>;
|
|
1167
|
+
reopenReporterReport(reportId: string, reporterToken: string, note?: string): Promise<MushiApiResponse<{
|
|
1168
|
+
outcome: Record<string, unknown>;
|
|
1152
1169
|
}>>;
|
|
1153
1170
|
/**
|
|
1154
1171
|
* Submit a batch of activity events for the current user.
|
|
@@ -1253,6 +1270,10 @@ interface MushiReporterReport {
|
|
|
1253
1270
|
created_at: string;
|
|
1254
1271
|
last_admin_reply_at?: string | null;
|
|
1255
1272
|
last_reporter_reply_at?: string | null;
|
|
1273
|
+
parent_report_id?: string | null;
|
|
1274
|
+
verified_at?: string | null;
|
|
1275
|
+
reopened_at?: string | null;
|
|
1276
|
+
regression_count?: number;
|
|
1256
1277
|
unread_count?: number;
|
|
1257
1278
|
}
|
|
1258
1279
|
interface MushiReporterComment {
|
package/dist/index.d.ts
CHANGED
|
@@ -1081,6 +1081,19 @@ interface MushiSDKInstance {
|
|
|
1081
1081
|
* Returns the newly created comment, or null on failure.
|
|
1082
1082
|
*/
|
|
1083
1083
|
replyToReport(reportId: string, body: string): Promise<MushiReporterComment | null>;
|
|
1084
|
+
/**
|
|
1085
|
+
* Submit a structured feedback chip (confirms / not_fixed / …) on a report.
|
|
1086
|
+
* Drives the verify/reopen lifecycle when the report is in a fixed state.
|
|
1087
|
+
*/
|
|
1088
|
+
submitFeedbackSignal(reportId: string, signal: string, note?: string): Promise<Record<string, unknown> | null>;
|
|
1089
|
+
/**
|
|
1090
|
+
* Reporter-initiated regression reopen with an optional note.
|
|
1091
|
+
*/
|
|
1092
|
+
reopenReport(reportId: string, note?: string): Promise<Record<string, unknown> | null>;
|
|
1093
|
+
/**
|
|
1094
|
+
* Open the reporter inbox ("my reports") view in the widget.
|
|
1095
|
+
*/
|
|
1096
|
+
openMyReports(): void;
|
|
1084
1097
|
/**
|
|
1085
1098
|
* Returns the global contributor hall-of-fame ranked by total points.
|
|
1086
1099
|
* Safe to call without an authenticated user; uses public endpoint.
|
|
@@ -1147,8 +1160,12 @@ interface MushiApiClient {
|
|
|
1147
1160
|
listReporterComments(reportId: string, reporterToken: string): Promise<MushiApiResponse<{
|
|
1148
1161
|
comments: MushiReporterComment[];
|
|
1149
1162
|
}>>;
|
|
1150
|
-
replyToReporterReport(reportId: string, reporterToken: string, body: string): Promise<MushiApiResponse<{
|
|
1163
|
+
replyToReporterReport(reportId: string, reporterToken: string, body: string, feedbackSignal?: string): Promise<MushiApiResponse<{
|
|
1151
1164
|
comment: MushiReporterComment;
|
|
1165
|
+
feedback?: Record<string, unknown>;
|
|
1166
|
+
}>>;
|
|
1167
|
+
reopenReporterReport(reportId: string, reporterToken: string, note?: string): Promise<MushiApiResponse<{
|
|
1168
|
+
outcome: Record<string, unknown>;
|
|
1152
1169
|
}>>;
|
|
1153
1170
|
/**
|
|
1154
1171
|
* Submit a batch of activity events for the current user.
|
|
@@ -1253,6 +1270,10 @@ interface MushiReporterReport {
|
|
|
1253
1270
|
created_at: string;
|
|
1254
1271
|
last_admin_reply_at?: string | null;
|
|
1255
1272
|
last_reporter_reply_at?: string | null;
|
|
1273
|
+
parent_report_id?: string | null;
|
|
1274
|
+
verified_at?: string | null;
|
|
1275
|
+
reopened_at?: string | null;
|
|
1276
|
+
regression_count?: number;
|
|
1256
1277
|
unread_count?: number;
|
|
1257
1278
|
}
|
|
1258
1279
|
interface MushiReporterComment {
|
package/dist/index.js
CHANGED
|
@@ -138,12 +138,20 @@ function createApiClient(options) {
|
|
|
138
138
|
reporterToken
|
|
139
139
|
);
|
|
140
140
|
},
|
|
141
|
-
async replyToReporterReport(reportId, reporterToken, body) {
|
|
141
|
+
async replyToReporterReport(reportId, reporterToken, body, feedbackSignal) {
|
|
142
142
|
return requestForReporter(
|
|
143
143
|
"POST",
|
|
144
144
|
`/v1/reporter/reports/${reportId}/reply`,
|
|
145
145
|
reporterToken,
|
|
146
|
-
{ body }
|
|
146
|
+
{ body, ...feedbackSignal ? { feedback_signal: feedbackSignal } : {} }
|
|
147
|
+
);
|
|
148
|
+
},
|
|
149
|
+
async reopenReporterReport(reportId, reporterToken, note) {
|
|
150
|
+
return requestForReporter(
|
|
151
|
+
"POST",
|
|
152
|
+
`/v1/reporter/reports/${reportId}/reopen`,
|
|
153
|
+
reporterToken,
|
|
154
|
+
{ note: note ?? "" }
|
|
147
155
|
);
|
|
148
156
|
},
|
|
149
157
|
// ─── Rewards program (P1) ──────────────────────────────────
|