chatbot-lex-design-builder 1.0.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/dist/cjs/compile-graph-to-lex.d.ts +3 -0
- package/dist/cjs/compile-graph-to-lex.js +35 -0
- package/dist/cjs/compile-graph-to-lex.js.map +1 -0
- package/dist/cjs/index.d.ts +9 -0
- package/dist/cjs/index.js +43 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/types/edges/edge.d.ts +21 -0
- package/dist/cjs/types/edges/edge.js +12 -0
- package/dist/cjs/types/edges/edge.js.map +1 -0
- package/dist/cjs/types/edges/index.d.ts +1 -0
- package/dist/cjs/types/edges/index.js +18 -0
- package/dist/cjs/types/edges/index.js.map +1 -0
- package/dist/cjs/types/graph/graph.d.ts +2245 -0
- package/dist/cjs/types/graph/graph.js +11 -0
- package/dist/cjs/types/graph/graph.js.map +1 -0
- package/dist/cjs/types/graph/index.d.ts +1 -0
- package/dist/cjs/types/graph/index.js +18 -0
- package/dist/cjs/types/graph/index.js.map +1 -0
- package/dist/cjs/types/nodes/closing-response-node.d.ts +201 -0
- package/dist/cjs/types/nodes/closing-response-node.js +16 -0
- package/dist/cjs/types/nodes/closing-response-node.js.map +1 -0
- package/dist/cjs/types/nodes/codehook-node.d.ts +552 -0
- package/dist/cjs/types/nodes/codehook-node.js +20 -0
- package/dist/cjs/types/nodes/codehook-node.js.map +1 -0
- package/dist/cjs/types/nodes/condition-node.d.ts +525 -0
- package/dist/cjs/types/nodes/condition-node.js +22 -0
- package/dist/cjs/types/nodes/condition-node.js.map +1 -0
- package/dist/cjs/types/nodes/confirmation-node.d.ts +748 -0
- package/dist/cjs/types/nodes/confirmation-node.js +19 -0
- package/dist/cjs/types/nodes/confirmation-node.js.map +1 -0
- package/dist/cjs/types/nodes/end-of-conversation-node.d.ts +19 -0
- package/dist/cjs/types/nodes/end-of-conversation-node.js +12 -0
- package/dist/cjs/types/nodes/end-of-conversation-node.js.map +1 -0
- package/dist/cjs/types/nodes/fullfillment-node.d.ts +552 -0
- package/dist/cjs/types/nodes/fullfillment-node.js +20 -0
- package/dist/cjs/types/nodes/fullfillment-node.js.map +1 -0
- package/dist/cjs/types/nodes/go-to-intent-node.d.ts +34 -0
- package/dist/cjs/types/nodes/go-to-intent-node.js +14 -0
- package/dist/cjs/types/nodes/go-to-intent-node.js.map +1 -0
- package/dist/cjs/types/nodes/index.d.ts +10 -0
- package/dist/cjs/types/nodes/index.js +27 -0
- package/dist/cjs/types/nodes/index.js.map +1 -0
- package/dist/cjs/types/nodes/intent-node.d.ts +59 -0
- package/dist/cjs/types/nodes/intent-node.js +17 -0
- package/dist/cjs/types/nodes/intent-node.js.map +1 -0
- package/dist/cjs/types/nodes/node-type.d.ts +11 -0
- package/dist/cjs/types/nodes/node-type.js +16 -0
- package/dist/cjs/types/nodes/node-type.js.map +1 -0
- package/dist/cjs/types/nodes/node.d.ts +1788 -0
- package/dist/cjs/types/nodes/node.js +25 -0
- package/dist/cjs/types/nodes/node.js.map +1 -0
- package/dist/cjs/types/nodes/slot-node.d.ts +576 -0
- package/dist/cjs/types/nodes/slot-node.js +23 -0
- package/dist/cjs/types/nodes/slot-node.js.map +1 -0
- package/dist/cjs/types/others/bot-flow.d.ts +5839 -0
- package/dist/cjs/types/others/bot-flow.js +14 -0
- package/dist/cjs/types/others/bot-flow.js.map +1 -0
- package/dist/cjs/types/others/file-and-folder.d.ts +9 -0
- package/dist/cjs/types/others/file-and-folder.js +3 -0
- package/dist/cjs/types/others/file-and-folder.js.map +1 -0
- package/dist/cjs/types/others/flow-detail.d.ts +12 -0
- package/dist/cjs/types/others/flow-detail.js +3 -0
- package/dist/cjs/types/others/flow-detail.js.map +1 -0
- package/dist/cjs/types/others/index.d.ts +5 -0
- package/dist/cjs/types/others/index.js +22 -0
- package/dist/cjs/types/others/index.js.map +1 -0
- package/dist/cjs/types/others/lex-export-options.d.ts +4 -0
- package/dist/cjs/types/others/lex-export-options.js +3 -0
- package/dist/cjs/types/others/lex-export-options.js.map +1 -0
- package/dist/cjs/types/others/lex-exporter.d.ts +2 -0
- package/dist/cjs/types/others/lex-exporter.js +3 -0
- package/dist/cjs/types/others/lex-exporter.js.map +1 -0
- package/dist/cjs/types/responses/index.d.ts +4 -0
- package/dist/cjs/types/responses/index.js +21 -0
- package/dist/cjs/types/responses/index.js.map +1 -0
- package/dist/cjs/types/responses/message-type.d.ts +4 -0
- package/dist/cjs/types/responses/message-type.js +9 -0
- package/dist/cjs/types/responses/message-type.js.map +1 -0
- package/dist/cjs/types/responses/message.d.ts +60 -0
- package/dist/cjs/types/responses/message.js +11 -0
- package/dist/cjs/types/responses/message.js.map +1 -0
- package/dist/cjs/types/responses/text-message-button.d.ts +70 -0
- package/dist/cjs/types/responses/text-message-button.js +22 -0
- package/dist/cjs/types/responses/text-message-button.js.map +1 -0
- package/dist/cjs/types/responses/text-message.d.ts +16 -0
- package/dist/cjs/types/responses/text-message.js +14 -0
- package/dist/cjs/types/responses/text-message.js.map +1 -0
- package/dist/cjs/utils/compile-flow-to-flowdetail.d.ts +2 -0
- package/dist/cjs/utils/compile-flow-to-flowdetail.js +9 -0
- package/dist/cjs/utils/compile-flow-to-flowdetail.js.map +1 -0
- package/dist/cjs/utils/file-exporter.d.ts +8 -0
- package/dist/cjs/utils/file-exporter.js +37 -0
- package/dist/cjs/utils/file-exporter.js.map +1 -0
- package/dist/cjs/utils/find-first-fullfillment-node.d.ts +59 -0
- package/dist/cjs/utils/find-first-fullfillment-node.js +9 -0
- package/dist/cjs/utils/find-first-fullfillment-node.js.map +1 -0
- package/dist/cjs/utils/find-first-intent-node.d.ts +12 -0
- package/dist/cjs/utils/find-first-intent-node.js +9 -0
- package/dist/cjs/utils/find-first-intent-node.js.map +1 -0
- package/dist/cjs/utils/generate-response.d.ts +15 -0
- package/dist/cjs/utils/generate-response.js +14 -0
- package/dist/cjs/utils/generate-response.js.map +1 -0
- package/dist/cjs/utils/get-bfs-order.d.ts +333 -0
- package/dist/cjs/utils/get-bfs-order.js +18 -0
- package/dist/cjs/utils/get-bfs-order.js.map +1 -0
- package/dist/cjs/utils/get-end-of-conversation-node.d.ts +6 -0
- package/dist/cjs/utils/get-end-of-conversation-node.js +16 -0
- package/dist/cjs/utils/get-end-of-conversation-node.js.map +1 -0
- package/dist/cjs/utils/get-first-closing-response-node.d.ts +25 -0
- package/dist/cjs/utils/get-first-closing-response-node.js +9 -0
- package/dist/cjs/utils/get-first-closing-response-node.js.map +1 -0
- package/dist/cjs/utils/get-first-confirmation-node.d.ts +73 -0
- package/dist/cjs/utils/get-first-confirmation-node.js +9 -0
- package/dist/cjs/utils/get-first-confirmation-node.js.map +1 -0
- package/dist/cjs/utils/get-message.d.ts +12 -0
- package/dist/cjs/utils/get-message.js +16 -0
- package/dist/cjs/utils/get-message.js.map +1 -0
- package/dist/cjs/utils/get-next-step.d.ts +36 -0
- package/dist/cjs/utils/get-next-step.js +98 -0
- package/dist/cjs/utils/get-next-step.js.map +1 -0
- package/dist/cjs/utils/get-prompt-attempt-specification.d.ts +117 -0
- package/dist/cjs/utils/get-prompt-attempt-specification.js +99 -0
- package/dist/cjs/utils/get-prompt-attempt-specification.js.map +1 -0
- package/dist/cjs/utils/get-slot-nodes.d.ts +62 -0
- package/dist/cjs/utils/get-slot-nodes.js +9 -0
- package/dist/cjs/utils/get-slot-nodes.js.map +1 -0
- package/dist/cjs/utils/get-utterances.d.ts +3 -0
- package/dist/cjs/utils/get-utterances.js +12 -0
- package/dist/cjs/utils/get-utterances.js.map +1 -0
- package/dist/cjs/utils/index.d.ts +17 -0
- package/dist/cjs/utils/index.js +34 -0
- package/dist/cjs/utils/index.js.map +1 -0
- package/dist/cjs/utils/lex-zip-exporter.d.ts +2 -0
- package/dist/cjs/utils/lex-zip-exporter.js +3 -0
- package/dist/cjs/utils/lex-zip-exporter.js.map +1 -0
- package/dist/cjs/utils/node-builders/build-closing-response.d.ts +3 -0
- package/dist/cjs/utils/node-builders/build-closing-response.js +78 -0
- package/dist/cjs/utils/node-builders/build-closing-response.js.map +1 -0
- package/dist/cjs/utils/node-builders/build-confirmation.d.ts +3 -0
- package/dist/cjs/utils/node-builders/build-confirmation.js +204 -0
- package/dist/cjs/utils/node-builders/build-confirmation.js.map +1 -0
- package/dist/cjs/utils/node-builders/build-fullfillment.d.ts +3 -0
- package/dist/cjs/utils/node-builders/build-fullfillment.js +112 -0
- package/dist/cjs/utils/node-builders/build-fullfillment.js.map +1 -0
- package/dist/cjs/utils/node-builders/build-initial-response.d.ts +3 -0
- package/dist/cjs/utils/node-builders/build-initial-response.js +155 -0
- package/dist/cjs/utils/node-builders/build-initial-response.js.map +1 -0
- package/dist/cjs/utils/node-builders/build-intent.d.ts +60 -0
- package/dist/cjs/utils/node-builders/build-intent.js +73 -0
- package/dist/cjs/utils/node-builders/build-intent.js.map +1 -0
- package/dist/cjs/utils/node-builders/build-slot.d.ts +3 -0
- package/dist/cjs/utils/node-builders/build-slot.js +198 -0
- package/dist/cjs/utils/node-builders/build-slot.js.map +1 -0
- package/dist/cjs/utils/node-builders/index.d.ts +6 -0
- package/dist/cjs/utils/node-builders/index.js +23 -0
- package/dist/cjs/utils/node-builders/index.js.map +1 -0
- package/dist/cjs/utils/transform-flow-detail-to-file-and-folder.d.ts +4 -0
- package/dist/cjs/utils/transform-flow-detail-to-file-and-folder.js +141 -0
- package/dist/cjs/utils/transform-flow-detail-to-file-and-folder.js.map +1 -0
- package/dist/cjs/utils/validate-graph.d.ts +341 -0
- package/dist/cjs/utils/validate-graph.js +13 -0
- package/dist/cjs/utils/validate-graph.js.map +1 -0
- package/dist/esm/compile-graph-to-lex.d.ts +3 -0
- package/dist/esm/compile-graph-to-lex.js +28 -0
- package/dist/esm/compile-graph-to-lex.js.map +1 -0
- package/dist/esm/index.d.ts +9 -0
- package/dist/esm/index.js +10 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types/edges/edge.d.ts +21 -0
- package/dist/esm/types/edges/edge.js +9 -0
- package/dist/esm/types/edges/edge.js.map +1 -0
- package/dist/esm/types/edges/index.d.ts +1 -0
- package/dist/esm/types/edges/index.js +2 -0
- package/dist/esm/types/edges/index.js.map +1 -0
- package/dist/esm/types/graph/graph.d.ts +2245 -0
- package/dist/esm/types/graph/graph.js +8 -0
- package/dist/esm/types/graph/graph.js.map +1 -0
- package/dist/esm/types/graph/index.d.ts +1 -0
- package/dist/esm/types/graph/index.js +2 -0
- package/dist/esm/types/graph/index.js.map +1 -0
- package/dist/esm/types/nodes/closing-response-node.d.ts +201 -0
- package/dist/esm/types/nodes/closing-response-node.js +13 -0
- package/dist/esm/types/nodes/closing-response-node.js.map +1 -0
- package/dist/esm/types/nodes/codehook-node.d.ts +552 -0
- package/dist/esm/types/nodes/codehook-node.js +17 -0
- package/dist/esm/types/nodes/codehook-node.js.map +1 -0
- package/dist/esm/types/nodes/condition-node.d.ts +525 -0
- package/dist/esm/types/nodes/condition-node.js +19 -0
- package/dist/esm/types/nodes/condition-node.js.map +1 -0
- package/dist/esm/types/nodes/confirmation-node.d.ts +748 -0
- package/dist/esm/types/nodes/confirmation-node.js +16 -0
- package/dist/esm/types/nodes/confirmation-node.js.map +1 -0
- package/dist/esm/types/nodes/end-of-conversation-node.d.ts +19 -0
- package/dist/esm/types/nodes/end-of-conversation-node.js +9 -0
- package/dist/esm/types/nodes/end-of-conversation-node.js.map +1 -0
- package/dist/esm/types/nodes/fullfillment-node.d.ts +552 -0
- package/dist/esm/types/nodes/fullfillment-node.js +17 -0
- package/dist/esm/types/nodes/fullfillment-node.js.map +1 -0
- package/dist/esm/types/nodes/go-to-intent-node.d.ts +34 -0
- package/dist/esm/types/nodes/go-to-intent-node.js +11 -0
- package/dist/esm/types/nodes/go-to-intent-node.js.map +1 -0
- package/dist/esm/types/nodes/index.d.ts +10 -0
- package/dist/esm/types/nodes/index.js +11 -0
- package/dist/esm/types/nodes/index.js.map +1 -0
- package/dist/esm/types/nodes/intent-node.d.ts +59 -0
- package/dist/esm/types/nodes/intent-node.js +14 -0
- package/dist/esm/types/nodes/intent-node.js.map +1 -0
- package/dist/esm/types/nodes/node-type.d.ts +11 -0
- package/dist/esm/types/nodes/node-type.js +13 -0
- package/dist/esm/types/nodes/node-type.js.map +1 -0
- package/dist/esm/types/nodes/node.d.ts +1788 -0
- package/dist/esm/types/nodes/node.js +22 -0
- package/dist/esm/types/nodes/node.js.map +1 -0
- package/dist/esm/types/nodes/slot-node.d.ts +576 -0
- package/dist/esm/types/nodes/slot-node.js +20 -0
- package/dist/esm/types/nodes/slot-node.js.map +1 -0
- package/dist/esm/types/others/bot-flow.d.ts +5839 -0
- package/dist/esm/types/others/bot-flow.js +12 -0
- package/dist/esm/types/others/bot-flow.js.map +1 -0
- package/dist/esm/types/others/file-and-folder.d.ts +9 -0
- package/dist/esm/types/others/file-and-folder.js +2 -0
- package/dist/esm/types/others/file-and-folder.js.map +1 -0
- package/dist/esm/types/others/flow-detail.d.ts +12 -0
- package/dist/esm/types/others/flow-detail.js +2 -0
- package/dist/esm/types/others/flow-detail.js.map +1 -0
- package/dist/esm/types/others/index.d.ts +5 -0
- package/dist/esm/types/others/index.js +6 -0
- package/dist/esm/types/others/index.js.map +1 -0
- package/dist/esm/types/others/lex-export-options.d.ts +4 -0
- package/dist/esm/types/others/lex-export-options.js +2 -0
- package/dist/esm/types/others/lex-export-options.js.map +1 -0
- package/dist/esm/types/others/lex-exporter.d.ts +2 -0
- package/dist/esm/types/others/lex-exporter.js +2 -0
- package/dist/esm/types/others/lex-exporter.js.map +1 -0
- package/dist/esm/types/responses/index.d.ts +4 -0
- package/dist/esm/types/responses/index.js +5 -0
- package/dist/esm/types/responses/index.js.map +1 -0
- package/dist/esm/types/responses/message-type.d.ts +4 -0
- package/dist/esm/types/responses/message-type.js +6 -0
- package/dist/esm/types/responses/message-type.js.map +1 -0
- package/dist/esm/types/responses/message.d.ts +60 -0
- package/dist/esm/types/responses/message.js +8 -0
- package/dist/esm/types/responses/message.js.map +1 -0
- package/dist/esm/types/responses/text-message-button.d.ts +70 -0
- package/dist/esm/types/responses/text-message-button.js +16 -0
- package/dist/esm/types/responses/text-message-button.js.map +1 -0
- package/dist/esm/types/responses/text-message.d.ts +16 -0
- package/dist/esm/types/responses/text-message.js +8 -0
- package/dist/esm/types/responses/text-message.js.map +1 -0
- package/dist/esm/utils/compile-flow-to-flowdetail.d.ts +2 -0
- package/dist/esm/utils/compile-flow-to-flowdetail.js +5 -0
- package/dist/esm/utils/compile-flow-to-flowdetail.js.map +1 -0
- package/dist/esm/utils/file-exporter.d.ts +8 -0
- package/dist/esm/utils/file-exporter.js +30 -0
- package/dist/esm/utils/file-exporter.js.map +1 -0
- package/dist/esm/utils/find-first-fullfillment-node.d.ts +59 -0
- package/dist/esm/utils/find-first-fullfillment-node.js +5 -0
- package/dist/esm/utils/find-first-fullfillment-node.js.map +1 -0
- package/dist/esm/utils/find-first-intent-node.d.ts +12 -0
- package/dist/esm/utils/find-first-intent-node.js +5 -0
- package/dist/esm/utils/find-first-intent-node.js.map +1 -0
- package/dist/esm/utils/generate-response.d.ts +15 -0
- package/dist/esm/utils/generate-response.js +10 -0
- package/dist/esm/utils/generate-response.js.map +1 -0
- package/dist/esm/utils/get-bfs-order.d.ts +333 -0
- package/dist/esm/utils/get-bfs-order.js +16 -0
- package/dist/esm/utils/get-bfs-order.js.map +1 -0
- package/dist/esm/utils/get-end-of-conversation-node.d.ts +6 -0
- package/dist/esm/utils/get-end-of-conversation-node.js +12 -0
- package/dist/esm/utils/get-end-of-conversation-node.js.map +1 -0
- package/dist/esm/utils/get-first-closing-response-node.d.ts +25 -0
- package/dist/esm/utils/get-first-closing-response-node.js +5 -0
- package/dist/esm/utils/get-first-closing-response-node.js.map +1 -0
- package/dist/esm/utils/get-first-confirmation-node.d.ts +73 -0
- package/dist/esm/utils/get-first-confirmation-node.js +5 -0
- package/dist/esm/utils/get-first-confirmation-node.js.map +1 -0
- package/dist/esm/utils/get-message.d.ts +12 -0
- package/dist/esm/utils/get-message.js +12 -0
- package/dist/esm/utils/get-message.js.map +1 -0
- package/dist/esm/utils/get-next-step.d.ts +36 -0
- package/dist/esm/utils/get-next-step.js +94 -0
- package/dist/esm/utils/get-next-step.js.map +1 -0
- package/dist/esm/utils/get-prompt-attempt-specification.d.ts +117 -0
- package/dist/esm/utils/get-prompt-attempt-specification.js +95 -0
- package/dist/esm/utils/get-prompt-attempt-specification.js.map +1 -0
- package/dist/esm/utils/get-slot-nodes.d.ts +62 -0
- package/dist/esm/utils/get-slot-nodes.js +5 -0
- package/dist/esm/utils/get-slot-nodes.js.map +1 -0
- package/dist/esm/utils/get-utterances.d.ts +3 -0
- package/dist/esm/utils/get-utterances.js +8 -0
- package/dist/esm/utils/get-utterances.js.map +1 -0
- package/dist/esm/utils/index.d.ts +17 -0
- package/dist/esm/utils/index.js +18 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/dist/esm/utils/lex-zip-exporter.d.ts +2 -0
- package/dist/esm/utils/lex-zip-exporter.js +2 -0
- package/dist/esm/utils/lex-zip-exporter.js.map +1 -0
- package/dist/esm/utils/node-builders/build-closing-response.d.ts +3 -0
- package/dist/esm/utils/node-builders/build-closing-response.js +74 -0
- package/dist/esm/utils/node-builders/build-closing-response.js.map +1 -0
- package/dist/esm/utils/node-builders/build-confirmation.d.ts +3 -0
- package/dist/esm/utils/node-builders/build-confirmation.js +200 -0
- package/dist/esm/utils/node-builders/build-confirmation.js.map +1 -0
- package/dist/esm/utils/node-builders/build-fullfillment.d.ts +3 -0
- package/dist/esm/utils/node-builders/build-fullfillment.js +108 -0
- package/dist/esm/utils/node-builders/build-fullfillment.js.map +1 -0
- package/dist/esm/utils/node-builders/build-initial-response.d.ts +3 -0
- package/dist/esm/utils/node-builders/build-initial-response.js +151 -0
- package/dist/esm/utils/node-builders/build-initial-response.js.map +1 -0
- package/dist/esm/utils/node-builders/build-intent.d.ts +60 -0
- package/dist/esm/utils/node-builders/build-intent.js +65 -0
- package/dist/esm/utils/node-builders/build-intent.js.map +1 -0
- package/dist/esm/utils/node-builders/build-slot.d.ts +3 -0
- package/dist/esm/utils/node-builders/build-slot.js +194 -0
- package/dist/esm/utils/node-builders/build-slot.js.map +1 -0
- package/dist/esm/utils/node-builders/index.d.ts +6 -0
- package/dist/esm/utils/node-builders/index.js +7 -0
- package/dist/esm/utils/node-builders/index.js.map +1 -0
- package/dist/esm/utils/transform-flow-detail-to-file-and-folder.d.ts +4 -0
- package/dist/esm/utils/transform-flow-detail-to-file-and-folder.js +137 -0
- package/dist/esm/utils/transform-flow-detail-to-file-and-folder.js.map +1 -0
- package/dist/esm/utils/validate-graph.d.ts +341 -0
- package/dist/esm/utils/validate-graph.js +11 -0
- package/dist/esm/utils/validate-graph.js.map +1 -0
- package/package.json +32 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { GraphSchema } from "../graph/graph";
|
|
3
|
+
const FlowSchema = z.object({
|
|
4
|
+
id: z.string(),
|
|
5
|
+
graph: GraphSchema,
|
|
6
|
+
name: z.string(),
|
|
7
|
+
});
|
|
8
|
+
const BotFlowSchema = z.object({
|
|
9
|
+
id: z.string(),
|
|
10
|
+
flows: FlowSchema.array(),
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=bot-flow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bot-flow.js","sourceRoot":"","sources":["../../../../types/others/bot-flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,KAAK,EAAE,WAAW;IAClB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE;CAC1B,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-and-folder.js","sourceRoot":"","sources":["../../../../types/others/file-and-folder.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-detail.js","sourceRoot":"","sources":["../../../../types/others/flow-detail.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../types/others/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lex-export-options.js","sourceRoot":"","sources":["../../../../types/others/lex-export-options.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lex-exporter.js","sourceRoot":"","sources":["../../../../types/others/lex-exporter.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../types/responses/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-type.js","sourceRoot":"","sources":["../../../../types/responses/message-type.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,gDAAiC,CAAA;AACnC,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const MessageSchema: z.ZodUnion<[z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
type: z.ZodLiteral<import("./message-type").MessageType.text>;
|
|
5
|
+
title: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
type: import("./message-type").MessageType.text;
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
}, {
|
|
11
|
+
type: import("./message-type").MessageType.text;
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
}>, z.ZodObject<{
|
|
15
|
+
id: z.ZodString;
|
|
16
|
+
type: z.ZodLiteral<import("./message-type").MessageType.textWithButton>;
|
|
17
|
+
title: z.ZodString;
|
|
18
|
+
buttons: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
actionType: z.ZodEnum<["post", "url"]>;
|
|
21
|
+
buttonTitle: z.ZodString;
|
|
22
|
+
value: z.ZodString;
|
|
23
|
+
action: z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
id: string;
|
|
26
|
+
value: string;
|
|
27
|
+
actionType: "url" | "post";
|
|
28
|
+
buttonTitle: string;
|
|
29
|
+
action?: string | null | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
id: string;
|
|
32
|
+
value: string;
|
|
33
|
+
actionType: "url" | "post";
|
|
34
|
+
buttonTitle: string;
|
|
35
|
+
action?: string | null | undefined;
|
|
36
|
+
}>, "many">>>>>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
type: import("./message-type").MessageType.textWithButton;
|
|
39
|
+
id: string;
|
|
40
|
+
title: string;
|
|
41
|
+
buttons?: {
|
|
42
|
+
id: string;
|
|
43
|
+
value: string;
|
|
44
|
+
actionType: "url" | "post";
|
|
45
|
+
buttonTitle: string;
|
|
46
|
+
action?: string | null | undefined;
|
|
47
|
+
}[] | null | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
type: import("./message-type").MessageType.textWithButton;
|
|
50
|
+
id: string;
|
|
51
|
+
title: string;
|
|
52
|
+
buttons?: {
|
|
53
|
+
id: string;
|
|
54
|
+
value: string;
|
|
55
|
+
actionType: "url" | "post";
|
|
56
|
+
buttonTitle: string;
|
|
57
|
+
action?: string | null | undefined;
|
|
58
|
+
}[] | null | undefined;
|
|
59
|
+
}>]>;
|
|
60
|
+
export type Message = z.infer<typeof MessageSchema>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { TextMessageSchema } from "./text-message";
|
|
3
|
+
import { TextMessageButtonSchema } from "./text-message-button";
|
|
4
|
+
export const MessageSchema = z.union([
|
|
5
|
+
TextMessageSchema,
|
|
6
|
+
TextMessageButtonSchema,
|
|
7
|
+
]);
|
|
8
|
+
//# sourceMappingURL=message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../../../types/responses/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC;IACnC,iBAAiB;IACjB,uBAAuB;CACxB,CAAC,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { MessageType } from "./message-type";
|
|
3
|
+
declare const TextButtonSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
actionType: z.ZodEnum<["post", "url"]>;
|
|
6
|
+
buttonTitle: z.ZodString;
|
|
7
|
+
value: z.ZodString;
|
|
8
|
+
action: z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
id: string;
|
|
11
|
+
value: string;
|
|
12
|
+
actionType: "url" | "post";
|
|
13
|
+
buttonTitle: string;
|
|
14
|
+
action?: string | null | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
id: string;
|
|
17
|
+
value: string;
|
|
18
|
+
actionType: "url" | "post";
|
|
19
|
+
buttonTitle: string;
|
|
20
|
+
action?: string | null | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const TextMessageButtonSchema: z.ZodObject<{
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
type: z.ZodLiteral<MessageType.textWithButton>;
|
|
25
|
+
title: z.ZodString;
|
|
26
|
+
buttons: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
actionType: z.ZodEnum<["post", "url"]>;
|
|
29
|
+
buttonTitle: z.ZodString;
|
|
30
|
+
value: z.ZodString;
|
|
31
|
+
action: z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
id: string;
|
|
34
|
+
value: string;
|
|
35
|
+
actionType: "url" | "post";
|
|
36
|
+
buttonTitle: string;
|
|
37
|
+
action?: string | null | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
id: string;
|
|
40
|
+
value: string;
|
|
41
|
+
actionType: "url" | "post";
|
|
42
|
+
buttonTitle: string;
|
|
43
|
+
action?: string | null | undefined;
|
|
44
|
+
}>, "many">>>>>;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
type: MessageType.textWithButton;
|
|
47
|
+
id: string;
|
|
48
|
+
title: string;
|
|
49
|
+
buttons?: {
|
|
50
|
+
id: string;
|
|
51
|
+
value: string;
|
|
52
|
+
actionType: "url" | "post";
|
|
53
|
+
buttonTitle: string;
|
|
54
|
+
action?: string | null | undefined;
|
|
55
|
+
}[] | null | undefined;
|
|
56
|
+
}, {
|
|
57
|
+
type: MessageType.textWithButton;
|
|
58
|
+
id: string;
|
|
59
|
+
title: string;
|
|
60
|
+
buttons?: {
|
|
61
|
+
id: string;
|
|
62
|
+
value: string;
|
|
63
|
+
actionType: "url" | "post";
|
|
64
|
+
buttonTitle: string;
|
|
65
|
+
action?: string | null | undefined;
|
|
66
|
+
}[] | null | undefined;
|
|
67
|
+
}>;
|
|
68
|
+
export type TextMessageWithButton = z.infer<typeof TextMessageButtonSchema>;
|
|
69
|
+
export type TextButton = z.infer<typeof TextButtonSchema>;
|
|
70
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { MessageType } from "./message-type";
|
|
3
|
+
const TextButtonSchema = z.object({
|
|
4
|
+
id: z.string(),
|
|
5
|
+
actionType: z.enum(["post", "url"]),
|
|
6
|
+
buttonTitle: z.string(),
|
|
7
|
+
value: z.string(),
|
|
8
|
+
action: z.string().nullish().nullable(),
|
|
9
|
+
});
|
|
10
|
+
export const TextMessageButtonSchema = z.object({
|
|
11
|
+
id: z.string(),
|
|
12
|
+
type: z.literal(MessageType.textWithButton),
|
|
13
|
+
title: z.string(),
|
|
14
|
+
buttons: TextButtonSchema.array().nullable().optional().nullish(),
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=text-message-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-message-button.js","sourceRoot":"","sources":["../../../../types/responses/text-message-button.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACnC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC;IAC3C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,gBAAgB,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE;CAClE,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { MessageType } from "./message-type";
|
|
3
|
+
export declare const TextMessageSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
type: z.ZodLiteral<MessageType.text>;
|
|
6
|
+
title: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
type: MessageType.text;
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
}, {
|
|
12
|
+
type: MessageType.text;
|
|
13
|
+
id: string;
|
|
14
|
+
title: string;
|
|
15
|
+
}>;
|
|
16
|
+
export type TextMessage = z.infer<typeof TextMessageSchema>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-message.js","sourceRoot":"","sources":["../../../../types/responses/text-message.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC;IACjC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compile-flow-to-flowdetail.js","sourceRoot":"","sources":["../../../utils/compile-flow-to-flowdetail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,UAAU,wBAAwB,CAAC,OAAgB;IACvD,OAAO,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LexExportOptions } from "../types/others/lex-export-options";
|
|
2
|
+
import { LexExporter } from "../types/others/lex-exporter";
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param flowDetails list of flows to be transformed
|
|
6
|
+
* @returns path of the zip file
|
|
7
|
+
*/
|
|
8
|
+
export declare const fileExporter: LexExporter<string, LexExportOptions>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { writeFileSync } from "fs";
|
|
2
|
+
import { ensureDirSync } from "fs-extra";
|
|
3
|
+
import zipper from "zip-local";
|
|
4
|
+
import { transformFlowDetailToFileAndFolder } from "./transform-flow-detail-to-file-and-folder";
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @param flowDetails list of flows to be transformed
|
|
8
|
+
* @returns path of the zip file
|
|
9
|
+
*/
|
|
10
|
+
export const fileExporter = (flowDetails, options) => {
|
|
11
|
+
const filesAndFolders = transformFlowDetailToFileAndFolder(flowDetails, options);
|
|
12
|
+
console.log("wrting files");
|
|
13
|
+
filesAndFolders.folders.forEach((folder) => {
|
|
14
|
+
console.log(" creating folder : ", folder);
|
|
15
|
+
ensureDirSync(folder);
|
|
16
|
+
});
|
|
17
|
+
filesAndFolders.files.forEach((file) => {
|
|
18
|
+
console.log(" creating file : ", file.path);
|
|
19
|
+
writeFileSync(file.path, file.content, {
|
|
20
|
+
encoding: "utf-8",
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
console.log("zipping");
|
|
24
|
+
zipper.sync
|
|
25
|
+
.zip(options.botName)
|
|
26
|
+
.compress()
|
|
27
|
+
.save(options.botName + ".zip");
|
|
28
|
+
return options.botName + ".zip";
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=file-exporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-exporter.js","sourceRoot":"","sources":["../../../utils/file-exporter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,MAAM,MAAM,WAAW,CAAC;AAI/B,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAChG;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAA0C,CACjE,WAAyB,EACzB,OAAO,EACP,EAAE;IACF,MAAM,eAAe,GAAG,kCAAkC,CACxD,WAAW,EACX,OAAO,CACR,CAAC;IAEF,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAE5B,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QACzC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;QAC3C,aAAa,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;YACrC,QAAQ,EAAE,OAAO;SAClB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAEvB,MAAM,CAAC,IAAI;SACR,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC;SACpB,QAAQ,EAAE;SACV,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC;IAElC,OAAO,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC;AAClC,CAAC,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Graph } from "../types/graph/graph";
|
|
2
|
+
import { NodeType } from "../types/nodes/node-type";
|
|
3
|
+
export declare const getFirstFullfillmentNode: (graph: Graph) => {
|
|
4
|
+
type: NodeType.fullfillmentNode;
|
|
5
|
+
data: {
|
|
6
|
+
active: boolean | null;
|
|
7
|
+
label: string;
|
|
8
|
+
success: ({
|
|
9
|
+
type: import("../types/responses").MessageType.text;
|
|
10
|
+
id: string;
|
|
11
|
+
title: string;
|
|
12
|
+
} | {
|
|
13
|
+
type: import("../types/responses").MessageType.textWithButton;
|
|
14
|
+
id: string;
|
|
15
|
+
title: string;
|
|
16
|
+
buttons?: {
|
|
17
|
+
id: string;
|
|
18
|
+
value: string;
|
|
19
|
+
actionType: "url" | "post";
|
|
20
|
+
buttonTitle: string;
|
|
21
|
+
action?: string | null | undefined;
|
|
22
|
+
}[] | null | undefined;
|
|
23
|
+
})[];
|
|
24
|
+
timeout: ({
|
|
25
|
+
type: import("../types/responses").MessageType.text;
|
|
26
|
+
id: string;
|
|
27
|
+
title: string;
|
|
28
|
+
} | {
|
|
29
|
+
type: import("../types/responses").MessageType.textWithButton;
|
|
30
|
+
id: string;
|
|
31
|
+
title: string;
|
|
32
|
+
buttons?: {
|
|
33
|
+
id: string;
|
|
34
|
+
value: string;
|
|
35
|
+
actionType: "url" | "post";
|
|
36
|
+
buttonTitle: string;
|
|
37
|
+
action?: string | null | undefined;
|
|
38
|
+
}[] | null | undefined;
|
|
39
|
+
})[];
|
|
40
|
+
invocationLabel: string;
|
|
41
|
+
failure: ({
|
|
42
|
+
type: import("../types/responses").MessageType.text;
|
|
43
|
+
id: string;
|
|
44
|
+
title: string;
|
|
45
|
+
} | {
|
|
46
|
+
type: import("../types/responses").MessageType.textWithButton;
|
|
47
|
+
id: string;
|
|
48
|
+
title: string;
|
|
49
|
+
buttons?: {
|
|
50
|
+
id: string;
|
|
51
|
+
value: string;
|
|
52
|
+
actionType: "url" | "post";
|
|
53
|
+
buttonTitle: string;
|
|
54
|
+
action?: string | null | undefined;
|
|
55
|
+
}[] | null | undefined;
|
|
56
|
+
})[];
|
|
57
|
+
};
|
|
58
|
+
id: string;
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-first-fullfillment-node.js","sourceRoot":"","sources":["../../../utils/find-first-fullfillment-node.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAY,EAAE,EAAE;IACvD,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CACrB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,gBAAgB,CACxB,CAAC;AACxB,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Graph } from "../types/graph/graph";
|
|
2
|
+
import { NodeType } from "../types/nodes/node-type";
|
|
3
|
+
export declare const findFirstIntentNode: (graph: Graph) => {
|
|
4
|
+
type: NodeType.intentNode;
|
|
5
|
+
data: {
|
|
6
|
+
name: string;
|
|
7
|
+
label: string;
|
|
8
|
+
description: string;
|
|
9
|
+
utterances: string;
|
|
10
|
+
};
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-first-intent-node.js","sourceRoot":"","sources":["../../../utils/find-first-intent-node.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAY,EAAE,EAAE;IAClD,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,UAAU,CAAe,CAAC;AAC/E,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Message } from "../types/responses/message";
|
|
2
|
+
export declare function generateResponse(messages: Message[]): {
|
|
3
|
+
messageGroupsList: {
|
|
4
|
+
message: {
|
|
5
|
+
ssmlMessage: null;
|
|
6
|
+
customPayload: {
|
|
7
|
+
value: string;
|
|
8
|
+
};
|
|
9
|
+
plainTextMessage: null;
|
|
10
|
+
imageResponseCard: null;
|
|
11
|
+
};
|
|
12
|
+
variations: null;
|
|
13
|
+
}[];
|
|
14
|
+
allowInterrupt: boolean;
|
|
15
|
+
} | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getMessage } from "./get-message";
|
|
2
|
+
export function generateResponse(messages) {
|
|
3
|
+
return messages.length > 0
|
|
4
|
+
? {
|
|
5
|
+
messageGroupsList: [getMessage(messages)],
|
|
6
|
+
allowInterrupt: true,
|
|
7
|
+
}
|
|
8
|
+
: null;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=generate-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-response.js","sourceRoot":"","sources":["../../../utils/generate-response.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,UAAU,gBAAgB,CAAC,QAAmB;IAClD,OAAO,QAAQ,CAAC,MAAM,GAAG,CAAC;QACxB,CAAC,CAAC;YACE,iBAAiB,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;YACzC,cAAc,EAAE,IAAI;SACrB;QACH,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"}
|