@mushi-mushi/core 1.32.0 → 1.32.3
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/README.md +2 -2
- package/dist/index.cjs +63 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -10
- package/dist/index.d.ts +12 -10
- package/dist/index.js +63 -30
- package/dist/index.js.map +1 -1
- package/dist/reporter-channels.d.cts +1 -1
- package/dist/reporter-channels.d.ts +1 -1
- package/dist/{types-0j5BJ3aC.d.cts → types-DhR6TWJZ.d.cts} +55 -21
- package/dist/{types-0j5BJ3aC.d.ts → types-DhR6TWJZ.d.ts} +55 -21
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { U as MushiPushSubscriptionJSON, Y as MushiReporterChannelUnavailable, am as MushiReporterChannels, _ as MushiReporterNotificationPrefs, $ as MushiReporterPrefsUpdate, a1 as MushiReporterReportDetail, a2 as MushiReporterTimelineItem, a3 as MushiReporterUpdates, an as reporterChannels, ao as subscribeBrowserPush } from './types-DhR6TWJZ.cjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { U as MushiPushSubscriptionJSON, Y as MushiReporterChannelUnavailable, am as MushiReporterChannels, _ as MushiReporterNotificationPrefs, $ as MushiReporterPrefsUpdate, a1 as MushiReporterReportDetail, a2 as MushiReporterTimelineItem, a3 as MushiReporterUpdates, an as reporterChannels, ao as subscribeBrowserPush } from './types-DhR6TWJZ.js';
|
|
@@ -133,6 +133,12 @@ declare function subscribeBrowserPush(channels: Pick<MushiReporterChannels, 'sub
|
|
|
133
133
|
reason: string;
|
|
134
134
|
}>;
|
|
135
135
|
|
|
136
|
+
/**
|
|
137
|
+
* What `Mushi.init()` and `<MushiProvider config>` accept: a {@link MushiConfig}
|
|
138
|
+
* whose `projectId` / `apiKey` may instead come from the NEXT_PUBLIC_MUSHI_* /
|
|
139
|
+
* VITE_MUSHI_* / MUSHI_* env vars. Init still throws if neither supplies them.
|
|
140
|
+
*/
|
|
141
|
+
type MushiInitConfig = Omit<MushiConfig, 'projectId' | 'apiKey'> & Partial<Pick<MushiConfig, 'projectId' | 'apiKey'>>;
|
|
136
142
|
interface MushiConfig {
|
|
137
143
|
projectId: string;
|
|
138
144
|
apiKey: string;
|
|
@@ -211,17 +217,20 @@ interface MushiConfig {
|
|
|
211
217
|
*/
|
|
212
218
|
tunnel?: string;
|
|
213
219
|
/**
|
|
214
|
-
* Drop automatic error reports
|
|
215
|
-
* or RegExp. Never applied to user-submitted
|
|
220
|
+
* Drop automatic error reports and `captureException()` calls whose message
|
|
221
|
+
* matches any string (substring) or RegExp. Never applied to user-submitted
|
|
222
|
+
* widget feedback.
|
|
216
223
|
*/
|
|
217
224
|
ignoreErrors?: Array<string | RegExp>;
|
|
218
225
|
/**
|
|
219
|
-
* Drop automatic error reports
|
|
226
|
+
* Drop automatic error reports and `captureException()` calls whose
|
|
227
|
+
* throw-site URL (script filename, else the stack's first frame) matches.
|
|
220
228
|
*/
|
|
221
229
|
denyUrls?: Array<string | RegExp>;
|
|
222
230
|
/**
|
|
223
|
-
* When set, drop automatic error reports
|
|
224
|
-
* at least one entry.
|
|
231
|
+
* When set, drop automatic error reports and `captureException()` calls
|
|
232
|
+
* unless the throw-site URL matches at least one entry. An error with no
|
|
233
|
+
* known URL (e.g. cross-origin "Script error.") is dropped.
|
|
225
234
|
*/
|
|
226
235
|
allowUrls?: Array<string | RegExp>;
|
|
227
236
|
/**
|
|
@@ -308,6 +317,13 @@ interface MushiWidgetConfig {
|
|
|
308
317
|
expandedTitle?: string;
|
|
309
318
|
mode?: 'simple' | 'conversational';
|
|
310
319
|
locale?: string;
|
|
320
|
+
/**
|
|
321
|
+
* Page-level z-index of the launcher (default `99999`). The panel and toasts
|
|
322
|
+
* sit at `zIndex + 1`. Each surface carries its own z-index and the widget's
|
|
323
|
+
* host element forms no stacking context, so these numbers compare directly
|
|
324
|
+
* with the host page's own layers. The banner has its own setting,
|
|
325
|
+
* `bannerConfig.zIndex`.
|
|
326
|
+
*/
|
|
311
327
|
zIndex?: number;
|
|
312
328
|
/**
|
|
313
329
|
* Controls how, or whether, the default trigger is injected.
|
|
@@ -437,10 +453,13 @@ interface MushiWidgetConfig {
|
|
|
437
453
|
/**
|
|
438
454
|
* CSS selectors of host-app elements that the widget trigger and panel must
|
|
439
455
|
* never visually overlap. At render time the widget queries each selector,
|
|
440
|
-
* measures
|
|
441
|
-
*
|
|
456
|
+
* measures its bounding rect, and moves the widget's anchored edge
|
|
457
|
+
* (`--mushi-bottom` for bottom positions, the default; `--mushi-top` for top
|
|
458
|
+
* positions) so it clears every avoided element in that half of the viewport
|
|
459
|
+
* by at least 8px. Elements in the other half are left alone.
|
|
442
460
|
*
|
|
443
|
-
* Typical use:
|
|
461
|
+
* Typical use: a sticky mobile header for a top position, or a bottom tab
|
|
462
|
+
* bar or fixed sign-in CTA for a bottom position.
|
|
444
463
|
*
|
|
445
464
|
* @example
|
|
446
465
|
* avoidSelectors: ['[data-mobile-header]', '#sign-in-cta']
|
|
@@ -519,14 +538,17 @@ interface MushiBannerConfig {
|
|
|
519
538
|
/** 'top' pins the banner below any existing sticky headers; 'bottom' pins above bottom navs. Defaults to 'top'. */
|
|
520
539
|
position?: 'top' | 'bottom';
|
|
521
540
|
/**
|
|
522
|
-
* Body copy on the strip — the lime
|
|
541
|
+
* Body copy on the strip — the lime announcement line users see in
|
|
523
542
|
* the Mushi admin console. When set, the banner switches to the rich layout
|
|
524
543
|
* (pill + message + flat text actions) instead of button-only CTAs.
|
|
525
544
|
*/
|
|
526
545
|
message?: string;
|
|
527
546
|
/**
|
|
528
|
-
* Pill label shown before `message
|
|
547
|
+
* Pill label shown before `message`. Defaults to `"Feedback"` when
|
|
529
548
|
* `message` is set. Pass `false` to hide the pill.
|
|
549
|
+
*
|
|
550
|
+
* Do not set `"Beta"` in a production App Store or Google Play build: Apple
|
|
551
|
+
* can reject the app under guideline 2.2 (beta testing belongs in TestFlight).
|
|
530
552
|
*/
|
|
531
553
|
label?: string | false;
|
|
532
554
|
/** Override the call-to-action text in the banner. Defaults to '🐛 Report a bug'. */
|
|
@@ -537,7 +559,11 @@ interface MushiBannerConfig {
|
|
|
537
559
|
featureCtaLabel?: string;
|
|
538
560
|
/** Extra flat links after the bug/feature CTAs (e.g. "My submissions"). */
|
|
539
561
|
links?: MushiBannerLink[];
|
|
540
|
-
/**
|
|
562
|
+
/**
|
|
563
|
+
* Page-level z-index of the banner strip. Defaults to the widget's `zIndex`
|
|
564
|
+
* minus one, just under the launcher. Set it below your own overlays (sheets,
|
|
565
|
+
* drawers, dialogs) so they cover the banner, e.g. `130` under a `200` sheet.
|
|
566
|
+
*/
|
|
541
567
|
zIndex?: number;
|
|
542
568
|
}
|
|
543
569
|
interface MushiBetaModeConfig {
|
|
@@ -595,9 +621,12 @@ interface MushiCaptureConfig {
|
|
|
595
621
|
screenshot?: 'on-report' | 'auto' | 'off';
|
|
596
622
|
/**
|
|
597
623
|
* Custom screenshot capture function. When provided, the SDK calls this
|
|
598
|
-
* instead of its built-in DOM-snapshot capturer.
|
|
599
|
-
* on success, or `null` to skip
|
|
600
|
-
*
|
|
624
|
+
* instead of its built-in DOM-snapshot capturer. Resolve to a
|
|
625
|
+
* `data:image/jpeg` or `data:image/png` URL on success, or `null` to skip
|
|
626
|
+
* attachment. Any other string (a `file://` or `https://` URI) is ignored
|
|
627
|
+
* with a warning, so a native plugin's file must be read and returned as a
|
|
628
|
+
* data URL. If the function throws the SDK falls back to the built-in
|
|
629
|
+
* capturer.
|
|
601
630
|
*
|
|
602
631
|
* Primary use-case: Capacitor / WebView hosts that route through a native
|
|
603
632
|
* plugin (e.g. `@capawesome/capacitor-screenshot`) to obtain a real pixel-
|
|
@@ -607,9 +636,9 @@ interface MushiCaptureConfig {
|
|
|
607
636
|
* capture: {
|
|
608
637
|
* screenshot: 'auto',
|
|
609
638
|
* screenshotProvider: async () => {
|
|
610
|
-
*
|
|
611
|
-
* const
|
|
612
|
-
* return
|
|
639
|
+
* // Base64 PNG from your native screenshot plugin.
|
|
640
|
+
* const base64 = await takeNativeScreenshot();
|
|
641
|
+
* return base64 ? `data:image/png;base64,${base64}` : null;
|
|
613
642
|
* },
|
|
614
643
|
* }
|
|
615
644
|
*/
|
|
@@ -1907,7 +1936,8 @@ interface MushiDiscoveryEventPayload {
|
|
|
1907
1936
|
}
|
|
1908
1937
|
/** Payload for /v1/sdk/session — lightweight session lifecycle tracking.
|
|
1909
1938
|
* Best-effort, no offline queue. Privacy-safe: no PII by default;
|
|
1910
|
-
* `user_id_hash` is
|
|
1939
|
+
* `user_id_hash` is a one-way SHA-256 hex of the host's user id, never the
|
|
1940
|
+
* id itself, and stays null until the host identifies the user. */
|
|
1911
1941
|
interface MushiSessionEventPayload {
|
|
1912
1942
|
/** Lifecycle event kind. */
|
|
1913
1943
|
kind: 'session_start' | 'session_heartbeat' | 'session_end' | 'page_view';
|
|
@@ -1922,7 +1952,7 @@ interface MushiSessionEventPayload {
|
|
|
1922
1952
|
page_view_count?: number;
|
|
1923
1953
|
/** Device fingerprint hash — same token used in reports. */
|
|
1924
1954
|
reporter_token_hash?: string | null;
|
|
1925
|
-
/**
|
|
1955
|
+
/** SHA-256 hex of the host user id, set after Mushi.identifyWithToken(). */
|
|
1926
1956
|
user_id_hash?: string | null;
|
|
1927
1957
|
user_agent?: string | null;
|
|
1928
1958
|
sdk_version?: string;
|
|
@@ -1979,10 +2009,14 @@ interface MushiApiResponse<T> {
|
|
|
1979
2009
|
status?: number;
|
|
1980
2010
|
};
|
|
1981
2011
|
}
|
|
2012
|
+
/** Widget block of the runtime config: older edge functions send `triggerText: null` for "use the SDK default". */
|
|
2013
|
+
type MushiRuntimeWidgetConfig = Omit<MushiWidgetConfig, 'triggerText'> & {
|
|
2014
|
+
triggerText?: string | null;
|
|
2015
|
+
};
|
|
1982
2016
|
interface MushiRuntimeSdkConfig {
|
|
1983
2017
|
enabled?: boolean;
|
|
1984
2018
|
version?: string | null;
|
|
1985
|
-
widget?:
|
|
2019
|
+
widget?: MushiRuntimeWidgetConfig;
|
|
1986
2020
|
capture?: MushiCaptureConfig;
|
|
1987
2021
|
native?: {
|
|
1988
2022
|
triggerMode?: 'shake' | 'button' | 'both' | 'none';
|
|
@@ -2097,4 +2131,4 @@ interface MushiTesterReputation {
|
|
|
2097
2131
|
total_points: number;
|
|
2098
2132
|
}
|
|
2099
2133
|
|
|
2100
|
-
export { type
|
|
2134
|
+
export { type MushiReporterPrefsUpdate as $, type MushiDiscoverInventoryConfig as A, type MushiDiscoveryEventPayload as B, type MushiEventHandler as C, type MushiEventType as D, type MushiHallOfFameEntry as E, type MushiInitConfig as F, type MushiIntegrationsConfig as G, type MushiLeaderboardEntry as H, type MushiNetworkEntry as I, type MushiNotificationsConfig as J, type MushiOnDeviceClassifier as K, type MushiOnDeviceClassifierInput as L, type MushiApiClient as M, type MushiOnDeviceClassifierResult as N, type MushiPageContext as O, type MushiPerformanceMetrics as P, type MushiPreset as Q, type MushiPrivacyConfig as R, type MushiProactiveConfig as S, type MushiProductEventPayload as T, type MushiPushSubscriptionJSON as U, type MushiReportBuilder as V, type MushiReportCategory as W, type MushiReportStatus as X, type MushiReporterChannelUnavailable as Y, type MushiReporterComment as Z, type MushiReporterNotificationPrefs as _, type MushiConfig as a, type MushiReporterReport as a0, type MushiReporterReportDetail as a1, type MushiReporterTimelineItem as a2, type MushiReporterUpdates as a3, type MushiReputationResult as a4, type MushiRewardsConfig as a5, type MushiRuntimeSdkConfig as a6, type MushiRuntimeWidgetConfig as a7, type MushiSDKInstance as a8, type MushiSdkVersionInfo as a9, type MushiSelectedElement as aa, type MushiSentryConfig as ab, type MushiSentryContext as ac, type MushiSessionEventPayload as ad, type MushiTesterReputation as ae, type MushiTierResult as af, type MushiTimelineEntry as ag, type MushiTimelineKind as ah, type MushiTracePropagationConfig as ai, type MushiUrlMatcher as aj, type MushiWidgetAnchor as ak, type MushiWidgetConfig as al, type MushiReporterChannels as am, reporterChannels as an, subscribeBrowserPush as ao, type MushiPreFilterConfig as b, type MushiReport as c, type MushiOfflineConfig as d, type MushiEnvironment as e, type MushiAnalyticsConfig as f, type MushiPropertyValue as g, type MushiBreadcrumb as h, type MushiActivityEvent as i, type MushiApiCascadeConfig as j, type MushiApiResponse as k, type MushiAssistantConfig as l, type MushiAssistantReply as m, type MushiAssistantStep as n, type MushiBannerConfig as o, type MushiBannerLink as p, type MushiBetaChangelogEntry as q, type MushiBetaModeConfig as r, type MushiCaptureConfig as s, type MushiCaptureEventInput as t, type MushiCaptureExceptionOptions as u, type MushiConsoleEntry as v, type MushiCooldownConfig as w, type MushiCrossAppReport as x, type MushiCustomCategory as y, type MushiDiagnosticsResult as z };
|
|
@@ -133,6 +133,12 @@ declare function subscribeBrowserPush(channels: Pick<MushiReporterChannels, 'sub
|
|
|
133
133
|
reason: string;
|
|
134
134
|
}>;
|
|
135
135
|
|
|
136
|
+
/**
|
|
137
|
+
* What `Mushi.init()` and `<MushiProvider config>` accept: a {@link MushiConfig}
|
|
138
|
+
* whose `projectId` / `apiKey` may instead come from the NEXT_PUBLIC_MUSHI_* /
|
|
139
|
+
* VITE_MUSHI_* / MUSHI_* env vars. Init still throws if neither supplies them.
|
|
140
|
+
*/
|
|
141
|
+
type MushiInitConfig = Omit<MushiConfig, 'projectId' | 'apiKey'> & Partial<Pick<MushiConfig, 'projectId' | 'apiKey'>>;
|
|
136
142
|
interface MushiConfig {
|
|
137
143
|
projectId: string;
|
|
138
144
|
apiKey: string;
|
|
@@ -211,17 +217,20 @@ interface MushiConfig {
|
|
|
211
217
|
*/
|
|
212
218
|
tunnel?: string;
|
|
213
219
|
/**
|
|
214
|
-
* Drop automatic error reports
|
|
215
|
-
* or RegExp. Never applied to user-submitted
|
|
220
|
+
* Drop automatic error reports and `captureException()` calls whose message
|
|
221
|
+
* matches any string (substring) or RegExp. Never applied to user-submitted
|
|
222
|
+
* widget feedback.
|
|
216
223
|
*/
|
|
217
224
|
ignoreErrors?: Array<string | RegExp>;
|
|
218
225
|
/**
|
|
219
|
-
* Drop automatic error reports
|
|
226
|
+
* Drop automatic error reports and `captureException()` calls whose
|
|
227
|
+
* throw-site URL (script filename, else the stack's first frame) matches.
|
|
220
228
|
*/
|
|
221
229
|
denyUrls?: Array<string | RegExp>;
|
|
222
230
|
/**
|
|
223
|
-
* When set, drop automatic error reports
|
|
224
|
-
* at least one entry.
|
|
231
|
+
* When set, drop automatic error reports and `captureException()` calls
|
|
232
|
+
* unless the throw-site URL matches at least one entry. An error with no
|
|
233
|
+
* known URL (e.g. cross-origin "Script error.") is dropped.
|
|
225
234
|
*/
|
|
226
235
|
allowUrls?: Array<string | RegExp>;
|
|
227
236
|
/**
|
|
@@ -308,6 +317,13 @@ interface MushiWidgetConfig {
|
|
|
308
317
|
expandedTitle?: string;
|
|
309
318
|
mode?: 'simple' | 'conversational';
|
|
310
319
|
locale?: string;
|
|
320
|
+
/**
|
|
321
|
+
* Page-level z-index of the launcher (default `99999`). The panel and toasts
|
|
322
|
+
* sit at `zIndex + 1`. Each surface carries its own z-index and the widget's
|
|
323
|
+
* host element forms no stacking context, so these numbers compare directly
|
|
324
|
+
* with the host page's own layers. The banner has its own setting,
|
|
325
|
+
* `bannerConfig.zIndex`.
|
|
326
|
+
*/
|
|
311
327
|
zIndex?: number;
|
|
312
328
|
/**
|
|
313
329
|
* Controls how, or whether, the default trigger is injected.
|
|
@@ -437,10 +453,13 @@ interface MushiWidgetConfig {
|
|
|
437
453
|
/**
|
|
438
454
|
* CSS selectors of host-app elements that the widget trigger and panel must
|
|
439
455
|
* never visually overlap. At render time the widget queries each selector,
|
|
440
|
-
* measures
|
|
441
|
-
*
|
|
456
|
+
* measures its bounding rect, and moves the widget's anchored edge
|
|
457
|
+
* (`--mushi-bottom` for bottom positions, the default; `--mushi-top` for top
|
|
458
|
+
* positions) so it clears every avoided element in that half of the viewport
|
|
459
|
+
* by at least 8px. Elements in the other half are left alone.
|
|
442
460
|
*
|
|
443
|
-
* Typical use:
|
|
461
|
+
* Typical use: a sticky mobile header for a top position, or a bottom tab
|
|
462
|
+
* bar or fixed sign-in CTA for a bottom position.
|
|
444
463
|
*
|
|
445
464
|
* @example
|
|
446
465
|
* avoidSelectors: ['[data-mobile-header]', '#sign-in-cta']
|
|
@@ -519,14 +538,17 @@ interface MushiBannerConfig {
|
|
|
519
538
|
/** 'top' pins the banner below any existing sticky headers; 'bottom' pins above bottom navs. Defaults to 'top'. */
|
|
520
539
|
position?: 'top' | 'bottom';
|
|
521
540
|
/**
|
|
522
|
-
* Body copy on the strip — the lime
|
|
541
|
+
* Body copy on the strip — the lime announcement line users see in
|
|
523
542
|
* the Mushi admin console. When set, the banner switches to the rich layout
|
|
524
543
|
* (pill + message + flat text actions) instead of button-only CTAs.
|
|
525
544
|
*/
|
|
526
545
|
message?: string;
|
|
527
546
|
/**
|
|
528
|
-
* Pill label shown before `message
|
|
547
|
+
* Pill label shown before `message`. Defaults to `"Feedback"` when
|
|
529
548
|
* `message` is set. Pass `false` to hide the pill.
|
|
549
|
+
*
|
|
550
|
+
* Do not set `"Beta"` in a production App Store or Google Play build: Apple
|
|
551
|
+
* can reject the app under guideline 2.2 (beta testing belongs in TestFlight).
|
|
530
552
|
*/
|
|
531
553
|
label?: string | false;
|
|
532
554
|
/** Override the call-to-action text in the banner. Defaults to '🐛 Report a bug'. */
|
|
@@ -537,7 +559,11 @@ interface MushiBannerConfig {
|
|
|
537
559
|
featureCtaLabel?: string;
|
|
538
560
|
/** Extra flat links after the bug/feature CTAs (e.g. "My submissions"). */
|
|
539
561
|
links?: MushiBannerLink[];
|
|
540
|
-
/**
|
|
562
|
+
/**
|
|
563
|
+
* Page-level z-index of the banner strip. Defaults to the widget's `zIndex`
|
|
564
|
+
* minus one, just under the launcher. Set it below your own overlays (sheets,
|
|
565
|
+
* drawers, dialogs) so they cover the banner, e.g. `130` under a `200` sheet.
|
|
566
|
+
*/
|
|
541
567
|
zIndex?: number;
|
|
542
568
|
}
|
|
543
569
|
interface MushiBetaModeConfig {
|
|
@@ -595,9 +621,12 @@ interface MushiCaptureConfig {
|
|
|
595
621
|
screenshot?: 'on-report' | 'auto' | 'off';
|
|
596
622
|
/**
|
|
597
623
|
* Custom screenshot capture function. When provided, the SDK calls this
|
|
598
|
-
* instead of its built-in DOM-snapshot capturer.
|
|
599
|
-
* on success, or `null` to skip
|
|
600
|
-
*
|
|
624
|
+
* instead of its built-in DOM-snapshot capturer. Resolve to a
|
|
625
|
+
* `data:image/jpeg` or `data:image/png` URL on success, or `null` to skip
|
|
626
|
+
* attachment. Any other string (a `file://` or `https://` URI) is ignored
|
|
627
|
+
* with a warning, so a native plugin's file must be read and returned as a
|
|
628
|
+
* data URL. If the function throws the SDK falls back to the built-in
|
|
629
|
+
* capturer.
|
|
601
630
|
*
|
|
602
631
|
* Primary use-case: Capacitor / WebView hosts that route through a native
|
|
603
632
|
* plugin (e.g. `@capawesome/capacitor-screenshot`) to obtain a real pixel-
|
|
@@ -607,9 +636,9 @@ interface MushiCaptureConfig {
|
|
|
607
636
|
* capture: {
|
|
608
637
|
* screenshot: 'auto',
|
|
609
638
|
* screenshotProvider: async () => {
|
|
610
|
-
*
|
|
611
|
-
* const
|
|
612
|
-
* return
|
|
639
|
+
* // Base64 PNG from your native screenshot plugin.
|
|
640
|
+
* const base64 = await takeNativeScreenshot();
|
|
641
|
+
* return base64 ? `data:image/png;base64,${base64}` : null;
|
|
613
642
|
* },
|
|
614
643
|
* }
|
|
615
644
|
*/
|
|
@@ -1907,7 +1936,8 @@ interface MushiDiscoveryEventPayload {
|
|
|
1907
1936
|
}
|
|
1908
1937
|
/** Payload for /v1/sdk/session — lightweight session lifecycle tracking.
|
|
1909
1938
|
* Best-effort, no offline queue. Privacy-safe: no PII by default;
|
|
1910
|
-
* `user_id_hash` is
|
|
1939
|
+
* `user_id_hash` is a one-way SHA-256 hex of the host's user id, never the
|
|
1940
|
+
* id itself, and stays null until the host identifies the user. */
|
|
1911
1941
|
interface MushiSessionEventPayload {
|
|
1912
1942
|
/** Lifecycle event kind. */
|
|
1913
1943
|
kind: 'session_start' | 'session_heartbeat' | 'session_end' | 'page_view';
|
|
@@ -1922,7 +1952,7 @@ interface MushiSessionEventPayload {
|
|
|
1922
1952
|
page_view_count?: number;
|
|
1923
1953
|
/** Device fingerprint hash — same token used in reports. */
|
|
1924
1954
|
reporter_token_hash?: string | null;
|
|
1925
|
-
/**
|
|
1955
|
+
/** SHA-256 hex of the host user id, set after Mushi.identifyWithToken(). */
|
|
1926
1956
|
user_id_hash?: string | null;
|
|
1927
1957
|
user_agent?: string | null;
|
|
1928
1958
|
sdk_version?: string;
|
|
@@ -1979,10 +2009,14 @@ interface MushiApiResponse<T> {
|
|
|
1979
2009
|
status?: number;
|
|
1980
2010
|
};
|
|
1981
2011
|
}
|
|
2012
|
+
/** Widget block of the runtime config: older edge functions send `triggerText: null` for "use the SDK default". */
|
|
2013
|
+
type MushiRuntimeWidgetConfig = Omit<MushiWidgetConfig, 'triggerText'> & {
|
|
2014
|
+
triggerText?: string | null;
|
|
2015
|
+
};
|
|
1982
2016
|
interface MushiRuntimeSdkConfig {
|
|
1983
2017
|
enabled?: boolean;
|
|
1984
2018
|
version?: string | null;
|
|
1985
|
-
widget?:
|
|
2019
|
+
widget?: MushiRuntimeWidgetConfig;
|
|
1986
2020
|
capture?: MushiCaptureConfig;
|
|
1987
2021
|
native?: {
|
|
1988
2022
|
triggerMode?: 'shake' | 'button' | 'both' | 'none';
|
|
@@ -2097,4 +2131,4 @@ interface MushiTesterReputation {
|
|
|
2097
2131
|
total_points: number;
|
|
2098
2132
|
}
|
|
2099
2133
|
|
|
2100
|
-
export { type
|
|
2134
|
+
export { type MushiReporterPrefsUpdate as $, type MushiDiscoverInventoryConfig as A, type MushiDiscoveryEventPayload as B, type MushiEventHandler as C, type MushiEventType as D, type MushiHallOfFameEntry as E, type MushiInitConfig as F, type MushiIntegrationsConfig as G, type MushiLeaderboardEntry as H, type MushiNetworkEntry as I, type MushiNotificationsConfig as J, type MushiOnDeviceClassifier as K, type MushiOnDeviceClassifierInput as L, type MushiApiClient as M, type MushiOnDeviceClassifierResult as N, type MushiPageContext as O, type MushiPerformanceMetrics as P, type MushiPreset as Q, type MushiPrivacyConfig as R, type MushiProactiveConfig as S, type MushiProductEventPayload as T, type MushiPushSubscriptionJSON as U, type MushiReportBuilder as V, type MushiReportCategory as W, type MushiReportStatus as X, type MushiReporterChannelUnavailable as Y, type MushiReporterComment as Z, type MushiReporterNotificationPrefs as _, type MushiConfig as a, type MushiReporterReport as a0, type MushiReporterReportDetail as a1, type MushiReporterTimelineItem as a2, type MushiReporterUpdates as a3, type MushiReputationResult as a4, type MushiRewardsConfig as a5, type MushiRuntimeSdkConfig as a6, type MushiRuntimeWidgetConfig as a7, type MushiSDKInstance as a8, type MushiSdkVersionInfo as a9, type MushiSelectedElement as aa, type MushiSentryConfig as ab, type MushiSentryContext as ac, type MushiSessionEventPayload as ad, type MushiTesterReputation as ae, type MushiTierResult as af, type MushiTimelineEntry as ag, type MushiTimelineKind as ah, type MushiTracePropagationConfig as ai, type MushiUrlMatcher as aj, type MushiWidgetAnchor as ak, type MushiWidgetConfig as al, type MushiReporterChannels as am, reporterChannels as an, subscribeBrowserPush as ao, type MushiPreFilterConfig as b, type MushiReport as c, type MushiOfflineConfig as d, type MushiEnvironment as e, type MushiAnalyticsConfig as f, type MushiPropertyValue as g, type MushiBreadcrumb as h, type MushiActivityEvent as i, type MushiApiCascadeConfig as j, type MushiApiResponse as k, type MushiAssistantConfig as l, type MushiAssistantReply as m, type MushiAssistantStep as n, type MushiBannerConfig as o, type MushiBannerLink as p, type MushiBetaChangelogEntry as q, type MushiBetaModeConfig as r, type MushiCaptureConfig as s, type MushiCaptureEventInput as t, type MushiCaptureExceptionOptions as u, type MushiConsoleEntry as v, type MushiCooldownConfig as w, type MushiCrossAppReport as x, type MushiCustomCategory as y, type MushiDiagnosticsResult as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mushi-mushi/core",
|
|
3
|
-
"version": "1.32.
|
|
3
|
+
"version": "1.32.3",
|
|
4
4
|
"description": "Types, API client and pre-filter for Mushi SDKs. The bug mediator for AI-built apps: plain-English diagnosis + a ready fix, in your editor.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|