@pluno/product-agent-web 0.1.170 → 0.1.172
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.d.ts +5 -0
- package/dist/product-agent-sdk.js +225 -199
- package/dist/product-agent-widget.js +1012 -984
- package/dist/widget.d.ts +6 -5
- package/package.json +1 -1
package/dist/widget.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PlunoProductAgent, type ProductAgentAttachment, type ProductAgentIntegrationAuthRequest, type ProductAgentPersonalChannelConnectionRequest, type ProductAgentInitOptions } from "./index";
|
|
1
|
+
import { PlunoProductAgent, type ProductAgentAttachment, type ProductAgentIntegrationAuthRequest, type ProductAgentPersonalChannelConnectionRequest, type ProductAgentInitOptions, type ProductAgentWidgetLifecycleTrigger } from "./index";
|
|
2
2
|
import { type ActiveUsersCounterValue } from "./activeUsersCounter";
|
|
3
3
|
export type ProductAgentWidgetOptions = {
|
|
4
4
|
layout?: "floating" | "page";
|
|
@@ -47,14 +47,14 @@ export type ProductAgentWidgetOptions = {
|
|
|
47
47
|
persistSharePromptsDisabled?: (disabled: boolean) => void | Promise<void>;
|
|
48
48
|
sdkPreviewChannelId?: string;
|
|
49
49
|
initialDisplayState?: "shown" | "minimized";
|
|
50
|
-
onDisplayStateChange?: (state: "shown" | "minimized") => void;
|
|
51
|
-
onPanelOpenChange?: (open: boolean) => void;
|
|
50
|
+
onDisplayStateChange?: (state: "shown" | "minimized", trigger: ProductAgentWidgetLifecycleTrigger) => void;
|
|
51
|
+
onPanelOpenChange?: (open: boolean, trigger: ProductAgentWidgetLifecycleTrigger) => void;
|
|
52
52
|
showLauncherMinimizeButton?: boolean;
|
|
53
53
|
morningReport?: ProductAgentWidgetMorningReport | null;
|
|
54
54
|
onMorningReportSnooze?: () => void;
|
|
55
55
|
onMorningReportTaskStart?: () => void;
|
|
56
56
|
proactiveSuggestion?: ProductAgentWidgetProactiveSuggestion | null;
|
|
57
|
-
onProactiveSuggestionDismiss?: (suggestionId: string) => void;
|
|
57
|
+
onProactiveSuggestionDismiss?: (suggestionId: string, reason: "dismiss" | "edit") => void;
|
|
58
58
|
onProactiveSuggestionNeverShow?: (suggestionId: string) => void;
|
|
59
59
|
onProactiveSuggestionFeedbackSubmit?: (suggestionId: string, suggestedQuery: string, feedback: string) => void | Promise<void>;
|
|
60
60
|
onProactiveSuggestionTaskStart?: (suggestionId: string) => void;
|
|
@@ -110,8 +110,9 @@ export type ProductAgentWidgetHandle = {
|
|
|
110
110
|
updateAuthGate: (options: Pick<ProductAgentWidgetOptions, "loginRequired" | "loginButtonLabel" | "loginUrl" | "signupRequired" | "signupButtonLabel" | "signupUrl">) => void;
|
|
111
111
|
openPanel: (initialValueOrOptions?: string | {
|
|
112
112
|
focusComposer?: boolean;
|
|
113
|
+
trigger?: ProductAgentWidgetLifecycleTrigger;
|
|
113
114
|
}) => void;
|
|
114
|
-
closePanel: () => void;
|
|
115
|
+
closePanel: (trigger?: ProductAgentWidgetLifecycleTrigger) => void;
|
|
115
116
|
updateDisplayState: (displayState: "shown" | "minimized") => void;
|
|
116
117
|
updateMorningReport: (morningReport: ProductAgentWidgetMorningReport | null | undefined) => void;
|
|
117
118
|
updateProactiveSuggestion: (suggestion: ProductAgentWidgetProactiveSuggestion | null | undefined) => void;
|
package/package.json
CHANGED