@stackable-labs/embeddables 2.20.0 → 2.21.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.
@@ -1,8 +1,11 @@
1
1
  import type { ExtensionRegistryEntry } from '@stackable-labs/sdk-extension-contracts';
2
+ import type { SandboxLoadFailure } from '@stackable-labs/sdk-extension-host';
2
3
  interface DevModeBadgeProps {
3
4
  className?: string;
4
5
  extensions?: ExtensionRegistryEntry[];
5
6
  tokenErrors?: Map<string, string>;
7
+ loadFailures?: Record<string, SandboxLoadFailure>;
8
+ onRetry?: (extensionId: string) => void;
6
9
  }
7
- export declare const DevModeBadge: ({ className, extensions, tokenErrors }: DevModeBadgeProps) => import("react/jsx-runtime").JSX.Element | null;
10
+ export declare const DevModeBadge: ({ className, extensions, tokenErrors, loadFailures, onRetry, }: DevModeBadgeProps) => import("react/jsx-runtime").JSX.Element | null;
8
11
  export {};
@@ -0,0 +1,6 @@
1
+ export interface LoadFailureBeaconContext {
2
+ endpoint: string;
3
+ instanceId: string | undefined;
4
+ appId: string | undefined;
5
+ }
6
+ export declare const useExtensionFailureBeacon: (ctx: LoadFailureBeaconContext) => void;
@@ -0,0 +1,21 @@
1
+ import type { SandboxLoadFailure } from '@stackable-labs/sdk-extension-host';
2
+ export interface LoadFailureBeaconPayload {
3
+ outcome: 'failure';
4
+ eventId: string;
5
+ extensionId: string;
6
+ instanceId: string | null;
7
+ appId: string | null;
8
+ bundleUrl: string | null;
9
+ reason: string;
10
+ detail: string | null;
11
+ status: number | null;
12
+ hostUrl: string;
13
+ userAgent: string;
14
+ sdkVersion: string;
15
+ ts: number;
16
+ }
17
+ export declare const buildLoadFailurePayload: (failure: SandboxLoadFailure, ctx: {
18
+ instanceId: string | undefined;
19
+ appId: string | undefined;
20
+ }) => LoadFailureBeaconPayload;
21
+ export declare const shipLoadFailureBeacon: (endpoint: string, payload: LoadFailureBeaconPayload) => void;