@chatsystem/client 1.2.3 → 1.2.5
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/README.md +41 -3
- package/dist/index.cjs +199 -79
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +56 -0
- package/dist/index.mjs +5289 -4997
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CompanySettingsDTO } from '@chatsystem/shared';
|
|
1
2
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -61,8 +62,29 @@ export declare type AppProps = {
|
|
|
61
62
|
* ```
|
|
62
63
|
*/
|
|
63
64
|
identityProvider?: WidgetIdentityProvider;
|
|
65
|
+
/**
|
|
66
|
+
* Optional alternate server boundary for first-party embedded experiences.
|
|
67
|
+
* The canonical widget still owns settings, messages, streaming and scroll.
|
|
68
|
+
*/
|
|
69
|
+
runtimeAdapter?: WidgetRuntimeAdapter;
|
|
64
70
|
} & ShadowControls;
|
|
65
71
|
|
|
72
|
+
/**
|
|
73
|
+
* API-owned commercial presentation settings. Branding is deliberately not a
|
|
74
|
+
* mount option: the effective published offer is the only authority.
|
|
75
|
+
*/
|
|
76
|
+
export declare type CompanySettingsWithBranding = CompanySettingsDTO & {
|
|
77
|
+
branding: {
|
|
78
|
+
poweredByChatSystemVisible: boolean;
|
|
79
|
+
};
|
|
80
|
+
agent: CompanySettingsDTO["agent"] & {
|
|
81
|
+
text: CompanySettingsDTO["agent"]["text"] & {
|
|
82
|
+
/** Optional during API/client rolling deployments. */
|
|
83
|
+
conversationStarters?: string[];
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
|
|
66
88
|
declare enum DisplayModeEnum {
|
|
67
89
|
LAUNCHER = "launcher",
|
|
68
90
|
CHATBOX = "chatbox"
|
|
@@ -141,4 +163,38 @@ export declare type WidgetIdentityRequest = {
|
|
|
141
163
|
requiredCapabilities?: string[];
|
|
142
164
|
};
|
|
143
165
|
|
|
166
|
+
/**
|
|
167
|
+
* Reuses the complete ChatSystem conversation UI with a different server
|
|
168
|
+
* boundary.
|
|
169
|
+
*
|
|
170
|
+
* The hosted widget normally loads company settings and sends prompts through
|
|
171
|
+
* the public installation API. Internal surfaces such as the acquisition demo
|
|
172
|
+
* have their own admission, quota and authentication endpoints, but must not
|
|
173
|
+
* duplicate the widget's rendering, streaming or scrolling behavior. They can
|
|
174
|
+
* supply this adapter while every visual and conversational concern remains
|
|
175
|
+
* owned by the canonical client.
|
|
176
|
+
*/
|
|
177
|
+
export declare interface WidgetRuntimeAdapter {
|
|
178
|
+
loadCompanySettings(request: WidgetSettingsRequest): Promise<CompanySettingsWithBranding>;
|
|
179
|
+
sendTextPrompt(request: WidgetTextPromptRequest): Promise<Response>;
|
|
180
|
+
/** Called after a successful response stream has been fully consumed. */
|
|
181
|
+
onAssistantResponseCompleted?(response: Response): void | Promise<void>;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export declare type WidgetSettingsRequest = {
|
|
185
|
+
apiUrl: string;
|
|
186
|
+
appToken: string;
|
|
187
|
+
agentId?: number;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
export declare type WidgetTextPromptRequest = {
|
|
191
|
+
apiUrl: string;
|
|
192
|
+
appToken: string;
|
|
193
|
+
agentId?: number;
|
|
194
|
+
query: string;
|
|
195
|
+
language: string;
|
|
196
|
+
discussionId: number | null;
|
|
197
|
+
signal: AbortSignal;
|
|
198
|
+
};
|
|
199
|
+
|
|
144
200
|
export { }
|