diff --git a/packages/agent-app-sdk/src/widgets/details/details-widget.ts b/packages/agent-app-sdk/src/widgets/details/details-widget.ts index c4a38a8..562bd28 100644 --- a/packages/agent-app-sdk/src/widgets/details/details-widget.ts +++ b/packages/agent-app-sdk/src/widgets/details/details-widget.ts @@ -1,17 +1,9 @@ -import { - createWidget, - withAmplitude, - createConnection, - IConnection -} from '@livechat/widget-core-sdk'; +import { createConnection, createWidget, IConnection, withAmplitude } from '@livechat/widget-core-sdk'; import { withCustomerProfile } from '../shared/customer-profile'; import { withRichMessages } from '../shared/rich-messages'; +import { withTransactions } from '../shared/transactions'; import assertSection from './custom-sections'; -import { - IDetailsWidgetEvents, - IDetailsWidgetApi, - ISection -} from './interfaces'; +import { IDetailsWidgetApi, IDetailsWidgetEvents, ISection } from './interfaces'; export function DetailsWidget(connection: IConnection) { const base = createWidget( @@ -33,9 +25,7 @@ export function DetailsWidget(connection: IConnection) { } ); - const widget = withAmplitude(withRichMessages(withCustomerProfile(base))); - - return widget; + return withAmplitude(withTransactions(withRichMessages(withCustomerProfile(base)))); } export type IDetailsWidget = ReturnType; diff --git a/packages/agent-app-sdk/src/widgets/fullscreen/fullscreen-widget.ts b/packages/agent-app-sdk/src/widgets/fullscreen/fullscreen-widget.ts index 93c7aae..f9feb81 100644 --- a/packages/agent-app-sdk/src/widgets/fullscreen/fullscreen-widget.ts +++ b/packages/agent-app-sdk/src/widgets/fullscreen/fullscreen-widget.ts @@ -1,14 +1,6 @@ -import { - createWidget, - withAmplitude, - createConnection, - IConnection -} from '@livechat/widget-core-sdk'; -import { - IFullscreenWidgetApi, - IFullscreenWidgetEvents, - ReportsFilters -} from './interfaces'; +import { createConnection, createWidget, IConnection, withAmplitude } from '@livechat/widget-core-sdk'; +import { withTransactions } from '../shared/transactions'; +import { IFullscreenWidgetApi, IFullscreenWidgetEvents, ReportsFilters } from './interfaces'; export { ReportsFilters } from './interfaces'; @@ -35,7 +27,7 @@ export function FullscreenWidget( } } ); - return withAmplitude(base); + return withAmplitude(withTransactions(base)); } export type IFullscreenWidget = ReturnType; diff --git a/packages/agent-app-sdk/src/widgets/messagebox/messagebox-widget.ts b/packages/agent-app-sdk/src/widgets/messagebox/messagebox-widget.ts index f324f0f..33f25c8 100644 --- a/packages/agent-app-sdk/src/widgets/messagebox/messagebox-widget.ts +++ b/packages/agent-app-sdk/src/widgets/messagebox/messagebox-widget.ts @@ -1,16 +1,8 @@ -import { - createWidget, - withAmplitude, - createConnection, - IConnection -} from '@livechat/widget-core-sdk'; +import { createConnection, createWidget, IConnection, withAmplitude } from '@livechat/widget-core-sdk'; import { withCustomerProfile } from '../shared/customer-profile'; import { withRichMessages } from '../shared/rich-messages'; -import { - IMessageBoxWidgetApi, - IMessageBoxWidgetEvents, - IRichMessage -} from './interfaces'; +import { withTransactions } from '../shared/transactions'; +import { IMessageBoxWidgetApi, IMessageBoxWidgetEvents, IRichMessage } from './interfaces'; export function MessageBoxWidget( connection: IConnection @@ -30,7 +22,7 @@ export function MessageBoxWidget( } ); - const widget = withAmplitude(withRichMessages(withCustomerProfile(base))); + const widget = withAmplitude(withRichMessages(withCustomerProfile(withTransactions(base)))); return widget; } diff --git a/packages/agent-app-sdk/src/widgets/settings/settings-widget.ts b/packages/agent-app-sdk/src/widgets/settings/settings-widget.ts index 1dca67c..71d2497 100644 --- a/packages/agent-app-sdk/src/widgets/settings/settings-widget.ts +++ b/packages/agent-app-sdk/src/widgets/settings/settings-widget.ts @@ -1,11 +1,7 @@ -import { - createWidget, - withAmplitude, - createConnection, - IConnection -} from '@livechat/widget-core-sdk'; -import { ISettingsWidgetApi, ISettingsWidgetEvents } from './interfaces'; +import { createConnection, createWidget, IConnection, withAmplitude } from '@livechat/widget-core-sdk'; import { withPageData } from '../shared/page-data'; +import { withTransactions } from '../shared/transactions'; +import { ISettingsWidgetApi, ISettingsWidgetEvents } from './interfaces'; export function SettingsWidget(connection: IConnection) { const base = createWidget( @@ -16,7 +12,7 @@ export function SettingsWidget(connection: IConnection) { } } ); - return withAmplitude(withPageData(base)); + return withAmplitude(withPageData(withTransactions(base))); } export type ISettingsWidget = ReturnType;