♻️ (viewer) Change to features-centric folder structure
This commit is contained in:
committed by
Baptiste Arnaud
parent
643571fe7d
commit
a9d04798bc
375
apps/viewer/src/test/assets/typebots/api.json
Normal file
375
apps/viewer/src/test/assets/typebots/api.json
Normal file
@ -0,0 +1,375 @@
|
||||
{
|
||||
"id": "qujHPjZ44xbrHb1hS1d8qC",
|
||||
"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": 1, "y": 148 }
|
||||
},
|
||||
{
|
||||
"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": 669, "y": 141 }
|
||||
},
|
||||
{
|
||||
"id": "q5dAhqSTCaNdiGSJm9B9Rw",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "sgtE2Sy7cKykac9B223Kq9R",
|
||||
"type": "text",
|
||||
"groupId": "q5dAhqSTCaNdiGSJm9B9Rw",
|
||||
"content": {
|
||||
"html": "<div>What's your name?</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "What's your name?" }] }
|
||||
],
|
||||
"plainText": "What's your name?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "sqEsMo747LTDnY9FjQcEwUv",
|
||||
"type": "text input",
|
||||
"groupId": "q5dAhqSTCaNdiGSJm9B9Rw",
|
||||
"options": {
|
||||
"isLong": false,
|
||||
"labels": {
|
||||
"button": "Send",
|
||||
"placeholder": "Type your answer..."
|
||||
},
|
||||
"variableId": "giiLFGw5xXBCHzvp1qAbdX"
|
||||
},
|
||||
"outgoingEdgeId": "4tYbERpi5Po4goVgt6rWXg"
|
||||
}
|
||||
],
|
||||
"title": "Name",
|
||||
"graphCoordinates": { "x": 340, "y": 143 }
|
||||
},
|
||||
{
|
||||
"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": 1002, "y": 144 }
|
||||
},
|
||||
{
|
||||
"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": 1337, "y": 145 }
|
||||
},
|
||||
{
|
||||
"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": "fTVo43AG97eKcaTrZf9KyV"
|
||||
}
|
||||
],
|
||||
"title": "Bye",
|
||||
"graphCoordinates": { "x": 1668, "y": 143 }
|
||||
},
|
||||
{
|
||||
"id": "webhookGroup",
|
||||
"graphCoordinates": { "x": 1996, "y": 134 },
|
||||
"title": "Webhook",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "webhookBlock",
|
||||
"groupId": "webhookGroup",
|
||||
"type": "Webhook",
|
||||
"options": { "responseVariableMapping": [], "variablesForTest": [] },
|
||||
"webhookId": "webhook1"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [
|
||||
{ "id": "giiLFGw5xXBCHzvp1qAbdX", "name": "Name" },
|
||||
{ "id": "3VFChNVSCXQ2rXv4DrJ8Ah", "name": "Email" }
|
||||
],
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "vF7AD7zSAj7SNvN3gr9N94",
|
||||
"blockId": "s779Q1y51aVaDUJVrFb16vv"
|
||||
},
|
||||
"to": { "groupId": "webhookGroup" },
|
||||
"id": "fTVo43AG97eKcaTrZf9KyV"
|
||||
}
|
||||
],
|
||||
"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,
|
||||
"customDomain": null
|
||||
}
|
131
apps/viewer/src/test/assets/typebots/fileUpload.json
Normal file
131
apps/viewer/src/test/assets/typebots/fileUpload.json
Normal file
@ -0,0 +1,131 @@
|
||||
{
|
||||
"id": "cl45ojo7z01383q1av699t0qj",
|
||||
"createdAt": "2022-06-08T14:22:14.879Z",
|
||||
"updatedAt": "2022-06-08T16:19:32.893Z",
|
||||
"icon": null,
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": "cl45ol3j8000f2e6gcifqf21t",
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "cl45ojo7y00013q1aaysi2o6i",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl45ojo7y00023q1aavrwd411",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "cl45ojo7y00013q1aaysi2o6i",
|
||||
"outgoingEdgeId": "cl45ojxvc00082e6gw1xqnxpp"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "cl45ojrrd00062e6g17tuu9t0",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl45ojrre00072e6gk91592pj",
|
||||
"type": "text",
|
||||
"groupId": "cl45ojrrd00062e6g17tuu9t0",
|
||||
"content": {
|
||||
"html": "<div>Hey there, upload please</div>",
|
||||
"richText": [
|
||||
{
|
||||
"type": "p",
|
||||
"children": [{ "text": "Hey there, upload please" }]
|
||||
}
|
||||
],
|
||||
"plainText": "Hey there, upload please"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl45ojzs300092e6gkno525c4",
|
||||
"type": "file input",
|
||||
"groupId": "cl45ojrrd00062e6g17tuu9t0",
|
||||
"options": {
|
||||
"labels": {
|
||||
"button": "Upload",
|
||||
"placeholder": "<strong>\n Click to upload\n </strong> or drag and drop<br>\n (size limit: 10MB)"
|
||||
},
|
||||
"variableId": "vcl45ok77i000a2e6g79ye53a2",
|
||||
"isMultipleAllowed": true
|
||||
},
|
||||
"outgoingEdgeId": "cl45okfgz000d2e6g7z3wnqgq"
|
||||
}
|
||||
],
|
||||
"title": "Group #1",
|
||||
"graphCoordinates": { "x": 416, "y": 98 }
|
||||
},
|
||||
{
|
||||
"id": "cl45ok963000b2e6g2ky0wkvx",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl45ok963000c2e6g9snvbhw4",
|
||||
"type": "text",
|
||||
"groupId": "cl45ok963000b2e6g2ky0wkvx",
|
||||
"content": {
|
||||
"html": "<div>Thank you!</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "Thank you!" }] }
|
||||
],
|
||||
"plainText": "Thank you!"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Group #2",
|
||||
"graphCoordinates": { "x": 863, "y": 249 }
|
||||
}
|
||||
],
|
||||
"variables": [{ "id": "vcl45ok77i000a2e6g79ye53a2", "name": "Files" }],
|
||||
"edges": [
|
||||
{
|
||||
"id": "cl45ojxvc00082e6gw1xqnxpp",
|
||||
"to": { "groupId": "cl45ojrrd00062e6g17tuu9t0" },
|
||||
"from": {
|
||||
"blockId": "cl45ojo7y00023q1aavrwd411",
|
||||
"groupId": "cl45ojo7y00013q1aaysi2o6i"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl45okfgz000d2e6g7z3wnqgq",
|
||||
"to": { "groupId": "cl45ok963000b2e6g2ky0wkvx" },
|
||||
"from": {
|
||||
"blockId": "cl45ojzs300092e6gkno525c4",
|
||||
"groupId": "cl45ojrrd00062e6g17tuu9t0"
|
||||
}
|
||||
}
|
||||
],
|
||||
"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": "my-typebot-699t0qj",
|
||||
"customDomain": null,
|
||||
"workspaceId": "proWorkspace"
|
||||
}
|
154
apps/viewer/src/test/assets/typebots/hugeGroup.json
Normal file
154
apps/viewer/src/test/assets/typebots/hugeGroup.json
Normal file
@ -0,0 +1,154 @@
|
||||
{
|
||||
"id": "cl0jrltqx0037601agzjiy7t4",
|
||||
"createdAt": "2022-03-09T16:17:51.321Z",
|
||||
"updatedAt": "2022-03-09T16:19:07.037Z",
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": "dm12bh6hmEQemywn86osJD",
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "dqork4dJJZk3RgKYavBpRE",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "u7Px8eD9MWXNJEBwxQwJCF",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "dqork4dJJZk3RgKYavBpRE",
|
||||
"outgoingEdgeId": "b3XsreaqtWt4CrZZmCKDpa"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "2Vrpgk5VP9BUo3vKtM5kws",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "s6GezsfD612D1naKwvhDFgA",
|
||||
"type": "text",
|
||||
"groupId": "2Vrpgk5VP9BUo3vKtM5kws",
|
||||
"content": {
|
||||
"html": "<div>Hi what's your name?</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "Hi what's your name?" }] }
|
||||
],
|
||||
"plainText": "Hi what's your name?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "sq3mPXUrugs5t6FoME3T4t4",
|
||||
"type": "text input",
|
||||
"groupId": "2Vrpgk5VP9BUo3vKtM5kws",
|
||||
"options": {
|
||||
"isLong": false,
|
||||
"labels": {
|
||||
"button": "Send",
|
||||
"placeholder": "Type your answer..."
|
||||
},
|
||||
"variableId": "93BD32WVM5JEQ1nmWtr2S5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "s57hbzfpG2sVvXefznVhbVB",
|
||||
"type": "text",
|
||||
"groupId": "2Vrpgk5VP9BUo3vKtM5kws",
|
||||
"content": {
|
||||
"html": "<div>How old are you?</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "How old are you?" }] }
|
||||
],
|
||||
"plainText": "How old are you?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "s4fFn3s7nouQk88iJ3oLgx6",
|
||||
"type": "number input",
|
||||
"groupId": "2Vrpgk5VP9BUo3vKtM5kws",
|
||||
"options": {
|
||||
"labels": { "button": "Send", "placeholder": "Type a number..." }
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "scR6MewJwkPNJzABYG8NEA4",
|
||||
"type": "text",
|
||||
"groupId": "2Vrpgk5VP9BUo3vKtM5kws",
|
||||
"content": {
|
||||
"html": "<div>Cool!</div>",
|
||||
"richText": [{ "type": "p", "children": [{ "text": "Cool!" }] }],
|
||||
"plainText": "Cool!"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "s5fo1s8UTyHQ7CfqC6MRxyW",
|
||||
"type": "text",
|
||||
"groupId": "2Vrpgk5VP9BUo3vKtM5kws",
|
||||
"content": {
|
||||
"html": "<div>Do you eat pizza?</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "Do you eat pizza?" }] }
|
||||
],
|
||||
"plainText": "Do you eat pizza?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "sxn8UjQ2MjEMuRjhkh7LWws",
|
||||
"type": "choice input",
|
||||
"items": [
|
||||
{
|
||||
"id": "wGKXMr4mfySw1HNThND2Xd",
|
||||
"type": 0,
|
||||
"blockId": "sxn8UjQ2MjEMuRjhkh7LWws",
|
||||
"content": "Yes"
|
||||
},
|
||||
{
|
||||
"id": "qzqzVqMeo6TDUdMYckLZmf",
|
||||
"type": 0,
|
||||
"blockId": "sxn8UjQ2MjEMuRjhkh7LWws",
|
||||
"content": "No"
|
||||
}
|
||||
],
|
||||
"groupId": "2Vrpgk5VP9BUo3vKtM5kws",
|
||||
"options": { "buttonLabel": "Send", "isMultipleChoice": false }
|
||||
}
|
||||
],
|
||||
"title": "Group #1",
|
||||
"graphCoordinates": { "x": 386, "y": 108 }
|
||||
}
|
||||
],
|
||||
"variables": [{ "id": "93BD32WVM5JEQ1nmWtr2S5", "name": "Name" }],
|
||||
"edges": [
|
||||
{
|
||||
"id": "b3XsreaqtWt4CrZZmCKDpa",
|
||||
"to": { "groupId": "2Vrpgk5VP9BUo3vKtM5kws" },
|
||||
"from": {
|
||||
"blockId": "u7Px8eD9MWXNJEBwxQwJCF",
|
||||
"groupId": "dqork4dJJZk3RgKYavBpRE"
|
||||
}
|
||||
}
|
||||
],
|
||||
"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": "my-typebot-zjiy7t4",
|
||||
"customDomain": null
|
||||
}
|
73
apps/viewer/src/test/assets/typebots/linkTypebots/1.json
Normal file
73
apps/viewer/src/test/assets/typebots/linkTypebots/1.json
Normal file
@ -0,0 +1,73 @@
|
||||
{
|
||||
"id": "cl0ibhi7s0018n21aarlmg0cm",
|
||||
"createdAt": "2022-03-08T15:58:49.720Z",
|
||||
"updatedAt": "2022-03-08T16:07:18.899Z",
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "1qQrnsLzRim1LqCrhbj1MW",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "8srsGhdBJK8v88Xo1RRS4C",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "1qQrnsLzRim1LqCrhbj1MW",
|
||||
"outgoingEdgeId": "ovUHhwr6THMhqtn8QbkjtA"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "wSR4VCcDNDTTsD9Szi2xH8",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "sw6nHJfkMsM4pxZxMBB6QqW",
|
||||
"type": "Typebot link",
|
||||
"groupId": "wSR4VCcDNDTTsD9Szi2xH8",
|
||||
"options": { "typebotId": "cl0ibhv8d0130n21aw8doxhj5" }
|
||||
}
|
||||
],
|
||||
"title": "Group #1",
|
||||
"graphCoordinates": { "x": 363, "y": 199 }
|
||||
}
|
||||
],
|
||||
"variables": [],
|
||||
"edges": [
|
||||
{
|
||||
"id": "ovUHhwr6THMhqtn8QbkjtA",
|
||||
"to": { "groupId": "wSR4VCcDNDTTsD9Szi2xH8" },
|
||||
"from": {
|
||||
"blockId": "8srsGhdBJK8v88Xo1RRS4C",
|
||||
"groupId": "1qQrnsLzRim1LqCrhbj1MW"
|
||||
}
|
||||
}
|
||||
],
|
||||
"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
|
||||
}
|
76
apps/viewer/src/test/assets/typebots/linkTypebots/2.json
Normal file
76
apps/viewer/src/test/assets/typebots/linkTypebots/2.json
Normal file
@ -0,0 +1,76 @@
|
||||
{
|
||||
"id": "cl0ibhv8d0130n21aw8doxhj5",
|
||||
"createdAt": "2022-03-08T15:59:06.589Z",
|
||||
"updatedAt": "2022-03-08T15:59:10.498Z",
|
||||
"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",
|
||||
"graphCoordinates": { "x": 366, "y": 191 },
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "s8ZeBL9p5za77eBmdKECLYq",
|
||||
"groupId": "bg4QEJseUsTP496H27j5k2",
|
||||
"type": "text input",
|
||||
"options": {
|
||||
"isLong": false,
|
||||
"labels": { "button": "Send", "placeholder": "Type your answer..." }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"groupId": "p4ByLVoKiDRyRoPHKmcTfw",
|
||||
"blockId": "rw6smEWEJzHKbiVKLUKFvZ"
|
||||
},
|
||||
"to": { "groupId": "bg4QEJseUsTP496H27j5k2" },
|
||||
"id": "1z3pfiatTUHbraD2uSoA3E"
|
||||
}
|
||||
],
|
||||
"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
|
||||
}
|
121
apps/viewer/src/test/assets/typebots/predefinedVariables.json
Normal file
121
apps/viewer/src/test/assets/typebots/predefinedVariables.json
Normal file
@ -0,0 +1,121 @@
|
||||
{
|
||||
"id": "cl13bgvlm0050t71aq6a3w777",
|
||||
"createdAt": "2022-03-23T08:41:30.106Z",
|
||||
"updatedAt": "2022-03-23T08:41:30.106Z",
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "cl13bgvlk0000t71a4wabccvw",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl13bgvlk0001t71a3pilbj53",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "cl13bgvlk0000t71a4wabccvw",
|
||||
"outgoingEdgeId": "cl13bgz4800062e6dv7ejcchb"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "cl13bgy1s00042e6dao1wyobm",
|
||||
"graphCoordinates": { "x": 329, "y": 65 },
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl13bgy1w00052e6d5x57wt7o",
|
||||
"groupId": "cl13bgy1s00042e6dao1wyobm",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Hey I know you!</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "Hey I know you!" }] }
|
||||
],
|
||||
"plainText": "Hey I know you!"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl13bh6jd00072e6dftdirwy4",
|
||||
"groupId": "cl13bgy1s00042e6dao1wyobm",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Your name is {{Name}}</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "Your name is {{Name}}" }] }
|
||||
],
|
||||
"plainText": "Your name is {{Name}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl13bhfxd00092e6dydvcqlhm",
|
||||
"groupId": "cl13bgy1s00042e6dao1wyobm",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>What's your email?</div>",
|
||||
"richText": [
|
||||
{ "type": "p", "children": [{ "text": "What's your email?" }] }
|
||||
],
|
||||
"plainText": "What's your email?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl13bhnay000a2e6dxa630dh3",
|
||||
"groupId": "cl13bgy1s00042e6dao1wyobm",
|
||||
"type": "email input",
|
||||
"options": {
|
||||
"labels": { "button": "Send", "placeholder": "Type your email..." },
|
||||
"retryMessageContent": "This email doesn't seem to be valid. Can you type it again?",
|
||||
"variableId": "cl13bhr3w000b2e6d3c9kid0p"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [
|
||||
{ "id": "cl13bha3l00082e6duaz0xm6f", "name": "Name" },
|
||||
{ "id": "cl13bhr3w000b2e6d3c9kid0p", "name": "Email" }
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"groupId": "cl13bgvlk0000t71a4wabccvw",
|
||||
"blockId": "cl13bgvlk0001t71a3pilbj53"
|
||||
},
|
||||
"to": { "groupId": "cl13bgy1s00042e6dao1wyobm" },
|
||||
"id": "cl13bgz4800062e6dv7ejcchb"
|
||||
}
|
||||
],
|
||||
"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,
|
||||
"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
|
||||
}
|
121
apps/viewer/src/test/assets/typebots/sendEmail.json
Normal file
121
apps/viewer/src/test/assets/typebots/sendEmail.json
Normal file
@ -0,0 +1,121 @@
|
||||
{
|
||||
"id": "cl1rxxg6l334509lhv44f8qnx",
|
||||
"createdAt": "2022-04-09T14:16:43.053Z",
|
||||
"updatedAt": "2022-04-12T14:34:44.287Z",
|
||||
"icon": null,
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "cl1rxxg6k000009lhd0mgfy5i",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl1rxxg6k000109lh2is0gfua",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "cl1rxxg6k000009lhd0mgfy5i",
|
||||
"outgoingEdgeId": "cl1w8rhzs000f2e694836a1k3"
|
||||
}
|
||||
],
|
||||
"title": "Start",
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "cl1w8repd000b2e69fwiqsd00",
|
||||
"graphCoordinates": { "x": 364, "y": -2 },
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl1w8repg000c2e699jqwrepg",
|
||||
"groupId": "cl1w8repd000b2e69fwiqsd00",
|
||||
"type": "choice input",
|
||||
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
|
||||
"items": [
|
||||
{
|
||||
"id": "cl1w8repg000d2e69d8xnkqeq",
|
||||
"blockId": "cl1w8repg000c2e699jqwrepg",
|
||||
"type": 0,
|
||||
"content": "Send email",
|
||||
"outgoingEdgeId": "cl1w8rkoo000i2e69hs60pk0q"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "cl1w8rjaf000g2e69cqd2bwvk",
|
||||
"graphCoordinates": { "x": 715, "y": -10 },
|
||||
"title": "Group #2",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl1w8rjai000h2e695uvoimq7",
|
||||
"groupId": "cl1w8rjaf000g2e69cqd2bwvk",
|
||||
"type": "Email",
|
||||
"options": {
|
||||
"credentialsId": "send-email-credentials",
|
||||
"recipients": ["baptiste.arnaud95@gmail.com"],
|
||||
"replyTo": "contact@baptiste-arnaud.fr",
|
||||
"cc": ["test1@gmail.com", "test2@gmail.com"],
|
||||
"bcc": ["test3@gmail.com", "test4@gmail.com"],
|
||||
"subject": "Hey!",
|
||||
"body": "Test email"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [
|
||||
{ "id": "vcl1rxxovn000z2e69y6t9dxge", "name": "Score" },
|
||||
{ "id": "vcl1rylq5v00042e69tdml6hi3", "name": "Age" }
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"groupId": "cl1rxxg6k000009lhd0mgfy5i",
|
||||
"blockId": "cl1rxxg6k000109lh2is0gfua"
|
||||
},
|
||||
"to": { "groupId": "cl1w8repd000b2e69fwiqsd00" },
|
||||
"id": "cl1w8rhzs000f2e694836a1k3"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "cl1w8repd000b2e69fwiqsd00",
|
||||
"blockId": "cl1w8repg000c2e699jqwrepg",
|
||||
"itemId": "cl1w8repg000d2e69d8xnkqeq"
|
||||
},
|
||||
"to": { "groupId": "cl1w8rjaf000g2e69cqd2bwvk" },
|
||||
"id": "cl1w8rkoo000i2e69hs60pk0q"
|
||||
}
|
||||
],
|
||||
"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,
|
||||
"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
|
||||
}
|
279
apps/viewer/src/test/assets/typebots/webhook.json
Normal file
279
apps/viewer/src/test/assets/typebots/webhook.json
Normal file
@ -0,0 +1,279 @@
|
||||
{
|
||||
"id": "cl9ip9u0l00001ad79a2lzm55",
|
||||
"createdAt": "2022-10-21T16:22:07.414Z",
|
||||
"updatedAt": "2022-10-21T16:30:57.642Z",
|
||||
"icon": null,
|
||||
"name": "My typebot",
|
||||
"publishedTypebotId": null,
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
"id": "cl9ip9u0j0000d71a5d98gwni",
|
||||
"title": "Start",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl9ip9u0j0001d71a44dsd2p1",
|
||||
"type": "start",
|
||||
"label": "Start",
|
||||
"groupId": "cl9ip9u0j0000d71a5d98gwni",
|
||||
"outgoingEdgeId": "cl9ipkkb2001b3b6oh3vptq9k"
|
||||
}
|
||||
],
|
||||
"graphCoordinates": { "x": 0, "y": 0 }
|
||||
},
|
||||
{
|
||||
"id": "cl9ipa38j00083b6o69e90m4t",
|
||||
"graphCoordinates": { "x": 340, "y": 341 },
|
||||
"title": "Group #1",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl9ipaaut000a3b6ovrqlec3x",
|
||||
"groupId": "cl9ipa38j00083b6o69e90m4t",
|
||||
"type": "text input",
|
||||
"options": {
|
||||
"isLong": false,
|
||||
"labels": { "button": "Send", "placeholder": "Type a name..." },
|
||||
"variableId": "vcl9ipajth000c3b6okl97r81j"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl9ipan8f000d3b6oo2ovi3ac",
|
||||
"groupId": "cl9ipa38j00083b6o69e90m4t",
|
||||
"type": "number input",
|
||||
"options": {
|
||||
"labels": { "button": "Send", "placeholder": "Type an age..." },
|
||||
"variableId": "vcl9ipaszl000e3b6ousjxuw7b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl9ipb08n000f3b6ok3mi2p48",
|
||||
"groupId": "cl9ipa38j00083b6o69e90m4t",
|
||||
"type": "choice input",
|
||||
"options": {
|
||||
"buttonLabel": "Send",
|
||||
"isMultipleChoice": false,
|
||||
"variableId": "vcl9ipg4tb00103b6oue08w3nm"
|
||||
},
|
||||
"items": [
|
||||
{
|
||||
"id": "cl9ipb08n000g3b6okr691uad",
|
||||
"blockId": "cl9ipb08n000f3b6ok3mi2p48",
|
||||
"type": 0,
|
||||
"content": "Male"
|
||||
},
|
||||
{
|
||||
"blockId": "cl9ipb08n000f3b6ok3mi2p48",
|
||||
"type": 0,
|
||||
"id": "cl9ipb2kk000h3b6oadwtonnz",
|
||||
"content": "Female"
|
||||
}
|
||||
],
|
||||
"outgoingEdgeId": "cl9ipcp83000o3b6odsn0a9a1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "cl9ipbcjy000j3b6oqngo7luv",
|
||||
"graphCoordinates": { "x": 781, "y": 91 },
|
||||
"title": "Group #2",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl9ipbl6l000m3b6o3evn41kv",
|
||||
"groupId": "cl9ipbcjy000j3b6oqngo7luv",
|
||||
"type": "Set variable",
|
||||
"options": {
|
||||
"variableId": "vcl9ipbokm000n3b6o06hvarrf",
|
||||
"expressionToEvaluate": "{\n \"name\": \"John\",\n \"age\": 25,\n \"gender\": \"male\"\n}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cl9ipbcjy000k3b6oe8lta5c1",
|
||||
"groupId": "cl9ipbcjy000j3b6oqngo7luv",
|
||||
"type": "Webhook",
|
||||
"options": {
|
||||
"responseVariableMapping": [
|
||||
{
|
||||
"id": "cl9ipdspg000p3b6ognbfvmdx",
|
||||
"variableId": "vcl9ipdxnj000q3b6oy55th4xb",
|
||||
"bodyPath": "data"
|
||||
}
|
||||
],
|
||||
"variablesForTest": [],
|
||||
"isAdvancedConfig": true,
|
||||
"isCustomBody": true
|
||||
},
|
||||
"webhookId": "full-body-webhook"
|
||||
},
|
||||
{
|
||||
"id": "cl9ipe5t8000s3b6ocswre500",
|
||||
"groupId": "cl9ipbcjy000j3b6oqngo7luv",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Data of first request:</div><div></div><div>{{Data}}</div>",
|
||||
"richText": [
|
||||
{
|
||||
"type": "p",
|
||||
"children": [{ "text": "Data of first request:" }]
|
||||
},
|
||||
{ "type": "p", "children": [{ "text": "" }] },
|
||||
{ "type": "p", "children": [{ "text": "{{Data}}" }] }
|
||||
],
|
||||
"plainText": "Data of first request:{{Data}}"
|
||||
},
|
||||
"outgoingEdgeId": "cl9ipet83000z3b6of6zfqota"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "cl9ipej6b000u3b6oeaz305l6",
|
||||
"graphCoordinates": { "x": 1138, "y": 85 },
|
||||
"title": "Group #2 copy",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl9ipej6c000w3b6otzk247vl",
|
||||
"groupId": "cl9ipej6b000u3b6oeaz305l6",
|
||||
"type": "Webhook",
|
||||
"options": {
|
||||
"responseVariableMapping": [
|
||||
{
|
||||
"id": "cl9ipdspg000p3b6ognbfvmdx",
|
||||
"variableId": "vcl9ipdxnj000q3b6oy55th4xb",
|
||||
"bodyPath": "data"
|
||||
}
|
||||
],
|
||||
"variablesForTest": [],
|
||||
"isAdvancedConfig": true,
|
||||
"isCustomBody": true
|
||||
},
|
||||
"webhookId": "partial-body-webhook"
|
||||
},
|
||||
{
|
||||
"id": "cl9ipej6c000y3b6oegzkgloq",
|
||||
"groupId": "cl9ipej6b000u3b6oeaz305l6",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"html": "<div>Data of second request:</div><div></div><div>{{Data}}</div>",
|
||||
"richText": [
|
||||
{
|
||||
"type": "p",
|
||||
"children": [{ "text": "Data of second request:" }]
|
||||
},
|
||||
{ "type": "p", "children": [{ "text": "" }] },
|
||||
{ "type": "p", "children": [{ "text": "{{Data}}" }] }
|
||||
],
|
||||
"plainText": "Data of second request:{{Data}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "cl9ipkaer00153b6ov230yuv2",
|
||||
"graphCoordinates": { "x": 333, "y": 26 },
|
||||
"title": "Group #4",
|
||||
"blocks": [
|
||||
{
|
||||
"id": "cl9ipkaer00163b6o0ohmmscn",
|
||||
"groupId": "cl9ipkaer00153b6ov230yuv2",
|
||||
"type": "choice input",
|
||||
"options": { "buttonLabel": "Send", "isMultipleChoice": false },
|
||||
"items": [
|
||||
{
|
||||
"id": "cl9ipkaer00173b6oxof4zrqn",
|
||||
"blockId": "cl9ipkaer00163b6o0ohmmscn",
|
||||
"type": 0,
|
||||
"content": "Send failing webhook"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "cl9ipki9u00193b6okmhudo0f",
|
||||
"groupId": "cl9ipkaer00153b6ov230yuv2",
|
||||
"type": "Webhook",
|
||||
"options": {
|
||||
"responseVariableMapping": [],
|
||||
"variablesForTest": [],
|
||||
"isAdvancedConfig": false,
|
||||
"isCustomBody": false
|
||||
},
|
||||
"webhookId": "failing-webhook",
|
||||
"outgoingEdgeId": "cl9ipklm0001c3b6oy0a5nbhr"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variables": [
|
||||
{ "id": "vcl9ipajth000c3b6okl97r81j", "name": "Name" },
|
||||
{ "id": "vcl9ipaszl000e3b6ousjxuw7b", "name": "Age" },
|
||||
{ "id": "vcl9ipbokm000n3b6o06hvarrf", "name": "Full body" },
|
||||
{ "id": "vcl9ipdxnj000q3b6oy55th4xb", "name": "Data" },
|
||||
{ "id": "vcl9ipg4tb00103b6oue08w3nm", "name": "Gender" }
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"from": {
|
||||
"groupId": "cl9ipa38j00083b6o69e90m4t",
|
||||
"blockId": "cl9ipb08n000f3b6ok3mi2p48"
|
||||
},
|
||||
"to": { "groupId": "cl9ipbcjy000j3b6oqngo7luv" },
|
||||
"id": "cl9ipcp83000o3b6odsn0a9a1"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "cl9ipbcjy000j3b6oqngo7luv",
|
||||
"blockId": "cl9ipe5t8000s3b6ocswre500"
|
||||
},
|
||||
"to": { "groupId": "cl9ipej6b000u3b6oeaz305l6" },
|
||||
"id": "cl9ipet83000z3b6of6zfqota"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "cl9ip9u0j0000d71a5d98gwni",
|
||||
"blockId": "cl9ip9u0j0001d71a44dsd2p1"
|
||||
},
|
||||
"to": { "groupId": "cl9ipkaer00153b6ov230yuv2" },
|
||||
"id": "cl9ipkkb2001b3b6oh3vptq9k"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"groupId": "cl9ipkaer00153b6ov230yuv2",
|
||||
"blockId": "cl9ipki9u00193b6okmhudo0f"
|
||||
},
|
||||
"to": { "groupId": "cl9ipa38j00083b6o69e90m4t" },
|
||||
"id": "cl9ipklm0001c3b6oy0a5nbhr"
|
||||
}
|
||||
],
|
||||
"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": false,
|
||||
"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",
|
||||
"isArchived": false,
|
||||
"isClosed": false
|
||||
}
|
23
apps/viewer/src/test/utils/databaseActions.ts
Normal file
23
apps/viewer/src/test/utils/databaseActions.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import { CredentialsType, SmtpCredentialsData } from 'models'
|
||||
import { PrismaClient } from 'db'
|
||||
import { encrypt } from 'utils/api'
|
||||
import { proWorkspaceId } from 'utils/playwright/databaseSetup'
|
||||
|
||||
const prisma = new PrismaClient()
|
||||
|
||||
export const createSmtpCredentials = (
|
||||
id: string,
|
||||
smtpData: SmtpCredentialsData
|
||||
) => {
|
||||
const { encryptedData, iv } = encrypt(smtpData)
|
||||
return prisma.credentials.create({
|
||||
data: {
|
||||
id,
|
||||
data: encryptedData,
|
||||
iv,
|
||||
name: smtpData.from.email as string,
|
||||
type: CredentialsType.SMTP,
|
||||
workspaceId: proWorkspaceId,
|
||||
},
|
||||
})
|
||||
}
|
4
apps/viewer/src/test/utils/playwright.ts
Normal file
4
apps/viewer/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)
|
Reference in New Issue
Block a user