@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.
@@ -1 +1 @@
1
- export { T as MushiPushSubscriptionJSON, X as MushiReporterChannelUnavailable, ak as MushiReporterChannels, Z as MushiReporterNotificationPrefs, _ as MushiReporterPrefsUpdate, a0 as MushiReporterReportDetail, a1 as MushiReporterTimelineItem, a2 as MushiReporterUpdates, al as reporterChannels, am as subscribeBrowserPush } from './types-0j5BJ3aC.cjs';
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 { T as MushiPushSubscriptionJSON, X as MushiReporterChannelUnavailable, ak as MushiReporterChannels, Z as MushiReporterNotificationPrefs, _ as MushiReporterPrefsUpdate, a0 as MushiReporterReportDetail, a1 as MushiReporterTimelineItem, a2 as MushiReporterUpdates, al as reporterChannels, am as subscribeBrowserPush } from './types-0j5BJ3aC.js';
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 whose message matches any string (substring)
215
- * or RegExp. Never applied to user-submitted widget feedback.
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 whose script URL / stack filename matches.
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 unless the script URL matches
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 the union bounding rect, and nudges `--mushi-top` / `--mushi-bottom`
441
- * so the panel clears every avoided element by at least 8px.
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: avoid a sticky mobile header or a fixed sign-in CTA.
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 "Beta" announcement line users see in
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` (e.g. "Beta"). Defaults to `"Beta"` when
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
- /** CSS z-index of the banner element. Defaults to the widget's configured zIndex. */
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. Return a JPEG/PNG data URI
599
- * on success, or `null` to skip attachment. If the function throws the SDK
600
- * falls back to the built-in capturer.
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
- * const { Screenshot } = await import('@capawesome/capacitor-screenshot');
611
- * const { uri } = await Screenshot.take();
612
- * return uri; // data URI on web, file:// on native (SDK handles both)
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 the same device-fingerprint hash used elsewhere. */
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
- /** user_id_hash when the host app called Mushi.identify(). */
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?: MushiWidgetConfig;
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 MushiReporterReport as $, type MushiDiscoverInventoryConfig as A, type MushiDiscoveryEventPayload as B, type MushiEventHandler as C, type MushiEventType as D, type MushiHallOfFameEntry as E, type MushiIntegrationsConfig as F, type MushiLeaderboardEntry as G, type MushiNetworkEntry as H, type MushiNotificationsConfig as I, type MushiOnDeviceClassifier as J, type MushiOnDeviceClassifierInput as K, type MushiOnDeviceClassifierResult as L, type MushiApiClient as M, type MushiPageContext as N, type MushiPerformanceMetrics as O, type MushiPreset as P, type MushiPrivacyConfig as Q, type MushiProactiveConfig as R, type MushiProductEventPayload as S, type MushiPushSubscriptionJSON as T, type MushiReportBuilder as U, type MushiReportCategory as V, type MushiReportStatus as W, type MushiReporterChannelUnavailable as X, type MushiReporterComment as Y, type MushiReporterNotificationPrefs as Z, type MushiReporterPrefsUpdate as _, type MushiConfig as a, type MushiReporterReportDetail as a0, type MushiReporterTimelineItem as a1, type MushiReporterUpdates as a2, type MushiReputationResult as a3, type MushiRewardsConfig as a4, type MushiRuntimeSdkConfig as a5, type MushiSDKInstance as a6, type MushiSdkVersionInfo as a7, type MushiSelectedElement as a8, type MushiSentryConfig as a9, type MushiSentryContext as aa, type MushiSessionEventPayload as ab, type MushiTesterReputation as ac, type MushiTierResult as ad, type MushiTimelineEntry as ae, type MushiTimelineKind as af, type MushiTracePropagationConfig as ag, type MushiUrlMatcher as ah, type MushiWidgetAnchor as ai, type MushiWidgetConfig as aj, type MushiReporterChannels as ak, reporterChannels as al, subscribeBrowserPush as am, 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 };
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 whose message matches any string (substring)
215
- * or RegExp. Never applied to user-submitted widget feedback.
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 whose script URL / stack filename matches.
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 unless the script URL matches
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 the union bounding rect, and nudges `--mushi-top` / `--mushi-bottom`
441
- * so the panel clears every avoided element by at least 8px.
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: avoid a sticky mobile header or a fixed sign-in CTA.
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 "Beta" announcement line users see in
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` (e.g. "Beta"). Defaults to `"Beta"` when
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
- /** CSS z-index of the banner element. Defaults to the widget's configured zIndex. */
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. Return a JPEG/PNG data URI
599
- * on success, or `null` to skip attachment. If the function throws the SDK
600
- * falls back to the built-in capturer.
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
- * const { Screenshot } = await import('@capawesome/capacitor-screenshot');
611
- * const { uri } = await Screenshot.take();
612
- * return uri; // data URI on web, file:// on native (SDK handles both)
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 the same device-fingerprint hash used elsewhere. */
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
- /** user_id_hash when the host app called Mushi.identify(). */
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?: MushiWidgetConfig;
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 MushiReporterReport as $, type MushiDiscoverInventoryConfig as A, type MushiDiscoveryEventPayload as B, type MushiEventHandler as C, type MushiEventType as D, type MushiHallOfFameEntry as E, type MushiIntegrationsConfig as F, type MushiLeaderboardEntry as G, type MushiNetworkEntry as H, type MushiNotificationsConfig as I, type MushiOnDeviceClassifier as J, type MushiOnDeviceClassifierInput as K, type MushiOnDeviceClassifierResult as L, type MushiApiClient as M, type MushiPageContext as N, type MushiPerformanceMetrics as O, type MushiPreset as P, type MushiPrivacyConfig as Q, type MushiProactiveConfig as R, type MushiProductEventPayload as S, type MushiPushSubscriptionJSON as T, type MushiReportBuilder as U, type MushiReportCategory as V, type MushiReportStatus as W, type MushiReporterChannelUnavailable as X, type MushiReporterComment as Y, type MushiReporterNotificationPrefs as Z, type MushiReporterPrefsUpdate as _, type MushiConfig as a, type MushiReporterReportDetail as a0, type MushiReporterTimelineItem as a1, type MushiReporterUpdates as a2, type MushiReputationResult as a3, type MushiRewardsConfig as a4, type MushiRuntimeSdkConfig as a5, type MushiSDKInstance as a6, type MushiSdkVersionInfo as a7, type MushiSelectedElement as a8, type MushiSentryConfig as a9, type MushiSentryContext as aa, type MushiSessionEventPayload as ab, type MushiTesterReputation as ac, type MushiTierResult as ad, type MushiTimelineEntry as ae, type MushiTimelineKind as af, type MushiTracePropagationConfig as ag, type MushiUrlMatcher as ah, type MushiWidgetAnchor as ai, type MushiWidgetConfig as aj, type MushiReporterChannels as ak, reporterChannels as al, subscribeBrowserPush as am, 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 };
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.0",
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",