@brainfish-ai/widgets-initiator 1.24.0 → 1.25.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.
@@ -0,0 +1,13 @@
1
+ export declare function originFromWidgetHost(widgetHost: string): string;
2
+ export declare function targetOriginForIframe(iframe: HTMLIFrameElement, widgetHost?: string): string;
3
+ export declare function registerIframe(iframe: HTMLIFrameElement, widgetHost: string): void;
4
+ export declare function unregisterIframe(iframe: HTMLIFrameElement): void;
5
+ /** Snapshot of currently registered agent iframes. */
6
+ export declare function getRegisteredIframes(): Array<{
7
+ iframe: HTMLIFrameElement;
8
+ widgetHost: string;
9
+ }>;
10
+ export declare function isRegisteredIframeSource(source: MessageEventSource | null): source is Window;
11
+ export declare function hasRegisteredIframeOrigin(origin: string): boolean;
12
+ /** @internal Test helper */
13
+ export declare function resetIframeRegistry(): void;
@@ -0,0 +1,9 @@
1
+ export declare function validateSecretAttributesJwe(jwe: string): boolean;
2
+ export declare function pushSecretAttributesToIframe(iframe: HTMLIFrameElement, widgetHost: string): void;
3
+ export declare function pushSecretAttributesToIframes(): void;
4
+ export declare function setSecretAttributesJwe(jwe: string): boolean;
5
+ export declare function clearSecretAttributesJwe(): void;
6
+ /** @internal Test helper */
7
+ export declare function resetSecretAttributesState(): void;
8
+ /** @internal Test helper */
9
+ export declare function getLatestSecretAttributesJwe(): string | null;
@@ -0,0 +1 @@
1
+ export {};
@@ -18,6 +18,7 @@ export interface BrainfishQueue extends Brainfish {
18
18
  setTheme: (theme: Theme) => void;
19
19
  identify: (userData: Record<string, unknown>) => void;
20
20
  setSecretAttributes: (jwe: string) => void;
21
+ clearSecretAttributes: () => void;
21
22
  isReady: boolean;
22
23
  open: () => void;
23
24
  close: () => void;