bstp-agent-widget 0.2.76 → 0.2.77

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bstp-agent-widget",
3
- "version": "0.2.76",
3
+ "version": "0.2.77",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/agent-widget.js",
@@ -0,0 +1,4 @@
1
+ export enum AgentChatMessageSender {
2
+ USER = 'user',
3
+ ASSISTANT = 'assistant',
4
+ }
@@ -0,0 +1,13 @@
1
+ export interface AgentChatMdChartWidgetItem {
2
+ key: string;
3
+ label: string;
4
+ used: number;
5
+ total: number;
6
+ unit: string;
7
+ percentUsed?: number;
8
+ }
9
+
10
+ export interface AgentChatMdChartWidgetProps {
11
+ items?: AgentChatMdChartWidgetItem[];
12
+ title?: string;
13
+ }
@@ -0,0 +1,5 @@
1
+ export interface AgentChatMdHighlightBoxWidgetProps {
2
+ title?: string;
3
+ content?: string;
4
+ variant?: 'info' | 'success' | 'warning' | 'error';
5
+ }
@@ -0,0 +1,16 @@
1
+ export interface AgentChatMdOfferCardWidgetItem {
2
+ offerId?: string;
3
+ name?: string;
4
+ description?: string;
5
+ price?: string;
6
+ priceType?: string;
7
+ dataAmount?: string;
8
+ chargeType?: string;
9
+ }
10
+
11
+ export interface AgentChatMdOfferCardWidgetProps {
12
+ items?: AgentChatMdOfferCardWidgetItem[];
13
+ title?: string;
14
+ showPricing?: boolean;
15
+ onSelectOffer?: (offerId: string) => void;
16
+ }
@@ -0,0 +1,25 @@
1
+ export interface AgentChatMdOverviewCardAdvantage {
2
+ key: string;
3
+ type: string;
4
+ amount: string;
5
+ unit?: string | null;
6
+ }
7
+
8
+ export interface AgentChatMdOverviewCardWidgetItem {
9
+ billingAccountId?: string;
10
+ title?: string;
11
+ advantages?: AgentChatMdOverviewCardAdvantage[];
12
+ price?: string;
13
+ priceSuffix?: string;
14
+ }
15
+
16
+ export interface AgentChatMdOverviewCardWidgetProps {
17
+ items?: AgentChatMdOverviewCardWidgetItem[];
18
+ title?: string;
19
+ advantages?: AgentChatMdOverviewCardAdvantage[];
20
+ price?: string;
21
+ priceSuffix?: string;
22
+ ctaLabel?: string;
23
+ onCtaClick?: () => void;
24
+ onSelectAccount?: (billingAccountId: string) => void;
25
+ }
@@ -0,0 +1,6 @@
1
+ import { WidgetEvent } from '@markdown-ui/react';
2
+
3
+ export interface AgentChatMdRendererProps {
4
+ content: string;
5
+ onWidgetEvent?: (event: WidgetEvent) => void;
6
+ }
@@ -0,0 +1,4 @@
1
+ export interface AgentChatMdTableWidgetProps {
2
+ headers?: string[];
3
+ rows?: string[][];
4
+ }
@@ -0,0 +1,7 @@
1
+ export interface MdWidgetConfig {
2
+ type: string;
3
+ data?: Record<string, unknown>;
4
+ visualizationConfig?: Record<string, unknown>;
5
+ responseType?: string;
6
+ items?: unknown[];
7
+ }
@@ -0,0 +1,8 @@
1
+ import { AgentChatMessageSender } from '@/types/enums/agent-chat-message-sender';
2
+
3
+ export interface AgentChatMessage {
4
+ id: string;
5
+ sentBy: AgentChatMessageSender;
6
+ text: string;
7
+ createdAt?: string;
8
+ }
@@ -0,0 +1,5 @@
1
+ export interface AgentChatRuntimeInfo {
2
+ customerId: string | null;
3
+ hasCustomerToken: boolean;
4
+ hasGenaiToken: boolean;
5
+ }
@@ -1,14 +1,14 @@
1
- export type AgentChatRuntimeValue = {
1
+ export interface AgentChatRuntimeValue {
2
2
  customerId: string;
3
3
  customerToken: string;
4
4
  language?: string;
5
- };
5
+ }
6
6
 
7
- export type AgentChatRuntimeGetter = {
7
+ export interface AgentChatRuntimeGetter {
8
8
  getCustomerId: () => string | null;
9
9
  getCustomerToken: () => string | null | Promise<string | null>;
10
10
  getLanguage?: () => string | null;
11
- };
11
+ }
12
12
 
13
13
  export type AgentChatRuntime = AgentChatRuntimeValue | AgentChatRuntimeGetter;
14
14
 
@@ -1,4 +1,4 @@
1
- export type AgentChatUsageChartItem = {
1
+ export interface AgentChatUsageChartItem {
2
2
  key: string;
3
3
  label: string;
4
4
  used: number;
@@ -9,4 +9,4 @@ export type AgentChatUsageChartItem = {
9
9
  expireDate?: string;
10
10
  valueRaw?: string;
11
11
  currentValueRaw?: string;
12
- };
12
+ }
@@ -1,4 +1,4 @@
1
- export type AgentChatWidgetUiOptions = {
1
+ export interface AgentChatWidgetUiOptions {
2
2
  /** Panel width in px */
3
3
  panelWidth?: number;
4
4
  /** Panel height in px or CSS value */
@@ -25,4 +25,4 @@ export type AgentChatWidgetUiOptions = {
25
25
  panelTopOffset?: number;
26
26
  /** CSS selector for the host layout node that should reserve space for the widget */
27
27
  hostContainerSelector?: string;
28
- };
28
+ }
@@ -9,19 +9,19 @@ export interface AppConfig {
9
9
  genai?: AppConfigGenai;
10
10
  }
11
11
 
12
- interface AppConfigUrl {
12
+ export interface AppConfigUrl {
13
13
  app: string;
14
14
  api: string;
15
15
  apiPaths: ApiPathsConfig;
16
16
  }
17
17
 
18
- interface ApiPathsConfig {
18
+ export interface ApiPathsConfig {
19
19
  crm: string;
20
20
  uiAuthz: string;
21
21
  genai?: string;
22
22
  }
23
23
 
24
- interface AppConfigKeycloak {
24
+ export interface AppConfigKeycloak {
25
25
  url: string;
26
26
  realm: string;
27
27
  clientId: string;