♻️ (builder) Change to features-centric folder structure
BIN
apps/builder/src/test/assets/avatar.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
184
apps/builder/src/test/assets/typebots/editor/buttonsDnd.json
Normal file
@ -0,0 +1,184 @@
|
||||
{
|
||||
"id": "ckz84wbbj2095no1ali9kzfz4",
|
||||
"createdAt": "2022-02-04T08:16:59.215Z",
|
||||
"updatedAt": "2022-02-04T08:16:59.215Z",
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "de8iZbvNxMxyhvLrnPBpt8",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "hqgG9FuPDWrkrdHXFnSy9G",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "de8iZbvNxMxyhvLrnPBpt8",
|
||||
"outgoingEdgeId": "41aa19ih9WQQQEurwdjmVJ"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "vmDTsAC7aLeqanVVtJ9yQx",
|
||||
"graphCoordinates": { "x": 85, "y": 220 },
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "sqUp2x8SXx8JBC8a9XuKGL9",
|
||||
"groupId": "vmDTsAC7aLeqanVVtJ9yQx",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Hello!</div>",
|
||||
"richText": [{ "type": "p", "children": [{ "text": "Hello!" }] }],
|
||||
"plainText": "Hello!"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "suRXuWyuJ7kpsdLUYKA6VqM",
|
||||
"groupId": "vmDTsAC7aLeqanVVtJ9yQx",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>How are you?</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "How are you?" }] }
|
||||
],
|
||||
"plainText": "How are you?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ssxDdzVUkgZYPPoPnQK4dCo",
|
||||
"groupId": "vmDTsAC7aLeqanVVtJ9yQx",
|
||||
"type": "choice input",
|
||||
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
|
||||
"items": [
|
||||
{
|
||||
"id": "e7dy3bH2py8fFcak2jUJjr",
|
||||
"blockId": "ssxDdzVUkgZYPPoPnQK4dCo",
|
||||
"type": 0,
|
||||
"content": "Item 1",
|
||||
"outgoingEdgeId": "8Ty7noiTJAP3jtaWXLsNwy"
|
||||
},
|
||||
{
|
||||
"blockId": "ssxDdzVUkgZYPPoPnQK4dCo",
|
||||
"type": 0,
|
||||
"id": "mBJkTavGHAygmPTjiLMQyC",
|
||||
"content": "Item 2"
|
||||
},
|
||||
{
|
||||
"blockId": "ssxDdzVUkgZYPPoPnQK4dCo",
|
||||
"type": 0,
|
||||
"id": "vVfToFyNLyGgRYyB8jYLkn",
|
||||
"content": "Item 3",
|
||||
"outgoingEdgeId": "tprSzPvt6A5kTFf7iUNaeR"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "hB4p8rwA1dUSq9A5ctTLqh",
|
||||
"graphCoordinates": { "x": 513, "y": 152 },
|
||||
"title": "Group #2",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "suHw7fjcMD9KjDRpbB413jn",
|
||||
"groupId": "hB4p8rwA1dUSq9A5ctTLqh",
|
||||
"type": "Condition",
|
||||
"items": [
|
||||
{
|
||||
"id": "jvGN6sfftqJgfYYVRUYMuJ",
|
||||
"blockId": "suHw7fjcMD9KjDRpbB413jn",
|
||||
"type": 1,
|
||||
"content": { "comparisons": [], "logicalOperator": "AND" }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "t7g44CwVvCg6mN16KHVAWv",
|
||||
"graphCoordinates": { "x": 509, "y": 489 },
|
||||
"title": "Group #3",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "suHztCMVss4kTAtgShANxjU",
|
||||
"groupId": "t7g44CwVvCg6mN16KHVAWv",
|
||||
"type": "choice input",
|
||||
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
|
||||
"items": [
|
||||
{
|
||||
"id": "buQjAL2M3cBUVK2ofnxKW3",
|
||||
"blockId": "suHztCMVss4kTAtgShANxjU",
|
||||
"type": 0,
|
||||
"content": "Item 2-1"
|
||||
},
|
||||
{
|
||||
"blockId": "suHztCMVss4kTAtgShANxjU",
|
||||
"type": 0,
|
||||
"id": "4gQe9XK1vyQUHXVzFErW4t",
|
||||
"content": "Item 2-2"
|
||||
},
|
||||
{
|
||||
"blockId": "suHztCMVss4kTAtgShANxjU",
|
||||
"type": 0,
|
||||
"id": "uttagH8w5XWzibkKsW23oi",
|
||||
"content": "Item 2-3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"groupId": "de8iZbvNxMxyhvLrnPBpt8",
|
||||
"blockId": "hqgG9FuPDWrkrdHXFnSy9G"
|
||||
},
|
||||
"to": { "groupId": "vmDTsAC7aLeqanVVtJ9yQx" },
|
||||
"id": "41aa19ih9WQQQEurwdjmVJ"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "vmDTsAC7aLeqanVVtJ9yQx",
|
||||
"blockId": "ssxDdzVUkgZYPPoPnQK4dCo",
|
||||
"itemId": "e7dy3bH2py8fFcak2jUJjr"
|
||||
},
|
||||
"to": { "groupId": "hB4p8rwA1dUSq9A5ctTLqh" },
|
||||
"id": "8Ty7noiTJAP3jtaWXLsNwy"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "vmDTsAC7aLeqanVVtJ9yQx",
|
||||
"blockId": "ssxDdzVUkgZYPPoPnQK4dCo",
|
||||
"itemId": "vVfToFyNLyGgRYyB8jYLkn"
|
||||
},
|
||||
"to": { "groupId": "t7g44CwVvCg6mN16KHVAWv" },
|
||||
"id": "tprSzPvt6A5kTFf7iUNaeR"
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": { "isBrandingEnabled": true },
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null
|
||||
}
|
@ -0,0 +1,188 @@
|
||||
{
|
||||
"id": "cl3wo63la1004801amwsqzbof",
|
||||
"createdAt": "2022-06-02T07:01:46.030Z",
|
||||
"updatedAt": "2022-06-02T07:34:02.336Z",
|
||||
"icon": null,
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "cl3wo63l80000801ae4lxgvad",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl3wo63l80001801a8u9g96sp",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "cl3wo63l80000801ae4lxgvad",
|
||||
"outgoingEdgeId": "cl3wo83ha000j2e6gdrk1crro"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "cl3wo7ucc000g2e6gdus80qeb",
|
||||
"graphCoordinates": { "x": 355, "y": -13 },
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl3wo7uce000h2e6gr9r3b11k",
|
||||
"groupId": "cl3wo7ucc000g2e6gdus80qeb",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Hello this is group 1</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "Hello this is group 1" }] }
|
||||
],
|
||||
"plainText": "Hello this is group 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl3wo8047000i2e6glma69ddz",
|
||||
"groupId": "cl3wo7ucc000g2e6gdus80qeb",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>What's your name?</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "What's your name?" }] }
|
||||
],
|
||||
"plainText": "What's your name?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl3wo85e8000k2e6gdb8qk860",
|
||||
"groupId": "cl3wo7ucc000g2e6gdus80qeb",
|
||||
"type": "text input",
|
||||
"options": {
|
||||
"isLong": false,
|
||||
"labels": { "button": "Send", "placeholder": "Type your answer..." }
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "cl3wo87et000l2e6ga64ipat6",
|
||||
"graphCoordinates": { "x": 22, "y": 260 },
|
||||
"title": "Group #1 copy",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl3wo87eu000m2e6g5h90qs9u",
|
||||
"groupId": "cl3wo87et000l2e6ga64ipat6",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Hello this is group 2</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "Hello this is group 2" }] }
|
||||
],
|
||||
"plainText": "Hello this is group 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl3wo87ev000n2e6gp7vn2z62",
|
||||
"groupId": "cl3wo87et000l2e6ga64ipat6",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>What's your name?</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "What's your name?" }] }
|
||||
],
|
||||
"plainText": "What's your name?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl3wo87ev000o2e6g71r3hvor",
|
||||
"groupId": "cl3wo87et000l2e6ga64ipat6",
|
||||
"type": "text input",
|
||||
"options": {
|
||||
"isLong": false,
|
||||
"labels": { "button": "Send", "placeholder": "Type your answer..." }
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "cl3wo8kfl000p2e6gszlvkub0",
|
||||
"graphCoordinates": { "x": 367, "y": 294 },
|
||||
"title": "Group #1 copy copy",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl3wo8kfl000q2e6gci1itvj3",
|
||||
"groupId": "cl3wo8kfl000p2e6gszlvkub0",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Hello this is group 3</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "Hello this is group 3" }] }
|
||||
],
|
||||
"plainText": "Hello this is group 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl3wo8kfl000r2e6gx0lxwitf",
|
||||
"groupId": "cl3wo8kfl000p2e6gszlvkub0",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>What's your name?</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "What's your name?" }] }
|
||||
],
|
||||
"plainText": "What's your name?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl3wo8kfl000s2e6g6ckc9om4",
|
||||
"groupId": "cl3wo8kfl000p2e6gszlvkub0",
|
||||
"type": "text input",
|
||||
"options": {
|
||||
"isLong": false,
|
||||
"labels": { "button": "Send", "placeholder": "Type your answer..." }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"groupId": "cl3wo63l80000801ae4lxgvad",
|
||||
"blockId": "cl3wo63l80001801a8u9g96sp"
|
||||
},
|
||||
"to": { "groupId": "cl3wo7ucc000g2e6gdus80qeb" },
|
||||
"id": "cl3wo83ha000j2e6gdrk1crro"
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostAvatar": {
|
||||
"url": "https://avatars.githubusercontent.com/u/16015833?v=4",
|
||||
"isEnabled": true
|
||||
},
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": {
|
||||
"isBrandingEnabled": true,
|
||||
"isInputPrefillEnabled": true,
|
||||
"isHideQueryParamsEnabled": true,
|
||||
"isNewResultOnRefreshEnabled": false
|
||||
},
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null,
|
||||
"customDomain": null,
|
||||
"workspaceId": "cl3ncues300081a1as58wmkxz"
|
||||
}
|
132
apps/builder/src/test/assets/typebots/inputs/variableButton.json
Normal file
@ -0,0 +1,132 @@
|
||||
{
|
||||
"id": "cl4fr6kca0000p11abjka8lvd",
|
||||
"createdAt": "2022-06-15T15:33:43.930Z",
|
||||
"updatedAt": "2022-06-15T15:36:44.821Z",
|
||||
"icon": null,
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "block0",
|
||||
"title": "Group #0",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "block0",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "block0",
|
||||
"outgoingEdgeId": "edge1"
|
||||
}
|
||||
],
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "block1",
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl4fr6rgf0000396ml1ai0t8v",
|
||||
"type": "Set variable",
|
||||
"groupId": "block1",
|
||||
"options": {
|
||||
"variableId": "vcl4fr8f8l000b396m6gsbnrmd",
|
||||
"expressionToEvaluate": "Variable item"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "block1",
|
||||
"type": "choice input",
|
||||
"items": [
|
||||
{
|
||||
"id": "choice1",
|
||||
"type": 0,
|
||||
"blockId": "block1",
|
||||
"content": "Item 1"
|
||||
},
|
||||
{
|
||||
"id": "cl4fr7e6i0003396mkh7mol65",
|
||||
"type": 0,
|
||||
"blockId": "block1",
|
||||
"content": "{{Item 2}}",
|
||||
"outgoingEdgeId": "cl4fr80900009396my6euvunj"
|
||||
},
|
||||
{
|
||||
"id": "cl4fr7lr90004396mh9vw8wnq",
|
||||
"type": 0,
|
||||
"blockId": "block1",
|
||||
"content": "Item 3"
|
||||
}
|
||||
],
|
||||
"groupId": "block1",
|
||||
"options": { "buttonLabel": "Send", "isMultipleChoice": false }
|
||||
}
|
||||
],
|
||||
"graphCoordinates": { "x": 199, "y": 210 }
|
||||
},
|
||||
{
|
||||
"id": "cl4fr7wsv0007396m7xgbeymx",
|
||||
"title": "Group #2",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl4fr7wsv0008396mf9oi9lvi",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Ok great!</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "Ok great!" }] }
|
||||
],
|
||||
"plainText": "Ok great!"
|
||||
},
|
||||
"groupId": "cl4fr7wsv0007396m7xgbeymx"
|
||||
}
|
||||
],
|
||||
"graphCoordinates": { "x": 603, "y": 195 }
|
||||
}
|
||||
],
|
||||
"variables": [{ "id": "vcl4fr8f8l000b396m6gsbnrmd", "name": "Item 2" }],
|
||||
"edges": [
|
||||
{
|
||||
"id": "edge1",
|
||||
"to": { "groupId": "block1" },
|
||||
"from": { "blockId": "block0", "groupId": "block0" }
|
||||
},
|
||||
{
|
||||
"id": "cl4fr80900009396my6euvunj",
|
||||
"to": { "groupId": "cl4fr7wsv0007396m7xgbeymx" },
|
||||
"from": {
|
||||
"itemId": "cl4fr7e6i0003396mkh7mol65",
|
||||
"blockId": "block1",
|
||||
"groupId": "block1"
|
||||
}
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": {
|
||||
"isBrandingEnabled": true,
|
||||
"isInputPrefillEnabled": true,
|
||||
"isHideQueryParamsEnabled": true,
|
||||
"isNewResultOnRefreshEnabled": false
|
||||
},
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null,
|
||||
"customDomain": null,
|
||||
"workspaceId": "proWorkspace"
|
||||
}
|
@ -0,0 +1,181 @@
|
||||
{
|
||||
"id": "cl10u677f0075a01a6xgl6phe",
|
||||
"createdAt": "2022-03-21T15:01:46.107Z",
|
||||
"updatedAt": "2022-03-21T15:03:07.312Z",
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "cl10u677d0000a01aa4g4aazg",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl10u677d0001a01a0xfo3d11",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "cl10u677d0000a01aa4g4aazg",
|
||||
"outgoingEdgeId": "cl10u6cw500052e6dq284zju3"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "cl10u68pw00032e6depze2oiy",
|
||||
"graphCoordinates": { "x": 353, "y": 121 },
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl10u68q000042e6dhdipu2wg",
|
||||
"groupId": "cl10u68pw00032e6depze2oiy",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Hi how are you?</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "Hi how are you?" }] }
|
||||
],
|
||||
"plainText": "Hi how are you?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl10u6ey300062e6dea9ikpko",
|
||||
"groupId": "cl10u68pw00032e6depze2oiy",
|
||||
"type": "text input",
|
||||
"options": {
|
||||
"isLong": false,
|
||||
"labels": { "button": "Send", "placeholder": "Type your answer..." }
|
||||
},
|
||||
"outgoingEdgeId": "cl10u7ax4000g2e6dkqoq18kp"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "cl10u6jzd00072e6dvo0zwy0s",
|
||||
"graphCoordinates": { "x": 691, "y": 127 },
|
||||
"title": "Group #2",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl10u6jzt00082e6dgw1piz0q",
|
||||
"groupId": "cl10u6jzd00072e6dvo0zwy0s",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>How old are you?</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "How old are you?" }] }
|
||||
],
|
||||
"plainText": "How old are you?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl10u6qa300092e6dh5izz7ig",
|
||||
"groupId": "cl10u6jzd00072e6dvo0zwy0s",
|
||||
"type": "number input",
|
||||
"options": {
|
||||
"labels": { "button": "Send", "placeholder": "Type a number..." }
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl10u6vbo000a2e6davz2hfw7",
|
||||
"groupId": "cl10u6jzd00072e6dvo0zwy0s",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Do you like cookies?</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "Do you like cookies?" }] }
|
||||
],
|
||||
"plainText": "Do you like cookies?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl10u6zk0000b2e6dvabq067r",
|
||||
"groupId": "cl10u6jzd00072e6dvo0zwy0s",
|
||||
"type": "choice input",
|
||||
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
|
||||
"items": [
|
||||
{
|
||||
"id": "cl10u6zk1000c2e6d0d4ivgcl",
|
||||
"blockId": "cl10u6zk0000b2e6dvabq067r",
|
||||
"type": 0,
|
||||
"content": "Yes"
|
||||
},
|
||||
{
|
||||
"blockId": "cl10u6zk0000b2e6dvabq067r",
|
||||
"type": 0,
|
||||
"id": "cl10u70gi000d2e6d924ywjsb",
|
||||
"content": "No"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "cl10u759h000f2e6d0rhfwep4",
|
||||
"groupId": "cl10u6jzd00072e6dvo0zwy0s",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Alright, cheers!</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "Alright, cheers!" }] }
|
||||
],
|
||||
"plainText": "Alright, cheers!"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl10u7i6n000h2e6d537h38pg",
|
||||
"groupId": "cl10u6jzd00072e6dvo0zwy0s",
|
||||
"type": "Webhook",
|
||||
"options": {
|
||||
"responseVariableMapping": [],
|
||||
"variablesForTest": [],
|
||||
"isAdvancedConfig": false,
|
||||
"isCustomBody": false
|
||||
},
|
||||
"webhookId": "webhook1"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"groupId": "cl10u677d0000a01aa4g4aazg",
|
||||
"blockId": "cl10u677d0001a01a0xfo3d11"
|
||||
},
|
||||
"to": { "groupId": "cl10u68pw00032e6depze2oiy" },
|
||||
"id": "cl10u6cw500052e6dq284zju3"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "cl10u68pw00032e6depze2oiy",
|
||||
"blockId": "cl10u6ey300062e6dea9ikpko"
|
||||
},
|
||||
"to": { "groupId": "cl10u6jzd00072e6dvo0zwy0s" },
|
||||
"id": "cl10u7ax4000g2e6dkqoq18kp"
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": {
|
||||
"isBrandingEnabled": true,
|
||||
"isInputPrefillEnabled": true,
|
||||
"isNewResultOnRefreshEnabled": false
|
||||
},
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null,
|
||||
"customDomain": null
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
{
|
||||
"id": "ckz8gg4n39573no1aa5rsfyp1",
|
||||
"createdAt": "2022-02-04T13:40:19.455Z",
|
||||
"updatedAt": "2022-02-04T13:40:19.455Z",
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "bSHn2HQZ1sKji5pd9Nmejf",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "qYmbSFBxCvGCgTvQTg9HeH",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "bSHn2HQZ1sKji5pd9Nmejf",
|
||||
"outgoingEdgeId": "jdQnqJK4b559rTJzHHhjcz"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "mSvUFogQH16bQDN1iGWF66",
|
||||
"graphCoordinates": { "x": 324, "y": 209 },
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "spDLmDCZfNJu4DrZ1MUg84c",
|
||||
"groupId": "mSvUFogQH16bQDN1iGWF66",
|
||||
"type": "email input",
|
||||
"options": {
|
||||
"labels": { "button": "Send", "placeholder": "Type your email..." },
|
||||
"variableId": "qyLW6xD1AyLeedso2tHmhw"
|
||||
},
|
||||
"outgoingEdgeId": "4yg9V76fdDntpDEw6H3tvU"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "jd4S6BQsUQ2RuKieHXYKs9",
|
||||
"graphCoordinates": { "x": 655, "y": 363 },
|
||||
"title": "Group #2",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "s1ZvUqWxV6b8UgFGYWh39pV",
|
||||
"groupId": "jd4S6BQsUQ2RuKieHXYKs9",
|
||||
"type": "Google Sheets",
|
||||
"options": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [{ "id": "qyLW6xD1AyLeedso2tHmhw", "name": "Email" }],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"groupId": "bSHn2HQZ1sKji5pd9Nmejf",
|
||||
"blockId": "qYmbSFBxCvGCgTvQTg9HeH"
|
||||
},
|
||||
"to": { "groupId": "mSvUFogQH16bQDN1iGWF66" },
|
||||
"id": "jdQnqJK4b559rTJzHHhjcz"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "mSvUFogQH16bQDN1iGWF66",
|
||||
"blockId": "spDLmDCZfNJu4DrZ1MUg84c"
|
||||
},
|
||||
"to": { "groupId": "jd4S6BQsUQ2RuKieHXYKs9" },
|
||||
"id": "4yg9V76fdDntpDEw6H3tvU"
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": { "isBrandingEnabled": true },
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null
|
||||
}
|
After Width: | Height: | Size: 1.2 MiB |
@ -0,0 +1,127 @@
|
||||
{
|
||||
"id": "ckz8gg4n39573no1aa5rsfyp1",
|
||||
"createdAt": "2022-02-04T13:40:19.455Z",
|
||||
"updatedAt": "2022-02-04T13:40:19.455Z",
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "bSHn2HQZ1sKji5pd9Nmejf",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "qYmbSFBxCvGCgTvQTg9HeH",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "bSHn2HQZ1sKji5pd9Nmejf",
|
||||
"outgoingEdgeId": "jdQnqJK4b559rTJzHHhjcz"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "mSvUFogQH16bQDN1iGWF66",
|
||||
"graphCoordinates": { "x": 324, "y": 209 },
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "spDLmDCZfNJu4DrZ1MUg84c",
|
||||
"groupId": "mSvUFogQH16bQDN1iGWF66",
|
||||
"type": "email input",
|
||||
"options": {
|
||||
"labels": { "button": "Send", "placeholder": "Type your email..." },
|
||||
"variableId": "qyLW6xD1AyLeedso2tHmhw"
|
||||
},
|
||||
"outgoingEdgeId": "4yg9V76fdDntpDEw6H3tvU"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "jd4S6BQsUQ2RuKieHXYKs9",
|
||||
"graphCoordinates": { "x": 655, "y": 363 },
|
||||
"title": "Group #2",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "s1ZvUqWxV6b8UgFGYWh39pV",
|
||||
"groupId": "jd4S6BQsUQ2RuKieHXYKs9",
|
||||
"type": "Google Sheets",
|
||||
"options": {},
|
||||
"outgoingEdgeId": "tBsPNYzMW1mMSvFMHZpmx8"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pd3PECJqHB9xHMfc52SbrZ",
|
||||
"graphCoordinates": { "x": 292, "y": 509 },
|
||||
"title": "Group #3",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "sdECvSYszxBaZHH5TuWm11h",
|
||||
"groupId": "pd3PECJqHB9xHMfc52SbrZ",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Your name is: {{First name}} {{Last name}}</div>",
|
||||
"richText": [
|
||||
{
|
||||
"type": "p",
|
||||
"children": [
|
||||
{ "text": "Your name is: {{First name}} {{Last name}}" }
|
||||
]
|
||||
}
|
||||
],
|
||||
"plainText": "Your name is: {{First name}} {{Last name}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [{ "id": "qyLW6xD1AyLeedso2tHmhw", "name": "Email" }],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"groupId": "bSHn2HQZ1sKji5pd9Nmejf",
|
||||
"blockId": "qYmbSFBxCvGCgTvQTg9HeH"
|
||||
},
|
||||
"to": { "groupId": "mSvUFogQH16bQDN1iGWF66" },
|
||||
"id": "jdQnqJK4b559rTJzHHhjcz"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "mSvUFogQH16bQDN1iGWF66",
|
||||
"blockId": "spDLmDCZfNJu4DrZ1MUg84c"
|
||||
},
|
||||
"to": { "groupId": "jd4S6BQsUQ2RuKieHXYKs9" },
|
||||
"id": "4yg9V76fdDntpDEw6H3tvU"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "jd4S6BQsUQ2RuKieHXYKs9",
|
||||
"blockId": "s1ZvUqWxV6b8UgFGYWh39pV"
|
||||
},
|
||||
"to": { "groupId": "pd3PECJqHB9xHMfc52SbrZ" },
|
||||
"id": "tBsPNYzMW1mMSvFMHZpmx8"
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": { "isBrandingEnabled": true },
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null
|
||||
}
|
After Width: | Height: | Size: 1.3 MiB |
@ -0,0 +1,111 @@
|
||||
{
|
||||
"id": "ckzcj4tfu1686gg1ae4fdj8uv",
|
||||
"createdAt": "2022-02-07T10:06:35.274Z",
|
||||
"updatedAt": "2022-02-07T10:06:35.274Z",
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "kSDJqC9TmM25eAM3a2yn3o",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "phSmjJU2gYq7b11hpima8b",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "kSDJqC9TmM25eAM3a2yn3o",
|
||||
"outgoingEdgeId": "vKtpPmbmqgeGC4vwCfPEdv"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "b5r2MMyftV1nv9vyr6VkZh",
|
||||
"graphCoordinates": { "x": 242, "y": 174 },
|
||||
"title": "Group #2",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "sb7ibhNAKfvs8yy8fz3XRMT",
|
||||
"groupId": "b5r2MMyftV1nv9vyr6VkZh",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Send email</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "Send email" }] }
|
||||
],
|
||||
"plainText": "Send email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "svM58drFcdtdJ7DaJCfTLXm",
|
||||
"groupId": "b5r2MMyftV1nv9vyr6VkZh",
|
||||
"type": "choice input",
|
||||
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
|
||||
"items": [
|
||||
{
|
||||
"id": "nxQEmdaQXc9eFjrbrVBavH",
|
||||
"blockId": "svM58drFcdtdJ7DaJCfTLXm",
|
||||
"type": 0,
|
||||
"content": "Go"
|
||||
}
|
||||
],
|
||||
"outgoingEdgeId": "ioB4s1iRBb8wXiRam8Pp4s"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "6jr7XM9GbVkJ2Ru1WyL45v",
|
||||
"graphCoordinates": { "x": 609, "y": 429 },
|
||||
"title": "Group #2",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "sr2sdAzN5dGao1gCiDWCG8i",
|
||||
"groupId": "6jr7XM9GbVkJ2Ru1WyL45v",
|
||||
"type": "Email",
|
||||
"options": { "credentialsId": "default", "recipients": [] }
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"groupId": "kSDJqC9TmM25eAM3a2yn3o",
|
||||
"blockId": "phSmjJU2gYq7b11hpima8b"
|
||||
},
|
||||
"to": { "groupId": "b5r2MMyftV1nv9vyr6VkZh" },
|
||||
"id": "vKtpPmbmqgeGC4vwCfPEdv"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "b5r2MMyftV1nv9vyr6VkZh",
|
||||
"blockId": "svM58drFcdtdJ7DaJCfTLXm"
|
||||
},
|
||||
"to": { "groupId": "6jr7XM9GbVkJ2Ru1WyL45v" },
|
||||
"id": "ioB4s1iRBb8wXiRam8Pp4s"
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": { "isBrandingEnabled": true },
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null
|
||||
}
|
BIN
apps/builder/src/test/assets/typebots/integrations/sendEmail.png
Normal file
After Width: | Height: | Size: 1.4 MiB |
121
apps/builder/src/test/assets/typebots/integrations/webhook.json
Normal file
@ -0,0 +1,121 @@
|
||||
{
|
||||
"id": "ckz8gli9e9842no1afuppdn0z",
|
||||
"createdAt": "2022-02-04T13:44:30.386Z",
|
||||
"updatedAt": "2022-02-04T13:44:30.386Z",
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "p6GeeRXHgwiJeoJRBkKaMJ",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "iDS7jFemUsQ7Sp3eu3xg3w",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "p6GeeRXHgwiJeoJRBkKaMJ",
|
||||
"outgoingEdgeId": "cyEJPaLU7AchnBSaeWoyiS"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "kBneEpKdMYrF65XxUQ5GS7",
|
||||
"graphCoordinates": { "x": 260, "y": 186 },
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "skSkZ4PNP7m1gYvu9Ew6ngM",
|
||||
"groupId": "kBneEpKdMYrF65XxUQ5GS7",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Ready?</div>",
|
||||
"richText": [{ "type": "p", "children": [{ "text": "Ready?" }] }],
|
||||
"plainText": "Ready?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "sh6ZVRA3o72y6BEiNKVcoma",
|
||||
"groupId": "kBneEpKdMYrF65XxUQ5GS7",
|
||||
"type": "choice input",
|
||||
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
|
||||
"items": [
|
||||
{
|
||||
"id": "rr5mKKBPq73ZrfXZ3uuupz",
|
||||
"blockId": "sh6ZVRA3o72y6BEiNKVcoma",
|
||||
"type": 0,
|
||||
"content": "Go",
|
||||
"outgoingEdgeId": "1sLicz8gq2QxytFTwBd8ac"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "8XnDM1QsqPms4LQHh8q3Jo",
|
||||
"graphCoordinates": { "x": 646, "y": 511 },
|
||||
"title": "Group #2",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "soSmiE7zyb3WF77GxFxAjYX",
|
||||
"groupId": "8XnDM1QsqPms4LQHh8q3Jo",
|
||||
"type": "Webhook",
|
||||
"options": {
|
||||
"responseVariableMapping": [],
|
||||
"variablesForTest": [],
|
||||
"isAdvancedConfig": false,
|
||||
"isCustomBody": false
|
||||
},
|
||||
"webhookId": "webhook1"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [
|
||||
{ "id": "var1", "name": "secret 1" },
|
||||
{ "id": "var2", "name": "secret 2" },
|
||||
{ "id": "var3", "name": "secret 3" },
|
||||
{ "id": "var4", "name": "secret 4" }
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"groupId": "p6GeeRXHgwiJeoJRBkKaMJ",
|
||||
"blockId": "iDS7jFemUsQ7Sp3eu3xg3w"
|
||||
},
|
||||
"to": { "groupId": "kBneEpKdMYrF65XxUQ5GS7" },
|
||||
"id": "cyEJPaLU7AchnBSaeWoyiS"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "kBneEpKdMYrF65XxUQ5GS7",
|
||||
"blockId": "sh6ZVRA3o72y6BEiNKVcoma",
|
||||
"itemId": "rr5mKKBPq73ZrfXZ3uuupz"
|
||||
},
|
||||
"to": { "groupId": "8XnDM1QsqPms4LQHh8q3Jo" },
|
||||
"id": "1sLicz8gq2QxytFTwBd8ac"
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": { "isBrandingEnabled": true },
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null
|
||||
}
|
BIN
apps/builder/src/test/assets/typebots/integrations/webhook.png
Normal file
After Width: | Height: | Size: 1.3 MiB |
100
apps/builder/src/test/assets/typebots/logic/code.json
Normal file
@ -0,0 +1,100 @@
|
||||
{
|
||||
"id": "ckz8hnw7m10833no1ar12eov20",
|
||||
"createdAt": "2022-02-04T14:14:21.394Z",
|
||||
"updatedAt": "2022-02-04T14:14:21.394Z",
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "tdN9VXcdBWpuh6Gpaz3w4u",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cVRL5EuVruTK31SAaVCvNE",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "tdN9VXcdBWpuh6Gpaz3w4u",
|
||||
"outgoingEdgeId": "jqZYCYGxaL8svJbM2h1QAn"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "vymPUjL9AcWpkg9PkUXovk",
|
||||
"graphCoordinates": { "x": 685, "y": 194 },
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "sa8WhnrMyMjYCBMeozfYRoi",
|
||||
"groupId": "vymPUjL9AcWpkg9PkUXovk",
|
||||
"type": "Code",
|
||||
"options": { "name": "Code snippet" }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "rEJ3PhFQc7diJ23jdoF6w7",
|
||||
"graphCoordinates": { "x": 294, "y": 201 },
|
||||
"title": "Group #2",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "s7QRApVZmVFZgS53CNruBRz",
|
||||
"groupId": "rEJ3PhFQc7diJ23jdoF6w7",
|
||||
"type": "choice input",
|
||||
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
|
||||
"items": [
|
||||
{
|
||||
"id": "5rWR3enRg6jZyFhtmgbPYo",
|
||||
"blockId": "s7QRApVZmVFZgS53CNruBRz",
|
||||
"type": 0,
|
||||
"content": "Trigger code",
|
||||
"outgoingEdgeId": "6aVDkPMEsadze2vf4mLiYt"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"groupId": "tdN9VXcdBWpuh6Gpaz3w4u",
|
||||
"blockId": "cVRL5EuVruTK31SAaVCvNE"
|
||||
},
|
||||
"to": { "groupId": "rEJ3PhFQc7diJ23jdoF6w7" },
|
||||
"id": "jqZYCYGxaL8svJbM2h1QAn"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "rEJ3PhFQc7diJ23jdoF6w7",
|
||||
"blockId": "s7QRApVZmVFZgS53CNruBRz",
|
||||
"itemId": "5rWR3enRg6jZyFhtmgbPYo"
|
||||
},
|
||||
"to": { "groupId": "vymPUjL9AcWpkg9PkUXovk" },
|
||||
"id": "6aVDkPMEsadze2vf4mLiYt"
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": { "isBrandingEnabled": true },
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null
|
||||
}
|
235
apps/builder/src/test/assets/typebots/logic/condition.json
Normal file
@ -0,0 +1,235 @@
|
||||
{
|
||||
"id": "ckz8gpmgr10008no1a1mq4q1l2",
|
||||
"createdAt": "2022-02-04T13:47:42.459Z",
|
||||
"updatedAt": "2022-02-04T13:47:42.459Z",
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "cN46uqNAR3ohjrS8jHJ6xT",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "nzijwLtLTAZfNNCN7kEpn5",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "cN46uqNAR3ohjrS8jHJ6xT",
|
||||
"outgoingEdgeId": "7wxB76VK81JsXMX9jU9dbQ"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "eh2ohNATnGg6RTdjG9h5kb",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "sb6xdkJRr6P6BxtTM3ku5JD",
|
||||
"type": "text",
|
||||
"groupId": "eh2ohNATnGg6RTdjG9h5kb",
|
||||
"content": {
|
||||
"html": "<div>How old are you?</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "How old are you?" }] }
|
||||
],
|
||||
"plainText": "How old are you?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ssyBKZve7bihSxUASYTruZA",
|
||||
"type": "number input",
|
||||
"groupId": "eh2ohNATnGg6RTdjG9h5kb",
|
||||
"options": {
|
||||
"labels": { "button": "Send", "placeholder": "Type a number..." },
|
||||
"variableId": "iDJzzyzAY2jrapm3NwhGMz"
|
||||
},
|
||||
"outgoingEdgeId": "r8LX7iuEXxjF5SW5dbS6qT"
|
||||
}
|
||||
],
|
||||
"title": "Group #1",
|
||||
"graphCoordinates": { "x": 159, "y": 224 }
|
||||
},
|
||||
{
|
||||
"id": "eMk84KvFM53sBxchTeackR",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "s5hz7HQki66cwELvk2738MJ",
|
||||
"groupId": "eMk84KvFM53sBxchTeackR",
|
||||
"type": "Condition",
|
||||
"items": [
|
||||
{
|
||||
"id": "56s4R9THRKeoJtBdKzEGLn",
|
||||
"blockId": "s5hz7HQki66cwELvk2738MJ",
|
||||
"type": 1,
|
||||
"content": {
|
||||
"comparisons": [
|
||||
{
|
||||
"id": "wxWqL7JuZhy9uwCZNPDJjM"
|
||||
}
|
||||
],
|
||||
"logicalOperator": "AND"
|
||||
},
|
||||
"outgoingEdgeId": "nDjMjM11xPQF7c9Be6ukdY"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "sv8uvEXgYWQNMfZWcdbfyCs",
|
||||
"type": "Condition",
|
||||
"items": [
|
||||
{
|
||||
"id": "ijYfW38tGhCMRrCtmR3bcr",
|
||||
"type": 1,
|
||||
"blockId": "sv8uvEXgYWQNMfZWcdbfyCs",
|
||||
"content": {
|
||||
"comparisons": [
|
||||
{
|
||||
"id": "3di6P3ypWf3XusgBLLHYBE"
|
||||
}
|
||||
],
|
||||
"logicalOperator": "AND"
|
||||
},
|
||||
"outgoingEdgeId": "s1uVbzP1zMMJjsCguAfhGV"
|
||||
}
|
||||
],
|
||||
"groupId": "eMk84KvFM53sBxchTeackR",
|
||||
"outgoingEdgeId": "hVScFHNzToiEsMfYVv5AWZ"
|
||||
}
|
||||
],
|
||||
"title": "Group #2",
|
||||
"graphCoordinates": { "x": 561, "y": 295 }
|
||||
},
|
||||
{
|
||||
"id": "fGrzjahWecA8hoNMRrLSwn",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "soZqPdPUjYAht9nHmVpba1Q",
|
||||
"type": "text",
|
||||
"groupId": "fGrzjahWecA8hoNMRrLSwn",
|
||||
"content": {
|
||||
"html": "<div>You are older than 80</div>",
|
||||
"richText": [
|
||||
{
|
||||
"type": "p",
|
||||
"children": [{ "text": "You are older than 80" }]
|
||||
}
|
||||
],
|
||||
"plainText": "You are older than 80"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Group #3",
|
||||
"graphCoordinates": { "x": 936, "y": 63 }
|
||||
},
|
||||
{
|
||||
"id": "49Jv45UJi9R3U4FuWS8R2c",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "svipUacs1sDk9KDxzaGhnsG",
|
||||
"type": "text",
|
||||
"groupId": "49Jv45UJi9R3U4FuWS8R2c",
|
||||
"content": {
|
||||
"html": "<div>You are older than 20</div>",
|
||||
"richText": [
|
||||
{
|
||||
"type": "p",
|
||||
"children": [{ "text": "You are older than 20" }]
|
||||
}
|
||||
],
|
||||
"plainText": "You are older than 20"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Group #4",
|
||||
"graphCoordinates": { "x": 950, "y": 298 }
|
||||
},
|
||||
{
|
||||
"id": "fD28kefdySKK7XA7SyTozC",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "spHJ7v9bDdVrFfuF2zg3YNR",
|
||||
"type": "text",
|
||||
"groupId": "fD28kefdySKK7XA7SyTozC",
|
||||
"content": {
|
||||
"html": "<div>You are younger than 20</div>",
|
||||
"richText": [
|
||||
{
|
||||
"type": "p",
|
||||
"children": [{ "text": "You are younger than 20" }]
|
||||
}
|
||||
],
|
||||
"plainText": "You are younger than 20"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Group #5",
|
||||
"graphCoordinates": { "x": 985, "y": 537 }
|
||||
}
|
||||
],
|
||||
"variables": [{ "id": "iDJzzyzAY2jrapm3NwhGMz", "name": "Age" }],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"groupId": "eMk84KvFM53sBxchTeackR",
|
||||
"blockId": "s5hz7HQki66cwELvk2738MJ",
|
||||
"itemId": "56s4R9THRKeoJtBdKzEGLn"
|
||||
},
|
||||
"to": { "groupId": "fGrzjahWecA8hoNMRrLSwn" },
|
||||
"id": "nDjMjM11xPQF7c9Be6ukdY"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "eMk84KvFM53sBxchTeackR",
|
||||
"blockId": "sv8uvEXgYWQNMfZWcdbfyCs",
|
||||
"itemId": "ijYfW38tGhCMRrCtmR3bcr"
|
||||
},
|
||||
"to": { "groupId": "49Jv45UJi9R3U4FuWS8R2c" },
|
||||
"id": "s1uVbzP1zMMJjsCguAfhGV"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "eMk84KvFM53sBxchTeackR",
|
||||
"blockId": "sv8uvEXgYWQNMfZWcdbfyCs"
|
||||
},
|
||||
"to": { "groupId": "fD28kefdySKK7XA7SyTozC" },
|
||||
"id": "hVScFHNzToiEsMfYVv5AWZ"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "eh2ohNATnGg6RTdjG9h5kb",
|
||||
"blockId": "ssyBKZve7bihSxUASYTruZA"
|
||||
},
|
||||
"to": { "groupId": "eMk84KvFM53sBxchTeackR" },
|
||||
"id": "r8LX7iuEXxjF5SW5dbS6qT"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "cN46uqNAR3ohjrS8jHJ6xT",
|
||||
"blockId": "nzijwLtLTAZfNNCN7kEpn5"
|
||||
},
|
||||
"to": { "groupId": "eh2ohNATnGg6RTdjG9h5kb" },
|
||||
"id": "7wxB76VK81JsXMX9jU9dbQ"
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": { "isBrandingEnabled": true },
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null
|
||||
}
|
BIN
apps/builder/src/test/assets/typebots/logic/condition.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
101
apps/builder/src/test/assets/typebots/logic/linkTypebots/1.json
Normal file
@ -0,0 +1,101 @@
|
||||
{
|
||||
"id": "cl0j7q9el0032b51al3rx6jo7",
|
||||
"createdAt": "2022-03-09T07:01:25.917Z",
|
||||
"updatedAt": "2022-03-09T07:01:25.917Z",
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "jPVDjQ5go4ZxmGCmApbcQf",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "nrCKsAYzbCogJanfxUavUV",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "jPVDjQ5go4ZxmGCmApbcQf",
|
||||
"outgoingEdgeId": "8MazLBx8HbfKeYLADQkA3z"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "nyD3H7h6tEZqDmGwGciGV4",
|
||||
"graphCoordinates": { "x": 428, "y": 168 },
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "s8Pz7fPg4niG1JcvBS3CwAs",
|
||||
"groupId": "nyD3H7h6tEZqDmGwGciGV4",
|
||||
"type": "Typebot link",
|
||||
"options": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "jMbvgRQfXUaXg37LRNqRaJ",
|
||||
"graphCoordinates": { "x": 423, "y": 386 },
|
||||
"title": "Hello",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "scE368YFYn9cWU1RkQDFLUW",
|
||||
"groupId": "jMbvgRQfXUaXg37LRNqRaJ",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Hello world</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "Hello world" }] }
|
||||
],
|
||||
"plainText": "Hello world"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "sem1do43KTkuvf49eqWcMgc",
|
||||
"groupId": "jMbvgRQfXUaXg37LRNqRaJ",
|
||||
"type": "text input",
|
||||
"options": {
|
||||
"isLong": false,
|
||||
"labels": { "button": "Send", "placeholder": "Type your answer..." }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"groupId": "jPVDjQ5go4ZxmGCmApbcQf",
|
||||
"blockId": "nrCKsAYzbCogJanfxUavUV"
|
||||
},
|
||||
"to": { "groupId": "nyD3H7h6tEZqDmGwGciGV4" },
|
||||
"id": "8MazLBx8HbfKeYLADQkA3z"
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": {
|
||||
"isBrandingEnabled": true,
|
||||
"isNewResultOnRefreshEnabled": false
|
||||
},
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null,
|
||||
"customDomain": null
|
||||
}
|
104
apps/builder/src/test/assets/typebots/logic/linkTypebots/2.json
Normal file
@ -0,0 +1,104 @@
|
||||
{
|
||||
"id": "cl0iecee90042961arm5kb0f0",
|
||||
"createdAt": "2022-03-08T17:18:50.337Z",
|
||||
"updatedAt": "2022-03-08T21:05:28.825Z",
|
||||
"name": "Another typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "p4ByLVoKiDRyRoPHKmcTfw",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "rw6smEWEJzHKbiVKLUKFvZ",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "p4ByLVoKiDRyRoPHKmcTfw",
|
||||
"outgoingEdgeId": "1z3pfiatTUHbraD2uSoA3E"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "bg4QEJseUsTP496H27j5k2",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "s8ZeBL9p5za77eBmdKECLYq",
|
||||
"type": "text input",
|
||||
"groupId": "bg4QEJseUsTP496H27j5k2",
|
||||
"options": {
|
||||
"isLong": false,
|
||||
"labels": { "button": "Send", "placeholder": "Type your answer..." }
|
||||
},
|
||||
"outgoingEdgeId": "aEBnubX4EMx4Cse6xPAR1m"
|
||||
}
|
||||
],
|
||||
"title": "Group #1",
|
||||
"graphCoordinates": { "x": 366, "y": 191 }
|
||||
},
|
||||
{
|
||||
"id": "uhqCZSNbsYVFxop7Gc8xvn",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "smyHyeS6yaFaHHU44BNmN4n",
|
||||
"type": "text",
|
||||
"groupId": "uhqCZSNbsYVFxop7Gc8xvn",
|
||||
"content": {
|
||||
"html": "<div>Second block</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "Second block" }] }
|
||||
],
|
||||
"plainText": "Second block"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Group #2",
|
||||
"graphCoordinates": { "x": 793, "y": 99 }
|
||||
}
|
||||
],
|
||||
"variables": [],
|
||||
"edges": [
|
||||
{
|
||||
"id": "1z3pfiatTUHbraD2uSoA3E",
|
||||
"to": { "groupId": "bg4QEJseUsTP496H27j5k2" },
|
||||
"from": {
|
||||
"blockId": "rw6smEWEJzHKbiVKLUKFvZ",
|
||||
"groupId": "p4ByLVoKiDRyRoPHKmcTfw"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "aEBnubX4EMx4Cse6xPAR1m",
|
||||
"to": { "groupId": "uhqCZSNbsYVFxop7Gc8xvn" },
|
||||
"from": {
|
||||
"blockId": "s8ZeBL9p5za77eBmdKECLYq",
|
||||
"groupId": "bg4QEJseUsTP496H27j5k2"
|
||||
}
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": {
|
||||
"isBrandingEnabled": true,
|
||||
"isNewResultOnRefreshEnabled": false
|
||||
},
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null,
|
||||
"customDomain": null
|
||||
}
|
100
apps/builder/src/test/assets/typebots/logic/redirect.json
Normal file
@ -0,0 +1,100 @@
|
||||
{
|
||||
"id": "ckz8hnw7m10833no1ar12eov20",
|
||||
"createdAt": "2022-02-04T14:14:21.394Z",
|
||||
"updatedAt": "2022-02-04T14:14:21.394Z",
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "tdN9VXcdBWpuh6Gpaz3w4u",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cVRL5EuVruTK31SAaVCvNE",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "tdN9VXcdBWpuh6Gpaz3w4u",
|
||||
"outgoingEdgeId": "jqZYCYGxaL8svJbM2h1QAn"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "vymPUjL9AcWpkg9PkUXovk",
|
||||
"graphCoordinates": { "x": 685, "y": 194 },
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "sa8WhnrMyMjYCBMeozfYRoi",
|
||||
"groupId": "vymPUjL9AcWpkg9PkUXovk",
|
||||
"type": "Redirect",
|
||||
"options": { "isNewTab": false }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "rEJ3PhFQc7diJ23jdoF6w7",
|
||||
"graphCoordinates": { "x": 294, "y": 201 },
|
||||
"title": "Group #2",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "s7QRApVZmVFZgS53CNruBRz",
|
||||
"groupId": "rEJ3PhFQc7diJ23jdoF6w7",
|
||||
"type": "choice input",
|
||||
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
|
||||
"items": [
|
||||
{
|
||||
"id": "5rWR3enRg6jZyFhtmgbPYo",
|
||||
"blockId": "s7QRApVZmVFZgS53CNruBRz",
|
||||
"type": 0,
|
||||
"content": "Go to URL",
|
||||
"outgoingEdgeId": "6aVDkPMEsadze2vf4mLiYt"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"groupId": "tdN9VXcdBWpuh6Gpaz3w4u",
|
||||
"blockId": "cVRL5EuVruTK31SAaVCvNE"
|
||||
},
|
||||
"to": { "groupId": "rEJ3PhFQc7diJ23jdoF6w7" },
|
||||
"id": "jqZYCYGxaL8svJbM2h1QAn"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "rEJ3PhFQc7diJ23jdoF6w7",
|
||||
"blockId": "s7QRApVZmVFZgS53CNruBRz",
|
||||
"itemId": "5rWR3enRg6jZyFhtmgbPYo"
|
||||
},
|
||||
"to": { "groupId": "vymPUjL9AcWpkg9PkUXovk" },
|
||||
"id": "6aVDkPMEsadze2vf4mLiYt"
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": { "isBrandingEnabled": true },
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null
|
||||
}
|
BIN
apps/builder/src/test/assets/typebots/logic/redirect.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
165
apps/builder/src/test/assets/typebots/logic/setVariable.json
Normal file
@ -0,0 +1,165 @@
|
||||
{
|
||||
"id": "cl9d7ruqe00093b6o0m9a6l0d",
|
||||
"createdAt": "2022-10-17T20:13:24.182Z",
|
||||
"updatedAt": "2022-10-17T20:14:48.231Z",
|
||||
"icon": null,
|
||||
"name": "My typebot copy",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "cl9d7ruqe00023b6op792zght",
|
||||
"title": "Start",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "rqecLJCZT7gP2JgBhRpb3a",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "cl9d7ruqe00023b6op792zght",
|
||||
"outgoingEdgeId": "cl9d7ruqe00063b6o98bpn80p"
|
||||
}
|
||||
],
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "cl9d7ruqe00033b6oe5nzpeub",
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "souEkLukHsYU9jrN2rAP7YT",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>How old are you?</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "How old are you?" }] }
|
||||
],
|
||||
"plainText": "How old are you?"
|
||||
},
|
||||
"groupId": "cl9d7ruqe00033b6oe5nzpeub"
|
||||
},
|
||||
{
|
||||
"id": "skfn5McXVrTNpi2e62RtEEY",
|
||||
"type": "number input",
|
||||
"groupId": "cl9d7ruqe00033b6oe5nzpeub",
|
||||
"options": {
|
||||
"labels": { "button": "Send", "placeholder": "Type a number..." }
|
||||
},
|
||||
"outgoingEdgeId": "cl9d7ruqe00073b6oumb3wdq8"
|
||||
}
|
||||
],
|
||||
"graphCoordinates": { "x": 200, "y": 171 }
|
||||
},
|
||||
{
|
||||
"id": "cl9d7ruqe00043b6o74n47tpt",
|
||||
"title": "Group #2",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "spgqbyvunY91Ct5kVgeLLkz",
|
||||
"type": "Set variable",
|
||||
"groupId": "cl9d7ruqe00043b6o74n47tpt",
|
||||
"options": {}
|
||||
},
|
||||
{
|
||||
"id": "skeKC71L8C8wpfeuV4TTLCD",
|
||||
"type": "Set variable",
|
||||
"groupId": "cl9d7ruqe00043b6o74n47tpt",
|
||||
"options": {}
|
||||
},
|
||||
{
|
||||
"id": "cl9d7srh8000e3b6okmpf5165",
|
||||
"groupId": "cl9d7ruqe00043b6o74n47tpt",
|
||||
"type": "Set variable",
|
||||
"options": {},
|
||||
"outgoingEdgeId": "cl9d7svig000f3b6o5v0wlsxw"
|
||||
}
|
||||
],
|
||||
"graphCoordinates": { "x": 526, "y": 283 }
|
||||
},
|
||||
{
|
||||
"id": "cl9d7ruqe00053b6o8l0h608t",
|
||||
"title": "Group #3",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "svpmd4uNoAXpoKyfYuuXTQe",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Multiplication: {{Total}}</div><div>Custom var: {{Custom var}}</div><div>Addition: {{Addition}}</div>",
|
||||
"richText": [
|
||||
{
|
||||
"type": "p",
|
||||
"children": [{ "text": "Multiplication: {{Total}}" }]
|
||||
},
|
||||
{
|
||||
"type": "p",
|
||||
"children": [{ "text": "Custom var: {{Custom var}}" }]
|
||||
},
|
||||
{
|
||||
"type": "p",
|
||||
"children": [{ "text": "Addition: {{Addition}}" }]
|
||||
}
|
||||
],
|
||||
"plainText": "Multiplication: {{Total}}Custom var: {{Custom var}}Addition: {{Addition}}"
|
||||
},
|
||||
"groupId": "cl9d7ruqe00053b6o8l0h608t"
|
||||
}
|
||||
],
|
||||
"graphCoordinates": { "x": 697, "y": -23 }
|
||||
}
|
||||
],
|
||||
"variables": [],
|
||||
"edges": [
|
||||
{
|
||||
"id": "cl9d7ruqe00063b6o98bpn80p",
|
||||
"to": { "groupId": "cl9d7ruqe00033b6oe5nzpeub" },
|
||||
"from": {
|
||||
"blockId": "rqecLJCZT7gP2JgBhRpb3a",
|
||||
"groupId": "cl9d7ruqe00023b6op792zght"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl9d7ruqe00073b6oumb3wdq8",
|
||||
"to": { "groupId": "cl9d7ruqe00043b6o74n47tpt" },
|
||||
"from": {
|
||||
"blockId": "skfn5McXVrTNpi2e62RtEEY",
|
||||
"groupId": "cl9d7ruqe00033b6oe5nzpeub"
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "cl9d7ruqe00043b6o74n47tpt",
|
||||
"blockId": "cl9d7srh8000e3b6okmpf5165"
|
||||
},
|
||||
"to": { "groupId": "cl9d7ruqe00053b6o8l0h608t" },
|
||||
"id": "cl9d7svig000f3b6o5v0wlsxw"
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostAvatar": {
|
||||
"url": "https://avatars.githubusercontent.com/u/16015833?v=4",
|
||||
"isEnabled": true
|
||||
},
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": { "isBrandingEnabled": true },
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null,
|
||||
"customDomain": null,
|
||||
"workspaceId": "proWorkspace",
|
||||
"isArchived": false,
|
||||
"isClosed": false
|
||||
}
|
BIN
apps/builder/src/test/assets/typebots/logic/setVariable.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
@ -0,0 +1,354 @@
|
||||
{
|
||||
"id": "8hASqMTjwFVzB32vRcVND5",
|
||||
"createdAt": "2022-02-05T06:21:16.522Z",
|
||||
"updatedAt": "2022-02-05T06:21:16.522Z",
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "k6kY6gwRE6noPoYQNGzgUq",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "22HP69iipkLjJDTUcc1AWW",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "k6kY6gwRE6noPoYQNGzgUq",
|
||||
"outgoingEdgeId": "oNvqaqNExdSH2kKEhKZHuE"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "kinRXxYop2X4d7F9qt8WNB",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "sc1y8VwDabNJgiVTBi4qtif",
|
||||
"type": "text",
|
||||
"groupId": "kinRXxYop2X4d7F9qt8WNB",
|
||||
"content": {
|
||||
"html": "<div>Welcome to <span class=\"slate-bold\">AA</span> (Awesome Agency)</div>",
|
||||
"richText": [
|
||||
{
|
||||
"type": "p",
|
||||
"children": [
|
||||
{ "text": "Welcome to " },
|
||||
{ "bold": true, "text": "AA" },
|
||||
{ "text": " (Awesome Agency)" }
|
||||
]
|
||||
}
|
||||
],
|
||||
"plainText": "Welcome to AA (Awesome Agency)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "s7YqZTBeyCa4Hp3wN2j922c",
|
||||
"type": "image",
|
||||
"groupId": "kinRXxYop2X4d7F9qt8WNB",
|
||||
"content": {
|
||||
"url": "https://media2.giphy.com/media/XD9o33QG9BoMis7iM4/giphy.gif?cid=fe3852a3ihg8rvipzzky5lybmdyq38fhke2tkrnshwk52c7d&rid=giphy.gif&ct=g"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "sbjZWLJGVkHAkDqS4JQeGow",
|
||||
"type": "choice input",
|
||||
"items": [
|
||||
{
|
||||
"id": "hQw2zbp7FDX7XYK9cFpbgC",
|
||||
"type": 0,
|
||||
"blockId": "sbjZWLJGVkHAkDqS4JQeGow",
|
||||
"content": "Hi!"
|
||||
}
|
||||
],
|
||||
"groupId": "kinRXxYop2X4d7F9qt8WNB",
|
||||
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
|
||||
"outgoingEdgeId": "i51YhHpk1dtSyduFNf5Wim"
|
||||
}
|
||||
],
|
||||
"title": "Welcome",
|
||||
"graphCoordinates": { "x": 0, "y": 154 }
|
||||
},
|
||||
{
|
||||
"id": "o4SH1UtKANnW5N5D67oZUz",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "sxeYubYN6XzhAfG7m9Fivhc",
|
||||
"type": "text",
|
||||
"groupId": "o4SH1UtKANnW5N5D67oZUz",
|
||||
"content": {
|
||||
"html": "<div>Great! Nice to meet you {{Name}}</div>",
|
||||
"richText": [
|
||||
{
|
||||
"type": "p",
|
||||
"children": [{ "text": "Great! Nice to meet you {{Name}}" }]
|
||||
}
|
||||
],
|
||||
"plainText": "Great! Nice to meet you {{Name}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "scQ5kduafAtfP9T8SHUJnGi",
|
||||
"type": "text",
|
||||
"groupId": "o4SH1UtKANnW5N5D67oZUz",
|
||||
"content": {
|
||||
"html": "<div>What's the best email we can reach you at?</div>",
|
||||
"richText": [
|
||||
{
|
||||
"type": "p",
|
||||
"children": [
|
||||
{ "text": "What's the best email we can reach you at?" }
|
||||
]
|
||||
}
|
||||
],
|
||||
"plainText": "What's the best email we can reach you at?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "snbsad18Bgry8yZ8DZCfdFD",
|
||||
"type": "email input",
|
||||
"groupId": "o4SH1UtKANnW5N5D67oZUz",
|
||||
"options": {
|
||||
"labels": { "button": "Send", "placeholder": "Type your email..." },
|
||||
"variableId": "3VFChNVSCXQ2rXv4DrJ8Ah"
|
||||
},
|
||||
"outgoingEdgeId": "w3MiN1Ct38jT5NykVsgmb5"
|
||||
}
|
||||
],
|
||||
"title": "Email",
|
||||
"graphCoordinates": { "x": 639, "y": 142 }
|
||||
},
|
||||
{
|
||||
"id": "group1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "sgtE2Sy7cKykac9B223Kq9R",
|
||||
"type": "text",
|
||||
"groupId": "group1",
|
||||
"content": {
|
||||
"html": "<div>What's your name?</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "What's your name?" }] }
|
||||
],
|
||||
"plainText": "What's your name?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "block1",
|
||||
"type": "text input",
|
||||
"groupId": "group1",
|
||||
"options": {
|
||||
"isLong": false,
|
||||
"labels": {
|
||||
"button": "Send",
|
||||
"placeholder": "Type your answer..."
|
||||
},
|
||||
"variableId": "giiLFGw5xXBCHzvp1qAbdX"
|
||||
},
|
||||
"outgoingEdgeId": "4tYbERpi5Po4goVgt6rWXg"
|
||||
}
|
||||
],
|
||||
"title": "Name",
|
||||
"graphCoordinates": { "x": 322, "y": 296 }
|
||||
},
|
||||
{
|
||||
"id": "fKqRz7iswk7ULaj5PJocZL",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "su7HceVXWyTCzi2vv3m4QbK",
|
||||
"type": "text",
|
||||
"groupId": "fKqRz7iswk7ULaj5PJocZL",
|
||||
"content": {
|
||||
"html": "<div>What services are you interested in?</div>",
|
||||
"richText": [
|
||||
{
|
||||
"type": "p",
|
||||
"children": [{ "text": "What services are you interested in?" }]
|
||||
}
|
||||
],
|
||||
"plainText": "What services are you interested in?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "s5VQGsVF4hQgziQsXVdwPDW",
|
||||
"type": "choice input",
|
||||
"items": [
|
||||
{
|
||||
"id": "fnLCBF4NdraSwcubnBhk8H",
|
||||
"type": 0,
|
||||
"blockId": "s5VQGsVF4hQgziQsXVdwPDW",
|
||||
"content": "Website dev"
|
||||
},
|
||||
{
|
||||
"id": "a782h8ynMouY84QjH7XSnR",
|
||||
"type": 0,
|
||||
"blockId": "s5VQGsVF4hQgziQsXVdwPDW",
|
||||
"content": "Content Marketing"
|
||||
},
|
||||
{
|
||||
"id": "jGvh94zBByvVFpSS3w97zY",
|
||||
"type": 0,
|
||||
"blockId": "s5VQGsVF4hQgziQsXVdwPDW",
|
||||
"content": "Social Media"
|
||||
},
|
||||
{
|
||||
"id": "6PRLbKUezuFmwWtLVbvAQ7",
|
||||
"type": 0,
|
||||
"blockId": "s5VQGsVF4hQgziQsXVdwPDW",
|
||||
"content": "UI / UX Design"
|
||||
}
|
||||
],
|
||||
"groupId": "fKqRz7iswk7ULaj5PJocZL",
|
||||
"options": { "buttonLabel": "Send", "isMultipleChoice": true },
|
||||
"outgoingEdgeId": "ohTRakmcYJ7GdFWRZrWRjk"
|
||||
}
|
||||
],
|
||||
"title": "Services",
|
||||
"graphCoordinates": { "x": 943, "y": -1 }
|
||||
},
|
||||
{
|
||||
"id": "7qHBEyCMvKEJryBHzPmHjV",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "sqR8Sz9gW21aUYKtUikq7qZ",
|
||||
"type": "text",
|
||||
"groupId": "7qHBEyCMvKEJryBHzPmHjV",
|
||||
"content": {
|
||||
"html": "<div>Can you tell me a bit more about your needs?</div>",
|
||||
"richText": [
|
||||
{
|
||||
"type": "p",
|
||||
"children": [
|
||||
{ "text": "Can you tell me a bit more about your needs?" }
|
||||
]
|
||||
}
|
||||
],
|
||||
"plainText": "Can you tell me a bit more about your needs?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "sqFy2G3C1mh9p6s3QBdSS5x",
|
||||
"type": "text input",
|
||||
"groupId": "7qHBEyCMvKEJryBHzPmHjV",
|
||||
"options": {
|
||||
"isLong": true,
|
||||
"labels": { "button": "Send", "placeholder": "Type your answer..." }
|
||||
},
|
||||
"outgoingEdgeId": "sH5nUssG2XQbm6ZidGv9BY"
|
||||
}
|
||||
],
|
||||
"title": "Additional information",
|
||||
"graphCoordinates": { "x": 1308, "y": 42 }
|
||||
},
|
||||
{
|
||||
"id": "vF7AD7zSAj7SNvN3gr9N94",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "seLegenCgUwMopRFeAefqZ7",
|
||||
"type": "text",
|
||||
"groupId": "vF7AD7zSAj7SNvN3gr9N94",
|
||||
"content": {
|
||||
"html": "<div>Perfect!</div>",
|
||||
"richText": [{ "type": "p", "children": [{ "text": "Perfect!" }] }],
|
||||
"plainText": "Perfect!"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "s779Q1y51aVaDUJVrFb16vv",
|
||||
"type": "text",
|
||||
"groupId": "vF7AD7zSAj7SNvN3gr9N94",
|
||||
"content": {
|
||||
"html": "<div>We'll get back to you at {{Email}}</div>",
|
||||
"richText": [
|
||||
{
|
||||
"type": "p",
|
||||
"children": [{ "text": "We'll get back to you at {{Email}}" }]
|
||||
}
|
||||
],
|
||||
"plainText": "We'll get back to you at {{Email}}"
|
||||
},
|
||||
"outgoingEdgeId": "r2zwZYe33EdggUeG9Lmi3R"
|
||||
}
|
||||
],
|
||||
"title": "Bye",
|
||||
"graphCoordinates": { "x": 1668, "y": 143 }
|
||||
}
|
||||
],
|
||||
"variables": [
|
||||
{ "id": "giiLFGw5xXBCHzvp1qAbdX", "name": "Name" },
|
||||
{ "id": "3VFChNVSCXQ2rXv4DrJ8Ah", "name": "Email" },
|
||||
{ "id": "8Q8t9YCc3ieAEXSYkmnCxH", "name": "utm_source" },
|
||||
{ "id": "ds54chWAyWC4zjkdWAm3Vc", "name": "utm_userid" }
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"id": "oNvqaqNExdSH2kKEhKZHuE",
|
||||
"to": { "groupId": "kinRXxYop2X4d7F9qt8WNB" },
|
||||
"from": {
|
||||
"blockId": "22HP69iipkLjJDTUcc1AWW",
|
||||
"groupId": "k6kY6gwRE6noPoYQNGzgUq"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "i51YhHpk1dtSyduFNf5Wim",
|
||||
"to": { "groupId": "q5dAhqSTCaNdiGSJm9B9Rw" },
|
||||
"from": {
|
||||
"blockId": "sbjZWLJGVkHAkDqS4JQeGow",
|
||||
"groupId": "kinRXxYop2X4d7F9qt8WNB"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "4tYbERpi5Po4goVgt6rWXg",
|
||||
"to": { "groupId": "o4SH1UtKANnW5N5D67oZUz" },
|
||||
"from": {
|
||||
"blockId": "sqEsMo747LTDnY9FjQcEwUv",
|
||||
"groupId": "q5dAhqSTCaNdiGSJm9B9Rw"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "w3MiN1Ct38jT5NykVsgmb5",
|
||||
"to": { "groupId": "fKqRz7iswk7ULaj5PJocZL" },
|
||||
"from": {
|
||||
"blockId": "snbsad18Bgry8yZ8DZCfdFD",
|
||||
"groupId": "o4SH1UtKANnW5N5D67oZUz"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ohTRakmcYJ7GdFWRZrWRjk",
|
||||
"to": { "groupId": "7qHBEyCMvKEJryBHzPmHjV" },
|
||||
"from": {
|
||||
"blockId": "s5VQGsVF4hQgziQsXVdwPDW",
|
||||
"groupId": "fKqRz7iswk7ULaj5PJocZL"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "sH5nUssG2XQbm6ZidGv9BY",
|
||||
"to": { "groupId": "vF7AD7zSAj7SNvN3gr9N94" },
|
||||
"from": {
|
||||
"blockId": "sqFy2G3C1mh9p6s3QBdSS5x",
|
||||
"groupId": "7qHBEyCMvKEJryBHzPmHjV"
|
||||
}
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": { "isBrandingEnabled": true },
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null
|
||||
}
|
118
apps/builder/src/test/assets/typebots/settings.json
Normal file
@ -0,0 +1,118 @@
|
||||
{
|
||||
"id": "cl0kvckdk2754en1avz0i71k0",
|
||||
"createdAt": "2022-03-10T10:50:23.912Z",
|
||||
"updatedAt": "2022-03-10T10:50:23.912Z",
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "cAvp3oQUNYcANvcEQEVSpD",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "bAkhPioPM1uAda6K2aJzHD",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "cAvp3oQUNYcANvcEQEVSpD",
|
||||
"outgoingEdgeId": "2V3HtAH5fSAm6fyYzCyotq"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "8KLYVvRVGVHRQGJHHe2YPv",
|
||||
"graphCoordinates": { "x": 362, "y": 96 },
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "s7QbNUSgojnka9v9LX7Tp7L",
|
||||
"groupId": "8KLYVvRVGVHRQGJHHe2YPv",
|
||||
"type": "Set variable",
|
||||
"options": {
|
||||
"variableId": "htYvG7crtdjpsZ6XKTh1PM",
|
||||
"expressionToEvaluate": "Baptiste"
|
||||
},
|
||||
"outgoingEdgeId": "7kKfQWo6xFy97cTwV7B2w7"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "4H8ucvLjTiQ7sAyB23Huka",
|
||||
"graphCoordinates": { "x": 723, "y": 203 },
|
||||
"title": "Group #2",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "s4xoCc33mHyKv6hbVWd8MLo",
|
||||
"groupId": "4H8ucvLjTiQ7sAyB23Huka",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>What's your name?</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "What's your name?" }] }
|
||||
],
|
||||
"plainText": "What's your name?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "s5AjAPTMbUbhYxVTjSNwQuJ",
|
||||
"groupId": "4H8ucvLjTiQ7sAyB23Huka",
|
||||
"type": "text input",
|
||||
"options": {
|
||||
"isLong": false,
|
||||
"labels": {
|
||||
"button": "Send",
|
||||
"placeholder": "Type your answer..."
|
||||
},
|
||||
"variableId": "htYvG7crtdjpsZ6XKTh1PM"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [{ "id": "htYvG7crtdjpsZ6XKTh1PM", "name": "Name" }],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"groupId": "cAvp3oQUNYcANvcEQEVSpD",
|
||||
"blockId": "bAkhPioPM1uAda6K2aJzHD"
|
||||
},
|
||||
"to": { "groupId": "8KLYVvRVGVHRQGJHHe2YPv" },
|
||||
"id": "2V3HtAH5fSAm6fyYzCyotq"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "8KLYVvRVGVHRQGJHHe2YPv",
|
||||
"blockId": "s7QbNUSgojnka9v9LX7Tp7L"
|
||||
},
|
||||
"to": { "groupId": "4H8ucvLjTiQ7sAyB23Huka" },
|
||||
"id": "7kKfQWo6xFy97cTwV7B2w7"
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": {
|
||||
"isBrandingEnabled": true,
|
||||
"isInputPrefillEnabled": true,
|
||||
"isNewResultOnRefreshEnabled": false
|
||||
},
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null,
|
||||
"customDomain": null
|
||||
}
|
BIN
apps/builder/src/test/assets/typebots/settings.png
Normal file
After Width: | Height: | Size: 394 KiB |
144
apps/builder/src/test/assets/typebots/singleChoiceTarget.json
Normal file
@ -0,0 +1,144 @@
|
||||
{
|
||||
"id": "ckz8hrq1i11165no1artywpjvb",
|
||||
"createdAt": "2022-02-04T14:17:20.022Z",
|
||||
"updatedAt": "2022-02-04T14:17:20.022Z",
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "3EgW9xiicKuiCNycEY2huP",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "bHS7nGbziYUwD27tKANQY6",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "3EgW9xiicKuiCNycEY2huP",
|
||||
"outgoingEdgeId": "9LViRZxY8G6iswJrE4YLsq"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "bs9JCJfixRTv8W2imPAoyX",
|
||||
"graphCoordinates": { "x": 392, "y": 180 },
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "sqcez9cUVbPvaFL4rQsUwUk",
|
||||
"groupId": "bs9JCJfixRTv8W2imPAoyX",
|
||||
"type": "choice input",
|
||||
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
|
||||
"items": [
|
||||
{
|
||||
"id": "2jCerpszvvbmhUS8FXkKG9",
|
||||
"blockId": "sqcez9cUVbPvaFL4rQsUwUk",
|
||||
"type": 0,
|
||||
"content": "Burgers",
|
||||
"outgoingEdgeId": "aTS7nwxhRdFN8NwAXE2oSq"
|
||||
},
|
||||
{
|
||||
"blockId": "sqcez9cUVbPvaFL4rQsUwUk",
|
||||
"type": 0,
|
||||
"id": "vP4HWCYkeRL6egk3yjCCmg",
|
||||
"content": "Hot dogs"
|
||||
},
|
||||
{
|
||||
"blockId": "sqcez9cUVbPvaFL4rQsUwUk",
|
||||
"type": 0,
|
||||
"id": "hhveB5JSxJ8X9N66LFaUfe",
|
||||
"content": "Carpaccio"
|
||||
}
|
||||
],
|
||||
"outgoingEdgeId": "8FaF38WfM7PiLJLS5z6vQe"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "ih574JsgYCSSt3t77DH9gp",
|
||||
"graphCoordinates": { "x": 770, "y": 105 },
|
||||
"title": "Group #2",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "s9hdG689cjRzmTdb5hMN83q",
|
||||
"groupId": "ih574JsgYCSSt3t77DH9gp",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>I love burgers!</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "I love burgers!" }] }
|
||||
],
|
||||
"plainText": "I love burgers!"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "5bMwu6Wv79avgdz3TKjVXr",
|
||||
"graphCoordinates": { "x": 766, "y": 311 },
|
||||
"title": "Group #3",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "s3Zwr8m3Nm2BwGxNNCu4n7N",
|
||||
"groupId": "5bMwu6Wv79avgdz3TKjVXr",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Cool!</div>",
|
||||
"richText": [{ "type": "p", "children": [{ "text": "Cool!" }] }],
|
||||
"plainText": "Cool!"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"groupId": "3EgW9xiicKuiCNycEY2huP",
|
||||
"blockId": "bHS7nGbziYUwD27tKANQY6"
|
||||
},
|
||||
"to": { "groupId": "bs9JCJfixRTv8W2imPAoyX" },
|
||||
"id": "9LViRZxY8G6iswJrE4YLsq"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "bs9JCJfixRTv8W2imPAoyX",
|
||||
"blockId": "sqcez9cUVbPvaFL4rQsUwUk",
|
||||
"itemId": "2jCerpszvvbmhUS8FXkKG9"
|
||||
},
|
||||
"to": { "groupId": "ih574JsgYCSSt3t77DH9gp" },
|
||||
"id": "aTS7nwxhRdFN8NwAXE2oSq"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "bs9JCJfixRTv8W2imPAoyX",
|
||||
"blockId": "sqcez9cUVbPvaFL4rQsUwUk"
|
||||
},
|
||||
"to": { "groupId": "5bMwu6Wv79avgdz3TKjVXr" },
|
||||
"id": "8FaF38WfM7PiLJLS5z6vQe"
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": { "isBrandingEnabled": true },
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null
|
||||
}
|
BIN
apps/builder/src/test/assets/typebots/singleChoiceTarget.png
Normal file
After Width: | Height: | Size: 1.4 MiB |
195
apps/builder/src/test/assets/typebots/theme.json
Normal file
@ -0,0 +1,195 @@
|
||||
{
|
||||
"id": "chat-theme-typebot",
|
||||
"createdAt": "2022-02-04T14:19:29.412Z",
|
||||
"updatedAt": "2022-06-26T14:07:19.077Z",
|
||||
"icon": null,
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "teepNancm8TLj1qYhaTYAf",
|
||||
"title": "Start",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "8fG3wDsExSSkq5ekUMzWVY",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "teepNancm8TLj1qYhaTYAf",
|
||||
"outgoingEdgeId": "pj6fgTAjarwBq2jVgMgYoK"
|
||||
}
|
||||
],
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "6Dj1i7LeM3qXg5SKMhMyo1",
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "swUB2pSmvcv3NC7ySzskRpL",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Ready?</div>",
|
||||
"richText": [{ "type": "p", "children": [{ "text": "Ready?" }] }],
|
||||
"plainText": "Ready?"
|
||||
},
|
||||
"groupId": "6Dj1i7LeM3qXg5SKMhMyo1"
|
||||
},
|
||||
{
|
||||
"id": "sc7ZYFtHVegJUA8c5K3gghi",
|
||||
"type": "choice input",
|
||||
"items": [
|
||||
{
|
||||
"id": "nTjur4kxyL473XTbAb4Fak",
|
||||
"type": 0,
|
||||
"blockId": "sc7ZYFtHVegJUA8c5K3gghi",
|
||||
"content": "Go"
|
||||
}
|
||||
],
|
||||
"groupId": "6Dj1i7LeM3qXg5SKMhMyo1",
|
||||
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
|
||||
"outgoingEdgeId": "uAsACqSmud99zmyCABWDwr"
|
||||
}
|
||||
],
|
||||
"graphCoordinates": { "x": 315, "y": 137 }
|
||||
},
|
||||
{
|
||||
"id": "2TR5xAQobKAg8hbArfh5br",
|
||||
"title": "Group #2",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl4vdo1fz0008396nolxr0yln",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Cool go</div>",
|
||||
"richText": [{ "type": "p", "children": [{ "text": "Cool go" }] }],
|
||||
"plainText": "Cool go"
|
||||
},
|
||||
"groupId": "2TR5xAQobKAg8hbArfh5br"
|
||||
},
|
||||
{
|
||||
"id": "cl4vdu5yy00003f6lq63uhmmr",
|
||||
"type": "choice input",
|
||||
"items": [
|
||||
{
|
||||
"id": "cl4vdu5yy00013f6lkubfw1x8",
|
||||
"type": 0,
|
||||
"blockId": "cl4vdu5yy00003f6lq63uhmmr",
|
||||
"content": "Go",
|
||||
"outgoingEdgeId": "cl4vdu9qt00033f6lv4hws0fs"
|
||||
}
|
||||
],
|
||||
"groupId": "2TR5xAQobKAg8hbArfh5br",
|
||||
"options": { "buttonLabel": "Send", "isMultipleChoice": false }
|
||||
}
|
||||
],
|
||||
"graphCoordinates": { "x": 760, "y": 299 }
|
||||
},
|
||||
{
|
||||
"id": "cl4vdu8nn00023f6l6ptvimhw",
|
||||
"graphCoordinates": { "x": 1150, "y": 381 },
|
||||
"title": "Group #3",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl4vdxjig00043f6lhich3xm0",
|
||||
"groupId": "cl4vdu8nn00023f6l6ptvimhw",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Cool go</div>",
|
||||
"richText": [{ "type": "p", "children": [{ "text": "Cool go" }] }],
|
||||
"plainText": "Cool go"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl4vdxn3i00053f6l4r3fftlp",
|
||||
"groupId": "cl4vdu8nn00023f6l6ptvimhw",
|
||||
"type": "choice input",
|
||||
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
|
||||
"items": [
|
||||
{
|
||||
"id": "cl4vdxn3j00063f6l3nf92fvl",
|
||||
"blockId": "cl4vdxn3i00053f6l4r3fftlp",
|
||||
"type": 0,
|
||||
"content": "Go",
|
||||
"outgoingEdgeId": "cl4vdxs5j00093f6l4i489c3r"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "cl4vdxpqq00083f6lrsj2y0dy",
|
||||
"graphCoordinates": { "x": 1540, "y": 507 },
|
||||
"title": "Group #4",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "s4xokHybra1jmZsWGVmza1K",
|
||||
"type": "text input",
|
||||
"groupId": "cl4vdxpqq00083f6lrsj2y0dy",
|
||||
"options": {
|
||||
"isLong": false,
|
||||
"labels": { "button": "Send", "placeholder": "Type your answer..." }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [],
|
||||
"edges": [
|
||||
{
|
||||
"id": "pj6fgTAjarwBq2jVgMgYoK",
|
||||
"to": { "groupId": "6Dj1i7LeM3qXg5SKMhMyo1" },
|
||||
"from": {
|
||||
"blockId": "8fG3wDsExSSkq5ekUMzWVY",
|
||||
"groupId": "teepNancm8TLj1qYhaTYAf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "uAsACqSmud99zmyCABWDwr",
|
||||
"to": { "groupId": "2TR5xAQobKAg8hbArfh5br" },
|
||||
"from": {
|
||||
"blockId": "sc7ZYFtHVegJUA8c5K3gghi",
|
||||
"groupId": "6Dj1i7LeM3qXg5SKMhMyo1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "2TR5xAQobKAg8hbArfh5br",
|
||||
"blockId": "cl4vdu5yy00003f6lq63uhmmr",
|
||||
"itemId": "cl4vdu5yy00013f6lkubfw1x8"
|
||||
},
|
||||
"to": { "groupId": "cl4vdu8nn00023f6l6ptvimhw" },
|
||||
"id": "cl4vdu9qt00033f6lv4hws0fs"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "cl4vdu8nn00023f6l6ptvimhw",
|
||||
"blockId": "cl4vdxn3i00053f6l4r3fftlp",
|
||||
"itemId": "cl4vdxn3j00063f6l3nf92fvl"
|
||||
},
|
||||
"to": { "groupId": "cl4vdxpqq00083f6lrsj2y0dy" },
|
||||
"id": "cl4vdxs5j00093f6l4i489c3r"
|
||||
}
|
||||
],
|
||||
"theme": {
|
||||
"chat": {
|
||||
"inputs": {
|
||||
"color": "#303235",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"placeholderColor": "#9095A0"
|
||||
},
|
||||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" },
|
||||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" },
|
||||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" }
|
||||
},
|
||||
"general": { "font": "Open Sans", "background": { "type": "None" } }
|
||||
},
|
||||
"settings": {
|
||||
"general": { "isBrandingEnabled": true },
|
||||
"metadata": {
|
||||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form."
|
||||
},
|
||||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 }
|
||||
},
|
||||
"publicId": null
|
||||
}
|
15
apps/builder/src/test/storageState.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"cookies": [],
|
||||
"origins": [
|
||||
{
|
||||
"origin": "http://localhost:3000",
|
||||
"localStorage": [
|
||||
{
|
||||
"name": "typebot-20-modal",
|
||||
"value": "hide"
|
||||
},
|
||||
{ "name": "workspaceId", "value": "proWorkspace" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
5
apps/builder/src/test/utils/browser.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export const refreshUser = async () => {
|
||||
await fetch('/api/auth/session?update')
|
||||
const event = new Event('visibilitychange')
|
||||
document.dispatchEvent(event)
|
||||
}
|
89
apps/builder/src/test/utils/databaseActions.ts
Normal file
@ -0,0 +1,89 @@
|
||||
import {
|
||||
CollaborationType,
|
||||
DashboardFolder,
|
||||
Prisma,
|
||||
PrismaClient,
|
||||
Workspace,
|
||||
} from 'db'
|
||||
import Stripe from 'stripe'
|
||||
import { proWorkspaceId } from 'utils/playwright/databaseSetup'
|
||||
|
||||
const prisma = new PrismaClient()
|
||||
|
||||
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY ?? '', {
|
||||
apiVersion: '2022-08-01',
|
||||
})
|
||||
|
||||
export const addSubscriptionToWorkspace = async (
|
||||
workspaceId: string,
|
||||
items: Stripe.SubscriptionCreateParams.Item[],
|
||||
metadata: Pick<
|
||||
Workspace,
|
||||
'additionalChatsIndex' | 'additionalStorageIndex' | 'plan'
|
||||
>
|
||||
) => {
|
||||
const { id: stripeId } = await stripe.customers.create({
|
||||
email: 'test-user@gmail.com',
|
||||
name: 'Test User',
|
||||
})
|
||||
const { id: paymentId } = await stripe.paymentMethods.create({
|
||||
card: {
|
||||
number: '4242424242424242',
|
||||
exp_month: 12,
|
||||
exp_year: 2022,
|
||||
cvc: '123',
|
||||
},
|
||||
type: 'card',
|
||||
})
|
||||
await stripe.paymentMethods.attach(paymentId, { customer: stripeId })
|
||||
await stripe.subscriptions.create({
|
||||
customer: stripeId,
|
||||
items,
|
||||
default_payment_method: paymentId,
|
||||
currency: 'usd',
|
||||
})
|
||||
await stripe.customers.update(stripeId, {
|
||||
invoice_settings: { default_payment_method: paymentId },
|
||||
})
|
||||
await prisma.workspace.update({
|
||||
where: { id: workspaceId },
|
||||
data: {
|
||||
stripeId,
|
||||
...metadata,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export const createCollaboration = (
|
||||
userId: string,
|
||||
typebotId: string,
|
||||
type: CollaborationType
|
||||
) =>
|
||||
prisma.collaboratorsOnTypebots.create({ data: { userId, typebotId, type } })
|
||||
|
||||
export const getSignedInUser = (email: string) =>
|
||||
prisma.user.findFirst({ where: { email } })
|
||||
|
||||
export const createFolders = (partialFolders: Partial<DashboardFolder>[]) =>
|
||||
prisma.dashboardFolder.createMany({
|
||||
data: partialFolders.map((folder) => ({
|
||||
workspaceId: proWorkspaceId,
|
||||
name: 'Folder #1',
|
||||
...folder,
|
||||
})),
|
||||
})
|
||||
|
||||
export const createFolder = (workspaceId: string, name: string) =>
|
||||
prisma.dashboardFolder.create({
|
||||
data: {
|
||||
workspaceId,
|
||||
name,
|
||||
},
|
||||
})
|
||||
|
||||
export const createClaimableCustomPlan = async (
|
||||
data: Prisma.ClaimableCustomPlanUncheckedCreateInput
|
||||
) =>
|
||||
prisma.claimableCustomPlan.create({
|
||||
data,
|
||||
})
|
4
apps/builder/src/test/utils/playwright.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import path from 'path'
|
||||
|
||||
export const getTestAsset = (name: string) =>
|
||||
path.join(__dirname, '..', 'assets', name)
|
9
apps/builder/src/test/utils/selectorUtils.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { Page } from '@playwright/test'
|
||||
|
||||
export const deleteButtonInConfirmDialog = (page: Page) =>
|
||||
page.locator('section[role="alertdialog"] button:has-text("Delete")')
|
||||
|
||||
export const stripePaymentForm = (page: Page) =>
|
||||
page
|
||||
.frameLocator('#typebot-iframe')
|
||||
.frameLocator('[title="Secure payment input frame"]')
|