-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plugin-hubtype-analytics: Add target bot_interaction_id on feedback k…
…nowledge base events (#2877) ## Description **@botonic/core** Add a new bot_interaction_id attribute in request.input. Add bot_interaction_id in HandoffBuilder.withBotEvent **@botonic/react** Be able to store in a Text message the value of botInteractionId. Use the value of botInteractionId when creating a feedback_knowledge_base event **@botonic/plugin-flow-builder** When create a Text message using a knowledge base, add the attribute of botInteractionId **@botonic/plugin-hubtype-analytics** Add in feedback_knowledge_base event the attribute feedback_target_bot_interaction_id Refactor and split Webviews events in 2 classes and also add optionals attributes ## Context This new attribute is needed in the knowledge base feedback events. ## Testing Fix tests of @botonic/core, @botonic/plugin-flow-builder, @botnic/plugin-flow-builder adding bot_interaction_id in Input tests Add feedback_target_bot_interaction_id in feedback_knowledge_base test
- Loading branch information
Showing
30 changed files
with
167 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 10 additions & 6 deletions
16
...tics/src/event-models/ht-event-webview.ts → .../src/event-models/ht-event-webview-end.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
packages/botonic-plugin-hubtype-analytics/src/event-models/ht-event-webview-step.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { EventAction, EventType, EventWebviewStep, RequestData } from '../types' | ||
import { HtEvent } from './ht-event' | ||
|
||
export class HtEventWebviewStep extends HtEvent { | ||
action: EventAction.WebviewStep | ||
flow_thread_id?: string | ||
webview_thread_id: string | ||
webview_name: string | ||
webview_step_name?: string | ||
webview_step_n?: number | ||
|
||
constructor(event: EventWebviewStep, requestData: RequestData) { | ||
super(event, requestData) | ||
this.type = EventType.WebEvent | ||
this.action = event.action | ||
this.flow_thread_id = event.flowThreadId | ||
this.webview_thread_id = event.webviewThreadId | ||
this.webview_name = event.webviewName | ||
this.webview_step_name = event.webviewStepName | ||
this.webview_step_n = event.webviewStepNumber | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.