@chatsystem/client 1.3.2 → 1.3.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/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { CompanySettingsDTO } from '@chatsystem/shared';
2
+ import { INTERACTIVE_WIDGET_PROTOCOL_V3 } from '@chatsystem/shared';
2
3
  import { InteractiveWidgetResultDTO } from '@chatsystem/shared';
3
4
  import { JSX as JSX_2 } from 'react/jsx-runtime';
4
5
  import { ReactNode } from 'react';
@@ -147,6 +148,14 @@ export declare interface WidgetRuntimeAdapter {
147
148
  submitInteractionResult?(request: WidgetInteractionResultRequest): Promise<Response>;
148
149
  /** Resumes an already accepted submission without retransmitting its values. */
149
150
  resumeInteraction?(request: WidgetInteractionResumeRequest): Promise<Response>;
151
+ /**
152
+ * Browser-only widget features supported by this custom server boundary.
153
+ * `localPreview` needs no submit or resume transport: values remain in the
154
+ * browser and are discarded once their terminal state has been rendered.
155
+ */
156
+ interactiveWidgetCapabilities?: Readonly<{
157
+ localPreview?: boolean;
158
+ }>;
150
159
  /** Called after a successful response stream has been fully consumed. */
151
160
  onAssistantResponseCompleted?(response: Response): void | Promise<void>;
152
161
  }
@@ -187,6 +196,8 @@ export declare type WidgetTextPromptRequest = {
187
196
  query: string;
188
197
  language: string;
189
198
  discussionId: number | null;
199
+ /** Protocol already constrained by this adapter's declared capabilities. */
200
+ interactiveWidgetProtocolVersion?: typeof INTERACTIVE_WIDGET_PROTOCOL_V3;
190
201
  signal: AbortSignal;
191
202
  };
192
203