@botonic/plugin-flow-builder 0.46.2 → 0.47.0
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/lib/cjs/action/ai-agent-from-user-input.d.ts +3 -0
- package/lib/cjs/action/ai-agent-from-user-input.js +23 -0
- package/lib/cjs/action/ai-agent-from-user-input.js.map +1 -0
- package/lib/cjs/action/context.d.ts +11 -0
- package/lib/cjs/action/context.js +17 -0
- package/lib/cjs/action/context.js.map +1 -0
- package/lib/cjs/action/fallback.d.ts +1 -1
- package/lib/cjs/action/first-interaction.d.ts +1 -1
- package/lib/cjs/action/first-interaction.js +4 -4
- package/lib/cjs/action/first-interaction.js.map +1 -1
- package/lib/cjs/action/get-contents.d.ts +3 -0
- package/lib/cjs/action/get-contents.js +44 -0
- package/lib/cjs/action/get-contents.js.map +1 -0
- package/lib/cjs/action/index.d.ts +6 -15
- package/lib/cjs/action/index.js +31 -94
- package/lib/cjs/action/index.js.map +1 -1
- package/lib/cjs/action/knowledge-bases.d.ts +1 -1
- package/lib/cjs/action/knowledge-bases.js +3 -3
- package/lib/cjs/action/knowledge-bases.js.map +1 -1
- package/lib/cjs/action/payload.d.ts +1 -1
- package/lib/cjs/api.d.ts +0 -1
- package/lib/cjs/api.js +0 -7
- package/lib/cjs/api.js.map +1 -1
- package/lib/cjs/content-fields/content-fields-base.d.ts +5 -4
- package/lib/cjs/content-fields/content-fields-base.js +7 -7
- package/lib/cjs/content-fields/content-fields-base.js.map +1 -1
- package/lib/cjs/content-fields/flow-ai-agent.d.ts +14 -6
- package/lib/cjs/content-fields/flow-ai-agent.js +100 -17
- package/lib/cjs/content-fields/flow-ai-agent.js.map +1 -1
- package/lib/cjs/content-fields/flow-bot-action.d.ts +4 -2
- package/lib/cjs/content-fields/flow-bot-action.js +10 -5
- package/lib/cjs/content-fields/flow-bot-action.js.map +1 -1
- package/lib/cjs/content-fields/flow-button.d.ts +4 -2
- package/lib/cjs/content-fields/flow-button.js +5 -2
- package/lib/cjs/content-fields/flow-button.js.map +1 -1
- package/lib/cjs/content-fields/flow-capture-user-input.d.ts +4 -3
- package/lib/cjs/content-fields/flow-capture-user-input.js +7 -5
- package/lib/cjs/content-fields/flow-capture-user-input.js.map +1 -1
- package/lib/cjs/content-fields/flow-carousel.d.ts +4 -3
- package/lib/cjs/content-fields/flow-carousel.js +11 -7
- package/lib/cjs/content-fields/flow-carousel.js.map +1 -1
- package/lib/cjs/content-fields/flow-channel-conditional.d.ts +5 -4
- package/lib/cjs/content-fields/flow-channel-conditional.js +10 -7
- package/lib/cjs/content-fields/flow-channel-conditional.js.map +1 -1
- package/lib/cjs/content-fields/flow-country-conditional.d.ts +5 -4
- package/lib/cjs/content-fields/flow-country-conditional.js +11 -7
- package/lib/cjs/content-fields/flow-country-conditional.js.map +1 -1
- package/lib/cjs/content-fields/flow-custom-conditional.d.ts +5 -4
- package/lib/cjs/content-fields/flow-custom-conditional.js +11 -7
- package/lib/cjs/content-fields/flow-custom-conditional.js.map +1 -1
- package/lib/cjs/content-fields/flow-element.d.ts +4 -4
- package/lib/cjs/content-fields/flow-element.js +7 -3
- package/lib/cjs/content-fields/flow-element.js.map +1 -1
- package/lib/cjs/content-fields/flow-go-to-flow.d.ts +3 -3
- package/lib/cjs/content-fields/flow-go-to-flow.js +7 -15
- package/lib/cjs/content-fields/flow-go-to-flow.js.map +1 -1
- package/lib/cjs/content-fields/flow-handoff.d.ts +5 -4
- package/lib/cjs/content-fields/flow-handoff.js +11 -7
- package/lib/cjs/content-fields/flow-handoff.js.map +1 -1
- package/lib/cjs/content-fields/flow-image.d.ts +4 -3
- package/lib/cjs/content-fields/flow-image.js +8 -4
- package/lib/cjs/content-fields/flow-image.js.map +1 -1
- package/lib/cjs/content-fields/flow-knowledge-base.d.ts +4 -3
- package/lib/cjs/content-fields/flow-knowledge-base.js +7 -3
- package/lib/cjs/content-fields/flow-knowledge-base.js.map +1 -1
- package/lib/cjs/content-fields/flow-queue-status-conditional.d.ts +3 -2
- package/lib/cjs/content-fields/flow-queue-status-conditional.js +7 -3
- package/lib/cjs/content-fields/flow-queue-status-conditional.js.map +1 -1
- package/lib/cjs/content-fields/flow-rating.d.ts +4 -3
- package/lib/cjs/content-fields/flow-rating.js +13 -9
- package/lib/cjs/content-fields/flow-rating.js.map +1 -1
- package/lib/cjs/content-fields/flow-text.d.ts +4 -4
- package/lib/cjs/content-fields/flow-text.js +10 -6
- package/lib/cjs/content-fields/flow-text.js.map +1 -1
- package/lib/cjs/content-fields/flow-video.d.ts +4 -3
- package/lib/cjs/content-fields/flow-video.js +8 -4
- package/lib/cjs/content-fields/flow-video.js.map +1 -1
- package/lib/cjs/content-fields/flow-webview.d.ts +3 -2
- package/lib/cjs/content-fields/flow-webview.js +6 -3
- package/lib/cjs/content-fields/flow-webview.js.map +1 -1
- package/lib/cjs/content-fields/flow-whatsapp-cta-url-button.d.ts +5 -3
- package/lib/cjs/content-fields/flow-whatsapp-cta-url-button.js +14 -10
- package/lib/cjs/content-fields/flow-whatsapp-cta-url-button.js.map +1 -1
- package/lib/cjs/content-fields/flow-whatsapp-template.d.ts +5 -3
- package/lib/cjs/content-fields/flow-whatsapp-template.js +26 -22
- package/lib/cjs/content-fields/flow-whatsapp-template.js.map +1 -1
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.d.ts +4 -3
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js +6 -4
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js.map +1 -1
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.d.ts +4 -3
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js +7 -5
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map +1 -1
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.d.ts +4 -3
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js +10 -6
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js.map +1 -1
- package/lib/cjs/content-fields/whatsapp-button-list/index.d.ts +3 -0
- package/lib/cjs/content-fields/whatsapp-button-list/index.js +10 -0
- package/lib/cjs/content-fields/whatsapp-button-list/index.js.map +1 -0
- package/lib/cjs/filters/index.d.ts +1 -0
- package/lib/cjs/filters/index.js +15 -0
- package/lib/cjs/filters/index.js.map +1 -1
- package/lib/cjs/index.d.ts +1 -1
- package/lib/cjs/index.js +4 -8
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/structured-output/flow-builder-content.js.map +1 -0
- package/lib/cjs/tracking.js +6 -6
- package/lib/cjs/tracking.js.map +1 -1
- package/lib/cjs/types.d.ts +1 -1
- package/lib/cjs/user-input/capture-user-input-api.js +4 -4
- package/lib/cjs/user-input/capture-user-input-api.js.map +1 -1
- package/lib/cjs/user-input/index.js +4 -4
- package/lib/cjs/user-input/index.js.map +1 -1
- package/lib/cjs/user-input/smart-intent.js +2 -2
- package/lib/cjs/user-input/smart-intent.js.map +1 -1
- package/lib/cjs/utils/ai-agent.d.ts +18 -0
- package/lib/cjs/utils/ai-agent.js +177 -0
- package/lib/cjs/utils/ai-agent.js.map +1 -0
- package/lib/cjs/utils/authentication.d.ts +2 -0
- package/lib/cjs/utils/authentication.js +21 -0
- package/lib/cjs/utils/authentication.js.map +1 -0
- package/lib/cjs/{helpers.d.ts → utils/get-flow-builder-plugin.d.ts} +1 -1
- package/lib/cjs/{helpers.js → utils/get-flow-builder-plugin.js} +1 -1
- package/lib/cjs/utils/get-flow-builder-plugin.js.map +1 -0
- package/lib/cjs/{utils.d.ts → utils/input.d.ts} +1 -2
- package/lib/cjs/{utils.js → utils/input.js} +3 -21
- package/lib/cjs/utils/input.js.map +1 -0
- package/lib/esm/action/ai-agent-from-user-input.d.ts +3 -0
- package/lib/esm/action/ai-agent-from-user-input.js +23 -0
- package/lib/esm/action/ai-agent-from-user-input.js.map +1 -0
- package/lib/esm/action/context.d.ts +11 -0
- package/lib/esm/action/context.js +17 -0
- package/lib/esm/action/context.js.map +1 -0
- package/lib/esm/action/fallback.d.ts +1 -1
- package/lib/esm/action/first-interaction.d.ts +1 -1
- package/lib/esm/action/first-interaction.js +4 -4
- package/lib/esm/action/first-interaction.js.map +1 -1
- package/lib/esm/action/get-contents.d.ts +3 -0
- package/lib/esm/action/get-contents.js +44 -0
- package/lib/esm/action/get-contents.js.map +1 -0
- package/lib/esm/action/index.d.ts +6 -15
- package/lib/esm/action/index.js +31 -94
- package/lib/esm/action/index.js.map +1 -1
- package/lib/esm/action/knowledge-bases.d.ts +1 -1
- package/lib/esm/action/knowledge-bases.js +3 -3
- package/lib/esm/action/knowledge-bases.js.map +1 -1
- package/lib/esm/action/payload.d.ts +1 -1
- package/lib/esm/api.d.ts +0 -1
- package/lib/esm/api.js +0 -7
- package/lib/esm/api.js.map +1 -1
- package/lib/esm/content-fields/content-fields-base.d.ts +5 -4
- package/lib/esm/content-fields/content-fields-base.js +7 -7
- package/lib/esm/content-fields/content-fields-base.js.map +1 -1
- package/lib/esm/content-fields/flow-ai-agent.d.ts +14 -6
- package/lib/esm/content-fields/flow-ai-agent.js +100 -17
- package/lib/esm/content-fields/flow-ai-agent.js.map +1 -1
- package/lib/esm/content-fields/flow-bot-action.d.ts +4 -2
- package/lib/esm/content-fields/flow-bot-action.js +10 -5
- package/lib/esm/content-fields/flow-bot-action.js.map +1 -1
- package/lib/esm/content-fields/flow-button.d.ts +4 -2
- package/lib/esm/content-fields/flow-button.js +5 -2
- package/lib/esm/content-fields/flow-button.js.map +1 -1
- package/lib/esm/content-fields/flow-capture-user-input.d.ts +4 -3
- package/lib/esm/content-fields/flow-capture-user-input.js +7 -5
- package/lib/esm/content-fields/flow-capture-user-input.js.map +1 -1
- package/lib/esm/content-fields/flow-carousel.d.ts +4 -3
- package/lib/esm/content-fields/flow-carousel.js +11 -7
- package/lib/esm/content-fields/flow-carousel.js.map +1 -1
- package/lib/esm/content-fields/flow-channel-conditional.d.ts +5 -4
- package/lib/esm/content-fields/flow-channel-conditional.js +10 -7
- package/lib/esm/content-fields/flow-channel-conditional.js.map +1 -1
- package/lib/esm/content-fields/flow-country-conditional.d.ts +5 -4
- package/lib/esm/content-fields/flow-country-conditional.js +11 -7
- package/lib/esm/content-fields/flow-country-conditional.js.map +1 -1
- package/lib/esm/content-fields/flow-custom-conditional.d.ts +5 -4
- package/lib/esm/content-fields/flow-custom-conditional.js +11 -7
- package/lib/esm/content-fields/flow-custom-conditional.js.map +1 -1
- package/lib/esm/content-fields/flow-element.d.ts +4 -4
- package/lib/esm/content-fields/flow-element.js +7 -3
- package/lib/esm/content-fields/flow-element.js.map +1 -1
- package/lib/esm/content-fields/flow-go-to-flow.d.ts +3 -3
- package/lib/esm/content-fields/flow-go-to-flow.js +7 -15
- package/lib/esm/content-fields/flow-go-to-flow.js.map +1 -1
- package/lib/esm/content-fields/flow-handoff.d.ts +5 -4
- package/lib/esm/content-fields/flow-handoff.js +11 -7
- package/lib/esm/content-fields/flow-handoff.js.map +1 -1
- package/lib/esm/content-fields/flow-image.d.ts +4 -3
- package/lib/esm/content-fields/flow-image.js +8 -4
- package/lib/esm/content-fields/flow-image.js.map +1 -1
- package/lib/esm/content-fields/flow-knowledge-base.d.ts +4 -3
- package/lib/esm/content-fields/flow-knowledge-base.js +7 -3
- package/lib/esm/content-fields/flow-knowledge-base.js.map +1 -1
- package/lib/esm/content-fields/flow-queue-status-conditional.d.ts +3 -2
- package/lib/esm/content-fields/flow-queue-status-conditional.js +7 -3
- package/lib/esm/content-fields/flow-queue-status-conditional.js.map +1 -1
- package/lib/esm/content-fields/flow-rating.d.ts +4 -3
- package/lib/esm/content-fields/flow-rating.js +13 -9
- package/lib/esm/content-fields/flow-rating.js.map +1 -1
- package/lib/esm/content-fields/flow-text.d.ts +4 -4
- package/lib/esm/content-fields/flow-text.js +10 -6
- package/lib/esm/content-fields/flow-text.js.map +1 -1
- package/lib/esm/content-fields/flow-video.d.ts +4 -3
- package/lib/esm/content-fields/flow-video.js +8 -4
- package/lib/esm/content-fields/flow-video.js.map +1 -1
- package/lib/esm/content-fields/flow-webview.d.ts +3 -2
- package/lib/esm/content-fields/flow-webview.js +6 -3
- package/lib/esm/content-fields/flow-webview.js.map +1 -1
- package/lib/esm/content-fields/flow-whatsapp-cta-url-button.d.ts +5 -3
- package/lib/esm/content-fields/flow-whatsapp-cta-url-button.js +14 -10
- package/lib/esm/content-fields/flow-whatsapp-cta-url-button.js.map +1 -1
- package/lib/esm/content-fields/flow-whatsapp-template.d.ts +5 -3
- package/lib/esm/content-fields/flow-whatsapp-template.js +26 -22
- package/lib/esm/content-fields/flow-whatsapp-template.js.map +1 -1
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.d.ts +4 -3
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js +6 -4
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js.map +1 -1
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.d.ts +4 -3
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js +7 -5
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map +1 -1
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.d.ts +4 -3
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js +10 -6
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js.map +1 -1
- package/lib/esm/content-fields/whatsapp-button-list/index.d.ts +3 -0
- package/lib/esm/content-fields/whatsapp-button-list/index.js +10 -0
- package/lib/esm/content-fields/whatsapp-button-list/index.js.map +1 -0
- package/lib/esm/filters/index.d.ts +1 -0
- package/lib/esm/filters/index.js +15 -0
- package/lib/esm/filters/index.js.map +1 -1
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +4 -8
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/structured-output/flow-builder-content.js.map +1 -0
- package/lib/esm/tracking.js +6 -6
- package/lib/esm/tracking.js.map +1 -1
- package/lib/esm/types.d.ts +1 -1
- package/lib/esm/user-input/capture-user-input-api.js +4 -4
- package/lib/esm/user-input/capture-user-input-api.js.map +1 -1
- package/lib/esm/user-input/index.js +4 -4
- package/lib/esm/user-input/index.js.map +1 -1
- package/lib/esm/user-input/smart-intent.js +2 -2
- package/lib/esm/user-input/smart-intent.js.map +1 -1
- package/lib/esm/utils/ai-agent.d.ts +18 -0
- package/lib/esm/utils/ai-agent.js +177 -0
- package/lib/esm/utils/ai-agent.js.map +1 -0
- package/lib/esm/utils/authentication.d.ts +2 -0
- package/lib/esm/utils/authentication.js +21 -0
- package/lib/esm/utils/authentication.js.map +1 -0
- package/lib/esm/{helpers.d.ts → utils/get-flow-builder-plugin.d.ts} +1 -1
- package/lib/esm/{helpers.js → utils/get-flow-builder-plugin.js} +1 -1
- package/lib/esm/utils/get-flow-builder-plugin.js.map +1 -0
- package/lib/esm/{utils.d.ts → utils/input.d.ts} +1 -2
- package/lib/esm/{utils.js → utils/input.js} +3 -21
- package/lib/esm/utils/input.js.map +1 -0
- package/package.json +2 -2
- package/src/action/ai-agent-from-user-input.ts +35 -0
- package/src/action/context.ts +29 -0
- package/src/action/fallback.ts +1 -1
- package/src/action/first-interaction.ts +4 -4
- package/src/action/get-contents.ts +51 -0
- package/src/action/index.tsx +42 -136
- package/src/action/knowledge-bases.ts +5 -2
- package/src/action/payload.ts +1 -1
- package/src/api.ts +0 -8
- package/src/content-fields/content-fields-base.ts +11 -9
- package/src/content-fields/flow-ai-agent.tsx +166 -31
- package/src/content-fields/flow-bot-action.tsx +17 -6
- package/src/content-fields/flow-button.tsx +8 -3
- package/src/content-fields/flow-capture-user-input.tsx +9 -6
- package/src/content-fields/flow-carousel.tsx +21 -11
- package/src/content-fields/flow-channel-conditional.tsx +16 -9
- package/src/content-fields/flow-country-conditional.tsx +17 -9
- package/src/content-fields/flow-custom-conditional.tsx +17 -9
- package/src/content-fields/flow-element.tsx +10 -11
- package/src/content-fields/flow-go-to-flow.tsx +10 -24
- package/src/content-fields/flow-handoff.tsx +21 -10
- package/src/content-fields/flow-image.tsx +11 -5
- package/src/content-fields/flow-knowledge-base.tsx +11 -5
- package/src/content-fields/flow-queue-status-conditional.tsx +13 -5
- package/src/content-fields/flow-rating.tsx +16 -16
- package/src/content-fields/flow-text.tsx +13 -7
- package/src/content-fields/flow-video.tsx +11 -5
- package/src/content-fields/flow-webview.tsx +12 -5
- package/src/content-fields/flow-whatsapp-cta-url-button.tsx +16 -12
- package/src/content-fields/flow-whatsapp-template.tsx +28 -24
- package/src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.tsx +8 -5
- package/src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.tsx +8 -6
- package/src/content-fields/whatsapp-button-list/flow-whatsapp-button-list.tsx +15 -15
- package/src/content-fields/whatsapp-button-list/index.ts +3 -0
- package/src/filters/index.ts +20 -0
- package/src/index.ts +3 -14
- package/src/tracking.ts +1 -1
- package/src/types.ts +1 -1
- package/src/user-input/capture-user-input-api.ts +2 -2
- package/src/user-input/index.ts +1 -1
- package/src/user-input/smart-intent.ts +1 -1
- package/src/utils/ai-agent.ts +233 -0
- package/src/utils/authentication.ts +23 -0
- package/src/{helpers.ts → utils/get-flow-builder-plugin.ts} +1 -1
- package/src/{utils.ts → utils/input.ts} +3 -23
- package/lib/cjs/action/ai-agent/index.d.ts +0 -3
- package/lib/cjs/action/ai-agent/index.js +0 -94
- package/lib/cjs/action/ai-agent/index.js.map +0 -1
- package/lib/cjs/action/ai-agent/structured-output/flow-builder-content.js.map +0 -1
- package/lib/cjs/helpers.js.map +0 -1
- package/lib/cjs/utils.js.map +0 -1
- package/lib/esm/action/ai-agent/index.d.ts +0 -3
- package/lib/esm/action/ai-agent/index.js +0 -94
- package/lib/esm/action/ai-agent/index.js.map +0 -1
- package/lib/esm/action/ai-agent/structured-output/flow-builder-content.js.map +0 -1
- package/lib/esm/helpers.js.map +0 -1
- package/lib/esm/utils.js.map +0 -1
- package/src/action/ai-agent/index.ts +0 -138
- /package/lib/cjs/{action/ai-agent/structured-output → structured-output}/flow-builder-content.d.ts +0 -0
- /package/lib/cjs/{action/ai-agent/structured-output → structured-output}/flow-builder-content.js +0 -0
- /package/lib/esm/{action/ai-agent/structured-output → structured-output}/flow-builder-content.d.ts +0 -0
- /package/lib/esm/{action/ai-agent/structured-output → structured-output}/flow-builder-content.js +0 -0
- /package/src/{action/ai-agent/structured-output → structured-output}/flow-builder-content.ts +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { BotContext } from '@botonic/core';
|
|
2
2
|
import { ContentFieldsBase } from './content-fields-base';
|
|
3
3
|
import type { HtVideoNode } from './hubtype-fields';
|
|
4
4
|
export declare class FlowVideo extends ContentFieldsBase {
|
|
5
5
|
src: string;
|
|
6
6
|
static fromHubtypeCMS(component: HtVideoNode, locale: string): FlowVideo;
|
|
7
|
-
trackFlow(
|
|
8
|
-
|
|
7
|
+
trackFlow(botContext: BotContext): Promise<void>;
|
|
8
|
+
processContent(botContext: BotContext): Promise<void>;
|
|
9
|
+
toBotonic(): JSX.Element;
|
|
9
10
|
}
|
|
@@ -17,11 +17,15 @@ class FlowVideo extends content_fields_base_1.ContentFieldsBase {
|
|
|
17
17
|
newVideo.followUp = component.follow_up;
|
|
18
18
|
return newVideo;
|
|
19
19
|
}
|
|
20
|
-
async trackFlow(
|
|
21
|
-
await (0, tracking_1.trackOneContent)(
|
|
20
|
+
async trackFlow(botContext) {
|
|
21
|
+
await (0, tracking_1.trackOneContent)(botContext, this);
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
async processContent(botContext) {
|
|
24
|
+
await this.trackFlow(botContext);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
toBotonic() {
|
|
28
|
+
return (0, jsx_runtime_1.jsx)(react_1.Video, { src: this.src }, this.id);
|
|
25
29
|
}
|
|
26
30
|
}
|
|
27
31
|
exports.FlowVideo = FlowVideo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-video.js","sourceRoot":"","sources":["../../../src/content-fields/flow-video.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"flow-video.js","sourceRoot":"","sources":["../../../src/content-fields/flow-video.tsx"],"names":[],"mappings":";;;;AACA,0CAAsC;AAEtC,0CAA6C;AAC7C,+DAAyD;AAGzD,MAAa,SAAU,SAAQ,uCAAiB;IAAhD;;QACS,QAAG,GAAG,EAAE,CAAA;IAuBjB,CAAC;IArBC,MAAM,CAAC,cAAc,CAAC,SAAsB,EAAE,MAAc;QAC1D,MAAM,QAAQ,GAAG,IAAI,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QAC5C,QAAQ,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAA;QAC9B,QAAQ,CAAC,GAAG,GAAG,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QAC1E,QAAQ,CAAC,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAA;QAEvC,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,UAAsB;QACpC,MAAM,IAAA,0BAAe,EAAC,UAAU,EAAE,IAAI,CAAC,CAAA;IACzC,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,UAAsB;QACzC,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;QAChC,OAAM;IACR,CAAC;IAED,SAAS;QACP,OAAO,uBAAC,aAAK,IAAe,GAAG,EAAE,IAAI,CAAC,GAAG,IAAtB,IAAI,CAAC,EAAE,CAAmB,CAAA;IAC/C,CAAC;CACF;AAxBD,8BAwBC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type BotContext } from '@botonic/core';
|
|
2
2
|
import { ContentFieldsBase } from './content-fields-base';
|
|
3
3
|
import type { HtWebviewExits, HtWebviewNode } from './hubtype-fields';
|
|
4
4
|
export declare class FlowWebview extends ContentFieldsBase {
|
|
@@ -7,5 +7,6 @@ export declare class FlowWebview extends ContentFieldsBase {
|
|
|
7
7
|
webviewComponentName: string;
|
|
8
8
|
exits: HtWebviewExits[];
|
|
9
9
|
static fromHubtypeCMS(component: HtWebviewNode): FlowWebview;
|
|
10
|
-
trackFlow(
|
|
10
|
+
trackFlow(botContext: BotContext): Promise<void>;
|
|
11
|
+
processContent(): Promise<void>;
|
|
11
12
|
}
|
|
@@ -21,8 +21,8 @@ class FlowWebview extends content_fields_base_1.ContentFieldsBase {
|
|
|
21
21
|
newWebview.followUp = component.follow_up;
|
|
22
22
|
return newWebview;
|
|
23
23
|
}
|
|
24
|
-
async trackFlow(
|
|
25
|
-
const { flowThreadId, flowId, flowName, flowNodeId, flowNodeContentId } = (0, tracking_1.getCommonFlowContentEventArgsForContentId)(
|
|
24
|
+
async trackFlow(botContext) {
|
|
25
|
+
const { flowThreadId, flowId, flowName, flowNodeId, flowNodeContentId } = (0, tracking_1.getCommonFlowContentEventArgsForContentId)(botContext, this.id);
|
|
26
26
|
const eventWebviewActionTriggered = {
|
|
27
27
|
action: core_1.EventAction.WebviewActionTriggered,
|
|
28
28
|
flowThreadId,
|
|
@@ -35,7 +35,10 @@ class FlowWebview extends content_fields_base_1.ContentFieldsBase {
|
|
|
35
35
|
webviewName: this.webviewName,
|
|
36
36
|
};
|
|
37
37
|
const { action, ...eventArgs } = eventWebviewActionTriggered;
|
|
38
|
-
await (0, tracking_1.trackEvent)(
|
|
38
|
+
await (0, tracking_1.trackEvent)(botContext, action, eventArgs);
|
|
39
|
+
}
|
|
40
|
+
async processContent() {
|
|
41
|
+
return;
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
exports.FlowWebview = FlowWebview;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-webview.js","sourceRoot":"","sources":["../../../src/content-fields/flow-webview.tsx"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"flow-webview.js","sourceRoot":"","sources":["../../../src/content-fields/flow-webview.tsx"],"names":[],"mappings":";;;AAAA,wCAIsB;AAEtB,0CAGoB;AACpB,+DAAyD;AAGzD,MAAa,WAAY,SAAQ,uCAAiB;IAAlD;;QACS,oBAAe,GAAW,EAAE,CAAA;QAC5B,gBAAW,GAAW,EAAE,CAAA;QACxB,yBAAoB,GAAW,EAAE,CAAA;QACjC,UAAK,GAAqB,EAAE,CAAA;IAmCrC,CAAC;IAjCC,MAAM,CAAC,cAAc,CAAC,SAAwB;QAC5C,MAAM,UAAU,GAAG,IAAI,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QAChD,UAAU,CAAC,eAAe,GAAG,SAAS,CAAC,OAAO,CAAC,iBAAiB,CAAA;QAChE,UAAU,CAAC,WAAW,GAAG,SAAS,CAAC,OAAO,CAAC,YAAY,CAAA;QACvD,UAAU,CAAC,oBAAoB,GAAG,SAAS,CAAC,OAAO,CAAC,sBAAsB,CAAA;QAC1E,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,CAAA;QAC1C,UAAU,CAAC,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAA;QAEzC,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,UAAsB;QACpC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,iBAAiB,EAAE,GACrE,IAAA,oDAAyC,EAAC,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC,CAAA;QAEhE,MAAM,2BAA2B,GAAgC;YAC/D,MAAM,EAAE,kBAAW,CAAC,sBAAsB;YAC1C,YAAY;YACZ,MAAM;YACN,QAAQ;YACR,UAAU;YACV,iBAAiB;YACjB,oBAAoB,EAAE,KAAK;YAC3B,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAA;QACD,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,GAAG,2BAA2B,CAAA;QAC5D,MAAM,IAAA,qBAAU,EAAC,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,CAAA;IACjD,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,OAAM;IACR,CAAC;CACF;AAvCD,kCAuCC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type BotContext } from '@botonic/core';
|
|
2
|
+
import { WhatsappCTAUrlHeaderType } from '@botonic/react';
|
|
2
3
|
import type { FlowBuilderApi } from '../api';
|
|
3
4
|
import { ContentFieldsBase } from './content-fields-base';
|
|
4
5
|
import type { HtWhatsappCTAUrlButtonNode } from './hubtype-fields';
|
|
@@ -14,6 +15,7 @@ export declare class FlowWhatsappCtaUrlButtonNode extends ContentFieldsBase {
|
|
|
14
15
|
url: string;
|
|
15
16
|
static fromHubtypeCMS(component: HtWhatsappCTAUrlButtonNode, locale: string, cmsApi: FlowBuilderApi): FlowWhatsappCtaUrlButtonNode;
|
|
16
17
|
private static setHeader;
|
|
17
|
-
trackFlow(
|
|
18
|
-
|
|
18
|
+
trackFlow(botContext: BotContext): Promise<void>;
|
|
19
|
+
processContent(botContext: BotContext): Promise<void>;
|
|
20
|
+
toBotonic(botContext: BotContext): JSX.Element;
|
|
19
21
|
}
|
|
@@ -57,30 +57,34 @@ class FlowWhatsappCtaUrlButtonNode extends content_fields_base_1.ContentFieldsBa
|
|
|
57
57
|
FlowWhatsappCtaUrlButtonNode.getAssetByLocale(locale, component.content.header_document);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
async trackFlow(
|
|
61
|
-
await (0, tracking_1.trackOneContent)(
|
|
60
|
+
async trackFlow(botContext) {
|
|
61
|
+
await (0, tracking_1.trackOneContent)(botContext, this);
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
async processContent(botContext) {
|
|
64
|
+
await this.trackFlow(botContext);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
toBotonic(botContext) {
|
|
68
|
+
const replacedText = this.replaceVariables(this.text, botContext);
|
|
69
|
+
if (!(0, core_1.isWhatsapp)(botContext.session)) {
|
|
66
70
|
return ((0, jsx_runtime_1.jsxs)(react_1.Text, { children: [replacedText, (0, jsx_runtime_1.jsx)(react_1.Button, { url: this.url, children: this.displayText })] }));
|
|
67
71
|
}
|
|
68
72
|
if (this.headerType === react_1.WhatsappCTAUrlHeaderType.Image &&
|
|
69
73
|
this.headerImage) {
|
|
70
|
-
return ((0, jsx_runtime_1.jsx)(react_1.WhatsappCTAUrlButton, { body: replacedText, headerType: this.headerType, headerImage: this.headerImage, footer: this.footer, displayText: this.displayText, url: this.url }, id));
|
|
74
|
+
return ((0, jsx_runtime_1.jsx)(react_1.WhatsappCTAUrlButton, { body: replacedText, headerType: this.headerType, headerImage: this.headerImage, footer: this.footer, displayText: this.displayText, url: this.url }, this.id));
|
|
71
75
|
}
|
|
72
76
|
if (this.headerType === react_1.WhatsappCTAUrlHeaderType.Video &&
|
|
73
77
|
this.headerVideo) {
|
|
74
|
-
return ((0, jsx_runtime_1.jsx)(react_1.WhatsappCTAUrlButton, { body: replacedText, headerType: this.headerType, headerVideo: this.headerVideo, footer: this.footer, displayText: this.displayText, url: this.url }, id));
|
|
78
|
+
return ((0, jsx_runtime_1.jsx)(react_1.WhatsappCTAUrlButton, { body: replacedText, headerType: this.headerType, headerVideo: this.headerVideo, footer: this.footer, displayText: this.displayText, url: this.url }, this.id));
|
|
75
79
|
}
|
|
76
80
|
if (this.headerType === react_1.WhatsappCTAUrlHeaderType.Document &&
|
|
77
81
|
this.headerDocument) {
|
|
78
|
-
return ((0, jsx_runtime_1.jsx)(react_1.WhatsappCTAUrlButton, { body: replacedText, headerType: this.headerType, headerDocument: this.headerDocument, footer: this.footer, displayText: this.displayText, url: this.url }, id));
|
|
82
|
+
return ((0, jsx_runtime_1.jsx)(react_1.WhatsappCTAUrlButton, { body: replacedText, headerType: this.headerType, headerDocument: this.headerDocument, footer: this.footer, displayText: this.displayText, url: this.url }, this.id));
|
|
79
83
|
}
|
|
80
84
|
if (this.headerType === react_1.WhatsappCTAUrlHeaderType.Text && this.header) {
|
|
81
|
-
return ((0, jsx_runtime_1.jsx)(react_1.WhatsappCTAUrlButton, { body: replacedText, header: this.header, headerType: this.headerType, footer: this.footer, displayText: this.displayText, url: this.url }, id));
|
|
85
|
+
return ((0, jsx_runtime_1.jsx)(react_1.WhatsappCTAUrlButton, { body: replacedText, header: this.header, headerType: this.headerType, footer: this.footer, displayText: this.displayText, url: this.url }, this.id));
|
|
82
86
|
}
|
|
83
|
-
return ((0, jsx_runtime_1.jsx)(react_1.WhatsappCTAUrlButton, { body: replacedText, footer: this.footer, displayText: this.displayText, url: this.url }, id));
|
|
87
|
+
return ((0, jsx_runtime_1.jsx)(react_1.WhatsappCTAUrlButton, { body: replacedText, footer: this.footer, displayText: this.displayText, url: this.url }, this.id));
|
|
84
88
|
}
|
|
85
89
|
}
|
|
86
90
|
exports.FlowWhatsappCtaUrlButtonNode = FlowWhatsappCtaUrlButtonNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-whatsapp-cta-url-button.js","sourceRoot":"","sources":["../../../src/content-fields/flow-whatsapp-cta-url-button.tsx"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"flow-whatsapp-cta-url-button.js","sourceRoot":"","sources":["../../../src/content-fields/flow-whatsapp-cta-url-button.tsx"],"names":[],"mappings":";;;;AAAA,wCAA2D;AAC3D,0CAKuB;AAGvB,0CAA6C;AAC7C,+DAAyD;AACzD,+CAA0C;AAG1C,MAAa,4BAA6B,SAAQ,uCAAiB;IAAnE;;QACS,SAAI,GAAG,EAAE,CAAA;QAOT,gBAAW,GAAG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E,IAAI,CAAC,UAAU,KAAK,gCAAwB,CAAC,QAAQ;YACrD,IAAI,CAAC,cAAc,EACnB,CAAC;YACD,OAAO,CACL,uBAAC,4BAAoB,IAEnB,IAAI,EAAE,YAAY,EAClB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,GAAG,EAAE,IAAI,CAAC,GAAG,IANR,IAAI,CAAC,EAAE,CAOZ,CACH,CAAA;QACH,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,KAAK,gCAAwB,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACrE,OAAO,CACL,uBAAC,4BAAoB,IAEnB,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,GAAG,EAAE,IAAI,CAAC,GAAG,IANR,IAAI,CAAC,EAAE,CAOZ,CACH,CAAA;QACH,CAAC;QAED,OAAO,CACL,uBAAC,4BAAoB,IAEnB,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,GAAG,EAAE,IAAI,CAAC,GAAG,IAJR,IAAI,CAAC,EAAE,CAKZ,CACH,CAAA;IACH,CAAC;CACF;AAtMD,oEAsMC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type BotContext } from '@botonic/core';
|
|
2
|
+
import { WhatsAppTemplateParameterType } from '@botonic/react';
|
|
2
3
|
import { ContentFieldsBase } from './content-fields-base';
|
|
3
4
|
import type { HtButton, HtMediaFileLocale, HtWhatsAppTemplate, HtWhatsappTemplateNode } from './hubtype-fields';
|
|
4
5
|
interface HeaderVariables {
|
|
@@ -23,7 +24,8 @@ export declare class FlowWhatsappTemplate extends ContentFieldsBase {
|
|
|
23
24
|
private createUrlButtonComponent;
|
|
24
25
|
private createQuickReplyButtonComponent;
|
|
25
26
|
private createVoiceCallButtonComponent;
|
|
26
|
-
trackFlow(
|
|
27
|
-
|
|
27
|
+
trackFlow(botContext: BotContext): Promise<void>;
|
|
28
|
+
processContent(botContext: BotContext): Promise<void>;
|
|
29
|
+
toBotonic(botContext: BotContext): JSX.Element;
|
|
28
30
|
}
|
|
29
31
|
export {};
|
|
@@ -4,8 +4,8 @@ exports.FlowWhatsappTemplate = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const core_1 = require("@botonic/core");
|
|
6
6
|
const react_1 = require("@botonic/react");
|
|
7
|
-
const helpers_1 = require("../helpers");
|
|
8
7
|
const tracking_1 = require("../tracking");
|
|
8
|
+
const get_flow_builder_plugin_1 = require("../utils/get-flow-builder-plugin");
|
|
9
9
|
const content_fields_base_1 = require("./content-fields-base");
|
|
10
10
|
class FlowWhatsappTemplate extends content_fields_base_1.ContentFieldsBase {
|
|
11
11
|
constructor() {
|
|
@@ -31,11 +31,11 @@ class FlowWhatsappTemplate extends content_fields_base_1.ContentFieldsBase {
|
|
|
31
31
|
}
|
|
32
32
|
return content;
|
|
33
33
|
}
|
|
34
|
-
getHeaderComponent(whatsappTemplate, headerVariables, locale,
|
|
34
|
+
getHeaderComponent(whatsappTemplate, headerVariables, locale, botContext) {
|
|
35
35
|
const headerComponent = whatsappTemplate.components.find(component => component.type === react_1.WhatsAppTemplateComponentType.HEADER);
|
|
36
36
|
if (headerComponent &&
|
|
37
37
|
headerComponent.format === react_1.WhatsAppTemplateParameterType.TEXT) {
|
|
38
|
-
return this.createHeaderTextComponent(headerVariables,
|
|
38
|
+
return this.createHeaderTextComponent(headerVariables, botContext);
|
|
39
39
|
}
|
|
40
40
|
if (headerComponent &&
|
|
41
41
|
headerComponent.format === react_1.WhatsAppTemplateParameterType.IMAGE) {
|
|
@@ -47,11 +47,11 @@ class FlowWhatsappTemplate extends content_fields_base_1.ContentFieldsBase {
|
|
|
47
47
|
}
|
|
48
48
|
return undefined;
|
|
49
49
|
}
|
|
50
|
-
createHeaderTextComponent(headerVariables,
|
|
50
|
+
createHeaderTextComponent(headerVariables, botContext) {
|
|
51
51
|
return {
|
|
52
52
|
type: react_1.WhatsAppTemplateComponentType.HEADER,
|
|
53
53
|
parameters: Object.values(headerVariables.text || {}).map(value => {
|
|
54
|
-
const valueVariable = this.replaceVariables(value,
|
|
54
|
+
const valueVariable = this.replaceVariables(value, botContext);
|
|
55
55
|
return {
|
|
56
56
|
type: react_1.WhatsAppTemplateParameterType.TEXT,
|
|
57
57
|
text: valueVariable,
|
|
@@ -85,12 +85,12 @@ class FlowWhatsappTemplate extends content_fields_base_1.ContentFieldsBase {
|
|
|
85
85
|
],
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
|
-
// TODO: To use named variables (contact_info_fields) we need to take it from
|
|
89
|
-
getBodyComponent(variableValues,
|
|
88
|
+
// TODO: To use named variables (contact_info_fields) we need to take it from botContext.session.user.contact_info, this only be able in toBotonic method
|
|
89
|
+
getBodyComponent(variableValues, botContext) {
|
|
90
90
|
return {
|
|
91
91
|
type: react_1.WhatsAppTemplateComponentType.BODY,
|
|
92
92
|
parameters: Object.entries(variableValues).map(([key, value]) => {
|
|
93
|
-
const valueVariable = this.replaceVariables(value,
|
|
93
|
+
const valueVariable = this.replaceVariables(value, botContext);
|
|
94
94
|
return {
|
|
95
95
|
type: react_1.WhatsAppTemplateParameterType.TEXT,
|
|
96
96
|
parameter_name: key,
|
|
@@ -99,7 +99,7 @@ class FlowWhatsappTemplate extends content_fields_base_1.ContentFieldsBase {
|
|
|
99
99
|
}),
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
getButtons(whatsappTemplate, buttonNodes, urlVariableValues,
|
|
102
|
+
getButtons(whatsappTemplate, buttonNodes, urlVariableValues, botContext) {
|
|
103
103
|
const htWhatsappTemplateButtons = whatsappTemplate.components.find(component => component.type === react_1.WhatsAppTemplateComponentType.BUTTONS);
|
|
104
104
|
if (htWhatsappTemplateButtons) {
|
|
105
105
|
const buttons = htWhatsappTemplateButtons.buttons
|
|
@@ -109,7 +109,7 @@ class FlowWhatsappTemplate extends content_fields_base_1.ContentFieldsBase {
|
|
|
109
109
|
if (!urlParam) {
|
|
110
110
|
return null;
|
|
111
111
|
}
|
|
112
|
-
return this.createUrlButtonComponent(index, urlParam,
|
|
112
|
+
return this.createUrlButtonComponent(index, urlParam, botContext);
|
|
113
113
|
}
|
|
114
114
|
if (button.type === react_1.WhatsAppTemplateButtonSubType.QUICK_REPLY) {
|
|
115
115
|
const payload = buttonNodes[index].target?.id || '';
|
|
@@ -125,8 +125,8 @@ class FlowWhatsappTemplate extends content_fields_base_1.ContentFieldsBase {
|
|
|
125
125
|
}
|
|
126
126
|
return undefined;
|
|
127
127
|
}
|
|
128
|
-
createUrlButtonComponent(index, urlParam,
|
|
129
|
-
const variableUrlParam = this.replaceVariables(urlParam,
|
|
128
|
+
createUrlButtonComponent(index, urlParam, botContext) {
|
|
129
|
+
const variableUrlParam = this.replaceVariables(urlParam, botContext);
|
|
130
130
|
return {
|
|
131
131
|
type: react_1.WhatsAppTemplateComponentType.BUTTON,
|
|
132
132
|
sub_type: react_1.WhatsAppTemplateButtonSubType.URL,
|
|
@@ -162,21 +162,25 @@ class FlowWhatsappTemplate extends content_fields_base_1.ContentFieldsBase {
|
|
|
162
162
|
parameters: [],
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
async trackFlow(
|
|
166
|
-
await (0, tracking_1.trackOneContent)(
|
|
165
|
+
async trackFlow(botContext) {
|
|
166
|
+
await (0, tracking_1.trackOneContent)(botContext, this);
|
|
167
167
|
}
|
|
168
|
-
|
|
168
|
+
async processContent(botContext) {
|
|
169
|
+
await this.trackFlow(botContext);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
toBotonic(botContext) {
|
|
169
173
|
const templateName = this.htWhatsappTemplate.name;
|
|
170
174
|
const templateLanguage = this.htWhatsappTemplate.language;
|
|
171
|
-
const body = this.getBodyComponent(this.variableValues,
|
|
172
|
-
const pluginFlowBuilder = (0,
|
|
175
|
+
const body = this.getBodyComponent(this.variableValues, botContext);
|
|
176
|
+
const pluginFlowBuilder = (0, get_flow_builder_plugin_1.getFlowBuilderPlugin)(botContext.plugins);
|
|
173
177
|
const resolvedLocale = pluginFlowBuilder.cmsApi.getResolvedLocale();
|
|
174
|
-
const header = this.getHeaderComponent(this.htWhatsappTemplate, this.headerVariables || {}, resolvedLocale,
|
|
175
|
-
const buttons = this.getButtons(this.htWhatsappTemplate, this.buttons || [], this.urlVariableValues || {},
|
|
176
|
-
if ((0, core_1.isWhatsapp)(
|
|
177
|
-
return ((0, jsx_runtime_1.jsx)(react_1.WhatsappTemplate, { name: templateName, language: templateLanguage, header: header, body: body, buttons: buttons }, id));
|
|
178
|
+
const header = this.getHeaderComponent(this.htWhatsappTemplate, this.headerVariables || {}, resolvedLocale, botContext);
|
|
179
|
+
const buttons = this.getButtons(this.htWhatsappTemplate, this.buttons || [], this.urlVariableValues || {}, botContext);
|
|
180
|
+
if ((0, core_1.isWhatsapp)(botContext.session)) {
|
|
181
|
+
return ((0, jsx_runtime_1.jsx)(react_1.WhatsappTemplate, { name: templateName, language: templateLanguage, header: header, body: body, buttons: buttons }, this.id));
|
|
178
182
|
}
|
|
179
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Text, { children: [`WhatsApp Template: ${templateName} (${templateLanguage})`, header && `${JSON.stringify(header, null, 2)}`, body && `${JSON.stringify(body, null, 2)}`, buttons && `${JSON.stringify(buttons, null, 2)}`] }, id));
|
|
183
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Text, { children: [`WhatsApp Template: ${templateName} (${templateLanguage})`, header && `${JSON.stringify(header, null, 2)}`, body && `${JSON.stringify(body, null, 2)}`, buttons && `${JSON.stringify(buttons, null, 2)}`] }, this.id));
|
|
180
184
|
}
|
|
181
185
|
}
|
|
182
186
|
exports.FlowWhatsappTemplate = FlowWhatsappTemplate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-whatsapp-template.js","sourceRoot":"","sources":["../../../src/content-fields/flow-whatsapp-template.tsx"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"flow-whatsapp-template.js","sourceRoot":"","sources":["../../../src/content-fields/flow-whatsapp-template.tsx"],"names":[],"mappings":";;;;AAAA,wCAA2D;AAC3D,0CAauB;AAEvB,0CAA6C;AAC7C,8EAAuE;AACvE,+DAAyD;AAiBzD,MAAa,oBAAqB,SAAQ,uCAAiB;IAA3D;;QAES,mBAAc,GAA2B,EAAE,CAAA;IA6RpD,CAAC;IAxRC,MAAM,CAAC,cAAc,CACnB,SAAiC,EACjC,aAAqB;QAErB,MAAM,gBAAgB,GAAG,IAAI,oBAAoB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QAC/D,gBAAgB,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAA;QACtC,gBAAgB,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,CAAA;QACpD,MAAM,eAAe,GAAG,oBAAoB,CAAC,kBAAkB,CAC7D,SAAS,EACT,aAAa,CACd,CAAA;QAED,gBAAgB,CAAC,kBAAkB,GAAG,eAAe,CAAC,QAAQ,CAAA;QAC9D,gBAAgB,CAAC,eAAe,GAAG,eAAe,CAAC,gBAAgB,CAAA;QACnE,gBAAgB,CAAC,cAAc,GAAG,eAAe,CAAC,eAAe,CAAA;QACjE,gBAAgB,CAAC,iBAAiB,GAAG,eAAe,CAAC,mBAAmB,CAAA;QAExE,gBAAgB,CAAC,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAA;QAE/C,OAAO,gBAAgB,CAAA;IACzB,CAAC;IAEO,MAAM,CAAC,kB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AAE,IAAI,EAAE,CAAC,CAAC,EAAE,KAJxC,IAAI,CAAC,EAAE,CAKX,CACR,CAAA;IACH,CAAC;CACF;AA/RD,oDA+RC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { WhatsappButtonListRowProps } from '@botonic/react';
|
|
2
2
|
import type { FlowBuilderApi } from '../../api';
|
|
3
3
|
import { ContentFieldsBase } from '../content-fields-base';
|
|
4
4
|
import type { HtWhatsappButtonListRow } from '../hubtype-fields';
|
|
@@ -7,7 +7,8 @@ export declare class FlowWhatsappButtonListRow extends ContentFieldsBase {
|
|
|
7
7
|
description: string;
|
|
8
8
|
targetId?: string;
|
|
9
9
|
static fromHubtypeCMS(component: HtWhatsappButtonListRow, locale: string, cmsApi: FlowBuilderApi): FlowWhatsappButtonListRow;
|
|
10
|
-
trackFlow(
|
|
11
|
-
|
|
10
|
+
trackFlow(): Promise<void>;
|
|
11
|
+
processContent(): Promise<void>;
|
|
12
|
+
renderRow(rowIndex: number, sectionIndex: number): WhatsappButtonListRowProps | undefined;
|
|
12
13
|
private getRowId;
|
|
13
14
|
}
|
|
@@ -16,11 +16,13 @@ class FlowWhatsappButtonListRow extends content_fields_base_1.ContentFieldsBase
|
|
|
16
16
|
newRow.targetId = cmsApi.getPayload(component.target);
|
|
17
17
|
return newRow;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
// Not apply for this content, because it is a child of the FlowWhatsappButtonList content
|
|
19
|
+
async trackFlow() {
|
|
20
|
+
return;
|
|
22
21
|
}
|
|
23
|
-
|
|
22
|
+
async processContent() {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
renderRow(rowIndex, sectionIndex) {
|
|
24
26
|
if (!this.targetId) {
|
|
25
27
|
console.error(`Row with title: '${this.title}' has no target`);
|
|
26
28
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-whatsapp-button-list-row.js","sourceRoot":"","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.tsx"],"names":[],"mappings":";;;AAGA,+CAAuD;AACvD,gEAA0D;AAG1D,MAAa,yBAA0B,SAAQ,uCAAiB;IAAhE;;QACS,UAAK,GAAG,EAAE,CAAA;QACV,gBAAW,GAAG,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"flow-whatsapp-button-list-row.js","sourceRoot":"","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.tsx"],"names":[],"mappings":";;;AAGA,+CAAuD;AACvD,gEAA0D;AAG1D,MAAa,yBAA0B,SAAQ,uCAAiB;IAAhE;;QACS,UAAK,GAAG,EAAE,CAAA;QACV,gBAAW,GAAG,EAAE,CAAA;IAgDzB,CAAC;IA7CC,MAAM,CAAC,cAAc,CACnB,SAAkC,EAClC,MAAc,EACd,MAAsB;QAEtB,MAAM,MAAM,GAAG,IAAI,yBAAyB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QAC1D,MAAM,CAAC,KAAK,GAAG,yBAAyB,CAAC,eAAe,CACtD,MAAM,EACN,SAAS,CAAC,IAAI,CACf,CAAA;QACD,MAAM,CAAC,WAAW,GAAG,yBAAyB,CAAC,eAAe,CAC5D,MAAM,EACN,SAAS,CAAC,WAAW,CACtB,CAAA;QACD,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;QAErD,OAAO,MAAM,CAAA;IACf,CAAC;IAED,KAAK,CAAC,SAAS;QACb,OAAM;IACR,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,OAAM;IACR,CAAC;IAED,SAAS,CACP,QAAgB,EAChB,YAAoB;QAEpB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,OAAO,CAAC,KAAK,CAAC,oBAAoB,IAAI,CAAC,KAAK,iBAAiB,CAAC,CAAA;YAC9D,OAAO,SAAS,CAAA;QAClB,CAAC;QACD,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;YACzC,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAA;IACH,CAAC;IAEO,QAAQ,CAAC,QAAgB,EAAE,YAAoB;QACrD,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAG,iCAAqB,GAAG,YAAY,IAAI,QAAQ,EAAE,CAAA;IAC9E,CAAC;CACF;AAlDD,8DAkDC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { WhatsappButtonListSectionProps } from '@botonic/react';
|
|
2
2
|
import type { FlowBuilderApi } from '../../api';
|
|
3
3
|
import { ContentFieldsBase } from '../content-fields-base';
|
|
4
4
|
import type { HtWhatsappButtonListSection } from '../hubtype-fields';
|
|
@@ -7,6 +7,7 @@ export declare class FlowWhatsappButtonListSection extends ContentFieldsBase {
|
|
|
7
7
|
title: string;
|
|
8
8
|
rows: FlowWhatsappButtonListRow[];
|
|
9
9
|
static fromHubtypeCMS(component: HtWhatsappButtonListSection, locale: string, cmsApi: FlowBuilderApi): FlowWhatsappButtonListSection;
|
|
10
|
-
trackFlow(
|
|
11
|
-
|
|
10
|
+
trackFlow(): Promise<void>;
|
|
11
|
+
processContent(): Promise<void>;
|
|
12
|
+
renderSection(sectionIndex: number): WhatsappButtonListSectionProps;
|
|
12
13
|
}
|
|
@@ -15,13 +15,15 @@ class FlowWhatsappButtonListSection extends content_fields_base_1.ContentFieldsB
|
|
|
15
15
|
newButton.rows = component.rows.map(row => flow_whatsapp_button_list_row_1.FlowWhatsappButtonListRow.fromHubtypeCMS(row, locale, cmsApi));
|
|
16
16
|
return newButton;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// Not apply for this content, because it is a child of the FlowWhatsappButtonList content
|
|
18
|
+
async trackFlow() {
|
|
19
|
+
return;
|
|
21
20
|
}
|
|
22
|
-
|
|
21
|
+
async processContent() {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
renderSection(sectionIndex) {
|
|
23
25
|
const rows = this.rows.reduce((acc, row, rowIndex) => {
|
|
24
|
-
const botonicRow = row.
|
|
26
|
+
const botonicRow = row.renderRow(rowIndex, sectionIndex);
|
|
25
27
|
if (botonicRow) {
|
|
26
28
|
acc.push(botonicRow);
|
|
27
29
|
}
|
package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-whatsapp-button-list-section.js","sourceRoot":"","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.tsx"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"flow-whatsapp-button-list-section.js","sourceRoot":"","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.tsx"],"names":[],"mappings":";;;AAMA,gEAA0D;AAE1D,mFAA2E;AAE3E,MAAa,6BAA8B,SAAQ,uCAAiB;IAApE;;QACS,UAAK,GAAG,EAAE,CAAA;QACV,SAAI,GAAgC,EAAE,CAAA;IAwC/C,CAAC;IAtCC,MAAM,CAAC,cAAc,CACnB,SAAsC,EACtC,MAAc,EACd,MAAsB;QAEtB,MAAM,SAAS,GAAG,IAAI,6BAA6B,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QACjE,SAAS,CAAC,KAAK,GAAG,6BAA6B,CAAC,eAAe,CAC7D,MAAM,EACN,SAAS,CAAC,KAAK,CAChB,CAAA;QACD,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CACxC,yDAAyB,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,CAC9D,CAAA;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,KAAK,CAAC,SAAS;QACb,OAAM;IACR,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,OAAM;IACR,CAAC;IAED,aAAa,CAAC,YAAoB;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAC3B,CAAC,GAAiC,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;YACnD,MAAM,UAAU,GAAG,GAAG,CAAC,SAAS,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;YACxD,IAAI,UAAU,EAAE,CAAC;gBACf,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;YACtB,CAAC;YACD,OAAO,GAAG,CAAA;QACZ,CAAC,EACD,EAAE,CACH,CAAA;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,CAAA;IACpC,CAAC;CACF;AA1CD,sEA0CC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type BotContext } from '@botonic/core';
|
|
2
2
|
import type { FlowBuilderApi } from '../../api';
|
|
3
3
|
import { ContentFieldsBase } from '../content-fields-base';
|
|
4
4
|
import type { HtWhatsappButtonListNode } from '../hubtype-fields';
|
|
@@ -8,6 +8,7 @@ export declare class FlowWhatsappButtonList extends ContentFieldsBase {
|
|
|
8
8
|
listButtonText: string;
|
|
9
9
|
sections: FlowWhatsappButtonListSection[];
|
|
10
10
|
static fromHubtypeCMS(component: HtWhatsappButtonListNode, locale: string, cmsApi: FlowBuilderApi): FlowWhatsappButtonList;
|
|
11
|
-
trackFlow(
|
|
12
|
-
|
|
11
|
+
trackFlow(botContext: BotContext): Promise<void>;
|
|
12
|
+
processContent(botContext: BotContext): Promise<void>;
|
|
13
|
+
toBotonic(botContext: BotContext): JSX.Element;
|
|
13
14
|
}
|
|
@@ -24,17 +24,21 @@ class FlowWhatsappButtonList extends content_fields_base_1.ContentFieldsBase {
|
|
|
24
24
|
newWhatsappButtonList.followUp = component.follow_up;
|
|
25
25
|
return newWhatsappButtonList;
|
|
26
26
|
}
|
|
27
|
-
async trackFlow(
|
|
28
|
-
await (0, tracking_1.trackOneContent)(
|
|
27
|
+
async trackFlow(botContext) {
|
|
28
|
+
await (0, tracking_1.trackOneContent)(botContext, this);
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
async processContent(botContext) {
|
|
31
|
+
await this.trackFlow(botContext);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
toBotonic(botContext) {
|
|
35
|
+
const replacedText = this.replaceVariables(this.text, botContext);
|
|
36
|
+
if (!(0, core_1.isWhatsapp)(botContext.session)) {
|
|
33
37
|
const rows = this.sections.flatMap(section => section.rows);
|
|
34
38
|
const buttons = rows.map(row => ((0, jsx_runtime_1.jsx)(react_1.Button, { payload: row.targetId, children: row.title }, row.id)));
|
|
35
39
|
return ((0, jsx_runtime_1.jsxs)(react_1.Text, { children: [replacedText, buttons] }));
|
|
36
40
|
}
|
|
37
|
-
return ((0, jsx_runtime_1.jsx)(react_1.WhatsappButtonList, { body: replacedText, button: this.listButtonText, sections: this.sections.map((section, sectionIndex) => section.
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(react_1.WhatsappButtonList, { body: replacedText, button: this.listButtonText, sections: this.sections.map((section, sectionIndex) => section.renderSection(sectionIndex)) }, this.id));
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
exports.FlowWhatsappButtonList = FlowWhatsappButtonList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-whatsapp-button-list.js","sourceRoot":"","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list.tsx"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"flow-whatsapp-button-list.js","sourceRoot":"","sources":["../../../../src/content-fields/whatsapp-button-list/flow-whatsapp-button-list.tsx"],"names":[],"mappings":";;;;AAAA,wCAA2D;AAC3D,0CAAiE;AAGjE,6CAAgD;AAChD,gEAA0D;AAE1D,2FAAmF;AAEnF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AAC,OAAO,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YAC3D,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAC9B,uBAAC,cAAM,IAAc,OAAO,EAAE,GAAG,CAAC,QAAQ,YACvC,GAAG,CAAC,KAAK,IADC,GAAG,CAAC,EAAE,CAEV,CACV,CAAC,CAAA;YAEF,OAAO,CACL,wBAAC,YAAI,eACF,YAAY,EACZ,OAAO,IACH,CACR,CAAA;QACH,CAAC;QAED,OAAO,CACL,uBAAC,0BAAkB,IAEjB,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,IAAI,CAAC,cAAc,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,CACpD,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CACpC,IALI,IAAI,CAAC,EAAE,CAMZ,CACH,CAAA;IACH,CAAC;CACF;AApED,wDAoEC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FlowWhatsappButtonListSection = exports.FlowWhatsappButtonListRow = exports.FlowWhatsappButtonList = void 0;
|
|
4
|
+
var flow_whatsapp_button_list_1 = require("./flow-whatsapp-button-list");
|
|
5
|
+
Object.defineProperty(exports, "FlowWhatsappButtonList", { enumerable: true, get: function () { return flow_whatsapp_button_list_1.FlowWhatsappButtonList; } });
|
|
6
|
+
var flow_whatsapp_button_list_row_1 = require("./flow-whatsapp-button-list-row");
|
|
7
|
+
Object.defineProperty(exports, "FlowWhatsappButtonListRow", { enumerable: true, get: function () { return flow_whatsapp_button_list_row_1.FlowWhatsappButtonListRow; } });
|
|
8
|
+
var flow_whatsapp_button_list_section_1 = require("./flow-whatsapp-button-list-section");
|
|
9
|
+
Object.defineProperty(exports, "FlowWhatsappButtonListSection", { enumerable: true, get: function () { return flow_whatsapp_button_list_section_1.FlowWhatsappButtonListSection; } });
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/content-fields/whatsapp-button-list/index.ts"],"names":[],"mappings":";;;AAAA,yEAAoE;AAA3D,mIAAA,sBAAsB,OAAA;AAC/B,iFAA2E;AAAlE,0IAAA,yBAAyB,OAAA;AAClC,yFAAmF;AAA1E,kJAAA,6BAA6B,OAAA"}
|
|
@@ -9,4 +9,5 @@ export declare class ContentFilterExecutor {
|
|
|
9
9
|
constructor(options: ContentFilterExecutorOptions);
|
|
10
10
|
filter(request: BotContext, content: FlowContent): Promise<FlowContent>;
|
|
11
11
|
}
|
|
12
|
+
export declare function filterContents(request: BotContext, contents: FlowContent[]): Promise<FlowContent[]>;
|
|
12
13
|
export {};
|
package/lib/cjs/filters/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ContentFilterExecutor = void 0;
|
|
4
|
+
exports.filterContents = filterContents;
|
|
5
|
+
const get_flow_builder_plugin_1 = require("../utils/get-flow-builder-plugin");
|
|
4
6
|
class ContentFilterExecutor {
|
|
5
7
|
constructor(options) {
|
|
6
8
|
this.filters = [];
|
|
@@ -14,4 +16,17 @@ class ContentFilterExecutor {
|
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
18
|
exports.ContentFilterExecutor = ContentFilterExecutor;
|
|
19
|
+
async function filterContents(request, contents) {
|
|
20
|
+
const flowBuilderPlugin = (0, get_flow_builder_plugin_1.getFlowBuilderPlugin)(request.plugins);
|
|
21
|
+
const contentFilters = flowBuilderPlugin.contentFilters;
|
|
22
|
+
const contentFilterExecutor = new ContentFilterExecutor({
|
|
23
|
+
filters: contentFilters,
|
|
24
|
+
});
|
|
25
|
+
const filteredContents = [];
|
|
26
|
+
for (const content of contents) {
|
|
27
|
+
const filteredContent = await contentFilterExecutor.filter(request, content);
|
|
28
|
+
filteredContents.push(filteredContent);
|
|
29
|
+
}
|
|
30
|
+
return filteredContents;
|
|
31
|
+
}
|
|
17
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/filters/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/filters/index.ts"],"names":[],"mappings":";;;AA6BA,wCAiBC;AA1CD,8EAAuE;AAMvE,MAAa,qBAAqB;IAGhC,YAAY,OAAqC;QAFzC,YAAO,GAAoB,EAAE,CAAA;QAGnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;IAChC,CAAC;IAED,KAAK,CAAC,MAAM,CACV,OAAmB,EACnB,OAAoB;QAEpB,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAClC,OAAO,GAAG,MAAM,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAC1C,CAAC;QAED,OAAO,OAAO,CAAA;IAChB,CAAC;CACF;AAjBD,sDAiBC;AAEM,KAAK,UAAU,cAAc,CAClC,OAAmB,EACnB,QAAuB;IAEvB,MAAM,iBAAiB,GAAG,IAAA,8CAAoB,EAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IAC/D,MAAM,cAAc,GAAG,iBAAiB,CAAC,cAAc,CAAA;IACvD,MAAM,qBAAqB,GAAG,IAAI,qBAAqB,CAAC;QACtD,OAAO,EAAE,cAAc;KACxB,CAAC,CAAA;IAEF,MAAM,gBAAgB,GAAkB,EAAE,CAAA;IAC1C,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,eAAe,GAAG,MAAM,qBAAqB,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAC5E,gBAAgB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;IACxC,CAAC;IAED,OAAO,gBAAgB,CAAA;AACzB,CAAC"}
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Plugin, type PluginPreRequest, type ResolvedPlugins, type Session } from '@botonic/core';
|
|
2
2
|
import { FlowBuilderApi } from './api';
|
|
3
|
-
import {
|
|
3
|
+
import type { FlowContent } from './content-fields';
|
|
4
4
|
import { type HtNodeWithContent } from './content-fields/hubtype-fields';
|
|
5
5
|
import { type AiAgentFunction, type BotonicPluginFlowBuilderOptions, type ContentFilter, FlowBuilderJSONVersion, type InShadowingConfig, type KnowledgeBaseFunction, type PayloadParamsBase, type RatingSubmittedInfo, type TrackEventFunction } from './types';
|
|
6
6
|
import type { SmartIntentsInferenceConfig } from './user-input/smart-intent';
|