@botonic/plugin-flow-builder 0.22.0-beta.3 → 0.22.1
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.d.ts +16 -2
- package/lib/cjs/action.js +21 -19
- package/lib/cjs/action.js.map +1 -1
- package/lib/cjs/api.d.ts +19 -0
- package/lib/cjs/api.js +108 -0
- package/lib/cjs/api.js.map +1 -0
- package/lib/cjs/content-fields/content-fields-base.d.ts +4 -4
- package/lib/cjs/content-fields/content-fields-base.js.map +1 -1
- package/lib/cjs/content-fields/flow-button.d.ts +6 -3
- package/lib/cjs/content-fields/flow-button.js +28 -21
- package/lib/cjs/content-fields/flow-button.js.map +1 -1
- package/lib/cjs/content-fields/flow-carousel.d.ts +3 -2
- package/lib/cjs/content-fields/flow-carousel.js +3 -10
- package/lib/cjs/content-fields/flow-carousel.js.map +1 -1
- package/lib/cjs/content-fields/flow-element.d.ts +6 -3
- package/lib/cjs/content-fields/flow-element.js +16 -5
- package/lib/cjs/content-fields/flow-element.js.map +1 -1
- package/lib/cjs/content-fields/flow-image.d.ts +2 -2
- package/lib/cjs/content-fields/flow-image.js.map +1 -1
- package/lib/cjs/content-fields/flow-text.d.ts +4 -3
- package/lib/cjs/content-fields/flow-text.js +9 -9
- package/lib/cjs/content-fields/flow-text.js.map +1 -1
- package/lib/cjs/content-fields/flow-video.d.ts +2 -2
- package/lib/cjs/content-fields/flow-video.js +0 -1
- package/lib/cjs/content-fields/flow-video.js.map +1 -1
- package/lib/cjs/content-fields/hubtype-fields/button.d.ts +9 -0
- package/lib/cjs/content-fields/hubtype-fields/button.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/button.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/carousel.d.ts +16 -0
- package/lib/cjs/content-fields/hubtype-fields/carousel.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/carousel.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/common.d.ts +55 -0
- package/lib/cjs/content-fields/hubtype-fields/common.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/common.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/fallback.d.ts +9 -0
- package/lib/cjs/content-fields/hubtype-fields/fallback.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/fallback.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/function.d.ts +28 -0
- package/lib/cjs/content-fields/hubtype-fields/function.js +10 -0
- package/lib/cjs/content-fields/hubtype-fields/function.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/handoff.d.ts +10 -0
- package/lib/cjs/content-fields/hubtype-fields/handoff.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/handoff.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/image.d.ts +8 -0
- package/lib/cjs/content-fields/{types.js → hubtype-fields/image.js} +1 -1
- package/lib/cjs/content-fields/hubtype-fields/image.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/index.d.ts +17 -0
- package/lib/cjs/content-fields/hubtype-fields/index.js +21 -0
- package/lib/cjs/content-fields/hubtype-fields/index.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/intent.d.ts +10 -0
- package/lib/cjs/content-fields/hubtype-fields/intent.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/intent.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/keyword.d.ts +9 -0
- package/lib/cjs/content-fields/hubtype-fields/keyword.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/keyword.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/node-types.d.ts +23 -0
- package/lib/cjs/content-fields/hubtype-fields/node-types.js +31 -0
- package/lib/cjs/content-fields/hubtype-fields/node-types.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/nodes.d.ts +16 -0
- package/lib/cjs/content-fields/hubtype-fields/nodes.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/nodes.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/payload.d.ts +8 -0
- package/lib/cjs/content-fields/hubtype-fields/payload.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/payload.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/start.d.ts +7 -0
- package/lib/cjs/content-fields/hubtype-fields/start.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/start.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/text.d.ts +11 -0
- package/lib/cjs/content-fields/hubtype-fields/text.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/text.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/url.d.ts +8 -0
- package/lib/cjs/content-fields/hubtype-fields/url.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/url.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/video.d.ts +8 -0
- package/lib/cjs/content-fields/hubtype-fields/video.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/video.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/whatsapp-button-list.d.ts +21 -0
- package/lib/cjs/content-fields/hubtype-fields/whatsapp-button-list.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/whatsapp-button-list.js.map +1 -0
- package/lib/cjs/content-fields/index.d.ts +7 -5
- package/lib/cjs/content-fields/index.js +11 -9
- package/lib/cjs/content-fields/index.js.map +1 -1
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.d.ts +10 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js +32 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js.map +1 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.d.ts +10 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js +29 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map +1 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.d.ts +12 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js +33 -0
- package/lib/cjs/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js.map +1 -0
- package/lib/cjs/functions/conditional-provider.d.ts +2 -2
- package/lib/cjs/functions/conditional-provider.js +2 -2
- package/lib/cjs/functions/conditional-provider.js.map +1 -1
- package/lib/cjs/functions/conditional-queue-status.d.ts +7 -2
- package/lib/cjs/functions/conditional-queue-status.js +11 -1
- package/lib/cjs/functions/conditional-queue-status.js.map +1 -1
- package/lib/cjs/handoff.d.ts +2 -2
- package/lib/cjs/handoff.js +17 -9
- package/lib/cjs/handoff.js.map +1 -1
- package/lib/cjs/helpers.d.ts +2 -1
- package/lib/cjs/helpers.js +5 -13
- package/lib/cjs/helpers.js.map +1 -1
- package/lib/cjs/index.d.ts +10 -21
- package/lib/cjs/index.js +36 -151
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/types.d.ts +8 -2
- package/lib/cjs/types.js.map +1 -1
- package/lib/esm/action.d.ts +16 -2
- package/lib/esm/action.js +21 -19
- package/lib/esm/action.js.map +1 -1
- package/lib/esm/api.d.ts +19 -0
- package/lib/esm/api.js +103 -0
- package/lib/esm/api.js.map +1 -0
- package/lib/esm/content-fields/content-fields-base.d.ts +4 -4
- package/lib/esm/content-fields/content-fields-base.js.map +1 -1
- package/lib/esm/content-fields/flow-button.d.ts +6 -3
- package/lib/esm/content-fields/flow-button.js +28 -21
- package/lib/esm/content-fields/flow-button.js.map +1 -1
- package/lib/esm/content-fields/flow-carousel.d.ts +3 -2
- package/lib/esm/content-fields/flow-carousel.js +4 -11
- package/lib/esm/content-fields/flow-carousel.js.map +1 -1
- package/lib/esm/content-fields/flow-element.d.ts +6 -3
- package/lib/esm/content-fields/flow-element.js +15 -5
- package/lib/esm/content-fields/flow-element.js.map +1 -1
- package/lib/esm/content-fields/flow-image.d.ts +2 -2
- package/lib/esm/content-fields/flow-image.js.map +1 -1
- package/lib/esm/content-fields/flow-text.d.ts +4 -3
- package/lib/esm/content-fields/flow-text.js +9 -9
- package/lib/esm/content-fields/flow-text.js.map +1 -1
- package/lib/esm/content-fields/flow-video.d.ts +2 -2
- package/lib/esm/content-fields/flow-video.js +0 -1
- package/lib/esm/content-fields/flow-video.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/button.d.ts +9 -0
- package/lib/esm/content-fields/hubtype-fields/button.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/button.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/carousel.d.ts +16 -0
- package/lib/esm/content-fields/hubtype-fields/carousel.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/carousel.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/common.d.ts +55 -0
- package/lib/esm/content-fields/hubtype-fields/common.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/common.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/fallback.d.ts +9 -0
- package/lib/esm/content-fields/hubtype-fields/fallback.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/fallback.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/function.d.ts +28 -0
- package/lib/esm/content-fields/hubtype-fields/function.js +7 -0
- package/lib/esm/content-fields/hubtype-fields/function.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/handoff.d.ts +10 -0
- package/lib/esm/content-fields/hubtype-fields/handoff.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/handoff.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/image.d.ts +8 -0
- package/lib/esm/content-fields/hubtype-fields/image.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/image.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/index.d.ts +17 -0
- package/lib/esm/content-fields/hubtype-fields/index.js +18 -0
- package/lib/esm/content-fields/hubtype-fields/index.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/intent.d.ts +10 -0
- package/lib/esm/content-fields/hubtype-fields/intent.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/intent.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/keyword.d.ts +9 -0
- package/lib/esm/content-fields/hubtype-fields/keyword.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/keyword.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/node-types.d.ts +23 -0
- package/lib/esm/content-fields/hubtype-fields/node-types.js +28 -0
- package/lib/esm/content-fields/hubtype-fields/node-types.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/nodes.d.ts +16 -0
- package/lib/esm/content-fields/hubtype-fields/nodes.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/nodes.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/payload.d.ts +8 -0
- package/lib/esm/content-fields/hubtype-fields/payload.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/payload.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/start.d.ts +7 -0
- package/lib/esm/content-fields/hubtype-fields/start.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/start.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/text.d.ts +11 -0
- package/lib/esm/content-fields/hubtype-fields/text.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/text.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/url.d.ts +8 -0
- package/lib/esm/content-fields/hubtype-fields/url.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/url.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/video.d.ts +8 -0
- package/lib/esm/content-fields/hubtype-fields/video.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/video.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/whatsapp-button-list.d.ts +21 -0
- package/lib/esm/content-fields/hubtype-fields/whatsapp-button-list.js +2 -0
- package/lib/esm/content-fields/hubtype-fields/whatsapp-button-list.js.map +1 -0
- package/lib/esm/content-fields/index.d.ts +7 -5
- package/lib/esm/content-fields/index.js +6 -4
- package/lib/esm/content-fields/index.js.map +1 -1
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.d.ts +10 -0
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js +28 -0
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.js.map +1 -0
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.d.ts +10 -0
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js +25 -0
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.js.map +1 -0
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.d.ts +12 -0
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js +28 -0
- package/lib/esm/content-fields/whatsapp-button-list/flow-whatsapp-button-list.js.map +1 -0
- package/lib/esm/functions/conditional-provider.d.ts +2 -2
- package/lib/esm/functions/conditional-provider.js +2 -2
- package/lib/esm/functions/conditional-provider.js.map +1 -1
- package/lib/esm/functions/conditional-queue-status.d.ts +7 -2
- package/lib/esm/functions/conditional-queue-status.js +11 -1
- package/lib/esm/functions/conditional-queue-status.js.map +1 -1
- package/lib/esm/handoff.d.ts +2 -2
- package/lib/esm/handoff.js +17 -9
- package/lib/esm/handoff.js.map +1 -1
- package/lib/esm/helpers.d.ts +2 -1
- package/lib/esm/helpers.js +3 -11
- package/lib/esm/helpers.js.map +1 -1
- package/lib/esm/index.d.ts +10 -21
- package/lib/esm/index.js +38 -153
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/types.d.ts +8 -2
- package/lib/esm/types.js.map +1 -1
- package/package.json +4 -5
- package/src/action.tsx +31 -22
- package/src/api.ts +162 -0
- package/src/content-fields/content-fields-base.ts +7 -7
- package/src/content-fields/flow-button.tsx +40 -19
- package/src/content-fields/flow-carousel.tsx +10 -18
- package/src/content-fields/flow-element.tsx +26 -9
- package/src/content-fields/flow-image.tsx +2 -2
- package/src/content-fields/flow-text.tsx +15 -12
- package/src/content-fields/flow-video.tsx +2 -3
- package/src/content-fields/hubtype-fields/button.ts +15 -0
- package/src/content-fields/hubtype-fields/carousel.ts +18 -0
- package/src/content-fields/hubtype-fields/common.ts +65 -0
- package/src/content-fields/hubtype-fields/fallback.ts +10 -0
- package/src/content-fields/hubtype-fields/function.ts +33 -0
- package/src/content-fields/hubtype-fields/handoff.ts +11 -0
- package/src/content-fields/hubtype-fields/image.ts +9 -0
- package/src/content-fields/hubtype-fields/index.ts +17 -0
- package/src/content-fields/hubtype-fields/intent.ts +11 -0
- package/src/content-fields/hubtype-fields/keyword.ts +10 -0
- package/src/content-fields/hubtype-fields/node-types.ts +26 -0
- package/src/content-fields/hubtype-fields/nodes.ts +32 -0
- package/src/content-fields/hubtype-fields/payload.ts +9 -0
- package/src/content-fields/hubtype-fields/start.ts +8 -0
- package/src/content-fields/hubtype-fields/text.ts +12 -0
- package/src/content-fields/hubtype-fields/url.ts +9 -0
- package/src/content-fields/hubtype-fields/video.ts +9 -0
- package/src/content-fields/hubtype-fields/whatsapp-button-list.ts +25 -0
- package/src/content-fields/index.ts +14 -5
- package/src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-row.tsx +33 -0
- package/src/content-fields/whatsapp-button-list/flow-whatsapp-button-list-section.tsx +35 -0
- package/src/content-fields/whatsapp-button-list/flow-whatsapp-button-list.tsx +46 -0
- package/src/functions/conditional-provider.ts +2 -2
- package/src/functions/conditional-queue-status.ts +22 -3
- package/src/handoff.ts +27 -14
- package/src/helpers.ts +8 -19
- package/src/index.ts +55 -197
- package/src/types.ts +14 -2
- package/lib/cjs/content-fields/types.d.ts +0 -5
- package/lib/cjs/content-fields/types.js.map +0 -1
- package/lib/cjs/flow-builder-models.d.ts +0 -196
- package/lib/cjs/flow-builder-models.js +0 -24
- package/lib/cjs/flow-builder-models.js.map +0 -1
- package/lib/esm/content-fields/types.d.ts +0 -5
- package/lib/esm/content-fields/types.js +0 -2
- package/lib/esm/content-fields/types.js.map +0 -1
- package/lib/esm/flow-builder-models.d.ts +0 -196
- package/lib/esm/flow-builder-models.js +0 -21
- package/lib/esm/flow-builder-models.js.map +0 -1
- package/src/.DS_Store +0 -0
- package/src/content-fields/types.ts +0 -6
- package/src/flow-builder-models.ts +0 -249
package/src/index.ts
CHANGED
|
@@ -1,254 +1,112 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Input,
|
|
3
2
|
Plugin,
|
|
4
3
|
PluginPostRequest,
|
|
5
4
|
PluginPreRequest,
|
|
6
5
|
Session,
|
|
7
6
|
} from '@botonic/core'
|
|
8
|
-
import
|
|
7
|
+
import { ActionRequest } from '@botonic/react'
|
|
9
8
|
|
|
9
|
+
import { FlowBuilderApi } from './api'
|
|
10
10
|
import {
|
|
11
11
|
FlowCarousel,
|
|
12
12
|
FlowContent,
|
|
13
13
|
FlowImage,
|
|
14
14
|
FlowText,
|
|
15
15
|
FlowVideo,
|
|
16
|
+
FlowWhatsappButtonList,
|
|
16
17
|
} from './content-fields'
|
|
17
18
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
NodeComponent,
|
|
25
|
-
NodeType,
|
|
26
|
-
StartNode,
|
|
27
|
-
} from './flow-builder-models'
|
|
19
|
+
HtFunctionNode,
|
|
20
|
+
HtHandoffNode,
|
|
21
|
+
HtNodeComponent,
|
|
22
|
+
HtNodeWithContent,
|
|
23
|
+
HtNodeWithContentType,
|
|
24
|
+
} from './content-fields/hubtype-fields'
|
|
28
25
|
import { DEFAULT_FUNCTIONS } from './functions'
|
|
29
|
-
import {
|
|
26
|
+
import { isHandoffNode } from './helpers'
|
|
30
27
|
import { BotonicPluginFlowBuilderOptions } from './types'
|
|
31
28
|
import { resolveGetAccessToken } from './utils'
|
|
32
29
|
|
|
33
30
|
export default class BotonicPluginFlowBuilder implements Plugin {
|
|
34
|
-
|
|
35
|
-
private flow: Promise<FlowBuilderData> | FlowBuilderData
|
|
31
|
+
public cmsApi: FlowBuilderApi
|
|
36
32
|
private functions: Record<any, any>
|
|
37
33
|
private currentRequest: PluginPreRequest
|
|
38
34
|
private getAccessToken: (session: Session) => string
|
|
39
35
|
public getLocale: (session: Session) => string
|
|
36
|
+
public trackEvent?: (
|
|
37
|
+
request: ActionRequest,
|
|
38
|
+
eventName: string,
|
|
39
|
+
args?: Record<string, any>
|
|
40
|
+
) => Promise<void>
|
|
40
41
|
|
|
41
42
|
constructor(readonly options: BotonicPluginFlowBuilderOptions) {
|
|
43
|
+
this.cmsApi = new FlowBuilderApi({
|
|
44
|
+
url: options.flowUrl,
|
|
45
|
+
flow: options.flow,
|
|
46
|
+
})
|
|
42
47
|
this.getLocale = options.getLocale
|
|
43
48
|
this.getAccessToken = resolveGetAccessToken(options)
|
|
44
|
-
this.
|
|
45
|
-
if (options.flow) this.flow = options.flow
|
|
49
|
+
this.trackEvent = options.trackEvent
|
|
46
50
|
const customFunctions = options.customFunctions || {}
|
|
47
51
|
this.functions = { ...DEFAULT_FUNCTIONS, ...customFunctions }
|
|
48
52
|
}
|
|
49
53
|
|
|
50
|
-
async readFlowContent(session: Session): Promise<FlowBuilderData> {
|
|
51
|
-
const { data } = await axios.get(this.flowUrl, {
|
|
52
|
-
headers: { Authorization: `Bearer ${this.getAccessToken(session)}` },
|
|
53
|
-
})
|
|
54
|
-
return data
|
|
55
|
-
}
|
|
56
|
-
|
|
57
54
|
async pre(request: PluginPreRequest): Promise<void> {
|
|
58
55
|
this.currentRequest = request
|
|
59
|
-
|
|
56
|
+
await this.cmsApi.init(this.getAccessToken(request.session))
|
|
60
57
|
}
|
|
61
58
|
|
|
62
59
|
async post(_request: PluginPostRequest): Promise<void> {}
|
|
63
60
|
|
|
64
|
-
async getContent(
|
|
65
|
-
|
|
66
|
-
const content = flow.nodes.find(node => node.id === id)
|
|
67
|
-
if (!content) throw Error(`Node with id: '${id}' not found`)
|
|
68
|
-
return content
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
async getContentByCode(code: string): Promise<NodeComponent> {
|
|
72
|
-
const flow = await this.flow
|
|
73
|
-
const content = flow.nodes.find(node => {
|
|
74
|
-
if ('code' in node) return node.code === code
|
|
75
|
-
return undefined
|
|
76
|
-
})
|
|
77
|
-
if (!content) throw Error(`Node with code: '${code}' not found`)
|
|
78
|
-
return content
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
async getHandoffContent(
|
|
82
|
-
handoffTargetId: string | undefined
|
|
83
|
-
): Promise<HandoffNode | undefined> {
|
|
84
|
-
if (!handoffTargetId) return undefined
|
|
85
|
-
return (await this.getContent(handoffTargetId)) as HandoffNode
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
getFlowContent(
|
|
89
|
-
hubtypeContent: NodeComponent,
|
|
90
|
-
locale: string
|
|
91
|
-
): FlowContent | undefined {
|
|
92
|
-
switch (hubtypeContent.type) {
|
|
93
|
-
case NodeType.TEXT:
|
|
94
|
-
return FlowText.fromHubtypeCMS(hubtypeContent, locale)
|
|
95
|
-
case NodeType.IMAGE:
|
|
96
|
-
return FlowImage.fromHubtypeCMS(hubtypeContent, locale)
|
|
97
|
-
case NodeType.CAROUSEL:
|
|
98
|
-
return FlowCarousel.fromHubtypeCMS(hubtypeContent, locale)
|
|
99
|
-
case NodeType.VIDEO:
|
|
100
|
-
return FlowVideo.fromHubtypeCMS(hubtypeContent, locale)
|
|
101
|
-
default:
|
|
102
|
-
return undefined
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
async getStartId(): Promise<string> {
|
|
107
|
-
const flow = await this.flow
|
|
108
|
-
const startNode = flow.nodes.find(
|
|
109
|
-
node => node.type === NodeType.START_UP
|
|
110
|
-
) as StartNode | undefined
|
|
111
|
-
if (!startNode) throw new Error('start-up id must be defined')
|
|
112
|
-
return startNode.target.id
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
async getFallbackId(alternate: boolean): Promise<string> {
|
|
116
|
-
const flow = await this.flow
|
|
117
|
-
const fallbackNode = flow.nodes.find(
|
|
118
|
-
node => node.type === NodeType.FALLBACK
|
|
119
|
-
) as FallbackNode | undefined
|
|
120
|
-
if (!fallbackNode) throw new Error('fallback node must be defined')
|
|
121
|
-
const fallbackFirstMessage = fallbackNode.content.first_message
|
|
122
|
-
const fallbackSecondMessage = fallbackNode.content.second_message
|
|
123
|
-
if (!fallbackSecondMessage) return fallbackFirstMessage.id
|
|
124
|
-
return alternate ? fallbackFirstMessage.id : fallbackSecondMessage.id
|
|
125
|
-
}
|
|
126
|
-
async getContents(
|
|
127
|
-
id: string,
|
|
61
|
+
async getContent(
|
|
62
|
+
nodeOrId: HtNodeWithContent | string,
|
|
128
63
|
locale: string,
|
|
129
64
|
prevContents?: FlowContent[]
|
|
130
|
-
): Promise<{ contents: FlowContent[]; handoffNode
|
|
65
|
+
): Promise<{ contents: FlowContent[]; handoffNode?: HtHandoffNode }> {
|
|
131
66
|
const contents = prevContents || []
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
await updateButtonUrls(hubtypeContent, 'buttons', this.getContent)
|
|
137
|
-
const content = this.getFlowContent(hubtypeContent, locale)
|
|
67
|
+
let node = nodeOrId as HtNodeWithContent
|
|
68
|
+
if (typeof nodeOrId === 'string') {
|
|
69
|
+
node = this.cmsApi.getNode(nodeOrId) as HtNodeWithContent
|
|
70
|
+
}
|
|
138
71
|
|
|
139
|
-
this.
|
|
72
|
+
const content = await this.getFlowContent(node, locale)
|
|
140
73
|
|
|
141
|
-
if (
|
|
142
|
-
const targetId = await this.callFunction(
|
|
143
|
-
return this.
|
|
74
|
+
if (node.type === HtNodeWithContentType.FUNCTION) {
|
|
75
|
+
const targetId = await this.callFunction(node, locale)
|
|
76
|
+
return this.getContent(targetId, locale, contents)
|
|
144
77
|
} else {
|
|
145
78
|
if (content) contents.push(content)
|
|
146
79
|
// TODO: prevent infinite recursive calls
|
|
147
80
|
|
|
148
|
-
if (
|
|
149
|
-
return this.
|
|
81
|
+
if (node.follow_up)
|
|
82
|
+
return this.getContent(node.follow_up.id, locale, contents)
|
|
150
83
|
}
|
|
151
|
-
// execute function
|
|
152
|
-
// return this.getContents(function result_mapping target, locale, contents)
|
|
153
|
-
return { contents, handoffNode: isHandoff && hubtypeContent }
|
|
154
|
-
}
|
|
155
84
|
|
|
156
|
-
|
|
157
|
-
if (content && 'buttons' in content) {
|
|
158
|
-
for (const button of content.buttons) {
|
|
159
|
-
if (button.payload) {
|
|
160
|
-
const contentButton = await this.getContent(button.payload)
|
|
161
|
-
if (contentButton?.type === NodeType.PAYLOAD) {
|
|
162
|
-
button.payload = contentButton.content.payload
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
85
|
+
return { contents, handoffNode: isHandoffNode(node) ? node : undefined }
|
|
167
86
|
}
|
|
168
87
|
|
|
169
|
-
|
|
170
|
-
|
|
88
|
+
private getFlowContent(
|
|
89
|
+
hubtypeContent: HtNodeComponent,
|
|
171
90
|
locale: string
|
|
172
|
-
):
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
this.hasMetConfidenceThreshold(node, inputConfidence)
|
|
187
|
-
)
|
|
188
|
-
return matchedIntentNode?.target?.id
|
|
189
|
-
}
|
|
190
|
-
} catch (error) {
|
|
191
|
-
console.error('Error getting payload by input: ', error)
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
return undefined
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
hasIntent(node: IntentNode, intent: string, locale: string): boolean {
|
|
198
|
-
return node.content.intents.some(
|
|
199
|
-
i => i.locale === locale && i.values.includes(intent)
|
|
200
|
-
)
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
hasMetConfidenceThreshold(
|
|
204
|
-
node: IntentNode,
|
|
205
|
-
predictedConfidence: number
|
|
206
|
-
): boolean {
|
|
207
|
-
const nodeConfidence = node.content.confidence / 100
|
|
208
|
-
return predictedConfidence >= nodeConfidence
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
async getPayloadByKeyword(
|
|
212
|
-
input: Input,
|
|
213
|
-
locale: string
|
|
214
|
-
): Promise<string | undefined> {
|
|
215
|
-
try {
|
|
216
|
-
const flow = await this.flow
|
|
217
|
-
const keywordNodes = flow.nodes.filter(
|
|
218
|
-
node => node.type == NodeType.KEYWORD
|
|
219
|
-
) as KeywordNode[]
|
|
220
|
-
const matchedKeywordNodes = keywordNodes.filter(node =>
|
|
221
|
-
//@ts-ignore
|
|
222
|
-
this.matchKeywords(node, input.data, locale)
|
|
223
|
-
)
|
|
224
|
-
if (matchedKeywordNodes.length > 0) {
|
|
225
|
-
return matchedKeywordNodes[0].target?.id
|
|
226
|
-
}
|
|
227
|
-
} catch (error) {
|
|
228
|
-
console.error('Error getting payload by input: ', error)
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
return undefined
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
matchKeywords(node: KeywordNode, input: string, locale: string): boolean {
|
|
235
|
-
const result = node.content.keywords.find(
|
|
236
|
-
i => i.locale === locale && this.containsAnyKeywords(input, i.values)
|
|
237
|
-
)
|
|
238
|
-
return Boolean(result)
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
containsAnyKeywords(input: string, keywords: string[]): boolean {
|
|
242
|
-
for (let i = 0; i < keywords.length; i++) {
|
|
243
|
-
if (input.includes(keywords[i])) {
|
|
244
|
-
return true
|
|
245
|
-
}
|
|
91
|
+
): FlowContent | undefined {
|
|
92
|
+
switch (hubtypeContent.type) {
|
|
93
|
+
case HtNodeWithContentType.TEXT:
|
|
94
|
+
return FlowText.fromHubtypeCMS(hubtypeContent, locale, this.cmsApi)
|
|
95
|
+
case HtNodeWithContentType.IMAGE:
|
|
96
|
+
return FlowImage.fromHubtypeCMS(hubtypeContent, locale)
|
|
97
|
+
case HtNodeWithContentType.CAROUSEL:
|
|
98
|
+
return FlowCarousel.fromHubtypeCMS(hubtypeContent, locale, this.cmsApi)
|
|
99
|
+
case HtNodeWithContentType.VIDEO:
|
|
100
|
+
return FlowVideo.fromHubtypeCMS(hubtypeContent, locale)
|
|
101
|
+
case HtNodeWithContentType.WHATSAPP_BUTTON_LIST:
|
|
102
|
+
return FlowWhatsappButtonList.fromHubtypeCMS(hubtypeContent, locale)
|
|
103
|
+
default:
|
|
104
|
+
return undefined
|
|
246
105
|
}
|
|
247
|
-
return false
|
|
248
106
|
}
|
|
249
107
|
|
|
250
108
|
async callFunction(
|
|
251
|
-
functionNode:
|
|
109
|
+
functionNode: HtFunctionNode,
|
|
252
110
|
locale: string
|
|
253
111
|
): Promise<string> {
|
|
254
112
|
const functionNodeId = functionNode.id
|
|
@@ -259,7 +117,7 @@ export default class BotonicPluginFlowBuilder implements Plugin {
|
|
|
259
117
|
|
|
260
118
|
const args = Object.assign(
|
|
261
119
|
{
|
|
262
|
-
|
|
120
|
+
request: this.currentRequest,
|
|
263
121
|
results: [functionNode.content.result_mapping.map(r => r.result)],
|
|
264
122
|
},
|
|
265
123
|
...nameValues
|
|
@@ -271,7 +129,7 @@ export default class BotonicPluginFlowBuilder implements Plugin {
|
|
|
271
129
|
const result = functionNode.content.result_mapping.find(
|
|
272
130
|
r => r.result === functionResult
|
|
273
131
|
)
|
|
274
|
-
if (!result) {
|
|
132
|
+
if (!result?.target) {
|
|
275
133
|
throw new Error(
|
|
276
134
|
`No result found for result_mapping for node with id: ${functionNodeId}`
|
|
277
135
|
)
|
package/src/types.ts
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import { Session } from '@botonic/core'
|
|
2
|
+
import { ActionRequest } from '@botonic/react'
|
|
2
3
|
|
|
3
|
-
import {
|
|
4
|
+
import { FlowBuilderApi } from './api'
|
|
5
|
+
import { HtFlowBuilderData } from './content-fields/hubtype-fields'
|
|
4
6
|
|
|
5
7
|
export interface BotonicPluginFlowBuilderOptions {
|
|
6
8
|
flowUrl: string
|
|
7
|
-
flow?:
|
|
9
|
+
flow?: HtFlowBuilderData
|
|
8
10
|
customFunctions?: Record<any, any>
|
|
9
11
|
getLocale: (session: Session) => string
|
|
10
12
|
getAccessToken: () => string
|
|
13
|
+
trackEvent?: (
|
|
14
|
+
request: ActionRequest,
|
|
15
|
+
eventName: string,
|
|
16
|
+
args?: Record<string, any>
|
|
17
|
+
) => Promise<void>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface FlowBuilderApiOptions {
|
|
21
|
+
url: string
|
|
22
|
+
flow?: HtFlowBuilderData
|
|
11
23
|
}
|
|
12
24
|
|
|
13
25
|
export enum ProcessEnvNodeEnvs {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/content-fields/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
export interface FlowBuilderData {
|
|
2
|
-
version: string;
|
|
3
|
-
name: string;
|
|
4
|
-
locales: string[];
|
|
5
|
-
start_node_id?: string;
|
|
6
|
-
ai_model_id?: string;
|
|
7
|
-
nodes: NodeComponent[];
|
|
8
|
-
}
|
|
9
|
-
export declare enum NodeType {
|
|
10
|
-
TEXT = "text",
|
|
11
|
-
IMAGE = "image",
|
|
12
|
-
CAROUSEL = "carousel",
|
|
13
|
-
HANDOFF = "handoff",
|
|
14
|
-
KEYWORD = "keyword",
|
|
15
|
-
INTENT = "intent",
|
|
16
|
-
START_UP = "start-up",
|
|
17
|
-
URL = "url",
|
|
18
|
-
PAYLOAD = "payload",
|
|
19
|
-
FUNCTION = "function",
|
|
20
|
-
FALLBACK = "fallback",
|
|
21
|
-
VIDEO = "video"
|
|
22
|
-
}
|
|
23
|
-
export interface BaseNode {
|
|
24
|
-
id: string;
|
|
25
|
-
type: NodeType;
|
|
26
|
-
}
|
|
27
|
-
export interface Meta {
|
|
28
|
-
x: number;
|
|
29
|
-
y: number;
|
|
30
|
-
}
|
|
31
|
-
export interface Node extends BaseNode {
|
|
32
|
-
code: string;
|
|
33
|
-
meta: Meta;
|
|
34
|
-
follow_up?: NodeLink;
|
|
35
|
-
target?: NodeLink;
|
|
36
|
-
}
|
|
37
|
-
export interface NodeLink {
|
|
38
|
-
id: string;
|
|
39
|
-
type: NodeType;
|
|
40
|
-
}
|
|
41
|
-
export interface TextLocale {
|
|
42
|
-
message: string;
|
|
43
|
-
locale: string;
|
|
44
|
-
}
|
|
45
|
-
export declare enum ButtonStyle {
|
|
46
|
-
BUTTON = "button",
|
|
47
|
-
QUICK_REPLY = "quick-reply"
|
|
48
|
-
}
|
|
49
|
-
export interface UrlLocale {
|
|
50
|
-
id: string;
|
|
51
|
-
locale: string;
|
|
52
|
-
}
|
|
53
|
-
export interface PayloadLocale {
|
|
54
|
-
id: string;
|
|
55
|
-
locale: string;
|
|
56
|
-
}
|
|
57
|
-
export interface Button {
|
|
58
|
-
id: string;
|
|
59
|
-
text: TextLocale[];
|
|
60
|
-
target?: NodeLink;
|
|
61
|
-
hidden: string;
|
|
62
|
-
url?: UrlLocale[];
|
|
63
|
-
payload?: PayloadLocale[];
|
|
64
|
-
}
|
|
65
|
-
export interface TextNodeContent {
|
|
66
|
-
text: TextLocale[];
|
|
67
|
-
buttons_style?: ButtonStyle;
|
|
68
|
-
buttons: Button[];
|
|
69
|
-
}
|
|
70
|
-
export interface TextNode extends Node {
|
|
71
|
-
type: NodeType.TEXT;
|
|
72
|
-
content: TextNodeContent;
|
|
73
|
-
}
|
|
74
|
-
export interface MediaFileLocale {
|
|
75
|
-
id: string;
|
|
76
|
-
file: string;
|
|
77
|
-
locale: string;
|
|
78
|
-
}
|
|
79
|
-
export interface ImageNodeContent {
|
|
80
|
-
image: MediaFileLocale[];
|
|
81
|
-
}
|
|
82
|
-
export interface ImageNode extends Node {
|
|
83
|
-
type: NodeType.IMAGE;
|
|
84
|
-
content: ImageNodeContent;
|
|
85
|
-
}
|
|
86
|
-
export interface CarouselElementNode {
|
|
87
|
-
id: string;
|
|
88
|
-
title: TextLocale[];
|
|
89
|
-
subtitle: TextLocale[];
|
|
90
|
-
image: MediaFileLocale[];
|
|
91
|
-
button: Button;
|
|
92
|
-
}
|
|
93
|
-
export interface CarouselNodeContent {
|
|
94
|
-
elements: CarouselElementNode[];
|
|
95
|
-
}
|
|
96
|
-
export interface CarouselNode extends Node {
|
|
97
|
-
type: NodeType.CAROUSEL;
|
|
98
|
-
content: CarouselNodeContent;
|
|
99
|
-
}
|
|
100
|
-
export interface QueueLocale {
|
|
101
|
-
id: string;
|
|
102
|
-
name: string;
|
|
103
|
-
locale: string;
|
|
104
|
-
}
|
|
105
|
-
export interface HandoffNodeContent {
|
|
106
|
-
queue: QueueLocale[];
|
|
107
|
-
payload: PayloadLocale[];
|
|
108
|
-
has_auto_assign: boolean;
|
|
109
|
-
}
|
|
110
|
-
export interface HandoffNode extends Node {
|
|
111
|
-
type: NodeType.HANDOFF;
|
|
112
|
-
content: HandoffNodeContent;
|
|
113
|
-
}
|
|
114
|
-
export interface InputLocale {
|
|
115
|
-
values: string[];
|
|
116
|
-
locale: string;
|
|
117
|
-
}
|
|
118
|
-
export interface KeywordNodeContent {
|
|
119
|
-
title: TextLocale[];
|
|
120
|
-
keywords: InputLocale[];
|
|
121
|
-
}
|
|
122
|
-
export interface KeywordNode extends Node {
|
|
123
|
-
type: NodeType.KEYWORD;
|
|
124
|
-
content: KeywordNodeContent;
|
|
125
|
-
}
|
|
126
|
-
export interface IntentNodeContent {
|
|
127
|
-
title: TextLocale[];
|
|
128
|
-
intents: InputLocale[];
|
|
129
|
-
confidence: number;
|
|
130
|
-
}
|
|
131
|
-
export interface IntentNode extends Node {
|
|
132
|
-
type: NodeType.INTENT;
|
|
133
|
-
content: IntentNodeContent;
|
|
134
|
-
}
|
|
135
|
-
export interface StartNode extends BaseNode {
|
|
136
|
-
type: NodeType.START_UP;
|
|
137
|
-
target: NodeLink;
|
|
138
|
-
}
|
|
139
|
-
export interface UrlNodeContent {
|
|
140
|
-
url: string;
|
|
141
|
-
}
|
|
142
|
-
export interface UrlNode extends BaseNode {
|
|
143
|
-
type: NodeType.URL;
|
|
144
|
-
content: UrlNodeContent;
|
|
145
|
-
}
|
|
146
|
-
export interface PayloadNodeContent {
|
|
147
|
-
payload: string;
|
|
148
|
-
}
|
|
149
|
-
export interface PayloadNode extends BaseNode {
|
|
150
|
-
type: NodeType.PAYLOAD;
|
|
151
|
-
content: PayloadNodeContent;
|
|
152
|
-
}
|
|
153
|
-
export type ArgumentType = number | string | Record<any, any>;
|
|
154
|
-
export interface FunctionNodeArgument {
|
|
155
|
-
type: ArgumentType;
|
|
156
|
-
name: string;
|
|
157
|
-
value: string;
|
|
158
|
-
}
|
|
159
|
-
export interface FunctionNodeArgumentLocale {
|
|
160
|
-
locale: string;
|
|
161
|
-
values: FunctionNodeArgument[];
|
|
162
|
-
}
|
|
163
|
-
export interface FunctionNodeResult {
|
|
164
|
-
result: string;
|
|
165
|
-
target: NodeLink;
|
|
166
|
-
}
|
|
167
|
-
export interface FunctionNodeContent {
|
|
168
|
-
action: string;
|
|
169
|
-
arguments: FunctionNodeArgumentLocale[];
|
|
170
|
-
result_mapping: FunctionNodeResult[];
|
|
171
|
-
}
|
|
172
|
-
export interface FunctionNode extends Node {
|
|
173
|
-
type: NodeType.FUNCTION;
|
|
174
|
-
content: FunctionNodeContent;
|
|
175
|
-
}
|
|
176
|
-
export interface FallbackNodeContent {
|
|
177
|
-
first_message: NodeLink;
|
|
178
|
-
second_message: NodeLink;
|
|
179
|
-
}
|
|
180
|
-
export interface FallbackNode extends Node {
|
|
181
|
-
type: NodeType.FALLBACK;
|
|
182
|
-
content: FallbackNodeContent;
|
|
183
|
-
}
|
|
184
|
-
export interface VideoLocale {
|
|
185
|
-
url: string;
|
|
186
|
-
is_embedded?: boolean;
|
|
187
|
-
locale: string;
|
|
188
|
-
}
|
|
189
|
-
export interface VideoNodeContent {
|
|
190
|
-
video: VideoLocale[];
|
|
191
|
-
}
|
|
192
|
-
export interface VideoNode extends Node {
|
|
193
|
-
type: NodeType.VIDEO;
|
|
194
|
-
content: VideoNodeContent;
|
|
195
|
-
}
|
|
196
|
-
export type NodeComponent = TextNode | ImageNode | CarouselNode | HandoffNode | KeywordNode | IntentNode | UrlNode | StartNode | PayloadNode | FunctionNode | FallbackNode | VideoNode;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ButtonStyle = exports.NodeType = void 0;
|
|
4
|
-
var NodeType;
|
|
5
|
-
(function (NodeType) {
|
|
6
|
-
NodeType["TEXT"] = "text";
|
|
7
|
-
NodeType["IMAGE"] = "image";
|
|
8
|
-
NodeType["CAROUSEL"] = "carousel";
|
|
9
|
-
NodeType["HANDOFF"] = "handoff";
|
|
10
|
-
NodeType["KEYWORD"] = "keyword";
|
|
11
|
-
NodeType["INTENT"] = "intent";
|
|
12
|
-
NodeType["START_UP"] = "start-up";
|
|
13
|
-
NodeType["URL"] = "url";
|
|
14
|
-
NodeType["PAYLOAD"] = "payload";
|
|
15
|
-
NodeType["FUNCTION"] = "function";
|
|
16
|
-
NodeType["FALLBACK"] = "fallback";
|
|
17
|
-
NodeType["VIDEO"] = "video";
|
|
18
|
-
})(NodeType = exports.NodeType || (exports.NodeType = {}));
|
|
19
|
-
var ButtonStyle;
|
|
20
|
-
(function (ButtonStyle) {
|
|
21
|
-
ButtonStyle["BUTTON"] = "button";
|
|
22
|
-
ButtonStyle["QUICK_REPLY"] = "quick-reply";
|
|
23
|
-
})(ButtonStyle = exports.ButtonStyle || (exports.ButtonStyle = {}));
|
|
24
|
-
//# sourceMappingURL=flow-builder-models.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flow-builder-models.js","sourceRoot":"","sources":["../../src/flow-builder-models.ts"],"names":[],"mappings":";;;AAUA,IAAY,QAaX;AAbD,WAAY,QAAQ;IAClB,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,iCAAqB,CAAA;IACrB,+BAAmB,CAAA;IACnB,+BAAmB,CAAA;IACnB,6BAAiB,CAAA;IACjB,iCAAqB,CAAA;IACrB,uBAAW,CAAA;IACX,+BAAmB,CAAA;IACnB,iCAAqB,CAAA;IACrB,iCAAqB,CAAA;IACrB,2BAAe,CAAA;AACjB,CAAC,EAbW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAanB;AA6BD,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,0CAA2B,CAAA;AAC7B,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/content-fields/types.ts"],"names":[],"mappings":""}
|