diff --git a/.github/workflows/auto-create-tags.yml b/.github/workflows/auto-create-tags.yml index db37985953..c9c7288dfd 100644 --- a/.github/workflows/auto-create-tags.yml +++ b/.github/workflows/auto-create-tags.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v2 - name: 'Create main tag' id: 'main' - uses: butlerlogic/action-autotag@stable + uses: butlerlogic/action-autotag@1.1.2 with: tag_prefix: 'v' @@ -23,19 +23,19 @@ jobs: uses: EndBug/latest-tag@latest - name: 'Create js tag' - uses: butlerlogic/action-autotag@stable + uses: butlerlogic/action-autotag@1.1.2 with: root: '/packages/embeds/js' tag_prefix: 'js-v' - name: 'Create react tag' - uses: butlerlogic/action-autotag@stable + uses: butlerlogic/action-autotag@1.1.2 with: root: '/packages/embeds/react' tag_prefix: 'react-v' - name: 'Create nextjs tag' - uses: butlerlogic/action-autotag@stable + uses: butlerlogic/action-autotag@1.1.2 with: root: '/packages/embeds/nextjs' tag_prefix: 'nextjs-v' diff --git a/.github/workflows/send-limit-email-alerts.yml b/.github/workflows/check-and-report-chats-usage.yml similarity index 67% rename from .github/workflows/send-limit-email-alerts.yml rename to .github/workflows/check-and-report-chats-usage.yml index 8118d3218d..86bf7c1934 100644 --- a/.github/workflows/send-limit-email-alerts.yml +++ b/.github/workflows/check-and-report-chats-usage.yml @@ -1,4 +1,4 @@ -name: Send chats limit alert emails +name: Check and report chats usage on: schedule: @@ -22,8 +22,13 @@ jobs: SMTP_HOST: '${{ secrets.SMTP_HOST }}' SMTP_PORT: '${{ secrets.SMTP_PORT }}' NEXT_PUBLIC_SMTP_FROM: '${{ secrets.NEXT_PUBLIC_SMTP_FROM }}' + STRIPE_SECRET_KEY: '${{ secrets.STRIPE_SECRET_KEY }}' + STRIPE_STARTER_PRICE_ID: '${{ secrets.STRIPE_STARTER_PRICE_ID }}' + STRIPE_STARTER_CHATS_PRICE_ID: '${{ secrets.STRIPE_STARTER_CHATS_PRICE_ID }}' + STRIPE_PRO_PRICE_ID: '${{ secrets.STRIPE_PRO_PRICE_ID }}' + STRIPE_PRO_CHATS_PRICE_ID: '${{ secrets.STRIPE_PRO_CHATS_PRICE_ID }}' steps: - uses: actions/checkout@v2 - uses: pnpm/action-setup@v2.2.2 - run: pnpm i --frozen-lockfile - - run: pnpm turbo run sendAlertEmails + - run: pnpm turbo run checkAndReportChatsUsage diff --git a/.github/workflows/publish_docker_images.yml b/.github/workflows/publish_docker_images.yml index 01f74b5da4..f99b184128 100644 --- a/.github/workflows/publish_docker_images.yml +++ b/.github/workflows/publish_docker_images.yml @@ -3,8 +3,6 @@ name: Build Docker images on: push: tags: ['v*'] - pull_request: - branches: [main] jobs: build-amd: diff --git a/.github/workflows/send-total-results-digest.yml b/.github/workflows/send-total-results-digest.yml deleted file mode 100644 index 7c262d298b..0000000000 --- a/.github/workflows/send-total-results-digest.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Send total results daily digest - -on: - schedule: - - cron: '0 5 * * *' - -jobs: - send: - runs-on: ubuntu-latest - defaults: - run: - working-directory: ./packages/scripts - env: - DATABASE_URL: '${{ secrets.DATABASE_URL }}' - ENCRYPTION_SECRET: '${{ secrets.ENCRYPTION_SECRET }}' - NEXTAUTH_URL: 'http://localhost:3000' - NEXT_PUBLIC_VIEWER_URL: 'http://localhost:3001' - TELEMETRY_WEBHOOK_URL: '${{ secrets.TELEMETRY_WEBHOOK_URL }}' - TELEMETRY_WEBHOOK_BEARER_TOKEN: '${{ secrets.TELEMETRY_WEBHOOK_BEARER_TOKEN }}' - steps: - - uses: actions/checkout@v2 - - uses: pnpm/action-setup@v2.2.2 - - run: pnpm i --frozen-lockfile - - run: pnpm turbo run telemetry:sendTotalResultsDigest diff --git a/.gitignore b/.gitignore index e169eaef57..cb66c1c86d 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ dump.sql dump.tar __env.js +__ENV.js typebotsToFix.json **/scripts/logs diff --git a/.tolgeerc b/.tolgeerc new file mode 100644 index 0000000000..a80977762d --- /dev/null +++ b/.tolgeerc @@ -0,0 +1,5 @@ +{ + "apiUrl": "https://tolgee.server.baptistearno.com", + "projectId": "1", + "delimiter": null +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index b5bce38bde..db00880628 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -4,7 +4,7 @@ "dbaeumer.vscode-eslint", "bradlc.vscode-tailwindcss", "unifiedjs.vscode-mdx", - "baptistearno.baptistearno-i18n-ally", + "lokalise.i18n-ally", "ms-playwright.playwright", "Prisma.prisma" ] diff --git a/.vscode/i18n-ally-custom-framework.yml b/.vscode/i18n-ally-custom-framework.yml new file mode 100644 index 0000000000..3cb5dac4ab --- /dev/null +++ b/.vscode/i18n-ally-custom-framework.yml @@ -0,0 +1,27 @@ +# An array of strings which contain Language Ids defined by VS Code +# You can check avaliable language ids here: https://code.visualstudio.com/docs/languages/overview#_language-id +languageIds: + - javascript + - typescript + - javascriptreact + - typescriptreact + +# An array of RegExes to find the key usage. **The key should be captured in the first match group**. +# You should unescape RegEx strings in order to fit in the YAML file +# To help with this, you can use https://www.freeformatter.com/json-escape.html +usageMatchRegex: + # The following example shows how to detect `t("your.i18n.keys")` + # the `{key}` will be placed by a proper keypath matching regex, + # you can ignore it and use your own matching rules as well + - "[^\\w\\d]t\\([\\s\\n]*'({key})'" + - 'keyName="({key})"' + +# An array of strings containing refactor templates. +# The "$1" will be replaced by the keypath specified. +# Optional: uncomment the following two lines to use + +refactorTemplates: + - t("$1") + +# If set to true, only enables this custom framework (will disable all built-in frameworks) +monopoly: true diff --git a/.vscode/settings.json b/.vscode/settings.json index 5d176d2989..e22d56d5d8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,11 @@ { - "i18n-ally.localesPaths": ["apps/builder/src/locales"], - "i18n-ally.enabledFrameworks": ["next-international"], - "i18n-ally.enabledParsers": ["ts"], + "i18n-ally.localesPaths": ["apps/builder/public/locales"], "i18n-ally.keystyle": "flat", "i18n-ally.displayLanguage": "en", + "i18n-ally.enabledFrameworks": ["custom"], + "i18n-ally.sortKeys": true, "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" }, "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, @@ -16,9 +16,6 @@ "NEXT_PUBLIC_VIEWER_URL": "http://localhost:3001", "NEXTAUTH_URL": "http://localhost:3000" }, - "[php]": { - "editor.defaultFormatter": "bmewburn.vscode-intelephense-client" - }, "[prisma]": { "editor.defaultFormatter": "Prisma.prisma" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 24313adc2a..0b23c132e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,336 @@ # Changelog + +## 2.20.0 (2023-12-04) + +### Added + +- โœจ Allow user to share a flow publicly and make it duplicatable [[bb41226](https://github.com/baptisteArno/typebot.io/commit/bb41226a046fe9dccd0ee04d2761c5b96d6001f4)] +- โœจ (openai) Add create speech OpenAI action [[1a44bf4](https://github.com/baptisteArno/typebot.io/commit/1a44bf4935a131010e912e9c7d0ba9127b55be83)] + +### Changed + +- โšก (wordpress) Add lib_version prop in shortcode [[eeac493](https://github.com/baptisteArno/typebot.io/commit/eeac4933870216017806586b9032e8af86ce75dc)] +- ๐Ÿšธ (fileUpload) Properly encode commas from uploaded file urls [[8d413f0](https://github.com/baptisteArno/typebot.io/commit/8d413f0865c8688ec6999937557db1ce9dfc4f26)] +- ๐Ÿ”ง Increase builder request max size to 4MB [[4666fd8](https://github.com/baptisteArno/typebot.io/commit/4666fd8fa09052e315d54b9333557daf66e7a5c2)] +- ๐Ÿšธ (redirect) Make sure the redirection is always done on top frame [[6ce43ed](https://github.com/baptisteArno/typebot.io/commit/6ce43ed26fafe85200414b83a2f192ed3977ebc6)] +- โšก (billing) Improve past_due workspace checking webhook [[0856c59](https://github.com/baptisteArno/typebot.io/commit/0856c59b500b62cdaa26b25f7d9a5be4a2ac8a9c)] + +### Removed + +- ๐Ÿ”ฅ Remove VIEWER_URL_INTERNAL variable [[73d2e16](https://github.com/baptisteArno/typebot.io/commit/73d2e165bfa38c014d1b8ae3c5c4701b0d3e7149)] + +### Fixed + +- ๐Ÿ› (share) Fix duplicate folderId issue [[8ce4e48](https://github.com/baptisteArno/typebot.io/commit/8ce4e4808d36133a49a7af8ad61665e9dbbfbc72)] +- ๐Ÿ› Fix default webhook body with multi inputs groups [[880ded9](https://github.com/baptisteArno/typebot.io/commit/880ded97d113dd70cea8a97020a30daef573567a)] +- ๐Ÿš‘ (pictureChoice) Fix pic choice multi select parsing [[b7ee800](https://github.com/baptisteArno/typebot.io/commit/b7ee8006494d4a681b813a4bf9ce4e9762b21fcd)] +- ๐Ÿ’š Update broken action-autotag package [[7f914e9](https://github.com/baptisteArno/typebot.io/commit/7f914e9b8c9afd280bd6d5f091b090fc610bce81)] +- ๐Ÿ› Fix processTelemetry endpoint not reachable [[30b09e5](https://github.com/baptisteArno/typebot.io/commit/30b09e56a405d1178018ab52bd69f5d2b7415bd2)] +- ๐Ÿš‘ (billing) Fix stripe webhook "invoice.paid" typo [[5b0073b](https://github.com/baptisteArno/typebot.io/commit/5b0073bb61301ea1370b3bf662652648b30a4225)] +- ๐Ÿ› (pictureChoice) Fix choice parsing too unrestrictive [[542e632](https://github.com/baptisteArno/typebot.io/commit/542e632472324a4c88cabee2be4f49921e5b28bb)] +- ๐Ÿš‘ (editor) Fix typebot update permission [[8a07392](https://github.com/baptisteArno/typebot.io/commit/8a073928211cda434246f17ba4b18fdbeec0b4ef)] +- ๐Ÿ› (chatwoot) Fix email prefill when Chatwoot contact already exist [[94886ca](https://github.com/baptisteArno/typebot.io/commit/94886ca58e684c6229f2438e66a90ff91dd79b1f)] +- โœ๏ธ Fix typebot v7 breaking changes doc typo [[1e64a73](https://github.com/baptisteArno/typebot.io/commit/1e64a73e54c6c841ff292eecf6f2011a2be86eda)] + +### Miscellaneous + +- ๐Ÿ“ Add flow share docs [[e228f68](https://github.com/baptisteArno/typebot.io/commit/e228f682f5b92b3e168a5b8fc11d7fdd1edb2af2)] +- ๐Ÿ›‚ Allow app admin to read a typebot [[cf8df68](https://github.com/baptisteArno/typebot.io/commit/cf8df681868974db099ee9c5d0b0105c68d46e07)] +- ๐Ÿ“ Improve WP prefilled var explanation [[2c203f3](https://github.com/baptisteArno/typebot.io/commit/2c203f3b6d2a59ec7c71a9858678c2daab73e8bd)] +- ๐Ÿ“ Add new start and continue endpoints in the API runtime instructions [[993bc79](https://github.com/baptisteArno/typebot.io/commit/993bc7900ede9fa44189f88724e35852bf5fe032)] +- ๐Ÿ›‚ (billing) Add isPastDue field in workspace ([#1046](https://github.com/baptisteArno/typebot.io/issues/1046)) [[ca79934](https://github.com/baptisteArno/typebot.io/commit/ca79934ef5c86feaa60cde4d4bc42171149a1f15)] +- ๐ŸŒ Add es and ro support [[f6ac389](https://github.com/baptisteArno/typebot.io/commit/f6ac3891f8d11089d81a3cb7be6c715460570f28)] + + + +## 2.19.1 (2023-11-17) + +### Added + +- ๐Ÿ”Š Add response debug log for failing requests without errors [[5298538](https://github.com/baptisteArno/typebot.io/commit/5298538ecb8e2fd06d38775ac0b4a7d4333055c5)] + +### Changed + +- โ™ฟ Show scrollbar on searchable items [[7cf64a1](https://github.com/baptisteArno/typebot.io/commit/7cf64a1abbd639ca9f45528f7b3917b93ab7e1aa)] +- ๐Ÿšธ Auto scroll once picture choice images are fully loaded [[1f19eb8](https://github.com/baptisteArno/typebot.io/commit/1f19eb8763b2553feb849075eda8a3c8adec6fa9)] +- โฌ†๏ธ (date) Upgrade date parser package [[00265af](https://github.com/baptisteArno/typebot.io/commit/00265af0cc77a6ccdff62676cd03ebcaa20c50c6)] +- โช (wordpress) Revert to specific non breaking version for self-hosters [[6c0f28b](https://github.com/baptisteArno/typebot.io/commit/6c0f28b3e4f70a9920100c5546d47573b02f0b2a)] +- โšก Add maxWidth and maxHeight bubble them props [[74dd169](https://github.com/baptisteArno/typebot.io/commit/74dd169b50013ed5603e605ee01aac4dcdf5bf93)] +- โช Revert new authentication method for preview bot [[06065c3](https://github.com/baptisteArno/typebot.io/commit/06065c3e850312f32a8b0611aa8a8824b660dba8)] +- โšก Add more video supports ([#1023](https://github.com/baptisteArno/typebot.io/issues/1023)) [[dd4de58](https://github.com/baptisteArno/typebot.io/commit/dd4de582a93132d71b8e50fc5352c997633e2671)] +- ๐Ÿ’„ Fix multi choice checkbox UI on small screens [[60829b4](https://github.com/baptisteArno/typebot.io/commit/60829b4d0ab318651bf5ac0ee30799a21a07cbdd)] +- ๐Ÿšธ (typebotLink) Make "current" option work like typebot links instead of jump [[64418df](https://github.com/baptisteArno/typebot.io/commit/64418df3a1bd9ff1d3832eec1ed038eef4515432)] +- โ™ป๏ธ Introduce typebot v6 with events ([#1013](https://github.com/baptisteArno/typebot.io/issues/1013)) [[35300ea](https://github.com/baptisteArno/typebot.io/commit/35300eaf340c9bcae41f7b004c682bb8939684ff)] +- โšก (chatwoot) Unmount Typebot embed bubble when opening chatwoot [[eed562b](https://github.com/baptisteArno/typebot.io/commit/eed562b47a04676f3067096f61ab11e6c19726bf)] +- โฌ†๏ธ Upgrade Sentry to mitigate security issue [[b2b82c4](https://github.com/baptisteArno/typebot.io/commit/b2b82c48e1c46377d19550559afac1d068ba23cb)] + +### Fixed + +- ๐Ÿ› (editor) Fix AB test items not connectable [[3a47a0f](https://github.com/baptisteArno/typebot.io/commit/3a47a0fcbda4d850509ab304f15d51f3cc17e5f2)] +- ๐Ÿ› (typebotLink) Fix variables merging with new values [[e22bd7d](https://github.com/baptisteArno/typebot.io/commit/e22bd7dc9b1dc816f53d203d518d4643a958fbb7)] +- ๐Ÿ› (wordpress) Fix version mismatch for self-hosters for Standard embed as well [[eca6d20](https://github.com/baptisteArno/typebot.io/commit/eca6d207bf54499808b098a883cf399485ff3f25)] +- ๐Ÿ› Fix typebot parsing for legacy columnsWidth setting [[8d56349](https://github.com/baptisteArno/typebot.io/commit/8d563499f05a939a4deed1fea26f8397f53260f2)] +- ๐Ÿ› (fileUpload) Fix results file display if name contains comma [[bd198a4](https://github.com/baptisteArno/typebot.io/commit/bd198a4e0f0437eb5284f094e45e9af83acd3da3)] +- ๐Ÿ› (js) Fix default theme values css variables [[fd00b6f](https://github.com/baptisteArno/typebot.io/commit/fd00b6fdd56a2cbc8e7494aec680bc0bb51a4061)] +- ๐Ÿ› (billing) Set invoicing behavior to "always invoice" to fix double payment issue [[a1d7415](https://github.com/baptisteArno/typebot.io/commit/a1d7415227647b3fcf72652fb44dda65ce219510)] +- ๐Ÿ› (textBubble) Fix variable parsing when starting or finishing by spaces [[23625ad](https://github.com/baptisteArno/typebot.io/commit/23625ad214925db8a16128181dc25e6c2513038f)] +- ๐Ÿ› (webhook) Fix legacy webhook {{state}} body parsing [[63233eb](https://github.com/baptisteArno/typebot.io/commit/63233eb7eea6956ea2ce546b09246bb6df62c4f5)] +- ๐Ÿ› Fix theme background and font default selection [[e9a10c0](https://github.com/baptisteArno/typebot.io/commit/e9a10c078fbb3a9dd18f5f79ba83edcc72ae04f7)] +- ๐Ÿ› Sort variables to parse to fix text bubble parsing issue [[a38467e](https://github.com/baptisteArno/typebot.io/commit/a38467e5b2eb0fd2eed17a2062dd5fe93c0d0e75)] +- ๐Ÿ› (editor) Fix edge delete with undefined groupIndex [[647afdb](https://github.com/baptisteArno/typebot.io/commit/647afdb8faae73edfaffd55b0c29937ba2c87ea6)] +- ๐Ÿš‘ (webhook) Fix webhook execution with default method [[14a3716](https://github.com/baptisteArno/typebot.io/commit/14a37160fd7f6048f143a8a5568782a9034db1b1)] +- ๐Ÿ› (typebotLink) Fix link to first group with start event [[9bb5591](https://github.com/baptisteArno/typebot.io/commit/9bb559174ad8aabf0f3a43961f821bd78c0d436b)] +- ๐Ÿš‘ (zapier) Fix execute webhook endpoint too strict on block type check [[9eef166](https://github.com/baptisteArno/typebot.io/commit/9eef1665f536eae568970eb07764cd8b4e5f7f99)] +- ๐Ÿš‘ (editor) Fix move block with outgoing edge [[58b9e0b](https://github.com/baptisteArno/typebot.io/commit/58b9e0b3063a88a8873ac2df49b111c10efe8191)] +- ๐Ÿ› Fix default initial items in TableList [[b73ca7a](https://github.com/baptisteArno/typebot.io/commit/b73ca7a98a51d5a216730423640dc4f711d04ffc)] +- ๐Ÿ› Fix typebot publishing endpoint events parsing [[4b67f9e](https://github.com/baptisteArno/typebot.io/commit/4b67f9e2e2938dadc2c09f413f8aa51d10dd41de)] +- ๐Ÿ› (import) Fix import typebot files that does not have name field [[aceba0a](https://github.com/baptisteArno/typebot.io/commit/aceba0abd086426556f55a49f530b285c035e179)] +- ๐Ÿš‘ Fix parsing issue with new events field on ongoing session states [[db17a0f](https://github.com/baptisteArno/typebot.io/commit/db17a0f508a3557072b34fefaa5c6826c722eed3)] +- ๐Ÿš‘ Fix weird env parsing on Firefox making it crash [[eaa9b81](https://github.com/baptisteArno/typebot.io/commit/eaa9b815c40bf710d35268ed2d8d56e768299c27)] + +### Miscellaneous + +- ๐Ÿ“ Update Discord invite link [[27e9c1a](https://github.com/baptisteArno/typebot.io/commit/27e9c1adb96cfde57f84e877a945fc6ae514d09b)] +- ๐Ÿ“ Change community URLs, introduce Discord server [[8f224e3](https://github.com/baptisteArno/typebot.io/commit/8f224e32930c931d08b4543d9254714f303b953e)] +- ๐Ÿ“ Add OpenAI Dialogue option in breaking change doc [[c59df18](https://github.com/baptisteArno/typebot.io/commit/c59df18f2127f8c827dbda0ef9d49a6eae70974e)] +- ๐Ÿง‘โ€๐Ÿ’ป (chat) Introduce startChat and continueChat endpoints [[084588a](https://github.com/baptisteArno/typebot.io/commit/084588a086c22029e53ffdef7ae1fe81d7e413b7)] +- ๐Ÿ›‚ Reduce sendMessage serverless function max memory [[bac2393](https://github.com/baptisteArno/typebot.io/commit/bac2393b5d7d14eb871945e84f260dcca72d3f65)] +- ๐Ÿ“ Add breaking changes and OpenAI block improvements docs [[df57841](https://github.com/baptisteArno/typebot.io/commit/df578417aa6a261e878f62d0c4865ef7d58f77c0)] +- fix: whole page overflowing on the x axis and displaying a horizontal scrollbar ([#1011](https://github.com/baptisteArno/typebot.io/issues/1011)) [[68e4fc7](https://github.com/baptisteArno/typebot.io/commit/68e4fc71fbee9f45e2869912798304493c75b1b0)] +- ๐Ÿ›‚ Update Cache-Control header in generatePresignedPostPolicy [[027c6ff](https://github.com/baptisteArno/typebot.io/commit/027c6ffcef30ff9f091bf9100e584efcc490976b)] +- ๐Ÿ“ฆ Add strict package versioning to avoid incompatibility in workspace [[0c22d85](https://github.com/baptisteArno/typebot.io/commit/0c22d858b749c0f39eb595ad6e8f74a497abc198)] +- ๐Ÿ“ Add UTM params forwarding video tutorial [[57e4540](https://github.com/baptisteArno/typebot.io/commit/57e454008e85c197ad25c78f069d4a4b97d43c6a)] + + + +## 2.19.0 (2023-11-02) + +### Changed + +- โšก Add cache-control header on newly uploaded files [[d1502f8](https://github.com/baptisteArno/typebot.io/commit/d1502f8300e85529f9a16e8376f83eb7ef8da556)] + +### Fixed + +- ๐Ÿš‘ Move cache control header into the post policy [[a855d85](https://github.com/baptisteArno/typebot.io/commit/a855d85d048bf7519699628d0bdf834752a54dbc)] +- โœ๏ธ (billing) Fix plan name typo [[bdf9fae](https://github.com/baptisteArno/typebot.io/commit/bdf9faea78b61817ffbb185b4dcaa11d3b537e62)] +- ๐Ÿ› Fix formatted message in input block when input is retried [[a564181](https://github.com/baptisteArno/typebot.io/commit/a5641811a320d99867fef246786fae9980bce1d7)] +- โœ๏ธ Fix CORSRules content typo for S3 config [[585e1d4](https://github.com/baptisteArno/typebot.io/commit/585e1d40749528bc69ffea385d2b6b21bac50ae4)] +- ๐Ÿ› (number) Fix number input validation with variables [[7586eca](https://github.com/baptisteArno/typebot.io/commit/7586ecaf139efcd3ab86a277cadd61c1a9d9c72f)] +- ๐Ÿ› Fix group duplicate new title bug [[2d1ce73](https://github.com/baptisteArno/typebot.io/commit/2d1ce73931221195c6838a384f64821fc837ccb3)] +- ๐Ÿ’š Fix checkAndReportChatsUsage script sending multiple emails at once [[3f7f094](https://github.com/baptisteArno/typebot.io/commit/3f7f0944e15e09c80e2b0aac9bb5100ab55a3526)] +- โœ๏ธ Fix manual deployment doc start script typo [[a347a27](https://github.com/baptisteArno/typebot.io/commit/a347a2741d1c6671610f1f6431e8be1ab7fb3376)] +- ๐Ÿ› Fix graph flickering on high res displays ([#959](https://github.com/baptisteArno/typebot.io/issues/959)) [[f1e3836](https://github.com/baptisteArno/typebot.io/commit/f1e38361842432d0224da13379ea5b985cde555a)] + +### Miscellaneous + +- ๐Ÿ“ Add text link section in text bubble doc [[b80bea1](https://github.com/baptisteArno/typebot.io/commit/b80bea11b485707e3a0bbe51549e585f957ac8bf)] +- ๐Ÿ“ Add webhook configuration tuto video [[3e02436](https://github.com/baptisteArno/typebot.io/commit/3e02436d30946ac8732ffbb25acf7a109f9ccff6)] +- ๐Ÿง‘โ€๐Ÿ’ป Migrate to Tolgee ([#976](https://github.com/baptisteArno/typebot.io/issues/976)) [[bed8b42](https://github.com/baptisteArno/typebot.io/commit/bed8b42a2eb10bd81909ac38a6b3b51a423789c2)] +- ๐Ÿง‘โ€๐Ÿ’ป Fix type resolution for @typebot.io/react and nextjs [[31b3fc3](https://github.com/baptisteArno/typebot.io/commit/31b3fc311ede7885ff89ee41467308e718c92d4d)] + + + +## 2.18.4 (2023-10-25) + +### Fixed + +- ๐Ÿš‘ Fix can invite new members in workspace bool [[53558dc](https://github.com/baptisteArno/typebot.io/commit/53558dc3036d9839c07f99ab511c707f8a6fb24a)] +- ๐Ÿ› (numberInput) Fix input clearing out on dot or comma press [[4b248d5](https://github.com/baptisteArno/typebot.io/commit/4b248d554f54aafef105c1dcb842e3c5e1b28d5f)] +- โœ๏ธ Fix popup blocked toast typo [[1ff5881](https://github.com/baptisteArno/typebot.io/commit/1ff58818a9b7f90eac70680b3af07990c42363e5)] + +### Miscellaneous + +- ๐Ÿง‘โ€๐Ÿ’ป (whatsapp) Improve whatsapp start log [[c2a08c4](https://github.com/baptisteArno/typebot.io/commit/c2a08c482efc30322b308880bb377e276f9cedfb)] + + + + +## 2.18.3 (2023-10-23) + +## Breaking change + +Billing has been upgraded to be usage-based. Stripe ENV variables have been simplified. Check the configuration for more information + +### Added + +- ๐Ÿ‘ทโ€โ™‚๏ธ Add convenient script for migrating Stripe prices [[11186d8](https://github.com/baptisteArno/typebot.io/commit/11186d8d297570270c4c0be17e2315041f8f3836)] +- ๐Ÿ‘ทโ€โ™‚๏ธ Improve getUsage accuracy in check cron job [[1cc4ccf](https://github.com/baptisteArno/typebot.io/commit/1cc4ccfcfa2b9876b02ca554f0d8aa1f61296596)] + +### Changed + +- ๐Ÿšธ (buttons) Trim items content when parsing reply for better consistency [[621fcd5](https://github.com/baptisteArno/typebot.io/commit/621fcd59f10e56e21aa01b84f03da395f711e535)] +- โ™ป๏ธ Update import contact to brevo script [[be9daee](https://github.com/baptisteArno/typebot.io/commit/be9daee63ea38533667680fe52d70abefc345f2c)] +- โšก (billing) Automatic usage-based billing ([#924](https://github.com/baptisteArno/typebot.io/issues/924)) [[797751b](https://github.com/baptisteArno/typebot.io/commit/797751b4185c871b79afef9827f4f9b9aae83366)] + +### Fixed + +- ๐Ÿ› Fixed pinch zooming mouse issue (with ctrl key) ([#940](https://github.com/baptisteArno/typebot.io/issues/940)) [[2c15662](https://github.com/baptisteArno/typebot.io/commit/2c15662ef2a21fdc40a4eaff4acb79394f1db166)] +- ๐Ÿ› Freeze body overflow when opening a Popup embed ([#937](https://github.com/baptisteArno/typebot.io/issues/937)) [[df3a17e](https://github.com/baptisteArno/typebot.io/commit/df3a17efa08696595bf0e16e4aa2b2187115638c)] +- ๐Ÿ’š Fix send email in CI "React is not defined" [[3e06d89](https://github.com/baptisteArno/typebot.io/commit/3e06d89873cd8177a54ffe2bcf75d7d3705ab854)] +- ๐Ÿ› (results) Lower the max limit in getResults endpoint to avoid payload size error [[885dcec](https://github.com/baptisteArno/typebot.io/commit/885dcecd8db922ff98c0676c44d9a25e7f7cd8d5)] +- ๐Ÿš‘ (billing) Fix chats pricing tiers incremental flat amouโ€ฆ [[6b0c263](https://github.com/baptisteArno/typebot.io/commit/6b0c263f885c091e81731230e012d33e223f0cfa)] +- ๐Ÿ› (webhook) Fix webhook response data key number parsing [[1d0aab7](https://github.com/baptisteArno/typebot.io/commit/1d0aab71f91e82bba77f73669828aae403f66d00)] + +### Miscellaneous + +- ๐Ÿฉน Surround logs saving in a try catch block [[b301174](https://github.com/baptisteArno/typebot.io/commit/b3011741066e283013ffba3cb6eded6a46943d5e)] +- Fix audio content overflow in windows. ([#944](https://github.com/baptisteArno/typebot.io/issues/944)) [[eba52a5](https://github.com/baptisteArno/typebot.io/commit/eba52a5397cd2712fff71b20212283d60466943e)] +- ๐Ÿ“ Add bounties info in README [[a8c2deb](https://github.com/baptisteArno/typebot.io/commit/a8c2deb258589d458ed9d16cffb3e413612ba89d)] + + + +## 2.18.2 (2023-10-13) + +### Changed + +- โšก (video) Allow changing video height when resolved to an iframe [[ee685f1](https://github.com/baptisteArno/typebot.io/commit/ee685f14f3325a557dd3ef5277219fa3d6f5b4d5)] + +### Fixed + +- ๐Ÿ› (videoBubble) Fix youtube parsing for IDs containing a "-" [[ee7dfbf](https://github.com/baptisteArno/typebot.io/commit/ee7dfbf848be1b39a8e6bf5201e201015dea3c20)] +- ๐Ÿ› (textBubble) Fix overflow with long links [[9bbb30f](https://github.com/baptisteArno/typebot.io/commit/9bbb30f30d784d9d73bd04c578eef37651033cf0)] +- ๐Ÿ› Fix link parsing when using variables [[ad79178](https://github.com/baptisteArno/typebot.io/commit/ad791789ba30f57b8f26c24c8adfda76da57206c)] +- ๐Ÿ› (openai) Fix 2 openai streaming back to back [[42fd603](https://github.com/baptisteArno/typebot.io/commit/42fd6037f76c96ed0dfc0d5e66f818432e84b4f2)] +- ๐Ÿš‘ Fix empty bubble issue when plate element does not have a type attribute [[a48026c](https://github.com/baptisteArno/typebot.io/commit/a48026c707eb11e6e8e289075cdc0f88f6dd2f6f)] + +### Miscellaneous + +- ๐Ÿณ Force Next.js apps local hostname [[3ca5384](https://github.com/baptisteArno/typebot.io/commit/3ca5384e7f1e4818051978f77029c6ca29818bc6)] +- ๐Ÿ“ (openai) Add "Multiple OpenAI blocks" video section [[e071c81](https://github.com/baptisteArno/typebot.io/commit/e071c810aeb790d111636d513788324d0aec065b)] + + + +## 2.18.1 (2023-10-10) + +### Added + +- โœจ Automatically parse markdown from variables in text bubbles [[cfc5f64](https://github.com/baptisteArno/typebot.io/commit/cfc5f641a62847ef3b38194d87f89a39daeffabd)] + +### Changed + +- ๐Ÿšธ (openai) Improve streaming bubble sequence and visual [[49826d1](https://github.com/baptisteArno/typebot.io/commit/49826d1303428854a61b8d3322b3f5fc7f0c2ae0)] +- โฌ†๏ธ Upgrade sentry and improve its reliability [[3e7b9b3](https://github.com/baptisteArno/typebot.io/commit/3e7b9b3afd3b42c96b61e0a223df45d97df434b4)] +- ๐Ÿšธ (condition) Don't show value in node content if operator is "set" or "empty" [[224a08b](https://github.com/baptisteArno/typebot.io/commit/224a08b93279cb6baa94d67e577484d792f596f5)] +- โ™ป๏ธ Remove sentry client monitoring in viewer [[073654e](https://github.com/baptisteArno/typebot.io/commit/073654e1e0064e740260bd7dea6cee558529827f)] +- ๐Ÿ’„ Better parsing of lists and code in streaming bubbles [[877a58d](https://github.com/baptisteArno/typebot.io/commit/877a58dac2428e32d545dfc3307b17bc253af237)] +- ๐Ÿšธ (openai) Improve streamed message lists CSS [[b232a94](https://github.com/baptisteArno/typebot.io/commit/b232a9495ef4168db7cc49734b9d676e5784c788)] +- โฌ†๏ธ (openai) Replace openai-edge with openai and upgrade next [[225dfed](https://github.com/baptisteArno/typebot.io/commit/225dfed313eb545c323485c9846b1e7d8f685c1b)] +- โ™ป๏ธ (api) Auto start bot if starting with input [[9e6a1f7](https://github.com/baptisteArno/typebot.io/commit/9e6a1f7dc0c1a66b3811625b82a0b1b73aeb62ee)] +- ๐Ÿšธ (videoBubble) Reparse variable video URL to correctly detect provider [[a7b784b](https://github.com/baptisteArno/typebot.io/commit/a7b784b446e085cdfe2c240bec33940a27f8a260)] +- ๐Ÿšธ (sendEmail) Rename username SMTP creds label to avoid confusion [[42ae75c](https://github.com/baptisteArno/typebot.io/commit/42ae75cb11249926983e24792291fd4704b75ab9)] + +### Removed + +- ๐Ÿ”ฅ Remove streamer Pages API endpoint [[bf1f657](https://github.com/baptisteArno/typebot.io/commit/bf1f6576421e768f5c4506c5f0610ec2b3e05ae4)] + +### Fixed + +- ๐Ÿ’š Fix docker build when Sentry not enabled [[54788a8](https://github.com/baptisteArno/typebot.io/commit/54788a828ec92d8a24c580a3d29b6a450e0f65bc)] +- ๐Ÿš‘ Fix custom CSS sanitization [[8eb9f25](https://github.com/baptisteArno/typebot.io/commit/8eb9f2568bd6146ff45093c8c7bf2983a69e7cd6)] +- ๐Ÿ› (editor) Fix default branding settings on creโ€ฆ [[258de60](https://github.com/baptisteArno/typebot.io/commit/258de60bd274c05c6783fb06b2458718a86baa04)] +- ๐Ÿ› Add no cache instructions to streamer [[4746e38](https://github.com/baptisteArno/typebot.io/commit/4746e38cb27185d3fe063eb7184c1d10f687c9a1)] +- ๐Ÿ› Enable stream again by migrating endpoint to route handler [[0ba13b4](https://github.com/baptisteArno/typebot.io/commit/0ba13b4df0febf96d900e5dc794bf42bb8092d66)] +- ๐Ÿ› New sendMessage version for the new parser [[3838ac9](https://github.com/baptisteArno/typebot.io/commit/3838ac9c3fbfa1ed85ed2390b2b3cb4a28698796)] +- ๐Ÿš‘ Fix text styling parsing on variables [[6f3e9e9](https://github.com/baptisteArno/typebot.io/commit/6f3e9e92512dc70849737bef2d07a78e997bf0f7)] +- ๐Ÿš‘ (results) Fix broken infinite scroll [[2bc9dfb](https://github.com/baptisteArno/typebot.io/commit/2bc9dfb503b52799fee84845d9ecd5d6a368dbb4)] +- ๐Ÿ› (whatsapp) Fix force create session when flow is completed at first round [[bf051be](https://github.com/baptisteArno/typebot.io/commit/bf051bebde1dfa14b759df604ded6d057b38f30c)] +- ๐Ÿš‘ (whatsapp) Fix start whatsapp session when user has multiple whatsapp enabled [[60c06aa](https://github.com/baptisteArno/typebot.io/commit/60c06aa9a95d4185c41f4159d08385ee9ce96ee9)] + +### Miscellaneous + +- ๐Ÿ“ (s3) Add s3 configuration detailed instructions [[021cae3](https://github.com/baptisteArno/typebot.io/commit/021cae3c294e61dacb27ee87e038ca1fd9bdd1af)] +- ๐Ÿ›‚ Sanitize custom CSS and head code to avoid modification of lite badge [[8e54824](https://github.com/baptisteArno/typebot.io/commit/8e548248b169b31f5760d6afff809dcbda211220)] +- ๐Ÿ“ (embed) Add note about non-embeddable websites [[15823df](https://github.com/baptisteArno/typebot.io/commit/15823df6bd24a3c71974d1609a5c33421d5c5dfb)] +- ๐Ÿ“ (whatsapp) Remove private beta mention [[d567bed](https://github.com/baptisteArno/typebot.io/commit/d567bede6ed3d5d8d00361aef6b33e7750b01ddf)] +- ๐Ÿณ Remove wait-for-it script to avoid edge cases issues [[ee800d5](https://github.com/baptisteArno/typebot.io/commit/ee800d5ba278dc897659378c7cef39ec33b4ae7b)] +- ๐Ÿง‘โ€๐Ÿ’ป Improve invalid environment variable insight on build fail [[8b8a23a](https://github.com/baptisteArno/typebot.io/commit/8b8a23accb4fb1d05c8dbad10faaaf0dbdeca9f8)] +- ๐Ÿ›‚ (whatsapp) Set default whatsapp expiry to 4 hours [[a53d128](https://github.com/baptisteArno/typebot.io/commit/a53d128fb0e7aed454bfc378d2746fdc16228d3a)] +- ๐Ÿ›‚ (whatsapp) Disable whatsapp by default on duplication [[3292ccc](https://github.com/baptisteArno/typebot.io/commit/3292cccf5110ba37ad62e468870f19dba2925529)] +- ๐Ÿ“ (docker) Update postgres image name [[317a15b](https://github.com/baptisteArno/typebot.io/commit/317a15b708de6c4af0f439877f2b67534b2c50c4)] +- ๐Ÿ“ (vercel) Add a note on function maxDuration for Hobby plans [[4d475ff](https://github.com/baptisteArno/typebot.io/commit/4d475ff009a62202e18f4db2de21d9b5ef54d6ac)] +- ๐Ÿ“ (whatsapp) Re-organize whatsapp overview doc [[a102d45](https://github.com/baptisteArno/typebot.io/commit/a102d45da1f195b658519fc5bb89d219caf5fd94)] +- ๐Ÿณ Bump Postgres version in official docker compose file [[876625d](https://github.com/baptisteArno/typebot.io/commit/876625deb83c3061896dcac03cdbb82854c8db5c)] + + + +## 2.18.0 (2023-09-29) + +## What's new? + +- WhatsApp integration has been greatly improved. Also the documentation to set it up as a self-hosters has more details. + +- New [Zemantic AI](https://zemantic.ai/) bock. It's the first ever block contributed by the community ๐Ÿฅณ + +## Details + +### Added + +- โœจ (whatsapp) Add custom session expiration ([#842](https://github.com/baptisteArno/typebot.io/issues/842)) [[4f953ac](https://github.com/baptisteArno/typebot.io/commit/4f953ac272b1e2a826776f9d4cefcce63757abf1)] +- ๐Ÿ‘ทโ€โ™‚๏ธ Only build docker images on tag push [[4cfb45e](https://github.com/baptisteArno/typebot.io/commit/4cfb45e2a3432f91418be402b063c6ce9e5fd907)] +- ๐Ÿ‘ทโ€โ™‚๏ธ (vercel) Increase max execution duration for webhooks [[8f4e5b5](https://github.com/baptisteArno/typebot.io/commit/8f4e5b5d634fcb6d706117425f458f647c7751e4)] +- โœจ Add Zemantic AI Integration block ([#752](https://github.com/baptisteArno/typebot.io/issues/752)) [[75e4b16](https://github.com/baptisteArno/typebot.io/commit/75e4b16af0288ad4f6d7618f3439736d10fd5d87)] + +### Changed + +- ๐Ÿšธ (whatsapp) Improve how the whatsapp preview behaves ([#873](https://github.com/baptisteArno/typebot.io/issues/873)) [[f016072](https://github.com/baptisteArno/typebot.io/commit/f016072e3eef021eb21d32922ce3931bc7306616)] +- ๐Ÿšธ (pictureChoice) Allow dynamic picture choice withโ€ฆ ([#865](https://github.com/baptisteArno/typebot.io/issues/865)) [[76f4954](https://github.com/baptisteArno/typebot.io/commit/76f4954540b523733f92db5db55f4de842515971)] +- ๐Ÿšธ (pictureChoice) Improve single picture choice with same titles [[d46e801](https://github.com/baptisteArno/typebot.io/commit/d46e8013d4d3e28eea099f8de8da9055d7d27723)] +- ๐Ÿšธ (whatsapp) Improve upgrade plan for whatsapp notice [[ccc34b3](https://github.com/baptisteArno/typebot.io/commit/ccc34b30287cc26939d7435aae0e8773f5afa462)] +- ๐Ÿšธ Better random IDs generation in setVariable [[a176e23](https://github.com/baptisteArno/typebot.io/commit/a176e23cc8c3d82c66df71b741527dd0210c5177)] +- โšก (setVariable) Add "Environment name" value in Set variable block ([#850](https://github.com/baptisteArno/typebot.io/issues/850)) [[1ca742f](https://github.com/baptisteArno/typebot.io/commit/1ca742fc0b83e7dc429872816967d767101eedb2)] +- โšก Auto continue bot on whatsApp if starting block is input ([#849](https://github.com/baptisteArno/typebot.io/issues/849)) [[b81fcf0](https://github.com/baptisteArno/typebot.io/commit/b81fcf0167e332d6559e44ce409c44ce87316f55)] +- โšก (wordpress) Add query params exclusion support [[2307231](https://github.com/baptisteArno/typebot.io/commit/2307231d283ee6af5948ed4941ea06d7627cbdca)] +- โ™ฟ (embed) Add aria-label to bubble button [[90cf2e9](https://github.com/baptisteArno/typebot.io/commit/90cf2e9f81ad938c068dd04ed4346910fe238a60)] +- โšก (whatsapp) Improve whatsApp management and media collection [[9e0109f](https://github.com/baptisteArno/typebot.io/commit/9e0109f561591db485626841856f83d13cde4246)] +- โ™ป๏ธ Remove storage limit related code [[d7dc5fb](https://github.com/baptisteArno/typebot.io/commit/d7dc5fb5fb7bd07b477470c4941f9fc57d7f08b0)] +- โ™ป๏ธ Export bot-engine code into its own package [[7d57e8d](https://github.com/baptisteArno/typebot.io/commit/7d57e8dd065c01b90c4eb03ccfdbc3b73da85c23)] +- โšก (whatsapp) Improve WhatsApp preview management [[f626c98](https://github.com/baptisteArno/typebot.io/commit/f626c9867cb324b8546e8fca40fe8065ff36b5c4)] +- ๐Ÿšธ (results) Use header id as table accessor to allow duplicate names [[61c46bc](https://github.com/baptisteArno/typebot.io/commit/61c46bcb465ff1a0fd769b02e20c981037a4dfaa)] +- โšก (customDomain) Add configuration modal for domain verification [[322c48c](https://github.com/baptisteArno/typebot.io/commit/322c48cddcbf348ab44850499e849d124b9adfed)] +- ๐Ÿšธ (typebotLink) Make sure variables from child bots are merged if necessary [[21ad061](https://github.com/baptisteArno/typebot.io/commit/21ad061f7bcc001be884c3db033c97f7baab718d)] +- ๐Ÿšธ (billing) Improve feedback when subscription is "past_due" [[0ccc2ef](https://github.com/baptisteArno/typebot.io/commit/0ccc2efa454e3a0f2c9b7a633b241175d4ee8dac)] +- โšก (analytics) Keep track of already explored blocks for drop off rate [[87fac3e](https://github.com/baptisteArno/typebot.io/commit/87fac3e9ffe68965a569d01888d277950c7732d7)] +- ๐Ÿ”ง Add recommended vscode extensions and more settings [[eea5d82](https://github.com/baptisteArno/typebot.io/commit/eea5d82f4047534162d9c939b24399b49dc66b3f)] +- โšก (s3) Improve storage management and type safety [[fbb198a](https://github.com/baptisteArno/typebot.io/commit/fbb198af9de1e8e44184373a36973a90c8f77b5f)] +- โšก (date) Add min and max options to date input block [[a2e24d0](https://github.com/baptisteArno/typebot.io/commit/a2e24d08a0feba9c5c73339a0d0e0733b3b1c30c)] +- โ™ป๏ธ (lp) Add back static images into landing page [[cdd3e19](https://github.com/baptisteArno/typebot.io/commit/cdd3e197557b913ea04617d9a2f9fcae9759f92e)] + +### Fixed + +- ๐Ÿ› (builder) Fix system color mode not syncing properly [[b31bcdf](https://github.com/baptisteArno/typebot.io/commit/b31bcdfb87d19facfc46f8800f9b562e5b615c1b)] +- ๐Ÿš‘ (js) Fix dependency issue preventing user to install @typebot.io/js [[59cd79a](https://github.com/baptisteArno/typebot.io/commit/59cd79a4b85195e5d3573891f8a942c639cf2fe6)] +- ๐Ÿ› (typebotLink) Fix nested typebot link pop [[cd97da2](https://github.com/baptisteArno/typebot.io/commit/cd97da2d34fcf576100d03fa30608ce26f1784c4)] +- ๐Ÿ› (whatsapp) Fix auto start input where it didn't display next buโ€ฆ ([#869](https://github.com/baptisteArno/typebot.io/issues/869)) [[f9a14c0](https://github.com/baptisteArno/typebot.io/commit/f9a14c0685826a00a1873d17baafbe950fab55e0)] +- ๐Ÿ› (whatsapp) Fix preview failing to start and wait timeoโ€ฆ [[e10a506](https://github.com/baptisteArno/typebot.io/commit/e10a506c9608dafd9462ea6d20d698551eb751c1)] +- ๐Ÿ› (preview) Fix always displayed start props toast [[99b0025](https://github.com/baptisteArno/typebot.io/commit/99b0025a664f951629899160f8ecea42046221b4)] +- ๐Ÿ› (pixel) Fix multiple Meta pixels tracking [[56e175b](https://github.com/baptisteArno/typebot.io/commit/56e175bda6df960f6a5f32d7fd5b5f4bdddd8d56)] +- ๐Ÿš‘ (fileUpload) Fix file upload in linked typebots [[7b3cbdb](https://github.com/baptisteArno/typebot.io/commit/7b3cbdb8e8a2dbdfa030ca782a186d9a449ff6d9)] +- ๐Ÿ› (bot) Fix reactivity issue when filtering single choices [[459fc4d](https://github.com/baptisteArno/typebot.io/commit/459fc4debc621cdd9f134f81443b4b9c58c93664)] +- ๐Ÿš‘ (billing) Fix disabled upgrade buttons [[ed60caa](https://github.com/baptisteArno/typebot.io/commit/ed60caa8060d6df4492958854f1bcd114b101b17)] +- ๐Ÿ’š Rename back viewer [[4673989](https://github.com/baptisteArno/typebot.io/commit/4673989104f00aeef8a68916b5b4ec55c063437e)] +- ๐Ÿš‘ (upload) Fix upload in embed [[85272af](https://github.com/baptisteArno/typebot.io/commit/85272af8f3c3ef9a9b8fed6161a85d1632404e9b)] +- ๐Ÿš‘ Fix file upload expiration issue [[9d80a3f](https://github.com/baptisteArno/typebot.io/commit/9d80a3f68b972cc649400cd7de26191c4e72e7e8)] +- ๐Ÿ› (results) Fix result modal content display [[2ce63f5](https://github.com/baptisteArno/typebot.io/commit/2ce63f5d06515f7808db0bd9abfb0bf9aeb48cbd)] +- ๐Ÿ› (payment) Fix postalCode camel case issue [[69ef41b](https://github.com/baptisteArno/typebot.io/commit/69ef41b5347c08049a88a321eaf86657f62f9490)] +- ๐Ÿ› Fix bubble icon file upload [[6548752](https://github.com/baptisteArno/typebot.io/commit/6548752b1bd29fbe3acab7efcaf4733fd80708e8)] +- ๐Ÿ› (openai) Fix models dropdown list on new block [[096262c](https://github.com/baptisteArno/typebot.io/commit/096262cff9aa6d79e75dba3b07ce91fd2c8e6794)] +- ๐Ÿ’š Remove defineLocale weird TS bug [[59cc450](https://github.com/baptisteArno/typebot.io/commit/59cc450fd36a646230b31c431ab6b33586aa158b)] +- ๐Ÿš‘ (typebotLink) Correctly pass back existing values from parent bot [[bea3332](https://github.com/baptisteArno/typebot.io/commit/bea3332c3248a9b3896c74c7fe6dbf21f4229d4e)] + +### Miscellaneous + +- ๐Ÿ“ Update About page content [[129f558](https://github.com/baptisteArno/typebot.io/commit/129f5582db4e2970a7cb177ef2abb79f47159a99)] +- ๐Ÿ›‚ (whatsapp) Remove feature flag [[0e4e10c](https://github.com/baptisteArno/typebot.io/commit/0e4e10c77b0d960ce268ebe2d25600812560e733)] +- ๐Ÿ“ (typebotLink) Add instructions about shared variables and merge answers [[1a4b8bb](https://github.com/baptisteArno/typebot.io/commit/1a4b8bb8fcc3fdf9d8dfae7bc31036eea9df99c0)] +- ๐Ÿ“ (whatsapp) Add a "Create WhatsApp app" guide [[ec52fdc](https://github.com/baptisteArno/typebot.io/commit/ec52fdc0ade4fd3acb651e8eae754269ac8cb6f7)] +- ๐Ÿ›‚ Improve editor authorization feedback ([#856](https://github.com/baptisteArno/typebot.io/issues/856)) [[801fea8](https://github.com/baptisteArno/typebot.io/commit/801fea860a9940a6a87b6c4c147c6da6c3234df3)] +- ๐Ÿ“ Add custom domain troobleshoot section [[bad415a](https://github.com/baptisteArno/typebot.io/commit/bad415ae1ff2c9d7bfe4584e042699466a91d9a0)] +- ๐Ÿ“ Change googleSheets date system var name [[797685a](https://github.com/baptisteArno/typebot.io/commit/797685aa9d3de68afedc7515aaaeb6ef972d6b7c)] +- ๐Ÿ›‚ (fileUpload) Improve file upload size limit enforcement [[bb13c2b](https://github.com/baptisteArno/typebot.io/commit/bb13c2bd61870a8da18bcf1a00dc85d79ec1f9c9)] +- ๐Ÿ“ Update support contact email [[6375a24](https://github.com/baptisteArno/typebot.io/commit/6375a2425fe5c8a2296effd7136d1fe7d7667295)] +- ๐Ÿ“ (vercel) Add disable github workflows section [[43be38c](https://github.com/baptisteArno/typebot.io/commit/43be38cf50732ae5336f3dc651f95ab782f57c19)] + ## 2.17.2 (2023-09-07) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d42d77d183..02abc179cd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,7 +41,10 @@ These apps are built with awesome web technologies including [Typescript](https: Check out the [Configuration guide](https://docs.typebot.io/self-hosting/configuration) if you want to enable more options 3. Make sure you have [Docker](https://docs.docker.com/compose/install/) running -4. Start the builder and viewer + +4. Make sure you have Node.js installed. I suggest you use [`nvm`](https://github.com/nvm-sh/nvm) allowing you to manage different versions. Once you installed nvm, you can install and use the latest version of Node.js: `nvm install && nvm use` + +5. Start the builder and viewer ```sh pnpm dev @@ -55,7 +58,7 @@ These apps are built with awesome web technologies including [Typescript](https: By default, you can easily authenticate in the builder using the "Github Sign In" button. For other options, check out the [Configuration guide](https://docs.typebot.io/self-hosting/configuration) -5. (Optionnal) Start the landing page +6. (Optionnal) Start the landing page Copy [`apps/landing-page/.env.local.example`](apps/landing-page/.env.local.example) to `apps/landing-page/.env.local` @@ -64,7 +67,7 @@ These apps are built with awesome web technologies including [Typescript](https: pnpm dev ``` -6. (Optionnal) Start the docs +7. (Optionnal) Start the docs ```sh cd apps/docs diff --git a/Dockerfile b/Dockerfile index cc62c82c69..da8b115c75 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,8 +27,7 @@ RUN pnpm install COPY --from=pruner /app/out/full/ . COPY turbo.json turbo.json -ENV ENCRYPTION_SECRET=encryption_secret_placeholder123 DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot NEXTAUTH_URL=http://localhost:3000 NEXT_PUBLIC_VIEWER_URL=http://localhost:3001 -RUN pnpm turbo run build --filter=${SCOPE}... +RUN SKIP_ENV_CHECK=true pnpm turbo run build --filter=${SCOPE}... FROM base AS runner WORKDIR /app @@ -53,9 +52,7 @@ COPY --from=builder /app/node_modules/.bin/prisma ./node_modules/.bin/prisma RUN ./node_modules/.bin/prisma generate --schema=packages/prisma/postgresql/schema.prisma; COPY scripts/${SCOPE}-entrypoint.sh ./ -COPY scripts/wait-for-it.sh ./ RUN chmod +x ./${SCOPE}-entrypoint.sh -RUN chmod +x ./wait-for-it.sh ENTRYPOINT ./${SCOPE}-entrypoint.sh EXPOSE 3000 diff --git a/README.md b/README.md index 3c92da17d2..cb3a038fb0 100644 --- a/README.md +++ b/README.md @@ -24,17 +24,15 @@ Typebot is an open-source chatbot builder. It allows you to create advanced chat Uptime Report a bug Ask a question -Ask a question +Ask a question +Ask a question

- Get Started + Try Typebot โ€ข Docs - โ€ข - YouTube -

--- @@ -87,8 +85,7 @@ So youโ€™ll be supporting open source software and getting a great service! ๐Ÿ’™ You'll find a lot of resources to help you get started with Typebot in the [documentation](https://docs.typebot.io/). -- Have a product-related question? Ask it to the [community](https://www.facebook.com/groups/typebot) -- Have a technical question? Ask it on [Github discussions](https://github.com/baptisteArno/typebot.io/discussions/new/choose) +- Have a question? Join the [Discord server](https://typebot.io/discord) and get instant help. - Found a bug? [Create an issue](https://github.com/baptisteArno/typebot.io/issues/new) ## Self-hosting @@ -99,6 +96,15 @@ Interested in self-hosting Typebot on your server? Take a look at the [self-host You are awesome, lets build great software together. Head over to the [Contribute guidelines](https://github.com/baptisteArno/typebot.io/blob/main/CONTRIBUTING.md) to get started. ๐Ÿ’ช +### Claim these open bounties ๐Ÿ‘‡ + + + + + Bounties of typebot + + + ## Run the project locally Follow the [Get started](https://github.com/baptisteArno/typebot.io/blob/main/CONTRIBUTING.md#get-started) section of the Contributing guide. diff --git a/apps/builder/next.config.mjs b/apps/builder/next.config.mjs index ee4f93d781..a2f9442915 100644 --- a/apps/builder/next.config.mjs +++ b/apps/builder/next.config.mjs @@ -8,6 +8,23 @@ const __filename = fileURLToPath(import.meta.url) const __dirname = dirname(__filename) +const injectViewerUrlIfVercelPreview = (val) => { + if ( + (val && typeof val === 'string' && val.length > 0) || + process.env.VERCEL_ENV !== 'preview' || + !process.env.VERCEL_BUILDER_PROJECT_NAME || + !process.env.NEXT_PUBLIC_VERCEL_VIEWER_PROJECT_NAME + ) + return + process.env.NEXT_PUBLIC_VIEWER_URL = + `https://${process.env.VERCEL_BRANCH_URL}`.replace( + process.env.VERCEL_BUILDER_PROJECT_NAME, + process.env.NEXT_PUBLIC_VERCEL_VIEWER_PROJECT_NAME + ) +} + +injectViewerUrlIfVercelPreview(process.env.NEXT_PUBLIC_VIEWER_URL) + configureRuntimeEnv() /** @type {import('next').NextConfig} */ @@ -22,7 +39,7 @@ const nextConfig = { ], i18n: { defaultLocale: 'en', - locales: ['en', 'fr', 'pt', 'pt-BR', 'de'], + locales: ['en', 'fr', 'pt', 'pt-BR', 'de', 'ro', 'es'], }, experimental: { outputFileTracingRoot: join(__dirname, '../../'), @@ -54,20 +71,34 @@ const nextConfig = { }, } -const sentryWebpackPluginOptions = { - silent: true, - release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-builder', -} - export default process.env.NEXT_PUBLIC_SENTRY_DSN ? withSentryConfig( + nextConfig, { - ...nextConfig, - sentry: { - hideSourceMaps: true, - widenClientFileUpload: true, - }, + // For all available options, see: + // https://github.com/getsentry/sentry-webpack-plugin#options + + // Suppresses source map uploading logs during build + silent: true, + release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-builder', + org: process.env.SENTRY_ORG, + project: process.env.SENTRY_PROJECT, }, - sentryWebpackPluginOptions + { + // For all available options, see: + // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ + + // Upload a larger set of source maps for prettier stack traces (increases build time) + widenClientFileUpload: true, + + // Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load) + tunnelRoute: '/monitoring', + + // Hides source maps from generated client bundles + hideSourceMaps: true, + + // Automatically tree-shake Sentry logger statements to reduce bundle size + disableLogger: true, + } ) : nextConfig diff --git a/apps/builder/package.json b/apps/builder/package.json index 41d495f7b1..79545e4bd5 100644 --- a/apps/builder/package.json +++ b/apps/builder/package.json @@ -11,9 +11,9 @@ "test:show-report": "pnpm playwright show-report src/test/reporters" }, "dependencies": { - "@chakra-ui/anatomy": "^2.1.1", + "@chakra-ui/anatomy": "2.1.1", "@chakra-ui/react": "2.7.1", - "@chakra-ui/theme-tools": "^2.0.18", + "@chakra-ui/theme-tools": "2.0.18", "@dnd-kit/core": "6.0.8", "@dnd-kit/sortable": "7.0.2", "@dnd-kit/utilities": "3.2.1", @@ -22,36 +22,37 @@ "@faire/mjml-react": "3.3.0", "@giphy/js-fetch-api": "5.0.0", "@giphy/js-types": "4.4.0", - "@giphy/js-util": "^5.0.0", + "@giphy/js-util": "5.0.0", "@giphy/react-components": "7.1.0", "@googleapis/drive": "8.0.0", "@paralleldrive/cuid2": "2.2.1", - "@sentry/nextjs": "7.66.0", - "@stripe/stripe-js": "1.54.1", - "@t3-oss/env-nextjs": "^0.6.0", - "@tanstack/react-query": "^4.29.19", + "@sentry/nextjs": "7.77.0", + "@tanstack/react-query": "4.29.19", "@tanstack/react-table": "8.9.3", - "@trpc/client": "10.34.0", - "@trpc/next": "10.34.0", - "@trpc/react-query": "10.34.0", - "@trpc/server": "10.34.0", + "@tolgee/format-icu": "5.13.3", + "@tolgee/react": "5.13.3", + "@trpc/client": "10.40.0", + "@trpc/next": "10.40.0", + "@trpc/react-query": "10.40.0", + "@trpc/server": "10.40.0", + "@typebot.io/bot-engine": "workspace:*", "@typebot.io/emails": "workspace:*", "@typebot.io/env": "workspace:*", "@typebot.io/nextjs": "workspace:*", + "@typebot.io/js": "workspace:*", "@udecode/plate-basic-marks": "21.1.5", - "@udecode/plate-common": "^21.1.5", + "@udecode/plate-common": "21.1.5", "@udecode/plate-core": "21.1.5", "@udecode/plate-link": "21.2.0", - "@udecode/plate-serializer-html": "21.1.5", "@udecode/plate-ui-link": "21.2.0", "@udecode/plate-ui-toolbar": "21.1.5", - "@uiw/codemirror-extensions-langs": "^4.21.7", - "@uiw/codemirror-theme-github": "^4.21.7", - "@uiw/codemirror-theme-tokyo-night": "^4.21.7", - "@uiw/react-codemirror": "^4.21.7", - "@upstash/ratelimit": "^0.4.3", - "@upstash/redis": "^1.22.0", - "@use-gesture/react": "^10.2.27", + "@uiw/codemirror-extensions-langs": "4.21.7", + "@uiw/codemirror-theme-github": "4.21.7", + "@uiw/codemirror-theme-tokyo-night": "4.21.7", + "@uiw/react-codemirror": "4.21.7", + "@upstash/ratelimit": "0.4.3", + "@upstash/redis": "1.22.0", + "@use-gesture/react": "10.2.27", "browser-image-compression": "2.0.2", "canvas-confetti": "1.6.0", "codemirror": "6.0.1", @@ -68,31 +69,29 @@ "libphonenumber-js": "1.10.37", "micro": "10.0.1", "micro-cors": "0.1.1", - "next": "13.4.3", + "next": "13.5.4", "next-auth": "4.22.1", - "next-international": "0.9.5", - "nextjs-cors": "^2.1.2", + "nextjs-cors": "2.1.2", "nodemailer": "6.9.3", "nprogress": "0.2.0", - "openai-edge": "1.2.2", + "openai": "4.19.0", "papaparse": "5.4.1", - "posthog-js": "^1.77.1", + "posthog-js": "1.77.1", "posthog-node": "3.1.1", "prettier": "2.8.8", "qs": "6.11.2", "react": "18.2.0", "react-dom": "18.2.0", - "sharp": "^0.32.4", + "sharp": "0.32.4", "slate": "0.94.1", "slate-history": "0.93.0", - "slate-hyperscript": "0.77.0", "slate-react": "0.94.2", "stripe": "12.13.0", "svg-round-corners": "0.4.1", "swr": "2.2.0", "tinycolor2": "1.6.0", "trpc-openapi": "1.2.0", - "unsplash-js": "^7.0.18", + "unsplash-js": "7.0.18", "use-debounce": "9.0.4" }, "devDependencies": { @@ -102,6 +101,7 @@ "@typebot.io/prisma": "workspace:*", "@typebot.io/schemas": "workspace:*", "@typebot.io/tsconfig": "workspace:*", + "@typebot.io/radar": "workspace:*", "@types/canvas-confetti": "1.6.0", "@types/jsonwebtoken": "9.0.2", "@types/micro-cors": "0.1.3", @@ -113,12 +113,12 @@ "@types/qs": "6.9.7", "@types/react": "18.2.15", "@types/tinycolor2": "1.4.3", - "dotenv-cli": "^7.2.1", + "dotenv-cli": "7.2.1", "eslint": "8.44.0", "eslint-config-custom": "workspace:*", - "next-runtime-env": "^1.6.2", - "superjson": "^1.12.4", - "typescript": "5.1.6", - "zod": "3.21.4" + "next-runtime-env": "1.6.2", + "superjson": "1.12.4", + "typescript": "5.3.2", + "zod": "3.22.4" } } diff --git a/apps/builder/public/images/actionRequiredBanner.png b/apps/builder/public/images/actionRequiredBanner.png new file mode 100644 index 0000000000..f0c8c3766c Binary files /dev/null and b/apps/builder/public/images/actionRequiredBanner.png differ diff --git a/apps/builder/public/images/backgrounds/brightRain.jpeg b/apps/builder/public/images/backgrounds/brightRain.jpeg new file mode 100644 index 0000000000..942e9504a1 Binary files /dev/null and b/apps/builder/public/images/backgrounds/brightRain.jpeg differ diff --git a/apps/builder/public/images/backgrounds/rayOfLights.jpeg b/apps/builder/public/images/backgrounds/rayOfLights.jpeg new file mode 100644 index 0000000000..828ad25dde Binary files /dev/null and b/apps/builder/public/images/backgrounds/rayOfLights.jpeg differ diff --git a/apps/builder/public/images/invitationBanner.png b/apps/builder/public/images/invitationBanner.png new file mode 100644 index 0000000000..87ba024202 Binary files /dev/null and b/apps/builder/public/images/invitationBanner.png differ diff --git a/apps/builder/public/images/og.png b/apps/builder/public/images/og.png new file mode 100644 index 0000000000..762c3e65f6 Binary files /dev/null and b/apps/builder/public/images/og.png differ diff --git a/apps/builder/public/images/tzz_bots_dark.png b/apps/builder/public/images/tzz_bots_dark.png new file mode 100644 index 0000000000..0500c8e316 Binary files /dev/null and b/apps/builder/public/images/tzz_bots_dark.png differ diff --git a/apps/builder/public/images/tzz_bots_light.png b/apps/builder/public/images/tzz_bots_light.png new file mode 100644 index 0000000000..85800603ee Binary files /dev/null and b/apps/builder/public/images/tzz_bots_light.png differ diff --git a/apps/builder/public/images/yourBotIsFlyingBanner.png b/apps/builder/public/images/yourBotIsFlyingBanner.png new file mode 100644 index 0000000000..d6d5c8f002 Binary files /dev/null and b/apps/builder/public/images/yourBotIsFlyingBanner.png differ diff --git a/apps/builder/public/images/yourMagicLinkBanner.png b/apps/builder/public/images/yourMagicLinkBanner.png new file mode 100644 index 0000000000..90cafe2009 Binary files /dev/null and b/apps/builder/public/images/yourMagicLinkBanner.png differ diff --git a/apps/builder/public/locales/de.json b/apps/builder/public/locales/de.json new file mode 100644 index 0000000000..adb5ec34b5 --- /dev/null +++ b/apps/builder/public/locales/de.json @@ -0,0 +1,247 @@ +{ + "account.apiTokens.createButton.label": "Erstellen", + "account.apiTokens.createModal.copyInstruction": "Bitte kopiere deinen Token und bewahre ihn an einem sicheren Ort auf.", + "account.apiTokens.createModal.createButton.label": "Token erstellen", + "account.apiTokens.createModal.createHeading": "Token erstellen", + "account.apiTokens.createModal.createdHeading": "Token erstellt", + "account.apiTokens.createModal.doneButton.label": "Fertig", + "account.apiTokens.createModal.nameInput.label": "Gib einen eindeutigen Namen fรผr deinen Token ein, um ihn von anderen Token zu unterscheiden.", + "account.apiTokens.createModal.nameInput.placeholder": "Z.B. Zapier, Github, Make.com", + "account.apiTokens.createModal.securityWarning": "Aus Sicherheitsgrรผnden kรถnnen wir ihn nicht erneut anzeigen.", + "account.apiTokens.deleteButton.label": "Lรถschen", + "account.apiTokens.deleteConfirmationMessage": "Der Token tokenName wird dauerhaft widerrufen, bist du sicher, dass du fortfahren mรถchtest?", + "account.apiTokens.description": "Diese Token ermรถglichen es anderen Apps, dein gesamtes Konto und Typebots zu steuern. Sei vorsichtig!", + "account.apiTokens.heading": "API-Token", + "account.apiTokens.table.createdHeader": "Erstellt", + "account.apiTokens.table.nameHeader": "Name", + "account.myAccount.changePhotoButton.label": "Foto รคndern", + "account.myAccount.changePhotoButton.specification": ".jpg oder .png, max 1MB", + "account.myAccount.emailInput.disabledTooltip": "Das Aktualisieren der E-Mail-Adresse ist nicht verfรผgbar. Kontaktiere den Support, wenn du sie รคndern mรถchtest.", + "account.myAccount.emailInput.label": "E-Mail-Adresse:", + "account.myAccount.nameInput.label": "Name:", + "account.preferences.appearance.darkLabel": "Dunkel", + "account.preferences.appearance.heading": "Erscheinungsbild", + "account.preferences.appearance.lightLabel": "Hell", + "account.preferences.appearance.systemLabel": "System", + "account.preferences.graphNavigation.heading": "Editor-Navigation", + "account.preferences.graphNavigation.mouse.description": "Bewege dich, indem du das Board ziehst und zoome rein/raus mit dem Mausrad", + "account.preferences.graphNavigation.mouse.label": "Maus", + "account.preferences.graphNavigation.trackpad.description": "Bewege das Board mit 2 Fingern und zoome rein/raus, indem du kneifst", + "account.preferences.graphNavigation.trackpad.label": "Trackpad", + "account.preferences.language.heading": "Sprache", + "account.preferences.language.tooltip": "Die รœbersetzungen sind noch nicht vollstรคndig. Es ist eine laufende Arbeit. \uD83E\uDD13", + "analytics.completionRateLabel": "Abschlussrate", + "analytics.notAvailableLabel": "Nicht verfรผgbar", + "analytics.startsLabel": "Starts", + "analytics.viewsLabel": "Ansichten", + "auth.emailSubmitButton.label": "Absenden", + "auth.error.default": "Versuche, dich mit einem anderen Konto anzumelden.", + "auth.error.email": "E-Mail nicht gefunden. Versuche, dich mit einem anderen Anbieter anzumelden.", + "auth.error.oauthNotLinked": "Um deine Identitรคt zu bestรคtigen, melde dich mit demselben Konto an, das du ursprรผnglich verwendet hast.", + "auth.error.unknown": "Ein Fehler ist aufgetreten. Bitte versuche es erneut.", + "auth.magicLink.description": "Vergiss nicht, deinen Spam-Ordner zu รผberprรผfen.", + "auth.magicLink.title": "Eine E-Mail mit magischem Link wurde gesendet. \uD83E\uDE84", + "auth.noProvider.link": "mindestens einen Authentifizierungsanbieter konfigurieren (E-Mail, Google, GitHub, Facebook oder Azure AD).", + "auth.noProvider.preLink": "Du musst", + "auth.orEmailLabel": "Oder mit deiner E-Mail", + "auth.register.aggreeToTerms": "Durch die Registrierung stimmst du unseren nutzungsbedingungen und datenschutzrichtlinie zu.", + "auth.register.alreadyHaveAccountLabel.link": "Anmelden", + "auth.register.alreadyHaveAccountLabel.preLink": "Bereits ein Konto vorhanden?", + "auth.register.heading": "Konto erstellen", + "auth.signin.heading": "Anmelden", + "auth.signin.noAccountLabel.link": "Kostenlos anmelden", + "auth.signin.noAccountLabel.preLink": "Noch kein Konto?", + "auth.signinErrorToast.description": "Anmeldungen sind deaktiviert.", + "auth.signinErrorToast.title": "Nicht autorisiert", + "auth.signinErrorToast.tooManyRequests": "Zu viele Anfragen. Versuche es spรคter erneut.", + "auth.socialLogin.azureButton.label": "Mit {azureProviderName} fortfahren", + "auth.socialLogin.customButton.label": "Mit {customProviderName} fortfahren", + "auth.socialLogin.facebookButton.label": "Mit Facebook fortfahren", + "auth.socialLogin.githubButton.label": "Mit GitHub fortfahren", + "auth.socialLogin.gitlabButton.label": "Mit {gitlabProviderName} fortfahren", + "auth.socialLogin.googleButton.label": "Mit Google fortfahren", + "back": "Zurรผck", + "billing.billingPortalButton.label": "Abrechnungsportal", + "billing.contribution.link": "Erfahre mehr.", + "billing.contribution.preLink": "Typebot trรคgt 1% deines Abonnements dazu bei, COโ‚‚ aus der Atmosphรคre zu entfernen.", + "billing.currentSubscription.cancelDate": "Wird storniert am", + "billing.currentSubscription.heading": "Abonnement", + "billing.currentSubscription.pastDueAlert": "Die letzte Zahlung ist fehlgeschlagen. Gehen Sie zum Abrechnungsportal, um fortzufahren und eine Kรผndigung Ihres Abonnements zu vermeiden.", + "billing.currentSubscription.subheading": "Aktuelles Workspace-Abonnement:", + "billing.customLimit.link": "Lass uns darรผber sprechen!", + "billing.customLimit.preLink": "Brauchst du individuelle Limits? Spezielle Funktionen?", + "billing.invoices.empty": "Keine Rechnungen fรผr diesen Workspace gefunden.", + "billing.invoices.heading": "Rechnungen", + "billing.invoices.paidAt": "Bezahlt am", + "billing.invoices.subtotal": "Zwischensumme", + "billing.limitMessage.analytics": "Detaillierte Analysen freischalten", + "billing.limitMessage.brand": "Branding entfernen", + "billing.limitMessage.customDomain": "Eigene Domains hinzufรผgen", + "billing.limitMessage.fileInput": "Datei-Eingabefelder verwenden", + "billing.limitMessage.folder": "Ordner erstellen", + "billing.preCheckoutModal.companyInput.label": "Firmenname:", + "billing.preCheckoutModal.emailInput.label": "E-Mail:", + "billing.preCheckoutModal.submitButton.label": "Zur Kasse gehen", + "billing.preCheckoutModal.taxId.label": "Steuernummer:", + "billing.preCheckoutModal.taxId.placeholder": "ID-Typ", + "billing.pricingCard.chatsPerMonth": "Chats/Monat", + "billing.pricingCard.chatsTooltip": "Ein Chat wird gezรคhlt, wenn ein Benutzer eine Diskussion startet. Es ist unabhรคngig von der Anzahl der gesendeten und empfangenen Nachrichten.", + "billing.pricingCard.heading": "Upgrade auf plan", + "billing.pricingCard.perMonth": "/ Monat", + "billing.pricingCard.plus": ", plus:", + "billing.pricingCard.pro.analytics": "Detaillierte Analysen", + "billing.pricingCard.pro.customDomains": "Eigene Domains", + "billing.pricingCard.pro.description": "Fรผr Agenturen & wachsende Start-ups.", + "billing.pricingCard.pro.everythingFromStarter": "Alles in Starter", + "billing.pricingCard.pro.includedSeats": "5 Plรคtze inklusive", + "billing.pricingCard.pro.mostPopularLabel": "Am beliebtesten", + "billing.pricingCard.pro.whatsAppIntegration": "WhatsApp-Integration", + "billing.pricingCard.starter.brandingRemoved": "Branding entfernt", + "billing.pricingCard.starter.createFolders": "Ordner erstellen", + "billing.pricingCard.starter.description": "Fรผr Einzelpersonen & kleine Unternehmen.", + "billing.pricingCard.starter.fileUploadBlock": "Datei-Upload Eingabefeld", + "billing.pricingCard.starter.includedSeats": "2 Plรคtze inklusive", + "billing.pricingCard.upgradeButton.current": "Dein aktueller Tarif", + "billing.updateSuccessToast.description": "Workspace {plan} Plan erfolgreich aktualisiert \uD83C\uDF89", + "billing.upgradeAlert.buttonDefaultLabel": "Mehr Informationen", + "billing.upgradeLimitLabel": "Um {type} hinzuzufรผgen, musst du deinen Tarif aktualisieren", + "billing.usage.chats.alert.soonReach": "Deine Typebots sind beliebt! Du wirst bald das Chat-Limit deines Tarifs erreichen. \uD83D\uDE80", + "billing.usage.chats.alert.updatePlan": "Vergewissere dich, dass du deinen Tarif aktualisierst, um dieses Limit zu erhรถhen und weiterhin mit deinen Benutzern zu chatten.", + "billing.usage.chats.heading": "Chats", + "billing.usage.heading": "Nutzung", + "billing.usage.unlimited": "Unbegrenzt", + "blocks.bubbles.embed.blockCard.tooltip": "Ein PDF, ein iframe, eine Website einbetten...", + "blocks.inputs.fileUpload.blockCard.tooltip": "Dateien hochladen", + "blocks.integrations.googleAnalytics.blockCard.tooltip": "Google Analytics", + "blocks.integrations.googleSheets.blockCard.tooltip": "Google Tabellen", + "cancel": "Abbrechen", + "clickToEdit": "Zum Bearbeiten klicken...", + "confirmModal.defaultTitle": "Bist du sicher?", + "dashboard.header.settingsButton.label": "Einstellungen & Mitglieder", + "dashboard.redirectionMessage": "Du wirst weitergeleitet...", + "dashboard.title": "Meine Typebots", + "delete": "Lรถschen", + "downgrade": "Downgrade", + "editor.blockCard.logicBlock.tooltip.code.label": "JavaScript-Code ausfรผhren", + "editor.blockCard.logicBlock.tooltip.jump.label": "Ablauf zu einer anderen Gruppe beschleunigen", + "editor.blockCard.logicBlock.tooltip.typebotLink.label": "Verlinkung zu einem anderen Typebot", + "editor.blocks.bubbles.audio.settings.autoplay.label": "Autoplay aktivieren", + "editor.blocks.bubbles.audio.settings.chooseFile.label": "Datei auswรคhlen", + "editor.blocks.bubbles.audio.settings.embedLink.label": "Link einbetten", + "editor.blocks.bubbles.audio.settings.upload.label": "Hochladen", + "editor.blocks.bubbles.audio.settings.worksWith.placeholder": "Fรผge den Audio-Dateilink ein...", + "editor.blocks.bubbles.audio.settings.worksWith.text": "Funktioniert mit .MP3- und .WAV-Dateien", + "editor.blocks.bubbles.embed.node.show.text": "Einbetten anzeigen", + "editor.blocks.bubbles.embed.settings.numberInput.unit": "px", + "editor.blocks.bubbles.embed.settings.worksWith.placeholder": "Fรผge den Link oder Code ein...", + "editor.blocks.bubbles.embed.settings.worksWith.text": "Funktioniert mit PDFs, iframes, Websites...", + "editor.blocks.bubbles.image.switchWithLabel.onClick.label": "Beim Klicken Link", + "editor.blocks.bubbles.image.switchWithLabel.onClick.placeholder": "Link Alternativtext (Beschreibung)", + "editor.blocks.bubbles.textEditor.plate.label": "Texteditor", + "editor.blocks.bubbles.textEditor.searchVariable.placeholder": "Nach einer Variable suchen", + "editor.blocks.start.text": "Start", + "editor.editableTypebotName.tooltip.rename.label": "Umbenennen", + "editor.gettingStartedModal.editorBasics.heading": "Grundlagen des Editors", + "editor.gettingStartedModal.editorBasics.list.four.label": "Klicke auf die Vorschau-Schaltflรคche oben rechts, um deinen Bot anzusehen.", + "editor.gettingStartedModal.editorBasics.list.label": "Wenn du Fragen hast, verwende gerne die Sprechblase unten rechts, um sie mir zu stellen. Ich beantworte normalerweise innerhalb der nรคchsten 24 Stunden. \uD83D\uDE03", + "editor.gettingStartedModal.editorBasics.list.one.label": "Die Seitenleiste enthรคlt Blรถcke, die du auf das Board ziehen und ablegen kannst.", + "editor.gettingStartedModal.editorBasics.list.three.label": "Verbinde die Gruppen miteinander.", + "editor.gettingStartedModal.editorBasics.list.two.label": "Du kannst Blรถcke gruppieren, indem du sie unter oder รผber einander ablegst.", + "editor.gettingStartedModal.seeAction.item.label": "Weitere Videos", + "editor.gettingStartedModal.seeAction.label": "In Aktion sehen", + "editor.gettingStartedModal.seeAction.time": "5 Minuten", + "editor.headers.flowButton.label": "Ablauf", + "editor.headers.helpButton.label": "Hilfe", + "editor.headers.previewButton.label": "Vorschau", + "editor.headers.resultsButton.label": "Ergebnisse", + "editor.headers.savingSpinner.label": "Speichern...", + "editor.headers.settingsButton.label": "Einstellungen", + "editor.headers.shareButton.label": "Teilen", + "editor.headers.themeButton.label": "Design", + "editor.sidebarBlock.abTest.label": "AB-Test", + "editor.sidebarBlock.analytics.label": "Analytics", + "editor.sidebarBlock.audio.label": "Audio", + "editor.sidebarBlock.button.label": "Buttons", + "editor.sidebarBlock.chatwoot.label": "Chatwoot", + "editor.sidebarBlock.condition.label": "Bedingung", + "editor.sidebarBlock.date.label": "Datum", + "editor.sidebarBlock.email.label": "E-Mail", + "editor.sidebarBlock.embed.label": "Einbetten", + "editor.sidebarBlock.file.label": "Datei", + "editor.sidebarBlock.image.label": "Bild", + "editor.sidebarBlock.jump.label": "Springen", + "editor.sidebarBlock.makecom.label": "Make.com", + "editor.sidebarBlock.number.label": "Nummer", + "editor.sidebarBlock.openai.label": "OpenAI", + "editor.sidebarBlock.pabbly.label": "Pabbly", + "editor.sidebarBlock.payment.label": "Zahlung", + "editor.sidebarBlock.phone.label": "Telefon", + "editor.sidebarBlock.picChoice.label": "Bildauswahl", + "editor.sidebarBlock.pixel.label": "Pixel", + "editor.sidebarBlock.rating.label": "Bewertung", + "editor.sidebarBlock.redirect.label": "Weiterleitung", + "editor.sidebarBlock.script.label": "Skript", + "editor.sidebarBlock.setVariable.label": "Variable setzen", + "editor.sidebarBlock.sheets.label": "Tabellen", + "editor.sidebarBlock.start.label": "Start", + "editor.sidebarBlock.text.label": "Text", + "editor.sidebarBlock.typebot.label": "Typebot", + "editor.sidebarBlock.video.label": "Video", + "editor.sidebarBlock.wait.label": "Warten", + "editor.sidebarBlock.webhook.label": "Webhook", + "editor.sidebarBlock.website.label": "Website", + "editor.sidebarBlock.zapier.label": "Zapier", + "editor.sidebarBlock.zemanticAi.label": "Zemantic AI", + "editor.sidebarBlocks.blockType.bubbles.heading": "Blasen", + "editor.sidebarBlocks.blockType.inputs.heading": "Eingaben", + "editor.sidebarBlocks.blockType.integrations.heading": "Integrationen", + "editor.sidebarBlocks.blockType.logic.heading": "Logik", + "editor.sidebarBlocks.sidebar.icon.lock.label": "Sperren", + "editor.sidebarBlocks.sidebar.icon.unlock.label": "Entsperren", + "editor.sidebarBlocks.sidebar.lock.label": "Seitenleiste sperren", + "editor.sidebarBlocks.sidebar.unlock.label": "Seitenleiste entsperren", + "errorMessage": "Ein Fehler ist aufgetreten", + "folders.createFolderButton.label": "Ordner erstellen", + "folders.createTypebotButton.label": "Typebot erstellen", + "folders.folderButton.deleteConfirmationMessage": "Mรถchtest du den Ordner folderName wirklich lรถschen? (Alles im Inneren wird in dein Dashboard verschoben)", + "folders.typebotButton.delete": "Lรถschen", + "folders.typebotButton.deleteConfirmationMessage": "Mรถchtest du deinen Typebot typebotName wirklich lรถschen?", + "folders.typebotButton.deleteConfirmationMessageWarning": "Alle zugehรถrigen Daten werden gelรถscht und kรถnnen nicht wiederhergestellt werden.", + "folders.typebotButton.duplicate": "Duplizieren", + "folders.typebotButton.live": "Live", + "folders.typebotButton.showMoreOptions": "Mehr Optionen anzeigen", + "folders.typebotButton.unpublish": "Verรถffentlichung aufheben", + "pending": "Ausstehend", + "remove": "Entfernen", + "skip": "รœberspringen", + "templates.buttons.fromScratchButton.label": "Von Grund auf starten", + "templates.buttons.fromTemplateButton.label": "Von einer Vorlage starten", + "templates.buttons.heading": "Erstelle einen neuen Typebot", + "templates.buttons.importFileButton.label": "Datei importieren", + "templates.importFromFileButon.toastError.description": "Konnte die Datei nicht verarbeiten. Bist du sicher, dass es sich um einen Typebot handelt?", + "templates.modal.menuHeading.marketing": "Marketing", + "templates.modal.menuHeading.new.tag": "Neu", + "templates.modal.menuHeading.other": "Andere", + "templates.modal.menuHeading.product": "Produkt", + "templates.modal.useTemplateButton.label": "Diese Vorlage verwenden", + "upgrade": "Upgrade", + "video.urlInput.helperText": "Funktioniert mit YouTube, Vimeo, Gumlet, TikTok und anderen", + "video.urlInput.placeholder": "Fรผge den Videolink ein...", + "workspace.dropdown.logoutButton.label": "Abmelden", + "workspace.dropdown.newButton.label": "Neuer Workspace", + "workspace.membersList.inviteButton.label": "Einladen", + "workspace.membersList.inviteInput.placeholder": "name@unternehmen.de", + "workspace.membersList.title": "Mitglieder", + "workspace.membersList.unlockBanner.label": "Aktualisiere deinen Plan, um mit mehr Teammitgliedern zu arbeiten und neue Limits freizuschalten \uD83D\uDE80", + "workspace.settings.deleteButton.confirmMessage": "Sind Sie sicher, dass Sie den Workspace {workspaceName} lรถschen mรถchten? Alle seine Ordner, Typebots und Ergebnisse werden dauerhaft gelรถscht.", + "workspace.settings.deleteButton.label": "Workspace lรถschen", + "workspace.settings.icon.title": "Symbol", + "workspace.settings.modal.menu.billingAndUsage.label": "Abrechnung & Nutzung", + "workspace.settings.modal.menu.members.label": "Mitglieder", + "workspace.settings.modal.menu.myAccount.label": "Mein Konto", + "workspace.settings.modal.menu.preferences.label": "Einstellungen", + "workspace.settings.modal.menu.settings.label": "Einstellungen", + "workspace.settings.modal.menu.version.label": "Version: {version}", + "workspace.settings.modal.menu.workspace.label": "Workspace", + "workspace.settings.name.label": "Name:" +} diff --git a/apps/builder/public/locales/en.json b/apps/builder/public/locales/en.json new file mode 100644 index 0000000000..102b44a201 --- /dev/null +++ b/apps/builder/public/locales/en.json @@ -0,0 +1,252 @@ +{ + "account.apiTokens.createButton.label": "Create", + "account.apiTokens.createModal.copyInstruction": "Please copy your token and store it in a safe place.", + "account.apiTokens.createModal.createButton.label": "Create token", + "account.apiTokens.createModal.createHeading": "Create Token", + "account.apiTokens.createModal.createdHeading": "Token Created", + "account.apiTokens.createModal.doneButton.label": "Done", + "account.apiTokens.createModal.nameInput.label": "Enter a unique name for your token to differentiate it from other tokens.", + "account.apiTokens.createModal.nameInput.placeholder": "I.e. Zapier, Github, Make.com", + "account.apiTokens.createModal.securityWarning": "For security reasons we cannot show it again.", + "account.apiTokens.deleteButton.label": "Delete", + "account.apiTokens.deleteConfirmationMessage": "The token tokenName will be permanently revoked, are you sure you want to continue?", + "account.apiTokens.description": "These tokens allow other apps to control your whole account and typebots. Be careful!", + "account.apiTokens.heading": "API tokens", + "account.apiTokens.table.createdHeader": "Created", + "account.apiTokens.table.nameHeader": "Name", + "account.myAccount.changePhotoButton.label": "Change photo", + "account.myAccount.changePhotoButton.specification": ".jpg or.png, max 1MB", + "account.myAccount.emailInput.disabledTooltip": "Updating email is not available. Contact the support if you want to change it.", + "account.myAccount.emailInput.label": "Email address:", + "account.myAccount.nameInput.label": "Name:", + "account.preferences.appearance.darkLabel": "Dark", + "account.preferences.appearance.heading": "Appearance", + "account.preferences.appearance.lightLabel": "Light", + "account.preferences.appearance.systemLabel": "System", + "account.preferences.graphNavigation.heading": "Editor Navigation", + "account.preferences.graphNavigation.mouse.description": "Move by dragging the board and zoom in/out using the scroll wheel", + "account.preferences.graphNavigation.mouse.label": "Mouse", + "account.preferences.graphNavigation.trackpad.description": "Move the board using 2 fingers and zoom in/out by pinching", + "account.preferences.graphNavigation.trackpad.label": "Trackpad", + "account.preferences.language.heading": "Language", + "account.preferences.language.tooltip": "The translations are not complete yet. It is a work in progress. \uD83E\uDD13", + "analytics.completionRateLabel": "Completion rate", + "analytics.notAvailableLabel": "Not available", + "analytics.startsLabel": "Starts", + "analytics.viewsLabel": "Views", + "auth.emailSubmitButton.label": "Submit", + "auth.error.default": "Try signing with a different account.", + "auth.error.email": "Email not found. Try signing with a different provider.", + "auth.error.oauthNotLinked": "To confirm your identity, sign in with the same account you used originally.", + "auth.error.unknown": "An error occurred. Please try again.", + "auth.magicLink.description": "Make sure to check your spam folder.", + "auth.magicLink.title": "A magic link email was sent. \uD83E\uDE84", + "auth.noProvider.link": "configure at least one auth provider (Email, Google, GitHub, Facebook or Azure AD).", + "auth.noProvider.preLink": "You need to", + "auth.orEmailLabel": "Or with your email", + "auth.register.aggreeToTerms": "By signing up, you agree to our terms of service and privacy policy.", + "auth.register.alreadyHaveAccountLabel.link": "Sign in", + "auth.register.alreadyHaveAccountLabel.preLink": "Already have an account?", + "auth.register.heading": "Create an account", + "auth.signin.heading": "Sign In", + "auth.signin.noAccountLabel.link": "Sign up for free", + "auth.signin.noAccountLabel.preLink": "Don't have an account?", + "auth.signinErrorToast.description": "Sign ups are disabled.", + "auth.signinErrorToast.title": "Unauthorized", + "auth.signinErrorToast.tooManyRequests": "Too many requests. Try again later.", + "auth.socialLogin.azureButton.label": "Continue with {azureProviderName}", + "auth.socialLogin.customButton.label": "Continue with {customProviderName}", + "auth.socialLogin.facebookButton.label": "Continue with Facebook", + "auth.socialLogin.githubButton.label": "Continue with GitHub", + "auth.socialLogin.gitlabButton.label": "Continue with {gitlabProviderName}", + "auth.socialLogin.googleButton.label": "Continue with Google", + "back": "Back", + "billing.billingPortalButton.label": "Billing portal", + "billing.contribution.link": "Learn more.", + "billing.contribution.preLink": "Typebot is contributing 1% of your subscription to remove COโ‚‚ from the atmosphere.", + "billing.currentSubscription.cancelDate": "Will be cancelled on", + "billing.currentSubscription.heading": "Subscription", + "billing.currentSubscription.pastDueAlert": "The latest payment failed. Head over to the billing portal to proceed and avoid having your subscription canceled.", + "billing.currentSubscription.subheading": "Current workspace subscription:", + "billing.customLimit.link": "Let's chat!", + "billing.customLimit.preLink": "Need custom limits? Specific features?", + "billing.invoices.empty": "No invoices found for this workspace.", + "billing.invoices.heading": "Invoices", + "billing.invoices.paidAt": "Paid at", + "billing.invoices.subtotal": "Subtotal", + "billing.limitMessage.analytics": "unlock in-depth analytics", + "billing.limitMessage.brand": "remove branding", + "billing.limitMessage.customDomain": "add custom domains", + "billing.limitMessage.fileInput": "use file input blocks", + "billing.limitMessage.folder": "create folders", + "billing.preCheckoutModal.companyInput.label": "Company name:", + "billing.preCheckoutModal.emailInput.label": "Email:", + "billing.preCheckoutModal.submitButton.label": "Go to checkout", + "billing.preCheckoutModal.taxId.label": "Tax ID:", + "billing.preCheckoutModal.taxId.placeholder": "ID type", + "billing.pricingCard.chatsPerMonth": "chats/mo", + "billing.pricingCard.chatsTooltip": "A chat is counted whenever a user starts a discussion. It is independant of the number of messages he sends and receives.", + "billing.pricingCard.heading": "Upgrade to plan", + "billing.pricingCard.perMonth": "/ month", + "billing.pricingCard.plus": ", plus:", + "billing.pricingCard.pro.analytics": "In-depth analytics", + "billing.pricingCard.pro.customDomains": "Custom domains", + "billing.pricingCard.pro.description": "For agencies & growing startups.", + "billing.pricingCard.pro.everythingFromStarter": "Everything in Starter", + "billing.pricingCard.pro.includedSeats": "5 seats included", + "billing.pricingCard.pro.mostPopularLabel": "Most popular", + "billing.pricingCard.pro.whatsAppIntegration": "WhatsApp integration", + "billing.pricingCard.starter.brandingRemoved": "Branding removed", + "billing.pricingCard.starter.createFolders": "Create folders", + "billing.pricingCard.starter.description": "For individuals & small businesses.", + "billing.pricingCard.starter.fileUploadBlock": "File upload input block", + "billing.pricingCard.starter.includedSeats": "2 seats included", + "billing.pricingCard.upgradeButton.current": "Your current plan", + "billing.tiersModal.heading": "Chats pricing table", + "billing.updateSuccessToast.description": "Workspace {plan} plan successfully updated \uD83C\uDF89", + "billing.upgradeAlert.buttonDefaultLabel": "More info", + "billing.upgradeLimitLabel": "You need to upgrade your plan in order to {type}", + "billing.usage.chats.alert.soonReach": "Your typebots are popular! You will soon reach your plan's chats limit. \uD83D\uDE80", + "billing.usage.chats.alert.updatePlan": "Make sure to update your plan to increase this limit and continue chatting with your users.", + "billing.usage.chats.heading": "Chats", + "billing.usage.heading": "Usage", + "billing.usage.unlimited": "Unlimited", + "blocks.bubbles.embed.blockCard.tooltip": "Embed a pdf, an iframe, a website...", + "blocks.inputs.fileUpload.blockCard.tooltip": "Upload Files", + "blocks.integrations.googleAnalytics.blockCard.tooltip": "Google Analytics", + "blocks.integrations.googleSheets.blockCard.tooltip": "Google Sheets", + "cancel": "Cancel", + "clickToEdit": "Click to edit...", + "confirmModal.defaultTitle": "Are you sure?", + "dashboard.header.settingsButton.label": "Settings & Members", + "dashboard.redirectionMessage": "You are being redirected...", + "dashboard.title": "My typebots", + "delete": "Delete", + "downgrade": "Downgrade", + "editor.blockCard.logicBlock.tooltip.code.label": "Execute Javascript code", + "editor.blockCard.logicBlock.tooltip.jump.label": "Fast forward the flow to another group", + "editor.blockCard.logicBlock.tooltip.typebotLink.label": "Link and jump to another typebot", + "editor.blocks.bubbles.audio.settings.autoplay.label": "Enable autoplay", + "editor.blocks.bubbles.audio.settings.chooseFile.label": "Choose a file", + "editor.blocks.bubbles.audio.settings.embedLink.label": "Embed link", + "editor.blocks.bubbles.audio.settings.upload.label": "Upload", + "editor.blocks.bubbles.audio.settings.worksWith.placeholder": "Paste the audio file link...", + "editor.blocks.bubbles.audio.settings.worksWith.text": "Works with .MP3s and .WAVs", + "editor.blocks.bubbles.embed.node.show.text": "Show embed", + "editor.blocks.bubbles.embed.settings.numberInput.unit": "px", + "editor.blocks.bubbles.embed.settings.worksWith.placeholder": "Paste the link or code...", + "editor.blocks.bubbles.embed.settings.worksWith.text": "Works with PDFs, iframes, websites...", + "editor.blocks.bubbles.image.switchWithLabel.onClick.label": "On click link", + "editor.blocks.bubbles.image.switchWithLabel.onClick.placeholder": "Link alt text (description)", + "editor.blocks.bubbles.textEditor.plate.label": "Text editor", + "editor.blocks.bubbles.textEditor.searchVariable.placeholder": "Search for a variable", + "editor.blocks.start.text": "Start", + "editor.editableTypebotName.tooltip.rename.label": "Rename", + "editor.gettingStartedModal.editorBasics.heading": "Editor Basics", + "editor.gettingStartedModal.editorBasics.list.four.label": "Preview your bot by clicking the test button on the top right", + "editor.gettingStartedModal.editorBasics.list.label": "Feel free to use the bottom-right bubble to reach out if you have any question. I usually answer within the next 24 hours. \uD83D\uDE03", + "editor.gettingStartedModal.editorBasics.list.one.label": "The left side bar contains blocks that you can drag and drop to the board.", + "editor.gettingStartedModal.editorBasics.list.three.label": "Connect the groups together", + "editor.gettingStartedModal.editorBasics.list.two.label": "You can group blocks together by dropping them below or above each other", + "editor.gettingStartedModal.seeAction.item.label": "Other videos", + "editor.gettingStartedModal.seeAction.label": "See it in action", + "editor.gettingStartedModal.seeAction.time": "5 minutes", + "editor.headers.flowButton.label": "Flow", + "editor.headers.helpButton.label": "Help", + "editor.headers.previewButton.label": "Test", + "editor.headers.resultsButton.label": "Results", + "editor.headers.savingSpinner.label": "Saving...", + "editor.headers.settingsButton.label": "Settings", + "editor.headers.shareButton.label": "Share", + "editor.headers.themeButton.label": "Theme", + "editor.sidebarBlock.abTest.label": "AB Test", + "editor.sidebarBlock.analytics.label": "Analytics", + "editor.sidebarBlock.audio.label": "Audio", + "editor.sidebarBlock.button.label": "Buttons", + "editor.sidebarBlock.chatwoot.label": "Chatwoot", + "editor.sidebarBlock.condition.label": "Condition", + "editor.sidebarBlock.date.label": "Date", + "editor.sidebarBlock.email.label": "Email", + "editor.sidebarBlock.embed.label": "Embed", + "editor.sidebarBlock.file.label": "File", + "editor.sidebarBlock.image.label": "Image", + "editor.sidebarBlock.jump.label": "Jump", + "editor.sidebarBlock.makecom.label": "Make.com", + "editor.sidebarBlock.number.label": "Number", + "editor.sidebarBlock.openai.label": "OpenAI", + "editor.sidebarBlock.pabbly.label": "Pabbly", + "editor.sidebarBlock.payment.label": "Payment", + "editor.sidebarBlock.phone.label": "Phone", + "editor.sidebarBlock.picChoice.label": "Pic choice", + "editor.sidebarBlock.pixel.label": "Pixel", + "editor.sidebarBlock.rating.label": "Rating", + "editor.sidebarBlock.redirect.label": "Redirect", + "editor.sidebarBlock.script.label": "Script", + "editor.sidebarBlock.setVariable.label": "Set variable", + "editor.sidebarBlock.sheets.label": "Sheets", + "editor.sidebarBlock.start.label": "Start", + "editor.sidebarBlock.text.label": "Text", + "editor.sidebarBlock.typebot.label": "Typebot", + "editor.sidebarBlock.video.label": "Video", + "editor.sidebarBlock.wait.label": "Wait", + "editor.sidebarBlock.webhook.label": "Webhook", + "editor.sidebarBlock.website.label": "Website", + "editor.sidebarBlock.zapier.label": "Zapier", + "editor.sidebarBlock.zemanticAi.label": "Zemantic AI", + "editor.sidebarBlocks.blockType.bubbles.heading": "Bubbles", + "editor.sidebarBlocks.blockType.inputs.heading": "Inputs", + "editor.sidebarBlocks.blockType.integrations.heading": "Integrations", + "editor.sidebarBlocks.blockType.logic.heading": "Logic", + "editor.sidebarBlocks.sidebar.icon.lock.label": "Lock", + "editor.sidebarBlocks.sidebar.icon.unlock.label": "Unlock", + "editor.sidebarBlocks.sidebar.lock.label": "Lock sidebar", + "editor.sidebarBlocks.sidebar.unlock.label": "Unlock sidebar", + "errorMessage": "An error occured", + "folders.createFolderButton.label": "Create a folder", + "folders.createTypebotButton.label": "Create a typebot", + "folders.folderButton.deleteConfirmationMessage": "Are you sure you want to delete folderName folder? (Everything inside will be move to your dashboard)", + "folders.typebotButton.delete": "Delete", + "folders.typebotButton.deleteConfirmationMessage": "Are you sure you want to delete your typebot typebotName?", + "folders.typebotButton.deleteConfirmationMessageWarning": "All its associated data will be deleted and won't be recoverable.", + "folders.typebotButton.duplicate": "Duplicate", + "folders.typebotButton.live": "Live", + "folders.typebotButton.showMoreOptions": "Show more options", + "folders.typebotButton.unpublish": "Unpublish", + "pending": "Pending", + "remove": "Remove", + "skip": "Skip", + "templates.buttons.fromScratchButton.label": "Start from scratch", + "templates.buttons.fromTemplateButton.label": "Start from a template", + "templates.buttons.heading": "Create a new typebot", + "templates.buttons.importFileButton.label": "Import a file", + "templates.importFromFileButon.toastError.description": "Failed to parse the file. Are you sure it's a typebot?", + "templates.modal.menuHeading.marketing": "Marketing", + "templates.modal.menuHeading.new.tag": "New", + "templates.modal.menuHeading.other": "Other", + "templates.modal.menuHeading.product": "Product", + "templates.modal.useTemplateButton.label": "Use this template", + "upgrade": "Upgrade", + "video.aspectRatioInput.label": "Aspect ratio", + "video.aspectRatioInput.moreInfoTooltip": "Example: \"16/9\" or \"9/16\"", + "video.maxWidthInput.label": "Max width", + "video.maxWidthInput.moreInfoTooltip": "Example: \"300px\" or \"100%\"", + "video.urlInput.helperText": "Works with Youtube, Vimeo, Gumlet, TikTok and others", + "video.urlInput.placeholder": "Paste the video link...", + "workspace.dropdown.logoutButton.label": "Log out", + "workspace.dropdown.newButton.label": "New workspace", + "workspace.membersList.inviteButton.label": "Invite", + "workspace.membersList.inviteInput.placeholder": "colleague@company.com", + "workspace.membersList.title": "Members", + "workspace.membersList.unlockBanner.label": "Upgrade your plan to work with more team members, and unlock awesome power features \uD83D\uDE80", + "workspace.settings.deleteButton.confirmMessage": "Are you sure you want to delete {workspaceName} workspace? All its folders, typebots and results will be deleted forever.", + "workspace.settings.deleteButton.label": "Delete workspace", + "workspace.settings.icon.title": "Icon", + "workspace.settings.modal.menu.billingAndUsage.label": "Billing & Usage", + "workspace.settings.modal.menu.members.label": "Members", + "workspace.settings.modal.menu.myAccount.label": "My account", + "workspace.settings.modal.menu.preferences.label": "Preferences", + "workspace.settings.modal.menu.settings.label": "Settings", + "workspace.settings.modal.menu.version.label": "Version: {version}", + "workspace.settings.modal.menu.workspace.label": "Workspace", + "workspace.settings.name.label": "Name:" +} diff --git a/apps/builder/public/locales/es.json b/apps/builder/public/locales/es.json new file mode 100644 index 0000000000..d561963079 --- /dev/null +++ b/apps/builder/public/locales/es.json @@ -0,0 +1,252 @@ +{ + "account.apiTokens.createButton.label": "Crear", + "account.apiTokens.createModal.copyInstruction": "Por favor, copia tu token y guรกrdalo en un lugar seguro.", + "account.apiTokens.createModal.createButton.label": "Crear token", + "account.apiTokens.createModal.createHeading": "Crear token", + "account.apiTokens.createModal.createdHeading": "Token Creado", + "account.apiTokens.createModal.doneButton.label": "Hecho", + "account.apiTokens.createModal.nameInput.label": "Ingresa un nombre รบnico para tu token, para diferenciarlo de otros tokens.", + "account.apiTokens.createModal.nameInput.placeholder": "Ej. Zapier, Github, Make.com", + "account.apiTokens.createModal.securityWarning": "Por motivos de seguridad, no podemos mostrarlo nuevamente.", + "account.apiTokens.deleteButton.label": "Eliminar", + "account.apiTokens.deleteConfirmationMessage": "El token tokenName serรก anulado de forma permanente. ยฟDeseas continuar?", + "account.apiTokens.description": "Estos tokens permiten que otras aplicaciones controlen toda tu cuenta y tus typebots. ยกTen cuidado!", + "account.apiTokens.heading": "Tokens de API", + "account.apiTokens.table.createdHeader": "Creado", + "account.apiTokens.table.nameHeader": "Nombre", + "account.myAccount.changePhotoButton.label": "Cambiar foto", + "account.myAccount.changePhotoButton.specification": ".jpg o .png, mรกximo 1MB", + "account.myAccount.emailInput.disabledTooltip": "El cambio de email no estรก disponible. Contacta al soporte si quieres cambiarlo.", + "account.myAccount.emailInput.label": "Correo electrรณnico:", + "account.myAccount.nameInput.label": "Nombre:", + "account.preferences.appearance.darkLabel": "Oscuro", + "account.preferences.appearance.heading": "Apariencia", + "account.preferences.appearance.lightLabel": "Claro", + "account.preferences.appearance.systemLabel": "Sistema", + "account.preferences.graphNavigation.heading": "Navegaciรณn del Editor", + "account.preferences.graphNavigation.mouse.description": "Muรฉvete arrastrando el tablero y acerca/aleja el zoom usando la rueda de desplazamiento.", + "account.preferences.graphNavigation.mouse.label": "Mouse", + "account.preferences.graphNavigation.trackpad.description": "Mueve el tablero con 2 dedos y acerca o aleja el zoom pellizcando", + "account.preferences.graphNavigation.trackpad.label": "Trackpad", + "account.preferences.language.heading": "Idioma", + "account.preferences.language.tooltip": "Las traducciones aรบn no estรกn completas. Es un trabajo en progreso. \uD83E\uDD13", + "analytics.completionRateLabel": "Tasa de finalizaciรณn", + "analytics.notAvailableLabel": "No disponible", + "analytics.startsLabel": "Iniciaron", + "analytics.viewsLabel": "Vistas", + "auth.emailSubmitButton.label": "Enviar", + "auth.error.default": "Intenta iniciar sesiรณn con una cuenta diferente.", + "auth.error.email": "No se encontrรณ el correo electrรณnico. Intenta iniciar sesiรณn con un proveedor diferente.", + "auth.error.oauthNotLinked": "Para confirmar tu identidad, inicia sesiรณn con la misma cuenta que utilizaste originalmente.", + "auth.error.unknown": "Se produjo un error. Intรฉntalo de nuevo.", + "auth.magicLink.description": "Asegรบrate de revisar tu carpeta spam.", + "auth.magicLink.title": "Se enviรณ un correo electrรณnico con enlace mรกgico. \uD83E\uDE84", + "auth.noProvider.link": "Configurar al menos un proveedor de autenticaciรณn (correo electrรณnico, Google, GitHub, Facebook o Azure AD).", + "auth.noProvider.preLink": "Necesitas", + "auth.orEmailLabel": "O con tu correo electrรณnico", + "auth.register.aggreeToTerms": "Al registrarte, aceptas nuestros tรฉrminos de servicio y polรญtica de privacidad.", + "auth.register.alreadyHaveAccountLabel.link": "Iniciar sesiรณn", + "auth.register.alreadyHaveAccountLabel.preLink": "ยฟYa tienes una cuenta?", + "auth.register.heading": "Crear una cuenta", + "auth.signin.heading": "Iniciar sesiรณn", + "auth.signin.noAccountLabel.link": "Regรญstrate gratis", + "auth.signin.noAccountLabel.preLink": "ยฟNo tienes una cuenta?", + "auth.signinErrorToast.description": "Los registros estรกn deshabilitados.", + "auth.signinErrorToast.title": "No autorizado", + "auth.signinErrorToast.tooManyRequests": "Demasiadas solicitudes. Intรฉntalo de nuevo mรกs tarde.", + "auth.socialLogin.azureButton.label": "Continuar con {azureProviderName}", + "auth.socialLogin.customButton.label": "Continuar con {customProviderName}", + "auth.socialLogin.facebookButton.label": "Continuar con Facebook", + "auth.socialLogin.githubButton.label": "Continuar con GitHub", + "auth.socialLogin.gitlabButton.label": "Continuar con {gitlabProviderName}", + "auth.socialLogin.googleButton.label": "Continuar con Google", + "back": "Volver", + "billing.billingPortalButton.label": "Portal de facturaciรณn", + "billing.contribution.link": "Mรกs informaciรณn.", + "billing.contribution.preLink": "Typebot estรก contribuyendo con un 1% de tu suscripciรณn para eliminar COโ‚‚ de la atmรณsfera.", + "billing.currentSubscription.cancelDate": "Serรก cancelado en", + "billing.currentSubscription.heading": "Suscripciรณn", + "billing.currentSubscription.pastDueAlert": "El รบltimo pago fallรณ. Ve al portal de facturaciรณn para continuar y evitar que tu suscripciรณn sea cancelada.", + "billing.currentSubscription.subheading": "Suscripciรณn actual del espacio de trabajo:", + "billing.customLimit.link": "ยกHablemos!", + "billing.customLimit.preLink": "ยฟNecesitas lรญmites personalizados? ยฟFunciones especรญficas?", + "billing.invoices.empty": "No se encontraron facturas para este espacio de trabajo.", + "billing.invoices.heading": "Facturas", + "billing.invoices.paidAt": "Pagado el", + "billing.invoices.subtotal": "Subtotal", + "billing.limitMessage.analytics": "desbloquea anรกlisis detallados", + "billing.limitMessage.brand": "elimina la marca", + "billing.limitMessage.customDomain": "aรฑade dominios personalizados", + "billing.limitMessage.fileInput": "usa bloques de carga de archivos", + "billing.limitMessage.folder": "crea carpetas", + "billing.preCheckoutModal.companyInput.label": "Nombre de la empresa:", + "billing.preCheckoutModal.emailInput.label": "Correo electrรณnico:", + "billing.preCheckoutModal.submitButton.label": "Ir a la pรกgina de pagos", + "billing.preCheckoutModal.taxId.label": "Identificaciรณn fiscal:", + "billing.preCheckoutModal.taxId.placeholder": "Tipo de ID", + "billing.pricingCard.chatsPerMonth": "chats/mes", + "billing.pricingCard.chatsTooltip": "Se cuenta un chat cada vez que un usuario inicia una conversaciรณn. Es independiente del nรบmero de mensajes que envรญa y recibe.", + "billing.pricingCard.heading": "Actualiza a plan", + "billing.pricingCard.perMonth": "/ mes", + "billing.pricingCard.plus": ", mรกs:", + "billing.pricingCard.pro.analytics": "Anรกlisis detallados", + "billing.pricingCard.pro.customDomains": "Dominios personalizados", + "billing.pricingCard.pro.description": "Para agencias y startups en crecimiento.", + "billing.pricingCard.pro.everythingFromStarter": "Todo en Starter", + "billing.pricingCard.pro.includedSeats": "5 asientos incluidos", + "billing.pricingCard.pro.mostPopularLabel": "Mรกs popular", + "billing.pricingCard.pro.whatsAppIntegration": "Integraciรณn de WhatsApp", + "billing.pricingCard.starter.brandingRemoved": "Marca eliminada", + "billing.pricingCard.starter.createFolders": "Crear carpetas", + "billing.pricingCard.starter.description": "Para individuos y pequeรฑas empresas.", + "billing.pricingCard.starter.fileUploadBlock": "Bloque de carga de archivos", + "billing.pricingCard.starter.includedSeats": "2 asientos incluidos", + "billing.pricingCard.upgradeButton.current": "Tu plan actual", + "billing.tiersModal.heading": "Tabla de precios de Chats", + "billing.updateSuccessToast.description": "Espacio de trabajo {plan} actualizado correctamente \uD83C\uDF89", + "billing.upgradeAlert.buttonDefaultLabel": "Mรกs informaciรณn", + "billing.upgradeLimitLabel": "Necesitas actualizar tu plan para {type}", + "billing.usage.chats.alert.soonReach": "ยกTus typebots son populares! Pronto alcanzarรกs el lรญmite de chats de tu plan. \uD83D\uDE80", + "billing.usage.chats.alert.updatePlan": "Asegรบrate de actualizar tu plan para aumentar este lรญmite y seguir chateando con tus usuarios.", + "billing.usage.chats.heading": "Chats", + "billing.usage.heading": "Uso", + "billing.usage.unlimited": "Ilimitado", + "blocks.bubbles.embed.blockCard.tooltip": "Insertar un PDF, un iframe, un sitio web...", + "blocks.inputs.fileUpload.blockCard.tooltip": "Cargar archivos", + "blocks.integrations.googleAnalytics.blockCard.tooltip": "Google Analytics", + "blocks.integrations.googleSheets.blockCard.tooltip": "Google Sheets", + "cancel": "Cancelar", + "clickToEdit": "Haz clic para editar...", + "confirmModal.defaultTitle": "ยฟEstรกs seguro?", + "dashboard.header.settingsButton.label": "Configuraciรณn y Miembros", + "dashboard.redirectionMessage": "Estรกs siendo redirigido...", + "dashboard.title": "Mis typebots", + "delete": "Eliminar", + "downgrade": "Degradar", + "editor.blockCard.logicBlock.tooltip.code.label": "Ejecutar cรณdigo Javascript", + "editor.blockCard.logicBlock.tooltip.jump.label": "Saltar al flujo de otro grupo", + "editor.blockCard.logicBlock.tooltip.typebotLink.label": "Enlazar y avanzar a otro typebot", + "editor.blocks.bubbles.audio.settings.autoplay.label": "Habilitar reproducciรณn automรกtica", + "editor.blocks.bubbles.audio.settings.chooseFile.label": "Elegir un archivo", + "editor.blocks.bubbles.audio.settings.embedLink.label": "Adicionar link", + "editor.blocks.bubbles.audio.settings.upload.label": "Subir", + "editor.blocks.bubbles.audio.settings.worksWith.placeholder": "Pega el enlace del archivo de audio...", + "editor.blocks.bubbles.audio.settings.worksWith.text": "Compatible con .MP3 y .WAV", + "editor.blocks.bubbles.embed.node.show.text": "Mostrar inserciรณn", + "editor.blocks.bubbles.embed.settings.numberInput.unit": "px", + "editor.blocks.bubbles.embed.settings.worksWith.placeholder": "Pega el enlace o cรณdigo...", + "editor.blocks.bubbles.embed.settings.worksWith.text": "Funciona con PDF, iframes, sitios web...", + "editor.blocks.bubbles.image.switchWithLabel.onClick.label": "Enlace al hacer clic", + "editor.blocks.bubbles.image.switchWithLabel.onClick.placeholder": "Texto alternativo del enlace (descripciรณn)", + "editor.blocks.bubbles.textEditor.plate.label": "Editor de texto", + "editor.blocks.bubbles.textEditor.searchVariable.placeholder": "Buscar una variable", + "editor.blocks.start.text": "Inicio", + "editor.editableTypebotName.tooltip.rename.label": "Renombrar", + "editor.gettingStartedModal.editorBasics.heading": "Conceptos bรกsicos del Editor", + "editor.gettingStartedModal.editorBasics.list.four.label": "Previsualiza tu bot haciendo clic en el botรณn de previsualizaciรณn en la esquina superior derecha", + "editor.gettingStartedModal.editorBasics.list.label": "Si tienes alguna pregunta, no dudes en usar la burbuja en la esquina inferior derecha. Suelo responder en las prรณximas 24 horas. \uD83D\uDE03", + "editor.gettingStartedModal.editorBasics.list.one.label": "La barra lateral izquierda contiene bloques que puedes arrastrar y soltar en el tablero.", + "editor.gettingStartedModal.editorBasics.list.three.label": "Conecta los grupos entre sรญ", + "editor.gettingStartedModal.editorBasics.list.two.label": "Puedes agrupar bloques ubicรกndolos debajo o encima de cada uno", + "editor.gettingStartedModal.seeAction.item.label": "Otros videos", + "editor.gettingStartedModal.seeAction.label": "Verlo en acciรณn", + "editor.gettingStartedModal.seeAction.time": "5 minutos", + "editor.headers.flowButton.label": "Flujo", + "editor.headers.helpButton.label": "Ayuda", + "editor.headers.previewButton.label": "Previsualizaciรณn", + "editor.headers.resultsButton.label": "Resultados", + "editor.headers.savingSpinner.label": "Guardando...", + "editor.headers.settingsButton.label": "Configuraciรณn", + "editor.headers.shareButton.label": "Compartir", + "editor.headers.themeButton.label": "Tema", + "editor.sidebarBlock.abTest.label": "Prueba A/B", + "editor.sidebarBlock.analytics.label": "Anรกlisis", + "editor.sidebarBlock.audio.label": "Audio", + "editor.sidebarBlock.button.label": "Botones", + "editor.sidebarBlock.chatwoot.label": "Chatwoot", + "editor.sidebarBlock.condition.label": "Condiciรณn", + "editor.sidebarBlock.date.label": "Fecha", + "editor.sidebarBlock.email.label": "Email", + "editor.sidebarBlock.embed.label": "Insertar", + "editor.sidebarBlock.file.label": "Archivo", + "editor.sidebarBlock.image.label": "Imagen", + "editor.sidebarBlock.jump.label": "Saltar", + "editor.sidebarBlock.makecom.label": "Make.com", + "editor.sidebarBlock.number.label": "Nรบmero", + "editor.sidebarBlock.openai.label": "OpenAI", + "editor.sidebarBlock.pabbly.label": "Pabbly", + "editor.sidebarBlock.payment.label": "Pago", + "editor.sidebarBlock.phone.label": "Telรฉfono", + "editor.sidebarBlock.picChoice.label": "Elegir imagen", + "editor.sidebarBlock.pixel.label": "Pรญxel", + "editor.sidebarBlock.rating.label": "Calificaciรณn", + "editor.sidebarBlock.redirect.label": "Redireccionar", + "editor.sidebarBlock.script.label": "Script", + "editor.sidebarBlock.setVariable.label": "Establecer variable", + "editor.sidebarBlock.sheets.label": "Sheets", + "editor.sidebarBlock.start.label": "Iniciar", + "editor.sidebarBlock.text.label": "Texto", + "editor.sidebarBlock.typebot.label": "Typebot", + "editor.sidebarBlock.video.label": "Video", + "editor.sidebarBlock.wait.label": "Esperar", + "editor.sidebarBlock.webhook.label": "Webhook", + "editor.sidebarBlock.website.label": "Sitio web", + "editor.sidebarBlock.zapier.label": "Zapier", + "editor.sidebarBlock.zemanticAi.label": "Zemantic AI", + "editor.sidebarBlocks.blockType.bubbles.heading": "Burbujas", + "editor.sidebarBlocks.blockType.inputs.heading": "Entradas", + "editor.sidebarBlocks.blockType.integrations.heading": "Integraciones", + "editor.sidebarBlocks.blockType.logic.heading": "Lรณgica", + "editor.sidebarBlocks.sidebar.icon.lock.label": "Bloquear", + "editor.sidebarBlocks.sidebar.icon.unlock.label": "Desbloquear", + "editor.sidebarBlocks.sidebar.lock.label": "Bloquear barra lateral", + "editor.sidebarBlocks.sidebar.unlock.label": "Desbloquear barra lateral", + "errorMessage": "Se produjo un error", + "folders.createFolderButton.label": "Crear una carpeta", + "folders.createTypebotButton.label": "Crear un Typebot", + "folders.folderButton.deleteConfirmationMessage": "ยฟEstรกs seguro de que quieres eliminar la carpeta folderName? (Todo lo que hay dentro se moverรก a tu tablero)", + "folders.typebotButton.delete": "Eliminar", + "folders.typebotButton.deleteConfirmationMessage": "ยฟEstรกs seguro de que quieres eliminar tu Typebot typebotName?", + "folders.typebotButton.deleteConfirmationMessageWarning": "Todos sus datos asociados se eliminarรกn y no se podrรกn recuperar.", + "folders.typebotButton.duplicate": "Duplicar", + "folders.typebotButton.live": "En vivo", + "folders.typebotButton.showMoreOptions": "Mostrar mรกs opciones", + "folders.typebotButton.unpublish": "Despublicar", + "pending": "Pendiente", + "remove": "Eliminar", + "skip": "Saltar", + "templates.buttons.fromScratchButton.label": "Empezar desde cero", + "templates.buttons.fromTemplateButton.label": "Empezar desde una plantilla", + "templates.buttons.heading": "Crear un nuevo Typebot", + "templates.buttons.importFileButton.label": "Importar un archivo", + "templates.importFromFileButon.toastError.description": "Error al analizar el archivo. ยฟEstรกs seguro de que es un Typebot?", + "templates.modal.menuHeading.marketing": "Marketing", + "templates.modal.menuHeading.new.tag": "Nuevo", + "templates.modal.menuHeading.other": "Otro", + "templates.modal.menuHeading.product": "Producto", + "templates.modal.useTemplateButton.label": "Usar esta plantilla", + "upgrade": "Actualizar", + "video.aspectRatioInput.label": "Relaciรณn de aspecto", + "video.aspectRatioInput.moreInfoTooltip": "Ejemplo: \"16/9\" o \"9/16\"", + "video.maxWidthInput.label": "Ancho mรกximo", + "video.maxWidthInput.moreInfoTooltip": "Ejemplo: \"300px\" o \"100%\"", + "video.urlInput.helperText": "Funciona con Youtube, Vimeo, Gumlet, TikTok y otros", + "video.urlInput.placeholder": "Pega el enlace del video...", + "workspace.dropdown.logoutButton.label": "Cerrar sesiรณn", + "workspace.dropdown.newButton.label": "Nuevo espacio de trabajo", + "workspace.membersList.inviteButton.label": "Invitar", + "workspace.membersList.inviteInput.placeholder": "colega@empresa.com", + "workspace.membersList.title": "Miembros", + "workspace.membersList.unlockBanner.label": "Actualiza tu plan para trabajar con mรกs miembros del equipo y desbloquear increรญbles funciones avanzadas \uD83D\uDE80", + "workspace.settings.deleteButton.confirmMessage": "ยฟEstรกs seguro de que quieres eliminar el espacio de trabajo {workspaceName}? Se eliminarรกn para siempre todas sus carpetas, Typebots y resultados.", + "workspace.settings.deleteButton.label": "Eliminar espacio de trabajo", + "workspace.settings.icon.title": "Icono", + "workspace.settings.modal.menu.billingAndUsage.label": "Facturaciรณn y uso", + "workspace.settings.modal.menu.members.label": "Miembros", + "workspace.settings.modal.menu.myAccount.label": "Mi cuenta", + "workspace.settings.modal.menu.preferences.label": "Preferencias", + "workspace.settings.modal.menu.settings.label": "Configuraciรณn", + "workspace.settings.modal.menu.version.label": "Versiรณn: {version}", + "workspace.settings.modal.menu.workspace.label": "Espacio de trabajo", + "workspace.settings.name.label": "Nombre:" +} diff --git a/apps/builder/public/locales/fr.json b/apps/builder/public/locales/fr.json new file mode 100644 index 0000000000..cc8af1570d --- /dev/null +++ b/apps/builder/public/locales/fr.json @@ -0,0 +1,252 @@ +{ + "account.apiTokens.createButton.label": "Crรฉer", + "account.apiTokens.createModal.copyInstruction": "Copie ton token et enregistre le dans un endroit sรปr.", + "account.apiTokens.createModal.createButton.label": "Crรฉer un token", + "account.apiTokens.createModal.createHeading": "Crรฉer un token", + "account.apiTokens.createModal.createdHeading": "Token crรฉรฉ", + "account.apiTokens.createModal.doneButton.label": "Terminรฉ", + "account.apiTokens.createModal.nameInput.label": "Tape un nom unique pour votre token afin de le diffรฉrencier des autres tokens.", + "account.apiTokens.createModal.nameInput.placeholder": "Ex. Zapier, Github, Make.com", + "account.apiTokens.createModal.securityWarning": "Pour des raisons de sรฉcuritรฉ, nous ne pourrons pas le montrer ร  nouveau.", + "account.apiTokens.deleteButton.label": "Supprimer", + "account.apiTokens.deleteConfirmationMessage": "Le token tokenName sera dรฉfinitivement rรฉvoquรฉ, es-tu sรปr de vouloir continuer ?", + "account.apiTokens.description": "Ces tokens permettent ร  d'autres applications de contrรดler ton compte et tes typebots. Prudence !", + "account.apiTokens.heading": "Tokens API", + "account.apiTokens.table.createdHeader": "Crรฉรฉ", + "account.apiTokens.table.nameHeader": "Nom", + "account.myAccount.changePhotoButton.label": "Changer de photo", + "account.myAccount.changePhotoButton.specification": ".jpg ou.png, max 1MB", + "account.myAccount.emailInput.disabledTooltip": "La mise ร  jour de l'adresse e-mail n'est pas disponible. Contacte le service d'assistance si tu souhaites la modifier.", + "account.myAccount.emailInput.label": "Adresse e-mail:", + "account.myAccount.nameInput.label": "Nom:", + "account.preferences.appearance.darkLabel": "Sombre", + "account.preferences.appearance.heading": "Apparence", + "account.preferences.appearance.lightLabel": "Clair", + "account.preferences.appearance.systemLabel": "Systรจme", + "account.preferences.graphNavigation.heading": "Navigation de l'รฉditeur", + "account.preferences.graphNavigation.mouse.description": "Dรฉplace le board en cliquant avec la souris et zoom utilisant la molette", + "account.preferences.graphNavigation.mouse.label": "Souris", + "account.preferences.graphNavigation.trackpad.description": "Dรฉplace le board en dรฉplaรงant les 2 doigts et zoom pincant", + "account.preferences.graphNavigation.trackpad.label": "Trackpad", + "account.preferences.language.heading": "Langue", + "account.preferences.language.tooltip": "Les traductions ne sont pas encore complรจtes. C'est un travail en cours. \uD83E\uDD13", + "analytics.completionRateLabel": "Taux de complรฉtion", + "analytics.notAvailableLabel": "Non disponible", + "analytics.startsLabel": "Dรฉmarrรฉs", + "analytics.viewsLabel": "Vues", + "auth.emailSubmitButton.label": "Se connecter", + "auth.error.default": "Essaye de te connecter avec un compte diffรฉrent.", + "auth.error.email": "Email non trouvรฉ. Essaye de te connecter avec un fournisseur diffรฉrent.", + "auth.error.oauthNotLinked": "Pour confirmer ton identitรฉ, connecte-toi avec le mรชme compte que tu as utilisรฉ ร  lorigine.", + "auth.error.unknown": "Une erreur est survenue. Essaye ร  nouveau.", + "auth.magicLink.description": "N'oublie pas de vรฉrifier ton dossier spam.", + "auth.magicLink.title": "Un email avec un lien d'authentification a รฉtรฉ envoyรฉ. \uD83E\uDE84", + "auth.noProvider.link": "configurer au moins un fournisseur d'authentification (E-mail, Google, GitHub, Facebook ou Azure AD).", + "auth.noProvider.preLink": "Tu as besoin de", + "auth.orEmailLabel": "Ou avec votre email", + "auth.register.aggreeToTerms": "En vous inscrivant, vous acceptez nos conditions de service et politique de protection de la vie privรฉe.", + "auth.register.alreadyHaveAccountLabel.link": "Se connecter", + "auth.register.alreadyHaveAccountLabel.preLink": "Tu as dรฉjร  un compte?", + "auth.register.heading": "Crรฉer un compte", + "auth.signin.heading": "Se connecter", + "auth.signin.noAccountLabel.link": "Inscris-toi gratuitement", + "auth.signin.noAccountLabel.preLink": "Tu n'as pas de compte?", + "auth.signinErrorToast.description": "Les inscriptions sont dรฉsactivรฉes.", + "auth.signinErrorToast.title": "Non autorisรฉ", + "auth.signinErrorToast.tooManyRequests": "Trop de tentatives de connexion.", + "auth.socialLogin.azureButton.label": "Continuer avec {azureProviderName}", + "auth.socialLogin.customButton.label": "Continuer avec {customProviderName}", + "auth.socialLogin.facebookButton.label": "Continuer avec Facebook", + "auth.socialLogin.githubButton.label": "Continuer avec GitHub", + "auth.socialLogin.gitlabButton.label": "Continuer avec {gitlabProviderName}", + "auth.socialLogin.googleButton.label": "Continuer avec Google", + "back": "Retour", + "billing.billingPortalButton.label": "Portail de facturation", + "billing.contribution.link": "En savoir plus.", + "billing.contribution.preLink": "Typebot contribue ร  hauteur de 1% de votre abonnement pour รฉliminer le COโ‚‚ de l'atmosphรจre.", + "billing.currentSubscription.cancelDate": "Sera annulรฉ le", + "billing.currentSubscription.heading": "Abonnement", + "billing.currentSubscription.pastDueAlert": "Le dernier paiement a รฉchouรฉ. Rendez-vous sur le portail de facturation pour effectuer la procรฉdure et รฉviter l'annulation de votre abonnement.", + "billing.currentSubscription.subheading": "Abonnement actuel du workspace :", + "billing.customLimit.link": "Discutons-en!", + "billing.customLimit.preLink": "Tu as besoin de limites personnalisรฉes ? De fonctionnalitรฉs spรฉcifiques ?", + "billing.invoices.empty": "Aucune facture trouvรฉe pour ce workspace.", + "billing.invoices.heading": "Factures", + "billing.invoices.paidAt": "Payรฉ le", + "billing.invoices.subtotal": "Sous-total", + "billing.limitMessage.analytics": "dรฉbloquer des analyses approfondies", + "billing.limitMessage.brand": "supprimer la marque", + "billing.limitMessage.customDomain": "ajouter des domaines personnalisรฉs", + "billing.limitMessage.fileInput": "utiliser des blocs de saisie de fichiers", + "billing.limitMessage.folder": "crรฉer des dossiers", + "billing.preCheckoutModal.companyInput.label": "Nom de l'entreprise :", + "billing.preCheckoutModal.emailInput.label": "E-mail :", + "billing.preCheckoutModal.submitButton.label": "Continuer", + "billing.preCheckoutModal.taxId.label": "Numรฉro de TVA :", + "billing.preCheckoutModal.taxId.placeholder": "Type", + "billing.pricingCard.chatsPerMonth": "chats/mois", + "billing.pricingCard.chatsTooltip": "Un chat est comptabilisรฉ chaque fois qu'un utilisateur dรฉmarre une discussion. Il est indรฉpendant du nombre de messages qu'il envoie et reรงoit.", + "billing.pricingCard.heading": "Passer ร  plan", + "billing.pricingCard.perMonth": "/ mois", + "billing.pricingCard.plus": ", plus :", + "billing.pricingCard.pro.analytics": "Analyses approfondies", + "billing.pricingCard.pro.customDomains": "Domaines personnalisรฉs", + "billing.pricingCard.pro.description": "Pour les agences et les startups en croissance.", + "billing.pricingCard.pro.everythingFromStarter": "Tout ce qu'il y a dans Starter", + "billing.pricingCard.pro.includedSeats": "5 collรจgues inclus", + "billing.pricingCard.pro.mostPopularLabel": "Le plus populaire", + "billing.pricingCard.pro.whatsAppIntegration": "Intรฉgration WhatsApp", + "billing.pricingCard.starter.brandingRemoved": "Marque enlevรฉe", + "billing.pricingCard.starter.createFolders": "Crรฉer des dossiers", + "billing.pricingCard.starter.description": "Pour les particuliers et les petites entreprises.", + "billing.pricingCard.starter.fileUploadBlock": "Bloc d'upload de fichier", + "billing.pricingCard.starter.includedSeats": "2 collรจgues inclus", + "billing.pricingCard.upgradeButton.current": "Abonnement actuel", + "billing.tiersModal.heading": "Table des prix des chats", + "billing.updateSuccessToast.description": "Ton abonnement {plan} a รฉtรฉ mis ร  jour avec succรจs \uD83C\uDF89", + "billing.upgradeAlert.buttonDefaultLabel": "Plus d'informations", + "billing.upgradeLimitLabel": "Tu dois mettre ร  niveau ton abonnement pour {type}", + "billing.usage.chats.alert.soonReach": "Tes typebots sont populaires ! Tu atteindras bientรดt la limite de chats de votre abonnement. \uD83D\uDE80", + "billing.usage.chats.alert.updatePlan": "Assure-toi de mettre ร  jour votre abonnement pour augmenter cette limite et continuer ร  discuter avec vos utilisateurs.", + "billing.usage.chats.heading": "Chats", + "billing.usage.heading": "Utilisation", + "billing.usage.unlimited": "Illimitรฉ", + "blocks.bubbles.embed.blockCard.tooltip": "Intรฉgrer un pdf, un iframe, un site web...", + "blocks.inputs.fileUpload.blockCard.tooltip": "Tรฉlรฉcharger des fichiers", + "blocks.integrations.googleAnalytics.blockCard.tooltip": "Google Analytics", + "blocks.integrations.googleSheets.blockCard.tooltip": "Google Sheets", + "cancel": "Annuler", + "clickToEdit": "Clique pour modifier...", + "confirmModal.defaultTitle": "Es-tu sรปr ?", + "dashboard.header.settingsButton.label": "Paramรจtres & Membres", + "dashboard.redirectionMessage": "Redirection en cours...", + "dashboard.title": "Mes typebots", + "delete": "Supprimer", + "downgrade": "Downgrade", + "editor.blockCard.logicBlock.tooltip.code.label": "Exรฉcuter du code Javascript", + "editor.blockCard.logicBlock.tooltip.jump.label": "Passer rapidement au groupe suivant", + "editor.blockCard.logicBlock.tooltip.typebotLink.label": "Lier et exรฉcuter un autre typebot", + "editor.blocks.bubbles.audio.settings.autoplay.label": "Activer la lecture automatique", + "editor.blocks.bubbles.audio.settings.chooseFile.label": "Choisir un fichier", + "editor.blocks.bubbles.audio.settings.embedLink.label": "Lien intรฉgrรฉ", + "editor.blocks.bubbles.audio.settings.upload.label": "Uploader", + "editor.blocks.bubbles.audio.settings.worksWith.placeholder": "Collez le lien du fichier audio...", + "editor.blocks.bubbles.audio.settings.worksWith.text": "Fonctionne avec les fichiers .MP3 et .WAV", + "editor.blocks.bubbles.embed.node.show.text": "Afficher l'intรฉgration", + "editor.blocks.bubbles.embed.settings.numberInput.unit": "px", + "editor.blocks.bubbles.embed.settings.worksWith.placeholder": "Collez le lien ou le code...", + "editor.blocks.bubbles.embed.settings.worksWith.text": "Fonctionne avec les PDF, les iframes, les sites web...", + "editor.blocks.bubbles.image.switchWithLabel.onClick.label": "Redirection au clic", + "editor.blocks.bubbles.image.switchWithLabel.onClick.placeholder": "Texte alternatif du lien (description)", + "editor.blocks.bubbles.textEditor.plate.label": "ร‰diteur de texte", + "editor.blocks.bubbles.textEditor.searchVariable.placeholder": "Rechercher une variable", + "editor.blocks.start.text": "Dรฉmarrer", + "editor.editableTypebotName.tooltip.rename.label": "Renommer", + "editor.gettingStartedModal.editorBasics.heading": "Principes de base de l'รฉditeur", + "editor.gettingStartedModal.editorBasics.list.four.label": "Prรฉvisualisez votre bot en cliquant sur le bouton \"Tester\" en haut ร  droite.", + "editor.gettingStartedModal.editorBasics.list.label": "N'hรฉsitez pas ร  utiliser la bulle en bas ร  droite pour me poser des questions. Je rรฉponds gรฉnรฉralement dans les 24 heures. \uD83D\uDE03", + "editor.gettingStartedModal.editorBasics.list.one.label": "La barre latรฉrale de gauche contient des blocs que vous pouvez glisser-dรฉposer sur le graph.", + "editor.gettingStartedModal.editorBasics.list.three.label": "Connectez les groupes ensemble.", + "editor.gettingStartedModal.editorBasics.list.two.label": "Vous pouvez regrouper les blocs en les dรฉposant les uns au-dessus ou en-dessous des autres.", + "editor.gettingStartedModal.seeAction.item.label": "Autres vidรฉos", + "editor.gettingStartedModal.seeAction.label": "Voir en action", + "editor.gettingStartedModal.seeAction.time": "5 minutes", + "editor.headers.flowButton.label": "Flow", + "editor.headers.helpButton.label": "Aide", + "editor.headers.previewButton.label": "Tester", + "editor.headers.resultsButton.label": "Rรฉsultats", + "editor.headers.savingSpinner.label": "Enregistrement...", + "editor.headers.settingsButton.label": "Paramรจtres", + "editor.headers.shareButton.label": "Partage", + "editor.headers.themeButton.label": "Thรจme", + "editor.sidebarBlock.abTest.label": "AB Test", + "editor.sidebarBlock.analytics.label": "Analytics", + "editor.sidebarBlock.audio.label": "Audio", + "editor.sidebarBlock.button.label": "Boutons", + "editor.sidebarBlock.chatwoot.label": "Chatwoot", + "editor.sidebarBlock.condition.label": "Condition", + "editor.sidebarBlock.date.label": "Date", + "editor.sidebarBlock.email.label": "Email", + "editor.sidebarBlock.embed.label": "Iframe", + "editor.sidebarBlock.file.label": "Fichier", + "editor.sidebarBlock.image.label": "Image", + "editor.sidebarBlock.jump.label": "Sauter", + "editor.sidebarBlock.makecom.label": "Make.com", + "editor.sidebarBlock.number.label": "Nombre", + "editor.sidebarBlock.openai.label": "OpenAI", + "editor.sidebarBlock.pabbly.label": "Pabbly", + "editor.sidebarBlock.payment.label": "Paiement", + "editor.sidebarBlock.phone.label": "Tรฉlรฉphone", + "editor.sidebarBlock.picChoice.label": "Choix image", + "editor.sidebarBlock.pixel.label": "Pixel", + "editor.sidebarBlock.rating.label": "ร‰valuation", + "editor.sidebarBlock.redirect.label": "Rediriger", + "editor.sidebarBlock.script.label": "Script", + "editor.sidebarBlock.setVariable.label": "Dรฉfinir variable", + "editor.sidebarBlock.sheets.label": "Sheets", + "editor.sidebarBlock.start.label": "Dรฉmarrer", + "editor.sidebarBlock.text.label": "Texte", + "editor.sidebarBlock.typebot.label": "Typebot", + "editor.sidebarBlock.video.label": "Vidรฉo", + "editor.sidebarBlock.wait.label": "Attendre", + "editor.sidebarBlock.webhook.label": "Webhook", + "editor.sidebarBlock.website.label": "Site web", + "editor.sidebarBlock.zapier.label": "Zapier", + "editor.sidebarBlock.zemanticAi.label": "Zemantic AI", + "editor.sidebarBlocks.blockType.bubbles.heading": "Bulles", + "editor.sidebarBlocks.blockType.inputs.heading": "Inputs", + "editor.sidebarBlocks.blockType.integrations.heading": "Intรฉgrations", + "editor.sidebarBlocks.blockType.logic.heading": "Logique", + "editor.sidebarBlocks.sidebar.icon.lock.label": "Fermรฉe", + "editor.sidebarBlocks.sidebar.icon.unlock.label": "Ouverte", + "editor.sidebarBlocks.sidebar.lock.label": "Fermer la barre latรฉrale", + "editor.sidebarBlocks.sidebar.unlock.label": "Ouvrir la barre latรฉrale", + "errorMessage": "Une erreur s'est produite", + "folders.createFolderButton.label": "Crรฉer un dossier", + "folders.createTypebotButton.label": "Crรฉer un typebot", + "folders.folderButton.deleteConfirmationMessage": "Es-tu sรปr de vouloir supprimer le dossier folderName ? (Tout ce qui est ร  l'intรฉrieur sera dรฉplacรฉ dans le dossier parent ou sur votre tableau de bord)", + "folders.typebotButton.delete": "Supprimer", + "folders.typebotButton.deleteConfirmationMessage": "Es-tu sรปr de vouloir supprimer votre typebot typebotName ?", + "folders.typebotButton.deleteConfirmationMessageWarning": "Toutes les donnรฉes associรฉes seront supprimรฉes et ne pourront pas รชtre rรฉcupรฉrรฉes.", + "folders.typebotButton.duplicate": "Dupliquer", + "folders.typebotButton.live": "Live", + "folders.typebotButton.showMoreOptions": "Afficher plus d'options", + "folders.typebotButton.unpublish": "Dรฉpublier", + "pending": "En attente", + "remove": "Retirer", + "skip": "Passer", + "templates.buttons.fromScratchButton.label": "Commencer ร  partir de zรฉro", + "templates.buttons.fromTemplateButton.label": "Commencer ร  partir d'un modรจle", + "templates.buttons.heading": "Crรฉer un nouveau typebot", + "templates.buttons.importFileButton.label": "Importer un fichier", + "templates.importFromFileButon.toastError.description": "ร‰chec de l'analyse du fichier. Es-tu sรปr que c'est un typebot ?", + "templates.modal.menuHeading.marketing": "Marketing", + "templates.modal.menuHeading.new.tag": "Nouveau", + "templates.modal.menuHeading.other": "Autre", + "templates.modal.menuHeading.product": "Produit", + "templates.modal.useTemplateButton.label": "Utiliser ce modรจle", + "upgrade": "Upgrade", + "video.aspectRatioInput.label": "Ratio", + "video.aspectRatioInput.moreInfoTooltip": "Exemple: \"16/9\" ou \"9/16\"", + "video.maxWidthInput.label": "Largeur max", + "video.maxWidthInput.moreInfoTooltip": "Exemple: \"300px\" ou \"100%\"", + "video.urlInput.helperText": "Fonctionne avec Youtube, Vimeo, Gumlet, TikTok et autres", + "video.urlInput.placeholder": "Collez le lien de la vidรฉo...", + "workspace.dropdown.logoutButton.label": "Dรฉconnexion", + "workspace.dropdown.newButton.label": "Nouveau workspace", + "workspace.membersList.inviteButton.label": "Inviter", + "workspace.membersList.inviteInput.placeholder": "collegue@entreprise.fr", + "workspace.membersList.title": "Membres", + "workspace.membersList.unlockBanner.label": "Upgrade ton plan pour travailler les membres de ton รฉquipe et dรฉbloquer d'autres fonctionnalitรฉs puissantes \uD83D\uDE80", + "workspace.settings.deleteButton.confirmMessage": "Es-tu sรปr(e) de vouloir supprimer le workspace {workspaceName} ? Tous ses dossiers, typebots et rรฉsultats seront supprimรฉs pour toujours.", + "workspace.settings.deleteButton.label": "Supprimer le workspace", + "workspace.settings.icon.title": "Icรดne", + "workspace.settings.modal.menu.billingAndUsage.label": "Facturation et utilisation", + "workspace.settings.modal.menu.members.label": "Membres", + "workspace.settings.modal.menu.myAccount.label": "Mon compte", + "workspace.settings.modal.menu.preferences.label": "Prรฉfรฉrences", + "workspace.settings.modal.menu.settings.label": "Paramรจtres", + "workspace.settings.modal.menu.version.label": "Version : {version}", + "workspace.settings.modal.menu.workspace.label": "Workspace", + "workspace.settings.name.label": "Nom:" +} diff --git a/apps/builder/public/locales/pt-BR.json b/apps/builder/public/locales/pt-BR.json new file mode 100644 index 0000000000..d670ec0203 --- /dev/null +++ b/apps/builder/public/locales/pt-BR.json @@ -0,0 +1,252 @@ +{ + "account.apiTokens.createButton.label": "Criar", + "account.apiTokens.createModal.copyInstruction": "Por favor, copie seu token e guarde-o em um lugar seguro.", + "account.apiTokens.createModal.createButton.label": "Criar token", + "account.apiTokens.createModal.createHeading": "Criar Token", + "account.apiTokens.createModal.createdHeading": "Token Criado", + "account.apiTokens.createModal.doneButton.label": "Concluรญdo", + "account.apiTokens.createModal.nameInput.label": "Insira um nome รบnico para o seu token para diferenciรก-lo de outros tokens.", + "account.apiTokens.createModal.nameInput.placeholder": "Ex. Zapier, Github, Make.com", + "account.apiTokens.createModal.securityWarning": "Por motivos de seguranรงa, nรฃo podemos mostrรก-lo novamente.", + "account.apiTokens.deleteButton.label": "Excluir", + "account.apiTokens.deleteConfirmationMessage": "O token tokenName serรก revogado permanentemente. Tem certeza de que deseja continuar?", + "account.apiTokens.description": "Esses tokens permitem que outros aplicativos controlem toda a sua conta e typebots. Tenha cuidado!", + "account.apiTokens.heading": "Tokens de API", + "account.apiTokens.table.createdHeader": "Criado", + "account.apiTokens.table.nameHeader": "Nome", + "account.myAccount.changePhotoButton.label": "Alterar foto", + "account.myAccount.changePhotoButton.specification": ".jpg ou.png, mรกximo 1MB", + "account.myAccount.emailInput.disabledTooltip": "A atualizaรงรฃo do e-mail nรฃo estรก disponรญvel. Entre em contato com o suporte se quiser alterรก-lo.", + "account.myAccount.emailInput.label": "Endereรงo de e-mail:", + "account.myAccount.nameInput.label": "Nome:", + "account.preferences.appearance.darkLabel": "Escuro", + "account.preferences.appearance.heading": "Aparรชncia", + "account.preferences.appearance.lightLabel": "Claro", + "account.preferences.appearance.systemLabel": "Sistema", + "account.preferences.graphNavigation.heading": "Navegaรงรฃo do Editor", + "account.preferences.graphNavigation.mouse.description": "Mova arrastando o quadro e amplie/reduza usando a roda de rolagem", + "account.preferences.graphNavigation.mouse.label": "Mouse", + "account.preferences.graphNavigation.trackpad.description": "Mova o quadro usando 2 dedos e amplie/reduza fazendo pinรงa", + "account.preferences.graphNavigation.trackpad.label": "Trackpad", + "account.preferences.language.heading": "Idioma", + "account.preferences.language.tooltip": "As traduรงรตes ainda nรฃo estรฃo completas. ร‰ um trabalho em andamento. \uD83E\uDD13", + "analytics.completionRateLabel": "Taxa de conclusรฃo", + "analytics.notAvailableLabel": "Nรฃo disponรญvel", + "analytics.startsLabel": "Inรญcios", + "analytics.viewsLabel": "Visualizaรงรตes", + "auth.emailSubmitButton.label": "Enviar", + "auth.error.default": "Tente entrar com uma conta diferente.", + "auth.error.email": "E-mail nรฃo encontrado. Tente entrar com um provedor diferente.", + "auth.error.oauthNotLinked": "Jรก existe uma conta vinculada a esse E-mail, entre com a mesma conta que vocรช usou originalmente.", + "auth.error.unknown": "Ocorreu um erro. Tente novamente.", + "auth.magicLink.description": "Certifique-se de verificar sua pasta de spam.", + "auth.magicLink.title": "Um email com o link mรกgico foi enviado. \uD83E\uDE84", + "auth.noProvider.link": "configurar pelo menos um provedor de autenticaรงรฃo (E-mail, Google, GitHub, Facebook ou Azure AD).", + "auth.noProvider.preLink": "Vocรช precisa", + "auth.orEmailLabel": "Ou com seu email", + "auth.register.aggreeToTerms": "Ao se cadastrar, vocรช concorda com nossos termos de serviรงo e polรญtica de privacidade.", + "auth.register.alreadyHaveAccountLabel.link": "Entrar", + "auth.register.alreadyHaveAccountLabel.preLink": "Jรก tem uma conta?", + "auth.register.heading": "Criar uma conta", + "auth.signin.heading": "Entrar", + "auth.signin.noAccountLabel.link": "Registre-se gratuitamente", + "auth.signin.noAccountLabel.preLink": "Nรฃo tem uma conta?", + "auth.signinErrorToast.description": "As inscriรงรตes estรฃo desativadas.", + "auth.signinErrorToast.title": "Nรฃo autorizado", + "auth.signinErrorToast.tooManyRequests": "Muitas tentativas. Tente novamente mais tarde.", + "auth.socialLogin.azureButton.label": "Continuar com {azureProviderName}", + "auth.socialLogin.customButton.label": "Continuar com {customProviderName}", + "auth.socialLogin.facebookButton.label": "Continuar com Facebook", + "auth.socialLogin.githubButton.label": "Continuar com GitHub", + "auth.socialLogin.gitlabButton.label": "Continuar com {gitlabProviderName}", + "auth.socialLogin.googleButton.label": "Continuar com Google", + "back": "Voltar", + "billing.billingPortalButton.label": "Portal de cobranรงa", + "billing.contribution.link": "Saiba mais.", + "billing.contribution.preLink": "A Typebot estรก contribuindo com 1% da sua assinatura para remover o COโ‚‚ da atmosfera.", + "billing.currentSubscription.cancelDate": "Serรก cancelado em", + "billing.currentSubscription.heading": "Assinatura", + "billing.currentSubscription.pastDueAlert": "O รบltimo pagamento falhou. Acesse o portal de faturamento para prosseguir e evitar o cancelamento da sua assinatura.", + "billing.currentSubscription.subheading": "Assinatura atual do espaรงo de trabalho:", + "billing.customLimit.link": "Vamos conversar!", + "billing.customLimit.preLink": "Precisa de limites personalizados? Recursos especรญficos?", + "billing.invoices.empty": "Nenhuma fatura encontrada para este espaรงo de trabalho.", + "billing.invoices.heading": "Faturas", + "billing.invoices.paidAt": "Pago em", + "billing.invoices.subtotal": "Subtotal", + "billing.limitMessage.analytics": "desbloquear anรกlises aprofundadas", + "billing.limitMessage.brand": "remover a marca", + "billing.limitMessage.customDomain": "adicionar domรญnios personalizados", + "billing.limitMessage.fileInput": "usar blocos de envio de arquivo", + "billing.limitMessage.folder": "criar pastas", + "billing.preCheckoutModal.companyInput.label": "Nome da empresa:", + "billing.preCheckoutModal.emailInput.label": "E-mail:", + "billing.preCheckoutModal.submitButton.label": "Ir para a finalizaรงรฃo da compra", + "billing.preCheckoutModal.taxId.label": "Identificaรงรฃo fiscal (CPF):", + "billing.preCheckoutModal.taxId.placeholder": "Tipo de ID", + "billing.pricingCard.chatsPerMonth": "chats/mรชs", + "billing.pricingCard.chatsTooltip": "Um chat รฉ contado sempre que um usuรกrio inicia uma discussรฃo. Ele รฉ independente do nรบmero de mensagens que ele envia e recebe.", + "billing.pricingCard.heading": "Mudar para plan", + "billing.pricingCard.perMonth": "/ mรชs", + "billing.pricingCard.plus": ", mais:", + "billing.pricingCard.pro.analytics": "Anรกlises aprofundadas", + "billing.pricingCard.pro.customDomains": "Domรญnios personalizados", + "billing.pricingCard.pro.description": "Para agรชncias e startups em crescimento.", + "billing.pricingCard.pro.everythingFromStarter": "Tudo em Starter", + "billing.pricingCard.pro.includedSeats": "5 assentos incluรญdos", + "billing.pricingCard.pro.mostPopularLabel": "Mais popular", + "billing.pricingCard.pro.whatsAppIntegration": "Integraรงรฃo do WhatsApp", + "billing.pricingCard.starter.brandingRemoved": "Marca removida", + "billing.pricingCard.starter.createFolders": "Criar pastas", + "billing.pricingCard.starter.description": "Para indivรญduos e pequenas empresas.", + "billing.pricingCard.starter.fileUploadBlock": "Bloco de envio de arquivo", + "billing.pricingCard.starter.includedSeats": "2 assentos incluรญdos", + "billing.pricingCard.upgradeButton.current": "Sua assinatura atual", + "billing.tiersModal.heading": "Tabela de preรงo de chats", + "billing.updateSuccessToast.description": "Sua assinatura {plan} foi atualizada com sucesso \uD83C\uDF89", + "billing.upgradeAlert.buttonDefaultLabel": "Mais informaรงรตes", + "billing.upgradeLimitLabel": "Vocรช precisa atualizar sua assinatura para {type}", + "billing.usage.chats.alert.soonReach": "Seus typebots sรฃo populares! Vocรช logo alcanรงarรก o limite de chats de seu plano. \uD83D\uDE80", + "billing.usage.chats.alert.updatePlan": "Certifique-se de atualizar seu plano para aumentar esse limite e continuar conversando com seus usuรกrios.", + "billing.usage.chats.heading": "Chats", + "billing.usage.heading": "Uso", + "billing.usage.unlimited": "Ilimitado", + "blocks.bubbles.embed.blockCard.tooltip": "Incorporar pdf, iframe, website...", + "blocks.inputs.fileUpload.blockCard.tooltip": "Anexar arquivos", + "blocks.integrations.googleAnalytics.blockCard.tooltip": "Google Analytics", + "blocks.integrations.googleSheets.blockCard.tooltip": "Google Sheets", + "cancel": "Cancelar", + "clickToEdit": "Clique para editar...", + "confirmModal.defaultTitle": "Tem certeza?", + "dashboard.header.settingsButton.label": "Configuraรงรตes & Membros", + "dashboard.redirectionMessage": "Vocรช estรก sendo redirecionado...", + "dashboard.title": "Meus typebots", + "delete": "Apagar", + "downgrade": "Downgrade", + "editor.blockCard.logicBlock.tooltip.code.label": "Executar cรณdigo Javascript", + "editor.blockCard.logicBlock.tooltip.jump.label": "Encaminhar fluxo para outro grupo", + "editor.blockCard.logicBlock.tooltip.typebotLink.label": "Link e salte para outro typebot", + "editor.blocks.bubbles.audio.settings.autoplay.label": "Ativar reproduรงรฃo automรกtica", + "editor.blocks.bubbles.audio.settings.chooseFile.label": "Escolher um arquivo", + "editor.blocks.bubbles.audio.settings.embedLink.label": "Incorporar link", + "editor.blocks.bubbles.audio.settings.upload.label": "Carregar", + "editor.blocks.bubbles.audio.settings.worksWith.placeholder": "Colar o link do arquivo de รกudio...", + "editor.blocks.bubbles.audio.settings.worksWith.text": "Compatรญvel com .MP3s e .WAVs", + "editor.blocks.bubbles.embed.node.show.text": "Mostrar incorporaรงรฃo", + "editor.blocks.bubbles.embed.settings.numberInput.unit": "px", + "editor.blocks.bubbles.embed.settings.worksWith.placeholder": "Colar o link ou cรณdigo...", + "editor.blocks.bubbles.embed.settings.worksWith.text": "Compatรญvel com PDFs, iframes, websites...", + "editor.blocks.bubbles.image.switchWithLabel.onClick.label": "Link ao clicar", + "editor.blocks.bubbles.image.switchWithLabel.onClick.placeholder": "Texto alternativo do link (descriรงรฃo)", + "editor.blocks.bubbles.textEditor.plate.label": "Editor de texto", + "editor.blocks.bubbles.textEditor.searchVariable.placeholder": "Pesquisar uma variรกvel", + "editor.blocks.start.text": "Inรญcio", + "editor.editableTypebotName.tooltip.rename.label": "Renomear", + "editor.gettingStartedModal.editorBasics.heading": "Fundamentos do Editor", + "editor.gettingStartedModal.editorBasics.list.four.label": "Prรฉ-visualize o seu bot ao clicar no botรฃo de visualizar no canto superior direito", + "editor.gettingStartedModal.editorBasics.list.label": "Sinta-se ร  vontade para usar o chat no canto inferior direito para entrar em contato se tiver alguma dรบvida. Normalmente, respondo nas prรณximas 24 horas. \uD83D\uDE03", + "editor.gettingStartedModal.editorBasics.list.one.label": "A barra lateral esquerda contรฉm blocos que podem ser arrastados e soltos no quadro.", + "editor.gettingStartedModal.editorBasics.list.three.label": "Conecte os grupos entre eles", + "editor.gettingStartedModal.editorBasics.list.two.label": "Vocรช pode agrupar blocos juntos, colocando-os abaixo ou acima dos outros", + "editor.gettingStartedModal.seeAction.item.label": "Outros vรญdeos", + "editor.gettingStartedModal.seeAction.label": "Veja como funciona em", + "editor.gettingStartedModal.seeAction.time": "5 minutos", + "editor.headers.flowButton.label": "Fluxo", + "editor.headers.helpButton.label": "Ajuda", + "editor.headers.previewButton.label": "Visualizar", + "editor.headers.resultsButton.label": "Resultados", + "editor.headers.savingSpinner.label": "Salvando...", + "editor.headers.settingsButton.label": "Configuraรงรตes", + "editor.headers.shareButton.label": "Compartilhar", + "editor.headers.themeButton.label": "Tema", + "editor.sidebarBlock.abTest.label": "Teste AB", + "editor.sidebarBlock.analytics.label": "Analytics", + "editor.sidebarBlock.audio.label": "รudio", + "editor.sidebarBlock.button.label": "Botรฃo", + "editor.sidebarBlock.chatwoot.label": "Chatwoot", + "editor.sidebarBlock.condition.label": "Condiรงรฃo", + "editor.sidebarBlock.date.label": "Data", + "editor.sidebarBlock.email.label": "Email", + "editor.sidebarBlock.embed.label": "Incorporar", + "editor.sidebarBlock.file.label": "Arquivo", + "editor.sidebarBlock.image.label": "Imagem", + "editor.sidebarBlock.jump.label": "Pular", + "editor.sidebarBlock.makecom.label": "Make.com", + "editor.sidebarBlock.number.label": "Nรบmero", + "editor.sidebarBlock.openai.label": "OpenAI", + "editor.sidebarBlock.pabbly.label": "Pabbly", + "editor.sidebarBlock.payment.label": "Pagamento", + "editor.sidebarBlock.phone.label": "Telefone", + "editor.sidebarBlock.picChoice.label": "Seleรงรฃo de Imagem", + "editor.sidebarBlock.pixel.label": "Pixel", + "editor.sidebarBlock.rating.label": "Avaliaรงรฃo", + "editor.sidebarBlock.redirect.label": "Redirecionar", + "editor.sidebarBlock.script.label": "Script", + "editor.sidebarBlock.setVariable.label": "Variรกvel", + "editor.sidebarBlock.sheets.label": "Sheets", + "editor.sidebarBlock.start.label": "Inรญcio", + "editor.sidebarBlock.text.label": "Texto", + "editor.sidebarBlock.typebot.label": "Typebot", + "editor.sidebarBlock.video.label": "Vรญdeo", + "editor.sidebarBlock.wait.label": "Espera", + "editor.sidebarBlock.webhook.label": "Webhook", + "editor.sidebarBlock.website.label": "Website", + "editor.sidebarBlock.zapier.label": "Zapier", + "editor.sidebarBlock.zemanticAi.label": "Zemantic AI", + "editor.sidebarBlocks.blockType.bubbles.heading": "Bubbles", + "editor.sidebarBlocks.blockType.inputs.heading": "Inputs", + "editor.sidebarBlocks.blockType.integrations.heading": "Integraรงรตes", + "editor.sidebarBlocks.blockType.logic.heading": "Condicionais", + "editor.sidebarBlocks.sidebar.icon.lock.label": "Bloquear", + "editor.sidebarBlocks.sidebar.icon.unlock.label": "Desbloquear", + "editor.sidebarBlocks.sidebar.lock.label": "Bloquear barra lateral", + "editor.sidebarBlocks.sidebar.unlock.label": "Desbloquear barra lateral", + "errorMessage": "Ocorreu um erro", + "folders.createFolderButton.label": "Criar uma pasta", + "folders.createTypebotButton.label": "Criar um typebot", + "folders.folderButton.deleteConfirmationMessage": "Tem certeza de que deseja excluir a pasta folderName? (Tudo o que estiver dentro serรก movido para o seu painel)", + "folders.typebotButton.delete": "Apagar", + "folders.typebotButton.deleteConfirmationMessage": "Tem certeza de que deseja excluir seu typebot typebotName?", + "folders.typebotButton.deleteConfirmationMessageWarning": "Todos os dados associados serรฃo excluรญdos e nรฃo poderรฃo ser recuperados.", + "folders.typebotButton.duplicate": "Duplicar", + "folders.typebotButton.live": "Live", + "folders.typebotButton.showMoreOptions": "Mostrar mais opรงรตes", + "folders.typebotButton.unpublish": "Despublicar", + "pending": "Pendente", + "remove": "Remover", + "skip": "Pular", + "templates.buttons.fromScratchButton.label": "Comece do zero", + "templates.buttons.fromTemplateButton.label": "Comece a partir de um modelo", + "templates.buttons.heading": "Criar um novo typebot", + "templates.buttons.importFileButton.label": "Importar um arquivo", + "templates.importFromFileButon.toastError.description": "Falha ao analisar o arquivo. Tem certeza de que รฉ um typebot?", + "templates.modal.menuHeading.marketing": "Marketing", + "templates.modal.menuHeading.new.tag": "Novo", + "templates.modal.menuHeading.other": "Outros", + "templates.modal.menuHeading.product": "Produto", + "templates.modal.useTemplateButton.label": "Usar esse modelo", + "upgrade": "Upgrade", + "video.aspectRatioInput.label": "Proporรงรฃo", + "video.aspectRatioInput.moreInfoTooltip": "Exemplo: \"16/9\" ou \"9/16\"", + "video.maxWidthInput.label": "Largura mรกxima", + "video.maxWidthInput.moreInfoTooltip": "Exemplo: \"300px\" ou \"100%\"", + "video.urlInput.helperText": "Compatรญvel com Youtube, Vimeo, Gumlet, TikTok e outros", + "video.urlInput.placeholder": "Colar o link do vรญdeo...", + "workspace.dropdown.logoutButton.label": "Sair", + "workspace.dropdown.newButton.label": "Novo espaรงo de trabalho", + "workspace.membersList.inviteButton.label": "Convidar", + "workspace.membersList.inviteInput.placeholder": "colega@empresa.com", + "workspace.membersList.title": "Membros", + "workspace.membersList.unlockBanner.label": "Atualize seu plano para trabalhar com mais membros da equipe e desbloqueie recursos incrรญveis \uD83D\uDE80", + "workspace.settings.deleteButton.confirmMessage": "Vocรช tem certeza de que deseja excluir o espaรงo de trabalho {workspaceName}? Todas as suas pastas, typebots e resultados serรฃo excluรญdos permanentemente.", + "workspace.settings.deleteButton.label": "Excluir espaรงo de trabalho", + "workspace.settings.icon.title": "รcone", + "workspace.settings.modal.menu.billingAndUsage.label": "Faturamento e uso", + "workspace.settings.modal.menu.members.label": "Membros", + "workspace.settings.modal.menu.myAccount.label": "Minha conta", + "workspace.settings.modal.menu.preferences.label": "Preferรชncias", + "workspace.settings.modal.menu.settings.label": "Configuraรงรตes", + "workspace.settings.modal.menu.version.label": "Versรฃo: {version}", + "workspace.settings.modal.menu.workspace.label": "Espaรงo de trabalho", + "workspace.settings.name.label": "Nome:" +} diff --git a/apps/builder/public/locales/pt.json b/apps/builder/public/locales/pt.json new file mode 100644 index 0000000000..41986fe4a2 --- /dev/null +++ b/apps/builder/public/locales/pt.json @@ -0,0 +1,252 @@ +{ + "account.apiTokens.createButton.label": "Criar", + "account.apiTokens.createModal.copyInstruction": "Por favor, copie o seu token e guarde-o num lugar seguro.", + "account.apiTokens.createModal.createButton.label": "Criar token", + "account.apiTokens.createModal.createHeading": "Criar Token", + "account.apiTokens.createModal.createdHeading": "Token Criado", + "account.apiTokens.createModal.doneButton.label": "Concluรญdo", + "account.apiTokens.createModal.nameInput.label": "Insira um nome รบnico para o seu token para o diferenciar de outros tokens.", + "account.apiTokens.createModal.nameInput.placeholder": "Ex. Zapier, Github, Make.com", + "account.apiTokens.createModal.securityWarning": "Por razรตes de seguranรงa, nรฃo o podemos mostrar novamente.", + "account.apiTokens.deleteButton.label": "Excluir", + "account.apiTokens.deleteConfirmationMessage": "O token tokenName serรก revogado permanentemente. Tem a certeza de que deseja continuar?", + "account.apiTokens.description": "Estes tokens permitem que outras aplicaรงรตes controlem toda a sua conta e typebots. Tenha cuidado!", + "account.apiTokens.heading": "Tokens de API", + "account.apiTokens.table.createdHeader": "Criado", + "account.apiTokens.table.nameHeader": "Nome", + "account.myAccount.changePhotoButton.label": "Alterar foto", + "account.myAccount.changePhotoButton.specification": ".jpg ou.png, mรกximo 1MB", + "account.myAccount.emailInput.disabledTooltip": "A atualizaรงรฃo do e-mail nรฃo estรก disponรญvel. Entre em contacto com o apoio se quiser alterรก-lo.", + "account.myAccount.emailInput.label": "Endereรงo de e-mail:", + "account.myAccount.nameInput.label": "Nome:", + "account.preferences.appearance.darkLabel": "Escuro", + "account.preferences.appearance.heading": "Aparรชncia", + "account.preferences.appearance.lightLabel": "Claro", + "account.preferences.appearance.systemLabel": "Sistema", + "account.preferences.graphNavigation.heading": "Navegaรงรฃo do Editor", + "account.preferences.graphNavigation.mouse.description": "Mova arrastando o quadro e amplie/reduza usando a roda de deslocamento", + "account.preferences.graphNavigation.mouse.label": "Rato", + "account.preferences.graphNavigation.trackpad.description": "Mova o quadro usando 2 dedos e amplie/reduza fazendo pinรงa", + "account.preferences.graphNavigation.trackpad.label": "Trackpad", + "account.preferences.language.heading": "Idioma", + "account.preferences.language.tooltip": "As traduรงรตes ainda nรฃo estรฃo completas. ร‰ um trabalho em curso. \uD83E\uDD13", + "analytics.completionRateLabel": "Taxa de conclusรฃo", + "analytics.notAvailableLabel": "Nรฃo disponรญvel", + "analytics.startsLabel": "Inรญcios", + "analytics.viewsLabel": "Visualizaรงรตes", + "auth.emailSubmitButton.label": "Enviar", + "auth.error.default": "Tente entrar com uma conta diferente.", + "auth.error.email": "E-mail nรฃo encontrado. Tente entrar com um fornecedor diferente.", + "auth.error.oauthNotLinked": "Para confirmar a sua identidade, entre com a mesma conta que usou originalmente.", + "auth.error.unknown": "Ocorreu um erro. Tente novamente.", + "auth.magicLink.description": "Certifique-se de verificar a sua pasta de spam.", + "auth.magicLink.title": "Foi enviado um e-mail com a ligaรงรฃo mรกgica. \uD83E\uDE84", + "auth.noProvider.link": "configurar pelo menos um fornecedor de autenticaรงรฃo (E-mail, Google, GitHub, Facebook ou Azure AD).", + "auth.noProvider.preLink": "Precisa de", + "auth.orEmailLabel": "Ou com o seu e-mail", + "auth.register.aggreeToTerms": "Ao registar-se, concorda com os nossos termos de serviรงo e polรญtica de privacidade.", + "auth.register.alreadyHaveAccountLabel.link": "Entrar", + "auth.register.alreadyHaveAccountLabel.preLink": "Jรก tem uma conta?", + "auth.register.heading": "Criar uma conta", + "auth.signin.heading": "Entrar", + "auth.signin.noAccountLabel.link": "Registe-se gratuitamente", + "auth.signin.noAccountLabel.preLink": "Nรฃo tem uma conta?", + "auth.signinErrorToast.description": "As inscriรงรตes estรฃo desativadas.", + "auth.signinErrorToast.title": "Nรฃo autorizado", + "auth.signinErrorToast.tooManyRequests": "Muitas tentativas. Tente novamente mais tarde.", + "auth.socialLogin.azureButton.label": "Continuar com {azureProviderName}", + "auth.socialLogin.customButton.label": "Continuar com {customProviderName}", + "auth.socialLogin.facebookButton.label": "Continuar com Facebook", + "auth.socialLogin.githubButton.label": "Continuar com GitHub", + "auth.socialLogin.gitlabButton.label": "Continuar com {gitlabProviderName}", + "auth.socialLogin.googleButton.label": "Continuar com Google", + "back": "Voltar", + "billing.billingPortalButton.label": "Portal de facturaรงรฃo", + "billing.contribution.link": "Saiba mais.", + "billing.contribution.preLink": "A Typebot estรก a contribuir com 1% da sua subscriรงรฃo para remover o COโ‚‚ da atmosfera.", + "billing.currentSubscription.cancelDate": "Serรก cancelado em", + "billing.currentSubscription.heading": "Subscriรงรฃo", + "billing.currentSubscription.pastDueAlert": "O รบltimo pagamento falhou. Acesse o portal de faturamento para continuar e evitar o cancelamento da sua assinatura.", + "billing.currentSubscription.subheading": "Subscriรงรฃo actual do espaรงo de trabalho:", + "billing.customLimit.link": "Vamos falar!", + "billing.customLimit.preLink": "Precisa de limites personalizados? Funcionalidades especรญficas?", + "billing.invoices.empty": "Nenhuma factura encontrada para este espaรงo de trabalho.", + "billing.invoices.heading": "Facturas", + "billing.invoices.paidAt": "Pago em", + "billing.invoices.subtotal": "Subtotal", + "billing.limitMessage.analytics": "desbloquear anรกlises aprofundadas", + "billing.limitMessage.brand": "remover a marca", + "billing.limitMessage.customDomain": "adicionar domรญnios personalizados", + "billing.limitMessage.fileInput": "usar blocos de envio de ficheiros", + "billing.limitMessage.folder": "criar pastas", + "billing.preCheckoutModal.companyInput.label": "Nome da empresa:", + "billing.preCheckoutModal.emailInput.label": "E-mail:", + "billing.preCheckoutModal.submitButton.label": "Ir para a finalizaรงรฃo da compra", + "billing.preCheckoutModal.taxId.label": "Identificaรงรฃo fiscal (NIF):", + "billing.preCheckoutModal.taxId.placeholder": "Tipo de ID", + "billing.pricingCard.chatsPerMonth": "chats/mรชs", + "billing.pricingCard.chatsTooltip": "Um chat รฉ contado sempre que um utilizador inicia uma discussรฃo. Ele รฉ independente do nรบmero de mensagens que envia e recebe.", + "billing.pricingCard.heading": "Mudar para plan", + "billing.pricingCard.perMonth": "/ mรชs", + "billing.pricingCard.plus": ", mais:", + "billing.pricingCard.pro.analytics": "Anรกlises aprofundadas", + "billing.pricingCard.pro.customDomains": "Domรญnios personalizados", + "billing.pricingCard.pro.description": "Para agรชncias e startups em crescimento.", + "billing.pricingCard.pro.everythingFromStarter": "Tudo em Starter", + "billing.pricingCard.pro.includedSeats": "5 lugares incluรญdos", + "billing.pricingCard.pro.mostPopularLabel": "Mais popular", + "billing.pricingCard.pro.whatsAppIntegration": "Integraรงรฃo do WhatsApp", + "billing.pricingCard.starter.brandingRemoved": "Marca removida", + "billing.pricingCard.starter.createFolders": "Criar pastas", + "billing.pricingCard.starter.description": "Para indivรญduos e pequenas empresas.", + "billing.pricingCard.starter.fileUploadBlock": "Bloco de envio de ficheiro", + "billing.pricingCard.starter.includedSeats": "2 lugares incluรญdos", + "billing.pricingCard.upgradeButton.current": "A sua subscriรงรฃo atual", + "billing.tiersModal.heading": "Tabela de preรงos de chat", + "billing.updateSuccessToast.description": "A sua subscriรงรฃo {plan} foi atualizada com sucesso \uD83C\uDF89", + "billing.upgradeAlert.buttonDefaultLabel": "Mais informaรงรตes", + "billing.upgradeLimitLabel": "Precisa de atualizar a sua subscriรงรฃo para {type}", + "billing.usage.chats.alert.soonReach": "Os seus typebots sรฃo populares! Vai alcanรงar em breve o limite de chats do seu plano. \uD83D\uDE80", + "billing.usage.chats.alert.updatePlan": "Certifique-se de atualizar o seu plano para aumentar esse limite e continuar a conversar com os seus utilizadores.", + "billing.usage.chats.heading": "Chats", + "billing.usage.heading": "Uso", + "billing.usage.unlimited": "Ilimitado", + "blocks.bubbles.embed.blockCard.tooltip": "Incorporar pdf, iframe, website...", + "blocks.inputs.fileUpload.blockCard.tooltip": "Carregar Ficheiros", + "blocks.integrations.googleAnalytics.blockCard.tooltip": "Google Analytics", + "blocks.integrations.googleSheets.blockCard.tooltip": "Google Sheets", + "cancel": "Cancelar", + "clickToEdit": "Clique para editar...", + "confirmModal.defaultTitle": "Tem a certeza?", + "dashboard.header.settingsButton.label": "Configuraรงรตes & Membros", + "dashboard.redirectionMessage": "Estรก a ser redirecionado...", + "dashboard.title": "Os meus typebots", + "delete": "Apagar", + "downgrade": "Downgrade", + "editor.blockCard.logicBlock.tooltip.code.label": "Executar cรณdigo Javascript", + "editor.blockCard.logicBlock.tooltip.jump.label": "Encaminhar fluxo para outro grupo", + "editor.blockCard.logicBlock.tooltip.typebotLink.label": "Link e salte para outro typebot", + "editor.blocks.bubbles.audio.settings.autoplay.label": "Ativar reproduรงรฃo automรกtica", + "editor.blocks.bubbles.audio.settings.chooseFile.label": "Escolher um ficheiro", + "editor.blocks.bubbles.audio.settings.embedLink.label": "Incorporar link", + "editor.blocks.bubbles.audio.settings.upload.label": "Carregar", + "editor.blocks.bubbles.audio.settings.worksWith.placeholder": "Colar o link do ficheiro de รกudio...", + "editor.blocks.bubbles.audio.settings.worksWith.text": "Compatรญvel com .MP3s e .WAVs", + "editor.blocks.bubbles.embed.node.show.text": "Mostrar incorporaรงรฃo", + "editor.blocks.bubbles.embed.settings.numberInput.unit": "px", + "editor.blocks.bubbles.embed.settings.worksWith.placeholder": "Colar o link ou cรณdigo...", + "editor.blocks.bubbles.embed.settings.worksWith.text": "Compatรญvel com PDFs, iframes, websites...", + "editor.blocks.bubbles.image.switchWithLabel.onClick.label": "Link ao clicar", + "editor.blocks.bubbles.image.switchWithLabel.onClick.placeholder": "Texto alternativo do link (descriรงรฃo)", + "editor.blocks.bubbles.textEditor.plate.label": "Editor de texto", + "editor.blocks.bubbles.textEditor.searchVariable.placeholder": "Pesquisar uma variรกvel", + "editor.blocks.start.text": "Comeรงar", + "editor.editableTypebotName.tooltip.rename.label": "Renomear", + "editor.gettingStartedModal.editorBasics.heading": "Noรงรตes bรกsicas de editor", + "editor.gettingStartedModal.editorBasics.list.four.label": "Prรฉ-visualize o seu bot ao clicar no botรฃo de visualizar no canto superior direito", + "editor.gettingStartedModal.editorBasics.list.label": "Sinta-se ร  vontade para usar o chat no canto inferior direito para entrar em contacto se tiver alguma questรฃo. Normalmente, respondo nas prรณximas 24 horas. \uD83D\uDE03", + "editor.gettingStartedModal.editorBasics.list.one.label": "A barra lateral esquerda contรฉm blocos que pode arrastar e largar no quadro.", + "editor.gettingStartedModal.editorBasics.list.three.label": "Ligue os grupos entre si", + "editor.gettingStartedModal.editorBasics.list.two.label": "Pode agrupar blocos juntos, colocando-os uns abaixo ou acima dos outros", + "editor.gettingStartedModal.seeAction.item.label": "Outros vรญdeos", + "editor.gettingStartedModal.seeAction.label": "Veja o funcionamento em", + "editor.gettingStartedModal.seeAction.time": "5 minutos", + "editor.headers.flowButton.label": "Fluxo", + "editor.headers.helpButton.label": "Ajuda", + "editor.headers.previewButton.label": "Visualizar", + "editor.headers.resultsButton.label": "Resultados", + "editor.headers.savingSpinner.label": "Salvando...", + "editor.headers.settingsButton.label": "Configuraรงรตes", + "editor.headers.shareButton.label": "Compartilhar", + "editor.headers.themeButton.label": "Tema", + "editor.sidebarBlock.abTest.label": "Teste AB", + "editor.sidebarBlock.analytics.label": "Analytics", + "editor.sidebarBlock.audio.label": "รudio", + "editor.sidebarBlock.button.label": "Botรฃo", + "editor.sidebarBlock.chatwoot.label": "Chatwoot", + "editor.sidebarBlock.condition.label": "Condiรงรฃo", + "editor.sidebarBlock.date.label": "Data", + "editor.sidebarBlock.email.label": "Email", + "editor.sidebarBlock.embed.label": "Incorporar", + "editor.sidebarBlock.file.label": "Ficheiro", + "editor.sidebarBlock.image.label": "Imagem", + "editor.sidebarBlock.jump.label": "Saltar", + "editor.sidebarBlock.makecom.label": "Make.com", + "editor.sidebarBlock.number.label": "Nรบmero", + "editor.sidebarBlock.openai.label": "OpenAI", + "editor.sidebarBlock.pabbly.label": "Pabbly", + "editor.sidebarBlock.payment.label": "Pagamento", + "editor.sidebarBlock.phone.label": "Telefone", + "editor.sidebarBlock.picChoice.label": "Seleรงรฃo de Imagem", + "editor.sidebarBlock.pixel.label": "Pixel", + "editor.sidebarBlock.rating.label": "Classificaรงรฃo", + "editor.sidebarBlock.redirect.label": "Redirecionar", + "editor.sidebarBlock.script.label": "Script", + "editor.sidebarBlock.setVariable.label": "Variรกvel", + "editor.sidebarBlock.sheets.label": "Sheets", + "editor.sidebarBlock.start.label": "Inรญcio", + "editor.sidebarBlock.text.label": "Texto", + "editor.sidebarBlock.typebot.label": "Typebot", + "editor.sidebarBlock.video.label": "Vรญdeo", + "editor.sidebarBlock.wait.label": "Espera", + "editor.sidebarBlock.webhook.label": "Webhook", + "editor.sidebarBlock.website.label": "Website", + "editor.sidebarBlock.zapier.label": "Zapier", + "editor.sidebarBlock.zemanticAi.label": "Zemantic AI", + "editor.sidebarBlocks.blockType.bubbles.heading": "Bubbles", + "editor.sidebarBlocks.blockType.inputs.heading": "Inputs", + "editor.sidebarBlocks.blockType.integrations.heading": "Integraรงรตes", + "editor.sidebarBlocks.blockType.logic.heading": "Condicionais", + "editor.sidebarBlocks.sidebar.icon.lock.label": "Bloquear", + "editor.sidebarBlocks.sidebar.icon.unlock.label": "Desbloquear", + "editor.sidebarBlocks.sidebar.lock.label": "Bloquear barra lateral", + "editor.sidebarBlocks.sidebar.unlock.label": "Desbloquear barra lateral", + "errorMessage": "Ocorreu um erro", + "folders.createFolderButton.label": "Criar uma pasta", + "folders.createTypebotButton.label": "Criar um typebot", + "folders.folderButton.deleteConfirmationMessage": "Tem a certeza de que deseja excluir a pasta folderName? (Tudo o que estiver dentro serรก movido para o seu painel)", + "folders.typebotButton.delete": "Apagar", + "folders.typebotButton.deleteConfirmationMessage": "Tem a certeza de que deseja excluir o seu typebot typebotName?", + "folders.typebotButton.deleteConfirmationMessageWarning": "Todos os dados associados serรฃo excluรญdos e nรฃo poderรฃo ser recuperados.", + "folders.typebotButton.duplicate": "Duplicar", + "folders.typebotButton.live": "Ao Vivo", + "folders.typebotButton.showMoreOptions": "Mostrar mais opรงรตes", + "folders.typebotButton.unpublish": "Despublicar", + "pending": "Pendente", + "remove": "Remover", + "skip": "Saltar", + "templates.buttons.fromScratchButton.label": "Comece do zero", + "templates.buttons.fromTemplateButton.label": "Comece a partir de um modelo", + "templates.buttons.heading": "Criar um novo typebot", + "templates.buttons.importFileButton.label": "Importar um ficheiro", + "templates.importFromFileButon.toastError.description": "Falha ao analisar o ficheiro. Tem certeza de que รฉ um typebot?", + "templates.modal.menuHeading.marketing": "Marketing", + "templates.modal.menuHeading.new.tag": "Novo", + "templates.modal.menuHeading.other": "Outros", + "templates.modal.menuHeading.product": "Produto", + "templates.modal.useTemplateButton.label": "Usar este modelo", + "upgrade": "Upgrade", + "video.aspectRatioInput.label": "Proporรงรฃo", + "video.aspectRatioInput.moreInfoTooltip": "Exemplo: \"16/9\" ou \"9/16\"", + "video.maxWidthInput.label": "Largura mรกxima", + "video.maxWidthInput.moreInfoTooltip": "Exemplo: \"300px\" ou \"100%\"", + "video.urlInput.helperText": "Compatรญvel com Youtube, Vimeo, Gumlet, TikTok e outros", + "video.urlInput.placeholder": "Colar o link do vรญdeo...", + "workspace.dropdown.logoutButton.label": "Sair", + "workspace.dropdown.newButton.label": "Novo espaรงo de trabalho", + "workspace.membersList.inviteButton.label": "Convidar", + "workspace.membersList.inviteInput.placeholder": "colega@empresa.com", + "workspace.membersList.title": "Membros", + "workspace.membersList.unlockBanner.label": "Atualize o seu plano para trabalhar com mais membros da equipa e desbloquear funcionalidades incrรญveis \uD83D\uDE80", + "workspace.settings.deleteButton.confirmMessage": "Tem a certeza de que deseja eliminar o espaรงo de trabalho {workspaceName}? Todas as suas pastas, typebots e resultados serรฃo excluรญdos permanentemente.", + "workspace.settings.deleteButton.label": "Eliminar espaรงo de trabalho", + "workspace.settings.icon.title": "รcone", + "workspace.settings.modal.menu.billingAndUsage.label": "Faturaรงรฃo e uso", + "workspace.settings.modal.menu.members.label": "Membros", + "workspace.settings.modal.menu.myAccount.label": "A minha conta", + "workspace.settings.modal.menu.preferences.label": "Preferรชncias", + "workspace.settings.modal.menu.settings.label": "Configuraรงรตes", + "workspace.settings.modal.menu.version.label": "Versรฃo: {version}", + "workspace.settings.modal.menu.workspace.label": "Espaรงo de trabalho", + "workspace.settings.name.label": "Nome:" +} diff --git a/apps/builder/public/locales/ro.json b/apps/builder/public/locales/ro.json new file mode 100644 index 0000000000..75b4683986 --- /dev/null +++ b/apps/builder/public/locales/ro.json @@ -0,0 +1,252 @@ +{ + "account.apiTokens.createButton.label": "Creazฤƒ", + "account.apiTokens.createModal.copyInstruction": "Vฤƒ rugฤƒm sฤƒ vฤƒ copiaศ›i jetonul ศ™i sฤƒ-l pฤƒstraศ›i รฎntr-un loc sigur.", + "account.apiTokens.createModal.createButton.label": "Creaศ›i token", + "account.apiTokens.createModal.createHeading": "Creaศ›i token", + "account.apiTokens.createModal.createdHeading": "Token creat", + "account.apiTokens.createModal.doneButton.label": "Terminat", + "account.apiTokens.createModal.nameInput.label": "Introduceศ›i un nume unic pentru token-ul dvs. pentru a-l diferenศ›ia de alte jetoane.", + "account.apiTokens.createModal.nameInput.placeholder": "d.e. Zapier, Github, Make.com", + "account.apiTokens.createModal.securityWarning": "Din motive de securitate, nu รฎl putem arฤƒta din nou.", + "account.apiTokens.deleteButton.label": "ศ˜terge", + "account.apiTokens.deleteConfirmationMessage": "Indicatorul tokenName va fi revocat definitiv, sunteศ›i sigur cฤƒ doriศ›i sฤƒ continuaศ›i?", + "account.apiTokens.description": "Aceste jetoane permit altor aplicaศ›ii sฤƒ vฤƒ controleze รฎntregul cont ศ™i typebots. Atenศ›ie!", + "account.apiTokens.heading": "Jetoane API", + "account.apiTokens.table.createdHeader": "Creat", + "account.apiTokens.table.nameHeader": "Nume", + "account.myAccount.changePhotoButton.label": "Schimbare fotografie", + "account.myAccount.changePhotoButton.specification": ".jpg sau.png, maxim 1MB", + "account.myAccount.emailInput.disabledTooltip": "Actualizarea e-mailului nu este disponibilฤƒ. Contactaศ›i asistenศ›a dacฤƒ doriศ›i sฤƒ o schimbaศ›i.", + "account.myAccount.emailInput.label": "Adresa de e-mail:", + "account.myAccount.nameInput.label": "Nume:", + "account.preferences.appearance.darkLabel": "รŽntuneric", + "account.preferences.appearance.heading": "Aspect", + "account.preferences.appearance.lightLabel": "Luminos", + "account.preferences.appearance.systemLabel": "Sistem", + "account.preferences.graphNavigation.heading": "Navigare editor", + "account.preferences.graphNavigation.mouse.description": "Deplasaศ›i-vฤƒ trฤƒgรขnd panoul ศ™i mฤƒriศ›i / micศ™oraศ›i folosind rotiศ›a de defilare", + "account.preferences.graphNavigation.mouse.label": "Mouse", + "account.preferences.graphNavigation.trackpad.description": "Mutaศ›i placa folosind 2 degete ศ™i mฤƒriศ›i/micศ™oraศ›i prin ciupire", + "account.preferences.graphNavigation.trackpad.label": "Trackpad", + "account.preferences.language.heading": "Limba", + "account.preferences.language.tooltip": "Traducerile nu sunt รฎncฤƒ complete. Este o lucrare รฎn curs. \uD83E\uDD13", + "analytics.completionRateLabel": "Rata de finalizare", + "analytics.notAvailableLabel": "Nu este disponibil", + "analytics.startsLabel": "รŽncepe", + "analytics.viewsLabel": "Vizualizฤƒri", + "auth.emailSubmitButton.label": "Trimite", + "auth.error.default": "รŽncercaศ›i sฤƒ semnaศ›i cu alt cont.", + "auth.error.email": "E-mail nu a fost gฤƒsit. รŽncercaศ›i sฤƒ semnaศ›i cu un alt furnizor.", + "auth.error.oauthNotLinked": "Pentru a vฤƒ confirma identitatea, conectaศ›i-vฤƒ cu acelaศ™i cont pe care l-aศ›i folosit iniศ›ial.", + "auth.error.unknown": "A aparut o eroare. Vฤƒ rugฤƒm sฤƒ รฎncercaศ›i din nou.", + "auth.magicLink.description": "Asiguraศ›i-vฤƒ cฤƒ verificaศ›i folderul de spam.", + "auth.magicLink.title": "A fost trimis un e-mail cu link magic. \uD83E\uDE84", + "auth.noProvider.link": "configuraศ›i cel puศ›in un furnizor de autentificare (E-mail, Google, GitHub, Facebook sau Azure AD).", + "auth.noProvider.preLink": "Trebuie sฤƒ", + "auth.orEmailLabel": "Sau cu e-mailul tฤƒu", + "auth.register.aggreeToTerms": "Prin รฎnscriere, sunteศ›i de acord cu termeni ศ™i condiศ›ii de utilizare ศ™i cu politica de confidenศ›ialitate.", + "auth.register.alreadyHaveAccountLabel.link": "Conectare", + "auth.register.alreadyHaveAccountLabel.preLink": "Ai deja un cont?", + "auth.register.heading": "Creaศ›i un cont", + "auth.signin.heading": "Conectare", + "auth.signin.noAccountLabel.link": "Inregistreaza-te GRATUIT", + "auth.signin.noAccountLabel.preLink": "Nu ai un cont?", + "auth.signinErrorToast.description": "รŽnscrierile sunt dezactivate.", + "auth.signinErrorToast.title": "Neautorizat", + "auth.signinErrorToast.tooManyRequests": "Prea multe cereri. รŽncercaศ›i mai tรขrziu.", + "auth.socialLogin.azureButton.label": "Continuaศ›i cu {customProviderName}", + "auth.socialLogin.customButton.label": "Continuaศ›i cu {customProviderName}", + "auth.socialLogin.facebookButton.label": "Continuaศ›i cu Facebook", + "auth.socialLogin.githubButton.label": "Continuaศ›i cu GitHub", + "auth.socialLogin.gitlabButton.label": "Continuaศ›i cu {customProviderName}", + "auth.socialLogin.googleButton.label": "Continuaศ›i cu Google", + "back": "รŽnapoi", + "billing.billingPortalButton.label": "Portalul de facturare", + "billing.contribution.link": "Aflฤƒ mai multe.", + "billing.contribution.preLink": "Typebot contribuie cu 1% din abonamentul dvs. pentru a elimina COโ‚‚ din atmosferฤƒ.", + "billing.currentSubscription.cancelDate": "Va fi anulat pe", + "billing.currentSubscription.heading": "Abonament", + "billing.currentSubscription.pastDueAlert": "Ultima platฤƒ a eศ™uat. Accesaศ›i portalul de facturare pentru a continua ศ™i pentru a evita anularea abonamentului.", + "billing.currentSubscription.subheading": "Abonament curent pentru spaศ›iul de lucru:", + "billing.customLimit.link": "Hai sa vorbim!", + "billing.customLimit.preLink": "Ai nevoie de limite personalizate? Caracteristici specifice?", + "billing.invoices.empty": "Nu s-au gฤƒsit facturi pentru acest spaศ›iu de lucru.", + "billing.invoices.heading": "Facturi", + "billing.invoices.paidAt": "Plฤƒtit la", + "billing.invoices.subtotal": "Subtotal", + "billing.limitMessage.analytics": "deblocaศ›i analize aprofundate", + "billing.limitMessage.brand": "eliminaศ›i brandingul", + "billing.limitMessage.customDomain": "adฤƒugaศ›i domenii personalizate", + "billing.limitMessage.fileInput": "utilizaศ›i blocuri de introducere a fiศ™ierelor", + "billing.limitMessage.folder": "creaศ›i foldere", + "billing.preCheckoutModal.companyInput.label": "Numele companiei:", + "billing.preCheckoutModal.emailInput.label": "E-mail:", + "billing.preCheckoutModal.submitButton.label": "Mergi la casa", + "billing.preCheckoutModal.taxId.label": "Cod fiscal:", + "billing.preCheckoutModal.taxId.placeholder": "tip ID", + "billing.pricingCard.chatsPerMonth": "chat-uri/lunฤƒ", + "billing.pricingCard.chatsTooltip": "Un chat este numฤƒrat ori de cรขte ori un utilizator รฎncepe o discuศ›ie. Este independent de numฤƒrul de mesaje pe care le trimite ศ™i le primeศ™te.", + "billing.pricingCard.heading": "Treceศ›i la plan", + "billing.pricingCard.perMonth": "/luna", + "billing.pricingCard.plus": ", la care se adauga:", + "billing.pricingCard.pro.analytics": "Analize aprofundate", + "billing.pricingCard.pro.customDomains": "Domenii personalizate", + "billing.pricingCard.pro.description": "Pentru agenศ›ii ศ™i startup-uri รฎn creศ™tere.", + "billing.pricingCard.pro.everythingFromStarter": "Totul รฎn Starter", + "billing.pricingCard.pro.includedSeats": "5 locuri incluse", + "billing.pricingCard.pro.mostPopularLabel": "Cel mai popular", + "billing.pricingCard.pro.whatsAppIntegration": "Integrare WhatsApp", + "billing.pricingCard.starter.brandingRemoved": "Branding eliminat", + "billing.pricingCard.starter.createFolders": "Creaศ›i foldere", + "billing.pricingCard.starter.description": "Pentru persoane fizice ศ™i รฎntreprinderi mici.", + "billing.pricingCard.starter.fileUploadBlock": "Bloc de intrare pentru รฎncฤƒrcarea fiศ™ierului", + "billing.pricingCard.starter.includedSeats": "2 locuri incluse", + "billing.pricingCard.upgradeButton.current": "Planul dvs. actual", + "billing.tiersModal.heading": "Tabelul de preศ›uri pentru chat", + "billing.updateSuccessToast.description": "Planul spaศ›iului de lucru {plan} a fost actualizat cu succes \uD83C\uDF89", + "billing.upgradeAlert.buttonDefaultLabel": "Mai multe informatii", + "billing.upgradeLimitLabel": "Trebuie sฤƒ vฤƒ actualizaศ›i planul pentru a {type}", + "billing.usage.chats.alert.soonReach": "Typebot-ii tฤƒi sunt populari! รŽn curรขnd vei atinge limita de chat-uri a planului tฤƒu. \uD83D\uDE80", + "billing.usage.chats.alert.updatePlan": "Asiguraศ›i-vฤƒ cฤƒ vฤƒ actualizaศ›i planul pentru a creศ™te aceastฤƒ limitฤƒ ศ™i continuaศ›i sฤƒ discutaศ›i cu utilizatorii dvs.", + "billing.usage.chats.heading": "Chat-uri", + "billing.usage.heading": "Utilizare", + "billing.usage.unlimited": "Nelimitat", + "blocks.bubbles.embed.blockCard.tooltip": "รŽncorporaศ›i un pdf, un iframe, un site web...", + "blocks.inputs.fileUpload.blockCard.tooltip": "รŽncฤƒrca fiศ™iere", + "blocks.integrations.googleAnalytics.blockCard.tooltip": "Google Analytics", + "blocks.integrations.googleSheets.blockCard.tooltip": "Foi de calcul Google", + "cancel": "Anulare", + "clickToEdit": "Faceศ›i clic pentru a edita...", + "confirmModal.defaultTitle": "Esti sigur?", + "dashboard.header.settingsButton.label": "Setฤƒri ศ™i membri", + "dashboard.redirectionMessage": "Sunteti redirectionat...", + "dashboard.title": "Typebot-ii mei", + "delete": "ศ˜terge", + "downgrade": "Degradeazฤƒ", + "editor.blockCard.logicBlock.tooltip.code.label": "Executaศ›i codul Javascript", + "editor.blockCard.logicBlock.tooltip.jump.label": "Avansaศ›i rapid fluxul cฤƒtre alt grup", + "editor.blockCard.logicBlock.tooltip.typebotLink.label": "Conectaศ›i-vฤƒ ศ™i sฤƒriศ›i la alt typebot", + "editor.blocks.bubbles.audio.settings.autoplay.label": "Activaศ›i redarea automatฤƒ", + "editor.blocks.bubbles.audio.settings.chooseFile.label": "Alegeศ›i un fiศ™ier", + "editor.blocks.bubbles.audio.settings.embedLink.label": "รŽncorporaศ›i linkul", + "editor.blocks.bubbles.audio.settings.upload.label": "รŽncฤƒrcaศ›i", + "editor.blocks.bubbles.audio.settings.worksWith.placeholder": "Lipiศ›i linkul fiศ™ierului audio...", + "editor.blocks.bubbles.audio.settings.worksWith.text": "Funcศ›ioneazฤƒ cu .MP3 ศ™i .WAV", + "editor.blocks.bubbles.embed.node.show.text": "Afiศ™aศ›i รฎncorporarea", + "editor.blocks.bubbles.embed.settings.numberInput.unit": "px", + "editor.blocks.bubbles.embed.settings.worksWith.placeholder": "Lipiศ›i linkul sau codul...", + "editor.blocks.bubbles.embed.settings.worksWith.text": "Funcศ›ioneazฤƒ cu PDF-uri, iframe, site-uri web...", + "editor.blocks.bubbles.image.switchWithLabel.onClick.label": "La clic pe link", + "editor.blocks.bubbles.image.switchWithLabel.onClick.placeholder": "Link alt text (descriere)", + "editor.blocks.bubbles.textEditor.plate.label": "Editor de text", + "editor.blocks.bubbles.textEditor.searchVariable.placeholder": "Cฤƒutaศ›i o variabilฤƒ", + "editor.blocks.start.text": "start", + "editor.editableTypebotName.tooltip.rename.label": "Redenumiศ›i", + "editor.gettingStartedModal.editorBasics.heading": "Elementele de bazฤƒ ale editorului", + "editor.gettingStartedModal.editorBasics.list.four.label": "Previzualizaศ›i botul dvs. fฤƒcรขnd clic pe butonul de previzualizare din dreapta sus", + "editor.gettingStartedModal.editorBasics.list.label": "Simศ›iศ›i-vฤƒ liber sฤƒ utilizaศ›i balonul din dreapta jos pentru a contacta dacฤƒ aveศ›i รฎntrebฤƒri. De obicei rฤƒspund รฎn urmฤƒtoarele 24 de ore. \uD83D\uDE03", + "editor.gettingStartedModal.editorBasics.list.one.label": "Bara din stรขnga conศ›ine blocuri pe care le puteศ›i trage ศ™i plasa pe panou.", + "editor.gettingStartedModal.editorBasics.list.three.label": "Conectaศ›i grupurile รฎmpreunฤƒ", + "editor.gettingStartedModal.editorBasics.list.two.label": "Puteศ›i grupa blocuri, aruncรขndu-le unul sub celฤƒlalt sau deasupra celuilalt", + "editor.gettingStartedModal.seeAction.item.label": "Alte videoclipuri", + "editor.gettingStartedModal.seeAction.label": "Vedeศ›i-l รฎn acศ›iune", + "editor.gettingStartedModal.seeAction.time": "5 minute", + "editor.headers.flowButton.label": "curgere", + "editor.headers.helpButton.label": "Ajutor", + "editor.headers.previewButton.label": "previzualizare", + "editor.headers.resultsButton.label": "Rezultate", + "editor.headers.savingSpinner.label": "Salvare...", + "editor.headers.settingsButton.label": "Setฤƒri", + "editor.headers.shareButton.label": "Acศ›iune", + "editor.headers.themeButton.label": "Temฤƒ", + "editor.sidebarBlock.abTest.label": "Testul AB", + "editor.sidebarBlock.analytics.label": "Analitica", + "editor.sidebarBlock.audio.label": "Audio", + "editor.sidebarBlock.button.label": "Butoane", + "editor.sidebarBlock.chatwoot.label": "Chatwoot", + "editor.sidebarBlock.condition.label": "Condiศ›ie", + "editor.sidebarBlock.date.label": "Data", + "editor.sidebarBlock.email.label": "E-mail", + "editor.sidebarBlock.embed.label": "รŽncorporare", + "editor.sidebarBlock.file.label": "FiลŸier", + "editor.sidebarBlock.image.label": "Imagine", + "editor.sidebarBlock.jump.label": "Sari", + "editor.sidebarBlock.makecom.label": "Make.com", + "editor.sidebarBlock.number.label": "Numฤƒr", + "editor.sidebarBlock.openai.label": "OpenAI", + "editor.sidebarBlock.pabbly.label": "Pabbly", + "editor.sidebarBlock.payment.label": "Platฤƒ", + "editor.sidebarBlock.phone.label": "Telefon", + "editor.sidebarBlock.picChoice.label": "Alegerea poza", + "editor.sidebarBlock.pixel.label": "Pixel", + "editor.sidebarBlock.rating.label": "Evaluare", + "editor.sidebarBlock.redirect.label": "Redirecลฃiona", + "editor.sidebarBlock.script.label": "Scenariul", + "editor.sidebarBlock.setVariable.label": "Setaศ›i variabila", + "editor.sidebarBlock.sheets.label": "Foi", + "editor.sidebarBlock.start.label": "Start", + "editor.sidebarBlock.text.label": "Text", + "editor.sidebarBlock.typebot.label": "Typebot", + "editor.sidebarBlock.video.label": "Video", + "editor.sidebarBlock.wait.label": "Aศ™teaptฤƒ", + "editor.sidebarBlock.webhook.label": "Webhook", + "editor.sidebarBlock.website.label": "Site-ul web", + "editor.sidebarBlock.zapier.label": "Zapier", + "editor.sidebarBlock.zemanticAi.label": "Zemantic AI", + "editor.sidebarBlocks.blockType.bubbles.heading": "Bule", + "editor.sidebarBlocks.blockType.inputs.heading": "Intrฤƒri", + "editor.sidebarBlocks.blockType.integrations.heading": "Integrari", + "editor.sidebarBlocks.blockType.logic.heading": "Logicฤƒ", + "editor.sidebarBlocks.sidebar.icon.lock.label": "Blocaศ›i", + "editor.sidebarBlocks.sidebar.icon.unlock.label": "Deblocaศ›i", + "editor.sidebarBlocks.sidebar.lock.label": "Blocaศ›i bara lateralฤƒ", + "editor.sidebarBlocks.sidebar.unlock.label": "Deblocaศ›i bara lateralฤƒ", + "errorMessage": "A aparut o eroare", + "folders.createFolderButton.label": "Creaศ›i un folder", + "folders.createTypebotButton.label": "Creaศ›i un typebot", + "folders.folderButton.deleteConfirmationMessage": "Sigur doriศ›i sฤƒ ศ™tergeศ›i dosarul folderName? (Totul din interior va fi mutat รฎn tabloul de bord)", + "folders.typebotButton.delete": "ศ˜terge", + "folders.typebotButton.deleteConfirmationMessage": "Sigur doriศ›i sฤƒ ศ™tergeศ›i typebotName de typebot?", + "folders.typebotButton.deleteConfirmationMessageWarning": "Toate datele asociate acesteia vor fi ศ™terse ศ™i nu vor fi recuperate.", + "folders.typebotButton.duplicate": "Duplicat", + "folders.typebotButton.live": "Trฤƒi", + "folders.typebotButton.showMoreOptions": "Afiศ™aศ›i mai multe opศ›iuni", + "folders.typebotButton.unpublish": "Anulaศ›i publicarea", + "pending": "In asteptarea", + "remove": "Elimina", + "skip": "Ocolire", + "templates.buttons.fromScratchButton.label": "รŽncepe de la zero", + "templates.buttons.fromTemplateButton.label": "รŽncepeศ›i de la un ศ™ablon", + "templates.buttons.heading": "Creaศ›i un nou typebot", + "templates.buttons.importFileButton.label": "Importaศ›i un fiศ™ier", + "templates.importFromFileButon.toastError.description": "Nu s-a putut analiza fiศ™ierul. Eศ™ti sigur cฤƒ este un typebot?", + "templates.modal.menuHeading.marketing": "Marketing", + "templates.modal.menuHeading.new.tag": "Nou", + "templates.modal.menuHeading.other": "Alte", + "templates.modal.menuHeading.product": "Produs", + "templates.modal.useTemplateButton.label": "Utilizaศ›i acest ศ™ablon", + "upgrade": "Actualizare", + "video.aspectRatioInput.label": "Raportul de aspect", + "video.aspectRatioInput.moreInfoTooltip": "Exemplu: โ€ž16/9โ€ sau โ€ž9/16โ€", + "video.maxWidthInput.label": "lฤƒศ›imea maximฤƒ", + "video.maxWidthInput.moreInfoTooltip": "Exemplu: โ€ž300pxโ€ sau โ€ž100%โ€", + "video.urlInput.helperText": "Funcศ›ioneazฤƒ cu Youtube, Vimeo, Gumlet, TikTok ศ™i altele", + "video.urlInput.placeholder": "Lipiศ›i linkul video...", + "workspace.dropdown.logoutButton.label": "Deconectaศ›i-vฤƒ", + "workspace.dropdown.newButton.label": "Nou spaศ›iu de lucru", + "workspace.membersList.inviteButton.label": "A invita", + "workspace.membersList.inviteInput.placeholder": "colega@company.com", + "workspace.membersList.title": "Membrii", + "workspace.membersList.unlockBanner.label": "Actualizaศ›i-vฤƒ planul pentru a lucra cu mai mulศ›i membri ai echipei ศ™i deblocaศ›i funcศ›ii extraordinare de putere \uD83D\uDE80", + "workspace.settings.deleteButton.confirmMessage": "Sigur doriศ›i sฤƒ ศ™tergeศ›i spaศ›iul de lucru {workspaceName}? Toate folderele, tiproboศ›ii ศ™i rezultatele sale vor fi ศ™terse pentru totdeauna.", + "workspace.settings.deleteButton.label": "ศ˜terge spaศ›iul de lucru", + "workspace.settings.icon.title": "Pictogramฤƒ", + "workspace.settings.modal.menu.billingAndUsage.label": "Facturare ศ™i utilizare", + "workspace.settings.modal.menu.members.label": "Membrii", + "workspace.settings.modal.menu.myAccount.label": "Contul meu", + "workspace.settings.modal.menu.preferences.label": "Preferinศ›e", + "workspace.settings.modal.menu.settings.label": "Setฤƒri", + "workspace.settings.modal.menu.version.label": "Versiune: {version}", + "workspace.settings.modal.menu.workspace.label": "Spaศ›iul de lucru", + "workspace.settings.name.label": "Nume:" +} diff --git a/apps/builder/public/templates/audio-chat-gpt.json b/apps/builder/public/templates/audio-chat-gpt.json new file mode 100644 index 0000000000..189b91a8e3 --- /dev/null +++ b/apps/builder/public/templates/audio-chat-gpt.json @@ -0,0 +1,206 @@ +{ + "version": "6", + "id": "clp6onbn200011ab379x5gnea", + "name": "Audio ChatGPT", + "icon": "๐Ÿ”ˆ", + "events": [ + { + "id": "ewnfbo0exlu7ihfu2lu2lusm", + "outgoingEdgeId": "knz1ln1so0dfyth76qjkjn1p", + "graphCoordinates": { "x": -228.25, "y": -123.31 }, + "type": "start" + } + ], + "groups": [ + { + "id": "qfrz5nwm63g12dajsjxothb5", + "title": "User input", + "graphCoordinates": { "x": 105.17, "y": -56.29 }, + "blocks": [ + { + "id": "ovgk70u0kfxrbtz9dy4e040o", + "type": "text input", + "options": { "variableId": "vudksu3zyrat6s1bq6qne0rx3" } + }, + { + "id": "m4jadtknjb3za3gvxj1xdn1k", + "outgoingEdgeId": "fpj0xacppqd1s5slyljzhzc9", + "type": "Set variable", + "options": { + "variableId": "vabkycu0qqff5d6ar2ama16pf", + "type": "Append value(s)", + "item": "{{User Message}}" + } + } + ] + }, + { + "id": "a6ymhjwtkqwp8t127plz8qmk", + "title": "ChatGPT reply", + "graphCoordinates": { "x": 445.12, "y": -56.2 }, + "blocks": [ + { + "id": "xikptnw1lp1qxdqo10qhmwy1", + "type": "OpenAI", + "options": { + "task": "Create chat completion", + "model": "gpt-3.5-turbo", + "messages": [ + { + "id": "wsdxha9db58gk2v9n1j10m7c", + "role": "Dialogue", + "dialogueVariableId": "vabkycu0qqff5d6ar2ama16pf", + "startsBy": "user" + } + ], + "responseMapping": [ + { + "id": "p8ksqi2jhyzid2od3dikv299", + "valueToExtract": "Message content", + "variableId": "vni6kwbch8zlq92dclgcivzyr" + } + ], + "credentialsId": "clp6ooc3700031ab30yof27jm" + } + }, + { + "id": "yblc864bzipaqfja7b2o3oo0", + "type": "Set variable", + "options": { + "variableId": "vabkycu0qqff5d6ar2ama16pf", + "type": "Append value(s)", + "item": "{{Assistant Message}}" + } + }, + { + "id": "prsimdxdol42ty2parzgx8am", + "type": "OpenAI", + "options": { + "credentialsId": "clp6ooc3700031ab30yof27jm", + "task": "Create speech", + "model": "tts-1", + "input": "{{Assistant Message}}", + "voice": "alloy", + "saveUrlInVariableId": "vgr0iwg95npp7pztkmdyn89m1" + } + }, + { + "id": "f6onszqys2tx7pw3tshb2vcy", + "outgoingEdgeId": "dw9jclv60i040saiikj3a386", + "type": "audio", + "content": { "url": "{{Assistant audio message}}" } + } + ] + }, + { + "id": "c5f00f3oclwi1srcz10jjt9u", + "title": "Intro", + "graphCoordinates": { "x": -222.61, "y": -54.39 }, + "blocks": [ + { + "id": "dp5gx25j73fgmcj9582ydik9", + "type": "OpenAI", + "options": { + "credentialsId": "clp6ooc3700031ab30yof27jm", + "task": "Create speech", + "model": "tts-1", + "input": "Hi there! How can I help?", + "voice": "alloy", + "saveUrlInVariableId": "vxw4quja426402hvhtm33tsp3" + } + }, + { + "id": "dmab8kc35uh84vvw1a53xbjn", + "outgoingEdgeId": "xnao10ucc1hbynv3pmk1t4by", + "type": "audio", + "content": { "url": "{{Welcome audio}}" } + } + ] + }, + { + "id": "yswu9fml4zflxaqlujb94ir8", + "title": "", + "graphCoordinates": { "x": 19.51, "y": -338.93 }, + "blocks": [ + { + "id": "okm2zz32zn8b60u1vkfrv9ca", + "type": "text", + "content": { + "richText": [ + { + "type": "p", + "children": [ + { + "text": "You need to add your OpenAI credentials to make this bot work. ๐Ÿช„" + } + ] + } + ] + } + }, + { + "id": "m5a1d0vhsrpyvvvyj89awxzc", + "type": "text", + "content": { + "richText": [ + { + "type": "p", + "children": [ + { + "text": "Once it's done, delete this group and connect the " + }, + { "text": "Start", "bold": true }, + { "text": " event with " }, + { "text": "Intro", "bold": true }, + { "text": " ๐Ÿš€\n" } + ] + } + ] + } + } + ] + } + ], + "edges": [ + { + "id": "fpj0xacppqd1s5slyljzhzc9", + "from": { "blockId": "m4jadtknjb3za3gvxj1xdn1k" }, + "to": { "groupId": "a6ymhjwtkqwp8t127plz8qmk" } + }, + { + "id": "xnao10ucc1hbynv3pmk1t4by", + "from": { "blockId": "dmab8kc35uh84vvw1a53xbjn" }, + "to": { "groupId": "qfrz5nwm63g12dajsjxothb5" } + }, + { + "id": "dw9jclv60i040saiikj3a386", + "from": { "blockId": "f6onszqys2tx7pw3tshb2vcy" }, + "to": { "groupId": "qfrz5nwm63g12dajsjxothb5" } + }, + { + "from": { "eventId": "ewnfbo0exlu7ihfu2lu2lusm" }, + "to": { "groupId": "yswu9fml4zflxaqlujb94ir8" }, + "id": "knz1ln1so0dfyth76qjkjn1p" + } + ], + "variables": [ + { "id": "vni6kwbch8zlq92dclgcivzyr", "name": "Assistant Message" }, + { "id": "vudksu3zyrat6s1bq6qne0rx3", "name": "User Message" }, + { "id": "vabkycu0qqff5d6ar2ama16pf", "name": "Chat history" }, + { "id": "vxw4quja426402hvhtm33tsp3", "name": "Welcome audio" }, + { "id": "vgr0iwg95npp7pztkmdyn89m1", "name": "Assistant audio message" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-20T09:06:40.430Z", + "updatedAt": "2023-11-20T09:20:01.662Z", + "folderId": null, + "publicId": null, + "customDomain": null, + "workspaceId": "freeWorkspace", + "resultsTablePreferences": null, + "isArchived": false, + "isClosed": false, + "whatsAppCredentialsId": null +} diff --git a/apps/builder/public/templates/basic-chat-gpt.json b/apps/builder/public/templates/basic-chat-gpt.json index c62b1bbb8b..dbd8a4a1ff 100644 --- a/apps/builder/public/templates/basic-chat-gpt.json +++ b/apps/builder/public/templates/basic-chat-gpt.json @@ -1,242 +1,214 @@ { - "id": "clf6ov7hg00001ao6q02sb8re", - "version": "4", - "createdAt": "2023-03-13T10:35:44.933Z", - "updatedAt": "2023-03-13T14:53:00.817Z", - "icon": "๐Ÿค–", + "version": "6", + "id": "clofz4jhf00071a5pjlh8ruwr", "name": "Basic ChatGPT", - "folderId": null, - "groups": [ + "events": [ { "id": "ewnfbo0exlu7ihfu2lu2lusm", - "title": "Start", + "outgoingEdgeId": "q25yjqccpjv3i1tclgv1x941", + "graphCoordinates": { "x": -228.25, "y": -123.31 }, + "type": "start" + } + ], + "groups": [ + { + "id": "t3tv4dm3khwmiotjle5jb65g", + "title": "", + "graphCoordinates": { "x": 10.94, "y": -121.96 }, "blocks": [ { - "id": "igbipfi63m6p9sl2f77uicuv", - "type": "start", - "label": "Start", - "groupId": "ewnfbo0exlu7ihfu2lu2lusm", - "outgoingEdgeId": "sevwpre8fo896btd6xm1e1dv" + "id": "s6eky7dd3md9hto9y4wsuj7h", + "groupId": "t3tv4dm3khwmiotjle5jb65g", + "type": "text", + "content": { + "richText": [ + { + "type": "p", + "children": [ + { + "text": "You need to add your OpenAI credentials to make this bot work. ๐Ÿช„" + } + ] + } + ] + } + }, + { + "id": "nqsu9f13q5j8tt56bcbuto62", + "groupId": "t3tv4dm3khwmiotjle5jb65g", + "type": "text", + "content": { + "richText": [ + { + "type": "p", + "children": [ + { + "text": "Once it's done, delete this group and connect the " + }, + { "bold": true, "text": "Start" }, + { "text": " event with " }, + { "bold": true, "text": "Intro" }, + { "text": " ๐Ÿš€" } + ] + } + ] + } } - ], - "graphCoordinates": { "x": -20.9296875, "y": -125.6796875 } + ] }, { "id": "qfrz5nwm63g12dajsjxothb5", "title": "User input", + "graphCoordinates": { "x": 198.64, "y": 179.04 }, "blocks": [ { "id": "ovgk70u0kfxrbtz9dy4e040o", + "groupId": "qfrz5nwm63g12dajsjxothb5", "type": "text input", + "options": { "variableId": "vudksu3zyrat6s1bq6qne0rx3" } + }, + { + "id": "m4jadtknjb3za3gvxj1xdn1k", "groupId": "qfrz5nwm63g12dajsjxothb5", + "outgoingEdgeId": "fpj0xacppqd1s5slyljzhzc9", + "type": "Set variable", "options": { - "isLong": true, - "labels": { - "button": "Send", - "placeholder": "Type your answer..." - }, - "variableId": "vevnx5f5bojz0sv648x6ppcmv", - "isPrefillDisabled": true - }, - "outgoingEdgeId": "kwm65fnel1gddbwdki9rq76v" + "variableId": "vabkycu0qqff5d6ar2ama16pf", + "type": "Append value(s)", + "item": "{{User Message}}" + } } - ], - "graphCoordinates": { "x": 385.59765625, "y": 176 } + ] }, { "id": "a6ymhjwtkqwp8t127plz8qmk", "title": "ChatGPT reply", + "graphCoordinates": { "x": 624.57, "y": 200.09 }, "blocks": [ { "id": "xikptnw1lp1qxdqo10qhmwy1", - "type": "OpenAI", "groupId": "a6ymhjwtkqwp8t127plz8qmk", + "type": "OpenAI", "options": { "task": "Create chat completion", "model": "gpt-3.5-turbo", "messages": [ { - "id": "vexqydoltfc5fkdrcednlvjz", - "role": "Messages sequence โœจ", - "content": { - "userMessagesVariableId": "vevnx5f5bojz0sv648x6ppcmv", - "assistantMessagesVariableId": "vni6kwbch8zlq92dclgcivzyr" - } + "id": "wsdxha9db58gk2v9n1j10m7c", + "role": "Dialogue", + "dialogueVariableId": "vabkycu0qqff5d6ar2ama16pf", + "startsBy": "user" } ], "responseMapping": [ { - "id": "brb5ccisi1tjiqf3ng0asaiq", - "variableId": "vni6kwbch8zlq92dclgcivzyr", - "valueToExtract": "Message content" + "id": "p8ksqi2jhyzid2od3dikv299", + "valueToExtract": "Message content", + "variableId": "vni6kwbch8zlq92dclgcivzyr" } - ] + ], + "credentialsId": "clocxtxlc00031an2uc59hdpb" + } + }, + { + "id": "yblc864bzipaqfja7b2o3oo0", + "groupId": "a6ymhjwtkqwp8t127plz8qmk", + "type": "Set variable", + "options": { + "variableId": "vabkycu0qqff5d6ar2ama16pf", + "type": "Append value(s)", + "item": "{{Assistant Message}}" } }, { "id": "myldn1l1nfdwwm8qvza71rwv", + "groupId": "a6ymhjwtkqwp8t127plz8qmk", + "outgoingEdgeId": "y8ml9ljnsydol9b42fd9zdve", "type": "text", "content": { "richText": [ - { - "type": "p", - "children": [{ "text": "{{Assistant Messages}}" }] - } + { "type": "p", "children": [{ "text": "{{Assistant Message}}" }] } ] - }, - "groupId": "a6ymhjwtkqwp8t127plz8qmk", - "outgoingEdgeId": "y8ml9ljnsydol9b42fd9zdve" + } } - ], - "graphCoordinates": { "x": 744.05078125, "y": 178.00390625 } + ] }, { "id": "c5f00f3oclwi1srcz10jjt9u", "title": "Intro", + "graphCoordinates": { "x": -183.19, "y": 156.03 }, "blocks": [ { "id": "vzcrfk4vl9gy8igu0ysja5nc", + "groupId": "c5f00f3oclwi1srcz10jjt9u", "type": "text", "content": { "richText": [ { "type": "p", "children": [{ "text": "Hi there ๐Ÿ‘‹" }] } ] - }, - "groupId": "c5f00f3oclwi1srcz10jjt9u" + } }, { "id": "gphm5wy1md9cunwkdtbzg6nq", - "type": "text", - "content": { - "richText": [ - { "type": "p", "children": [{ "text": "How can I help?" }] } - ] - }, "groupId": "c5f00f3oclwi1srcz10jjt9u", - "outgoingEdgeId": "h5sk58j0ryrxmfv4gmw7r4dw" - } - ], - "graphCoordinates": { "x": 54.7421875, "y": 172.83203125 } - }, - { - "id": "t3tv4dm3khwmiotjle5jb65g", - "title": "", - "blocks": [ - { - "id": "s6eky7dd3md9hto9y4wsuj7h", + "outgoingEdgeId": "h5sk58j0ryrxmfv4gmw7r4dw", "type": "text", "content": { "richText": [ - { - "type": "p", - "children": [ - { - "text": "You need to add your OpenAI credentials to make this bot work. ๐Ÿช„" - } - ] - } - ] - }, - "groupId": "t3tv4dm3khwmiotjle5jb65g" - }, - { - "id": "nqsu9f13q5j8tt56bcbuto62", - "type": "text", - "content": { - "richText": [ - { - "type": "p", - "children": [ - { - "text": "Once it's done, delete this group and connect the " - }, - { "bold": true, "text": "Start" }, - { "text": " block with " }, - { "bold": true, "text": "Intro" }, - { "text": " ๐Ÿš€" } - ] - } + { "type": "p", "children": [{ "text": "How can I help?" }] } ] - }, - "groupId": "t3tv4dm3khwmiotjle5jb65g" + } } - ], - "graphCoordinates": { "x": 321.13671875, "y": -121.90234375 } + ] } ], - "variables": [ - { "id": "vni6kwbch8zlq92dclgcivzyr", "name": "Assistant Messages" }, - { "id": "vevnx5f5bojz0sv648x6ppcmv", "name": "User Messages" } - ], "edges": [ { "id": "h5sk58j0ryrxmfv4gmw7r4dw", - "to": { "groupId": "qfrz5nwm63g12dajsjxothb5" }, "from": { - "blockId": "gphm5wy1md9cunwkdtbzg6nq", - "groupId": "c5f00f3oclwi1srcz10jjt9u" - } + "groupId": "c5f00f3oclwi1srcz10jjt9u", + "blockId": "gphm5wy1md9cunwkdtbzg6nq" + }, + "to": { "groupId": "qfrz5nwm63g12dajsjxothb5" } }, { - "id": "kwm65fnel1gddbwdki9rq76v", - "to": { "groupId": "a6ymhjwtkqwp8t127plz8qmk" }, + "id": "y8ml9ljnsydol9b42fd9zdve", "from": { - "blockId": "ovgk70u0kfxrbtz9dy4e040o", - "groupId": "qfrz5nwm63g12dajsjxothb5" - } + "groupId": "a6ymhjwtkqwp8t127plz8qmk", + "blockId": "myldn1l1nfdwwm8qvza71rwv" + }, + "to": { "groupId": "qfrz5nwm63g12dajsjxothb5" } }, { - "id": "y8ml9ljnsydol9b42fd9zdve", - "to": { "groupId": "qfrz5nwm63g12dajsjxothb5" }, + "id": "fpj0xacppqd1s5slyljzhzc9", "from": { - "blockId": "myldn1l1nfdwwm8qvza71rwv", - "groupId": "a6ymhjwtkqwp8t127plz8qmk" - } + "groupId": "qfrz5nwm63g12dajsjxothb5", + "blockId": "m4jadtknjb3za3gvxj1xdn1k" + }, + "to": { "groupId": "a6ymhjwtkqwp8t127plz8qmk" } }, { - "id": "sevwpre8fo896btd6xm1e1dv", + "from": { "eventId": "ewnfbo0exlu7ihfu2lu2lusm" }, "to": { "groupId": "t3tv4dm3khwmiotjle5jb65g" }, - "from": { - "blockId": "igbipfi63m6p9sl2f77uicuv", - "groupId": "ewnfbo0exlu7ihfu2lu2lusm" - } + "id": "q25yjqccpjv3i1tclgv1x941" } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": 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 } - }, + "variables": [ + { "id": "vni6kwbch8zlq92dclgcivzyr", "name": "Assistant Message" }, + { "id": "vudksu3zyrat6s1bq6qne0rx3", "name": "User Message" }, + { "id": "vabkycu0qqff5d6ar2ama16pf", "name": "Chat history" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": { "general": {} }, + "createdAt": "2023-11-01T16:30:13.155Z", + "updatedAt": "2023-11-01T16:30:13.155Z", + "icon": "๐Ÿค–", + "folderId": null, "publicId": null, "customDomain": null, - "workspaceId": "freeWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/chat-gpt-personas.json b/apps/builder/public/templates/chat-gpt-personas.json index bff9befaf8..fbc9005566 100644 --- a/apps/builder/public/templates/chat-gpt-personas.json +++ b/apps/builder/public/templates/chat-gpt-personas.json @@ -1,29 +1,20 @@ { - "id": "qcueq3ttys1ddagic7jsimp4", - "version": "4", - "createdAt": "2023-03-30T15:45:12.464Z", - "updatedAt": "2023-03-30T15:45:12.464Z", - "icon": "๐ŸŽญ", + "version": "6", + "id": "cloi9k6tf00051aqji6vk88pq", "name": "ChatGPT personas", - "folderId": null, - "groups": [ + "events": [ { "id": "w99qhdr20tw02sfrfwkfc1tg", - "title": "Start", - "blocks": [ - { - "id": "igbipfi63m6p9sl2f77uicuv", - "type": "start", - "label": "Start", - "groupId": "w99qhdr20tw02sfrfwkfc1tg", - "outgoingEdgeId": "x91dpk80zw2b4co4xra33cwg" - } - ], - "graphCoordinates": { "x": -61.95703125, "y": -242.94140625 } - }, + "outgoingEdgeId": "c3733n7ia1hxcwld9lm3p351", + "graphCoordinates": { "x": -95.29, "y": -267.02 }, + "type": "start" + } + ], + "groups": [ { "id": "bofjp88arodr4k0btv2esyqy", "title": "", + "graphCoordinates": { "x": 188.44, "y": -308.74 }, "blocks": [ { "id": "s6eky7dd3md9hto9y4wsuj7h", @@ -39,8 +30,7 @@ ] } ] - }, - "groupId": "bofjp88arodr4k0btv2esyqy" + } }, { "id": "nqsu9f13q5j8tt56bcbuto62", @@ -60,20 +50,18 @@ ] } ] - }, - "groupId": "bofjp88arodr4k0btv2esyqy" + } } - ], - "graphCoordinates": { "x": 303.5859375, "y": -278.4921875 } + ] }, { "id": "dmg57mgick51p8l5pnyqtyf9", "title": "Explainer AI reply", + "graphCoordinates": { "x": 1053.297810684862, "y": 919.9658659364646 }, "blocks": [ { "id": "xikptnw1lp1qxdqo10qhmwy1", "type": "OpenAI", - "groupId": "dmg57mgick51p8l5pnyqtyf9", "options": { "task": "Create chat completion", "model": "gpt-3.5-turbo", @@ -85,34 +73,36 @@ }, { "id": "i8i226uylkh84ovtpguaqc83", - "role": "Messages sequence โœจ", - "content": { - "userMessagesVariableId": "vevnx5f5bojz0sv648x6ppcmv", - "assistantMessagesVariableId": "vni6kwbch8zlq92dclgcivzyr" - } + "role": "Dialogue", + "dialogueVariableId": "vu9adij5penetej2xz89htfe6" } ], "responseMapping": [ { "id": "brb5ccisi1tjiqf3ng0asaiq", - "variableId": "vni6kwbch8zlq92dclgcivzyr", - "valueToExtract": "Message content" + "valueToExtract": "Message content", + "variableId": "vni6kwbch8zlq92dclgcivzyr" } ] } }, + { + "id": "kftq9x1wnrcefzc268ydmqkn", + "type": "Set variable", + "options": { + "variableId": "vu9adij5penetej2xz89htfe6", + "type": "Append value(s)", + "item": "{{Assistant Message}}" + } + }, { "id": "myldn1l1nfdwwm8qvza71rwv", "type": "text", "content": { "richText": [ - { - "type": "p", - "children": [{ "text": "{{Assistant Messages}}" }] - } + { "type": "p", "children": [{ "text": "{{Assistant Message}}" }] } ] - }, - "groupId": "dmg57mgick51p8l5pnyqtyf9" + } }, { "id": "jz9mklagfikyukzs7n3kmlcf", @@ -120,33 +110,28 @@ "items": [ { "id": "x18iwzwmbzi9jjpnwij1861i", - "type": 0, - "blockId": "jz9mklagfikyukzs7n3kmlcf", - "content": "Continue", - "outgoingEdgeId": "mxl8lftsj3pbmj4g24ymxajo" + "outgoingEdgeId": "mxl8lftsj3pbmj4g24ymxajo", + "type": "button", + "content": "Continue" }, { "id": "imx7otsonvm0takr02b4ulyo", - "type": 0, - "blockId": "jz9mklagfikyukzs7n3kmlcf", - "content": "Menu", - "outgoingEdgeId": "ny44r5sp69gne7obgshidhph" + "outgoingEdgeId": "ny44r5sp69gne7obgshidhph", + "type": "button", + "content": "Menu" } - ], - "groupId": "dmg57mgick51p8l5pnyqtyf9", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] } - ], - "graphCoordinates": { "x": 1053.2978106848623, "y": 919.9658659364646 } + ] }, { "id": "fj5z2nx488htv0843kq6qeyk", "title": "Professor AI reply", + "graphCoordinates": { "x": 1040.86, "y": -128.46 }, "blocks": [ { "id": "f2r11ibqq2ufrahfcl3gf6qi", "type": "OpenAI", - "groupId": "fj5z2nx488htv0843kq6qeyk", "options": { "task": "Create chat completion", "model": "gpt-3.5-turbo", @@ -158,34 +143,36 @@ }, { "id": "biqljpsbqfkgno4m80s4j5p0", - "role": "Messages sequence โœจ", - "content": { - "userMessagesVariableId": "vevnx5f5bojz0sv648x6ppcmv", - "assistantMessagesVariableId": "vni6kwbch8zlq92dclgcivzyr" - } + "role": "Dialogue", + "dialogueVariableId": "vu9adij5penetej2xz89htfe6" } ], "responseMapping": [ { "id": "brb5ccisi1tjiqf3ng0asaiq", - "variableId": "vni6kwbch8zlq92dclgcivzyr", - "valueToExtract": "Message content" + "valueToExtract": "Message content", + "variableId": "vni6kwbch8zlq92dclgcivzyr" } ] } }, + { + "id": "dyfigmu4095x8p99qe461zbh", + "type": "Set variable", + "options": { + "variableId": "vu9adij5penetej2xz89htfe6", + "type": "Append value(s)", + "item": "{{Assistant Message}}" + } + }, { "id": "sei88rrjcmpgm3vhxjvkofyt", "type": "text", "content": { "richText": [ - { - "type": "p", - "children": [{ "text": "{{Assistant Messages}}" }] - } + { "type": "p", "children": [{ "text": "{{Assistant Message}}" }] } ] - }, - "groupId": "fj5z2nx488htv0843kq6qeyk" + } }, { "id": "h3qetbhcpxhawnqoymo0v3hw", @@ -193,33 +180,28 @@ "items": [ { "id": "zaylo8bstqx0wp6bpdbd1rak", - "type": 0, - "blockId": "h3qetbhcpxhawnqoymo0v3hw", - "content": "Continue", - "outgoingEdgeId": "q6o0cbyzxtvgls3jtz7rpdgw" + "outgoingEdgeId": "q6o0cbyzxtvgls3jtz7rpdgw", + "type": "button", + "content": "Continue" }, { "id": "d5jv3sjpzobsrnhcp055mxkv", - "type": 0, - "blockId": "h3qetbhcpxhawnqoymo0v3hw", - "content": "Back to menu", - "outgoingEdgeId": "xjv7pkpgpwh169448t8pepg4" + "outgoingEdgeId": "xjv7pkpgpwh169448t8pepg4", + "type": "button", + "content": "Back to menu" } - ], - "groupId": "fj5z2nx488htv0843kq6qeyk", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] } - ], - "graphCoordinates": { "x": 1047.7979125005486, "y": 4.6530793670072885 } + ] }, { "id": "csbysu8dr08zxr4i6hzvzjdf", "title": "Copywriter AI reply", + "graphCoordinates": { "x": 1044.25, "y": 372.87 }, "blocks": [ { "id": "h2t5vbir3zh8eku55ozwb1du", "type": "OpenAI", - "groupId": "csbysu8dr08zxr4i6hzvzjdf", "options": { "task": "Create chat completion", "model": "gpt-3.5-turbo", @@ -231,34 +213,36 @@ }, { "id": "ynbhlcbsmy24pobiay9zezli", - "role": "Messages sequence โœจ", - "content": { - "userMessagesVariableId": "vevnx5f5bojz0sv648x6ppcmv", - "assistantMessagesVariableId": "vni6kwbch8zlq92dclgcivzyr" - } + "role": "Dialogue", + "dialogueVariableId": "vu9adij5penetej2xz89htfe6" } ], "responseMapping": [ { "id": "brb5ccisi1tjiqf3ng0asaiq", - "variableId": "vni6kwbch8zlq92dclgcivzyr", - "valueToExtract": "Message content" + "valueToExtract": "Message content", + "variableId": "vni6kwbch8zlq92dclgcivzyr" } ] } }, + { + "id": "usolgxcte60rin18ccygzbdu", + "type": "Set variable", + "options": { + "variableId": "vu9adij5penetej2xz89htfe6", + "type": "Append value(s)", + "item": "{{Assistant Message}}" + } + }, { "id": "h96lile0evtqa0jx24gmfo25", "type": "text", "content": { "richText": [ - { - "type": "p", - "children": [{ "text": "{{Assistant Messages}}" }] - } + { "type": "p", "children": [{ "text": "{{Assistant Message}}" }] } ] - }, - "groupId": "csbysu8dr08zxr4i6hzvzjdf" + } }, { "id": "u4jdl0gwv8965o2etxjk12w0", @@ -266,29 +250,33 @@ "items": [ { "id": "b6zif4xxe2cuiddc2oqayaxi", - "type": 0, - "blockId": "u4jdl0gwv8965o2etxjk12w0", - "content": "Continue", - "outgoingEdgeId": "jwydpoxngp2gvwanaruphe6s" + "outgoingEdgeId": "jwydpoxngp2gvwanaruphe6s", + "type": "button", + "content": "Continue" }, { "id": "ooib3mqlfkazta6iol1ocloe", - "type": 0, - "blockId": "u4jdl0gwv8965o2etxjk12w0", - "content": "Back to menu", - "outgoingEdgeId": "gfrpgowch879p1qaj9jzsh01" + "outgoingEdgeId": "gfrpgowch879p1qaj9jzsh01", + "type": "button", + "content": "Back to menu" } - ], - "groupId": "csbysu8dr08zxr4i6hzvzjdf", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] } - ], - "graphCoordinates": { "x": 1049.2780591838002, "y": 458.6633630669161 } + ] }, { "id": "u6nm47oyneidmsebszp60t0m", "title": "Menu", + "graphCoordinates": { "x": -6.082566623728974, "y": 37.78518756228981 }, "blocks": [ + { + "id": "rzlhl61q6dmh8n93usvqgyij", + "type": "Set variable", + "options": { + "variableId": "vu9adij5penetej2xz89htfe6", + "type": "Empty" + } + }, { "id": "gphm5wy1md9cunwkdtbzg6nq", "type": "text", @@ -299,20 +287,7 @@ "children": [{ "text": "Who would you want to talk to?" }] } ] - }, - "groupId": "u6nm47oyneidmsebszp60t0m" - }, - { - "id": "yodc4upemgfx55m919mdz694", - "type": "Set variable", - "groupId": "u6nm47oyneidmsebszp60t0m", - "options": { "variableId": "vevnx5f5bojz0sv648x6ppcmv" } - }, - { - "id": "rzlhl61q6dmh8n93usvqgyij", - "type": "Set variable", - "groupId": "u6nm47oyneidmsebszp60t0m", - "options": { "variableId": "vni6kwbch8zlq92dclgcivzyr" } + } }, { "id": "ohh19koa7up0nbke3146hnjp", @@ -320,104 +295,91 @@ "items": [ { "id": "rn0lqz1wvsg9lmc0jcl6ps8j", - "type": 0, - "blockId": "ohh19koa7up0nbke3146hnjp", - "content": "English professor", - "outgoingEdgeId": "ry7l8wcaidxw5izm7zoy83kj" + "outgoingEdgeId": "ry7l8wcaidxw5izm7zoy83kj", + "type": "button", + "content": "English professor" }, { "id": "le84cls9vkmrxquvqw8bhp7h", - "type": 0, - "blockId": "ohh19koa7up0nbke3146hnjp", - "content": "Copywriter", - "outgoingEdgeId": "iy2htkuup0l908fsosg6d2qz" + "outgoingEdgeId": "iy2htkuup0l908fsosg6d2qz", + "type": "button", + "content": "Copywriter" }, { "id": "mx4kgfgena53mxf87piwu1j2", - "type": 0, - "blockId": "ohh19koa7up0nbke3146hnjp", - "content": "Concept explainer", - "outgoingEdgeId": "kmex71jzzzekni4louuy3xbf" + "outgoingEdgeId": "kmex71jzzzekni4louuy3xbf", + "type": "button", + "content": "Concept explainer" } ], - "groupId": "u6nm47oyneidmsebszp60t0m", "options": { - "variableId": "vs7wwz29yyd21pfl4syeptdgi", - "buttonLabel": "Send", - "isMultipleChoice": false + "variableId": "vs7wwz29yyd21pfl4syeptdgi" } } - ], - "graphCoordinates": { "x": -6.082566623728974, "y": 37.78518756228981 } + ] }, { "id": "oemwa82xy3yt74gzilrojogl", "title": "Jumps", + "graphCoordinates": { "x": 1431.381871940994, "y": 1083.626261828848 }, "blocks": [ { "id": "nnzp5mle206cl3nnqlkqjau1", "type": "Jump", - "groupId": "py4fhjf59krp2ahz7fpdtj6h", "options": { "groupId": "irnu2zu8m2i4fu6485hxtra5" } }, { "id": "nm6vp6ifbjq7mttohwhibjvj", "type": "Jump", - "groupId": "py4fhjf59krp2ahz7fpdtj6h", "options": { "groupId": "u6nm47oyneidmsebszp60t0m" } } - ], - "graphCoordinates": { "x": 1431.381871940994, "y": 1083.6262618288476 } + ] }, { "id": "p1fh0e2y8sq4lhrskc4rb5z2", "title": "Jumps", + "graphCoordinates": { "x": 1436.545931193238, "y": 679.7247165284323 }, "blocks": [ { "id": "kyuvkruakbxjvxwgtjqti3gc", "type": "Jump", - "groupId": "wjgoxgdh5dxvulkn013oad81", "options": { "groupId": "h4mcrr5x6lvy1mz96k0ey3do" } }, { "id": "vywm4h8yz87ew4gjy4l6nmm3", "type": "Jump", - "groupId": "wjgoxgdh5dxvulkn013oad81", "options": { "groupId": "u6nm47oyneidmsebszp60t0m" } } - ], - "graphCoordinates": { "x": 1436.5459311932382, "y": 679.7247165284323 } + ] }, { "id": "ow2g8fv93xxrgpcabnx8uod8", "title": "Jumps", + "graphCoordinates": { "x": 1419.568721793131, "y": 169.5335644029076 }, "blocks": [ { "id": "qxgl1cscs38pfwzaj4pqsd46", "type": "Jump", - "groupId": "uz4isdxf2lha8y98f5umzeb7", "options": { "groupId": "m84gejzvl08ky6ynruiuszpc" } }, { "id": "m94q879l9yr1vx5xrbxlsj6q", "type": "Jump", - "groupId": "uz4isdxf2lha8y98f5umzeb7", "options": { "groupId": "u6nm47oyneidmsebszp60t0m" } } - ], - "graphCoordinates": { "x": 1419.5687217931309, "y": 169.5335644029076 } + ] }, { "id": "py719ungczkgz5f40zkw3tr2", "title": "EN professor intro", + "graphCoordinates": { "x": 339.814926172369, "y": 9.945652574763692 }, "blocks": [ { "id": "qm3v36qb93ijnghdjgy9mcwf", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Hi ๐Ÿ‘‹" }] }] - }, - "groupId": "py719ungczkgz5f40zkw3tr2" + } }, { "id": "ln8d3vdq4shclzrxcy9rmxfg", @@ -433,34 +395,31 @@ ] } ] - }, - "groupId": "py719ungczkgz5f40zkw3tr2" + } }, { "id": "r7yu488ugfif8hxy3e4sospb", + "outgoingEdgeId": "ripf74t9yicdze8xr2yrklyx", "type": "text", "content": { "richText": [ { "type": "p", "children": [{ "text": "How can I help?" }] } ] - }, - "groupId": "py719ungczkgz5f40zkw3tr2", - "outgoingEdgeId": "ripf74t9yicdze8xr2yrklyx" + } } - ], - "graphCoordinates": { "x": 339.81492617236904, "y": 9.945652574763692 } + ] }, { "id": "uyry49c9bm1pvk6t8i471l2d", "title": "Copywriter intro", + "graphCoordinates": { "x": 335.3081238025464, "y": 468.3681191076254 }, "blocks": [ { "id": "bbeedootn9m8eass0mqu3w4t", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Hi ๐Ÿ‘‹" }] }] - }, - "groupId": "uyry49c9bm1pvk6t8i471l2d" + } }, { "id": "chdghb0k27c4okwu9yky4ox4", @@ -472,34 +431,31 @@ "children": [{ "text": "I'm an expert in copywriting." }] } ] - }, - "groupId": "uyry49c9bm1pvk6t8i471l2d" + } }, { "id": "idp7w8c8zbkvl95oa1vquiml", + "outgoingEdgeId": "v0tfmbt8tpwwrieftvzg8lti", "type": "text", "content": { "richText": [ { "type": "p", "children": [{ "text": "How can I help?" }] } ] - }, - "groupId": "uyry49c9bm1pvk6t8i471l2d", - "outgoingEdgeId": "v0tfmbt8tpwwrieftvzg8lti" + } } - ], - "graphCoordinates": { "x": 335.3081238025464, "y": 468.3681191076254 } + ] }, { "id": "zfa8oj0a0tnlho9a67llulst", "title": "Explainer intro", + "graphCoordinates": { "x": 326.9849960884654, "y": 928.6632806049557 }, "blocks": [ { "id": "n96j3pf3m87aufcapx2ulr2n", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Hi ๐Ÿ‘‹" }] }] - }, - "groupId": "zfa8oj0a0tnlho9a67llulst" + } }, { "id": "wxk5z9yyiojkk9u3b5m6shax", @@ -513,11 +469,11 @@ ] } ] - }, - "groupId": "zfa8oj0a0tnlho9a67llulst" + } }, { "id": "ileqgg2r2kyh2zovpivr775s", + "outgoingEdgeId": "v5bki4h7m1lnryhgzudnvvpx", "type": "text", "content": { "richText": [ @@ -528,279 +484,242 @@ ] } ] - }, - "groupId": "zfa8oj0a0tnlho9a67llulst", - "outgoingEdgeId": "v5bki4h7m1lnryhgzudnvvpx" + } } - ], - "graphCoordinates": { "x": 326.98499608846544, "y": 928.6632806049557 } + ] }, { "id": "m84gejzvl08ky6ynruiuszpc", "title": "EN professor question", + "graphCoordinates": { "x": 692.86, "y": -14.84 }, "blocks": [ { "id": "ovgk70u0kfxrbtz9dy4e040o", "type": "text input", - "groupId": "m84gejzvl08ky6ynruiuszpc", "options": { - "isLong": true, "labels": { - "button": "Send", - "placeholder": "Type your answer..." + "placeholder": "Type your answer...", + "button": "Send" }, "variableId": "vevnx5f5bojz0sv648x6ppcmv", - "isPrefillDisabled": true - }, - "outgoingEdgeId": "vapajzlffxq1lgudxgm14g05" + "isLong": true + } + }, + { + "id": "nx6v1ogcp9x9o6regjopvff8", + "outgoingEdgeId": "cplyootzgqo5jpmhntgz4shm", + "type": "Set variable", + "options": { + "variableId": "vu9adij5penetej2xz89htfe6", + "type": "Append value(s)", + "item": "{{User Message}}" + } } - ], - "graphCoordinates": { "x": 692.8604882239152, "y": 11.63391545939837 } + ] }, { "id": "h4mcrr5x6lvy1mz96k0ey3do", "title": "Copywriter question", + "graphCoordinates": { "x": 692.3449852228088, "y": 462.3858990822391 }, "blocks": [ { "id": "emii43mtihiuy35gpp6b91d8", "type": "text input", - "groupId": "h4mcrr5x6lvy1mz96k0ey3do", "options": { - "isLong": true, "labels": { - "button": "Send", - "placeholder": "Type your answer..." + "placeholder": "Type your answer...", + "button": "Send" }, "variableId": "vevnx5f5bojz0sv648x6ppcmv", - "isPrefillDisabled": true - }, - "outgoingEdgeId": "vtffpz6eh4n95kwlb8zpu7cz" + "isLong": true + } + }, + { + "id": "h0cgmv6q61s3yhuq6u2pb5p0", + "outgoingEdgeId": "za1pwdunrlwgfu1kz7dnsb3m", + "type": "Set variable", + "options": { + "variableId": "vu9adij5penetej2xz89htfe6", + "type": "Append value(s)", + "item": "{{User Message}}" + } } - ], - "graphCoordinates": { "x": 692.3449852228088, "y": 462.38589908223906 } + ] }, { "id": "irnu2zu8m2i4fu6485hxtra5", "title": "Explainer question", + "graphCoordinates": { "x": 686.3012488543691, "y": 924.2085365228105 }, "blocks": [ { "id": "e6rovxwxlizr54iy8nyi84pi", "type": "text input", - "groupId": "irnu2zu8m2i4fu6485hxtra5", "options": { - "isLong": false, "labels": { - "button": "Send", - "placeholder": "Type your answer..." + "placeholder": "Type your answer...", + "button": "Send" }, "variableId": "vevnx5f5bojz0sv648x6ppcmv", - "isPrefillDisabled": true - }, - "outgoingEdgeId": "wv3t43ccf35mewn52liqtjg1" + "isLong": false + } + }, + { + "id": "b937909x86r3wzbn4mzxmw25", + "outgoingEdgeId": "fz77htstfb4jig82k66pl0vt", + "type": "Set variable", + "options": { + "variableId": "vu9adij5penetej2xz89htfe6", + "type": "Append value(s)", + "item": "{{User Message}}" + } } - ], - "graphCoordinates": { "x": 686.3012488543691, "y": 924.2085365228105 } + ] } ], - "variables": [ - { "id": "vni6kwbch8zlq92dclgcivzyr", "name": "Assistant Messages" }, - { "id": "vevnx5f5bojz0sv648x6ppcmv", "name": "User Messages" }, - { "id": "vldefdrythqxfh9p9p38jvmb2", "name": "Prompt" }, - { "id": "vs7wwz29yyd21pfl4syeptdgi", "name": "Persona" } - ], "edges": [ { "id": "ny44r5sp69gne7obgshidhph", - "to": { - "blockId": "nm6vp6ifbjq7mttohwhibjvj", - "groupId": "oemwa82xy3yt74gzilrojogl" - }, "from": { - "itemId": "imx7otsonvm0takr02b4ulyo", "blockId": "jz9mklagfikyukzs7n3kmlcf", - "groupId": "dmg57mgick51p8l5pnyqtyf9" + "itemId": "imx7otsonvm0takr02b4ulyo" + }, + "to": { + "groupId": "oemwa82xy3yt74gzilrojogl", + "blockId": "nm6vp6ifbjq7mttohwhibjvj" } }, { "id": "mxl8lftsj3pbmj4g24ymxajo", - "to": { - "blockId": "nnzp5mle206cl3nnqlkqjau1", - "groupId": "oemwa82xy3yt74gzilrojogl" - }, "from": { - "itemId": "x18iwzwmbzi9jjpnwij1861i", "blockId": "jz9mklagfikyukzs7n3kmlcf", - "groupId": "dmg57mgick51p8l5pnyqtyf9" + "itemId": "x18iwzwmbzi9jjpnwij1861i" + }, + "to": { + "groupId": "oemwa82xy3yt74gzilrojogl", + "blockId": "nnzp5mle206cl3nnqlkqjau1" } }, { "id": "ry7l8wcaidxw5izm7zoy83kj", - "to": { "groupId": "py719ungczkgz5f40zkw3tr2" }, "from": { - "itemId": "rn0lqz1wvsg9lmc0jcl6ps8j", "blockId": "ohh19koa7up0nbke3146hnjp", - "groupId": "u6nm47oyneidmsebszp60t0m" - } + "itemId": "rn0lqz1wvsg9lmc0jcl6ps8j" + }, + "to": { "groupId": "py719ungczkgz5f40zkw3tr2" } }, { "id": "ripf74t9yicdze8xr2yrklyx", - "to": { "groupId": "m84gejzvl08ky6ynruiuszpc" }, - "from": { - "blockId": "r7yu488ugfif8hxy3e4sospb", - "groupId": "py719ungczkgz5f40zkw3tr2" - } - }, - { - "id": "vapajzlffxq1lgudxgm14g05", - "to": { "groupId": "fj5z2nx488htv0843kq6qeyk" }, - "from": { - "blockId": "ovgk70u0kfxrbtz9dy4e040o", - "groupId": "m84gejzvl08ky6ynruiuszpc" - } + "from": { "blockId": "r7yu488ugfif8hxy3e4sospb" }, + "to": { "groupId": "m84gejzvl08ky6ynruiuszpc" } }, { "id": "q6o0cbyzxtvgls3jtz7rpdgw", - "to": { - "blockId": "qxgl1cscs38pfwzaj4pqsd46", - "groupId": "ow2g8fv93xxrgpcabnx8uod8" - }, "from": { - "itemId": "zaylo8bstqx0wp6bpdbd1rak", "blockId": "h3qetbhcpxhawnqoymo0v3hw", - "groupId": "fj5z2nx488htv0843kq6qeyk" + "itemId": "zaylo8bstqx0wp6bpdbd1rak" + }, + "to": { + "groupId": "ow2g8fv93xxrgpcabnx8uod8", + "blockId": "qxgl1cscs38pfwzaj4pqsd46" } }, { "id": "xjv7pkpgpwh169448t8pepg4", - "to": { - "blockId": "m94q879l9yr1vx5xrbxlsj6q", - "groupId": "ow2g8fv93xxrgpcabnx8uod8" - }, "from": { - "itemId": "d5jv3sjpzobsrnhcp055mxkv", "blockId": "h3qetbhcpxhawnqoymo0v3hw", - "groupId": "fj5z2nx488htv0843kq6qeyk" + "itemId": "d5jv3sjpzobsrnhcp055mxkv" + }, + "to": { + "groupId": "ow2g8fv93xxrgpcabnx8uod8", + "blockId": "m94q879l9yr1vx5xrbxlsj6q" } }, { "id": "v0tfmbt8tpwwrieftvzg8lti", - "to": { "groupId": "h4mcrr5x6lvy1mz96k0ey3do" }, - "from": { - "blockId": "idp7w8c8zbkvl95oa1vquiml", - "groupId": "uyry49c9bm1pvk6t8i471l2d" - } - }, - { - "id": "vtffpz6eh4n95kwlb8zpu7cz", - "to": { "groupId": "csbysu8dr08zxr4i6hzvzjdf" }, - "from": { - "blockId": "emii43mtihiuy35gpp6b91d8", - "groupId": "h4mcrr5x6lvy1mz96k0ey3do" - } + "from": { "blockId": "idp7w8c8zbkvl95oa1vquiml" }, + "to": { "groupId": "h4mcrr5x6lvy1mz96k0ey3do" } }, { "id": "iy2htkuup0l908fsosg6d2qz", - "to": { "groupId": "uyry49c9bm1pvk6t8i471l2d" }, "from": { - "itemId": "le84cls9vkmrxquvqw8bhp7h", "blockId": "ohh19koa7up0nbke3146hnjp", - "groupId": "u6nm47oyneidmsebszp60t0m" - } + "itemId": "le84cls9vkmrxquvqw8bhp7h" + }, + "to": { "groupId": "uyry49c9bm1pvk6t8i471l2d" } }, { "id": "kmex71jzzzekni4louuy3xbf", - "to": { "groupId": "zfa8oj0a0tnlho9a67llulst" }, "from": { - "itemId": "mx4kgfgena53mxf87piwu1j2", "blockId": "ohh19koa7up0nbke3146hnjp", - "groupId": "u6nm47oyneidmsebszp60t0m" - } + "itemId": "mx4kgfgena53mxf87piwu1j2" + }, + "to": { "groupId": "zfa8oj0a0tnlho9a67llulst" } }, { "id": "v5bki4h7m1lnryhgzudnvvpx", - "to": { "groupId": "irnu2zu8m2i4fu6485hxtra5" }, - "from": { - "blockId": "ileqgg2r2kyh2zovpivr775s", - "groupId": "zfa8oj0a0tnlho9a67llulst" - } - }, - { - "id": "wv3t43ccf35mewn52liqtjg1", - "to": { "groupId": "dmg57mgick51p8l5pnyqtyf9" }, - "from": { - "blockId": "e6rovxwxlizr54iy8nyi84pi", - "groupId": "irnu2zu8m2i4fu6485hxtra5" - } + "from": { "blockId": "ileqgg2r2kyh2zovpivr775s" }, + "to": { "groupId": "irnu2zu8m2i4fu6485hxtra5" } }, { "id": "gfrpgowch879p1qaj9jzsh01", - "to": { - "blockId": "vywm4h8yz87ew4gjy4l6nmm3", - "groupId": "p1fh0e2y8sq4lhrskc4rb5z2" - }, "from": { - "itemId": "ooib3mqlfkazta6iol1ocloe", "blockId": "u4jdl0gwv8965o2etxjk12w0", - "groupId": "csbysu8dr08zxr4i6hzvzjdf" + "itemId": "ooib3mqlfkazta6iol1ocloe" + }, + "to": { + "groupId": "p1fh0e2y8sq4lhrskc4rb5z2", + "blockId": "vywm4h8yz87ew4gjy4l6nmm3" } }, { "id": "jwydpoxngp2gvwanaruphe6s", - "to": { - "blockId": "kyuvkruakbxjvxwgtjqti3gc", - "groupId": "p1fh0e2y8sq4lhrskc4rb5z2" - }, "from": { - "itemId": "b6zif4xxe2cuiddc2oqayaxi", "blockId": "u4jdl0gwv8965o2etxjk12w0", - "groupId": "csbysu8dr08zxr4i6hzvzjdf" + "itemId": "b6zif4xxe2cuiddc2oqayaxi" + }, + "to": { + "groupId": "p1fh0e2y8sq4lhrskc4rb5z2", + "blockId": "kyuvkruakbxjvxwgtjqti3gc" } }, { - "from": { - "groupId": "w99qhdr20tw02sfrfwkfc1tg", - "blockId": "igbipfi63m6p9sl2f77uicuv" - }, + "id": "cplyootzgqo5jpmhntgz4shm", + "from": { "blockId": "nx6v1ogcp9x9o6regjopvff8" }, + "to": { "groupId": "fj5z2nx488htv0843kq6qeyk" } + }, + { + "id": "za1pwdunrlwgfu1kz7dnsb3m", + "from": { "blockId": "h0cgmv6q61s3yhuq6u2pb5p0" }, + "to": { "groupId": "csbysu8dr08zxr4i6hzvzjdf" } + }, + { + "id": "fz77htstfb4jig82k66pl0vt", + "from": { "blockId": "b937909x86r3wzbn4mzxmw25" }, + "to": { "groupId": "dmg57mgick51p8l5pnyqtyf9" } + }, + { + "from": { "eventId": "w99qhdr20tw02sfrfwkfc1tg" }, "to": { "groupId": "bofjp88arodr4k0btv2esyqy" }, - "id": "x91dpk80zw2b4co4xra33cwg" + "id": "c3733n7ia1hxcwld9lm3p351" } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, + "variables": [ + { "id": "vni6kwbch8zlq92dclgcivzyr", "name": "Assistant Message" }, + { "id": "vevnx5f5bojz0sv648x6ppcmv", "name": "User Message" }, + { "id": "vu9adij5penetej2xz89htfe6", "name": "Chat history" } + ], + "theme": {}, "selectedThemeTemplateId": null, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": 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 } - }, + "settings": {}, + "createdAt": "2023-11-03T06:57:51.747Z", + "updatedAt": "2023-11-03T07:03:19.089Z", + "icon": "๐ŸŽญ", + "folderId": null, "publicId": null, "customDomain": null, "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/customer-support.json b/apps/builder/public/templates/customer-support.json index 8d88192600..e4190ec6c5 100644 --- a/apps/builder/public/templates/customer-support.json +++ b/apps/builder/public/templates/customer-support.json @@ -1,33 +1,24 @@ { - "id": "cl16la7p900990b1a72qjqbb3", - "version": "4", - "createdAt": "2022-03-25T15:39:33.885Z", - "updatedAt": "2022-03-25T15:42:12.544Z", + "version": "6", + "id": "cloo046v300051aorhtv76f0i", "name": "Customer Support", - "icon": "๐Ÿ˜", - "folderId": null, - "groups": [ + "events": [ { "id": "uG1tt8JdDyu2nju3oJ4wc1", - "blocks": [ - { - "id": "bFHwV7tnY5dke8pQeFY8v6", - "type": "start", - "label": "Start", - "groupId": "uG1tt8JdDyu2nju3oJ4wc1", - "outgoingEdgeId": "2dzxChB1qm9WGfzNF91tfg" - } - ], - "title": "Start", - "graphCoordinates": { "x": -281, "y": -89 } - }, + "outgoingEdgeId": "2dzxChB1qm9WGfzNF91tfg", + "graphCoordinates": { "x": -281, "y": -89 }, + "type": "start" + } + ], + "groups": [ { "id": "vLUAPaxKwPF49iZhg4XZYa", + "title": "Menu", + "graphCoordinates": { "x": -28.4, "y": -88.19 }, "blocks": [ { "id": "spud6U3K1omh2dZG8yN2CW4", "type": "text", - "groupId": "vLUAPaxKwPF49iZhg4XZYa", "content": { "richText": [ { "type": "p", "children": [{ "text": "Hey friend ๐Ÿ‘‹" }] }, @@ -41,40 +32,31 @@ "items": [ { "id": "fQ8oLDnKmDBuPDK7riJ2kt", - "type": 0, - "blockId": "s6kp2Z4igeY3kL7B64qBdUg", - "content": "I have a feature request โœจ", - "outgoingEdgeId": "dhniFxrsH5r54aEE5JXwK2" + "outgoingEdgeId": "dhniFxrsH5r54aEE5JXwK2", + "content": "I have a feature request โœจ" }, { "id": "h2rFDX2UnKS4Kdu3Eyuqq3", - "type": 0, - "blockId": "s6kp2Z4igeY3kL7B64qBdUg", - "content": "There is a bug ๐Ÿ›", - "outgoingEdgeId": "2C4mhU5o2Hdm7dztR9xNE9" + "outgoingEdgeId": "2C4mhU5o2Hdm7dztR9xNE9", + "content": "There is a bug ๐Ÿ›" }, { "id": "hcUFBPeQA3gSyXRprRk2v9", - "type": 0, - "blockId": "s6kp2Z4igeY3kL7B64qBdUg", - "content": "I have a question ๐Ÿ’ญ", - "outgoingEdgeId": "bTo6CZD1YapDDyVdvJgFDV" + "outgoingEdgeId": "bTo6CZD1YapDDyVdvJgFDV", + "content": "I have a question ๐Ÿ’ญ" } - ], - "groupId": "vLUAPaxKwPF49iZhg4XZYa", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] } - ], - "title": "Menu", - "graphCoordinates": { "x": -7, "y": 90 } + ] }, { "id": "7MuqF6nen1ZTwGB53Mz8VY", + "title": "Bug", + "graphCoordinates": { "x": 364.46, "y": 92.39 }, "blocks": [ { "id": "sjsECyfSBMkUnoWaEnBTmJX", "type": "text", - "groupId": "7MuqF6nen1ZTwGB53Mz8VY", "content": { "richText": [{ "type": "p", "children": [{ "text": "Shoot! ๐Ÿคช" }] }] } @@ -82,7 +64,6 @@ { "id": "seomQsnPWgiMzQVeZ3us7x2", "type": "text", - "groupId": "7MuqF6nen1ZTwGB53Mz8VY", "content": { "richText": [ { @@ -98,29 +79,26 @@ }, { "id": "s3LYyyYtjdQ88jkMMV5DSW7", + "outgoingEdgeId": "cl1571jhh00022e6dk77f52wg", "type": "text input", - "groupId": "7MuqF6nen1ZTwGB53Mz8VY", "options": { - "isLong": true, "labels": { - "button": "Send", "placeholder": "Describe the bug..." }, - "variableId": "v51BcuecnB6kRU1tsttaGyR" - }, - "outgoingEdgeId": "cl1571jhh00022e6dk77f52wg" + "variableId": "v51BcuecnB6kRU1tsttaGyR", + "isLong": true + } } - ], - "title": "Bug", - "graphCoordinates": { "x": 476, "y": 76 } + ] }, { "id": "kyK8JQ77NodUYaz3JLS88A", + "title": "Feature request", + "graphCoordinates": { "x": 364.36, "y": -517.93 }, "blocks": [ { "id": "s9bgHcWdobb8Z5cTbrnTz6R", "type": "text", - "groupId": "kyK8JQ77NodUYaz3JLS88A", "content": { "richText": [{ "type": "p", "children": [{ "text": "Awesome!" }] }] } @@ -128,7 +106,6 @@ { "id": "s2NbNaBGKhMvdEUdVPXKZjy", "type": "text", - "groupId": "kyK8JQ77NodUYaz3JLS88A", "content": { "richText": [ { @@ -162,39 +139,24 @@ }, { "id": "cl16lb3b300092e6dh4h01vxw", - "groupId": "kyK8JQ77NodUYaz3JLS88A", "type": "choice input", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, - "items": [ - { - "id": "cl16lb3b3000a2e6dy8zdhzpz", - "blockId": "cl16lb3b300092e6dh4h01vxw", - "type": 0, - "content": "Restart" - } - ] + "items": [{ "id": "cl16lb3b3000a2e6dy8zdhzpz", "content": "Restart" }] }, { - "id": "cl16lablb00082e6dadk55sxv", - "groupId": "kyK8JQ77NodUYaz3JLS88A", - "type": "Typebot link", - "options": { - "typebotId": "current", - "groupId": "vLUAPaxKwPF49iZhg4XZYa", - "mergeResults": false - } + "id": "j08qxg0h804rngfroedblt5f", + "type": "Jump", + "options": { "groupId": "vLUAPaxKwPF49iZhg4XZYa" } } - ], - "title": "Feature request", - "graphCoordinates": { "x": 477, "y": -563 } + ] }, { "id": "puWCBhGWSQRbqTkVH89RCf", + "title": "Question", + "graphCoordinates": { "x": 365.4, "y": 491.3 }, "blocks": [ { "id": "sm4iHhLQs9yNdRG3b7xqV8Y", "type": "text", - "groupId": "puWCBhGWSQRbqTkVH89RCf", "content": { "richText": [ { @@ -205,8 +167,7 @@ "url": "https://docs.typebot.io/", "type": "a", "children": [{ "text": "Documentation ๐Ÿ™" }] - }, - { "text": "" } + } ] } ] @@ -215,7 +176,6 @@ { "id": "sreX6rwMevEmbTpnkGCtp3k", "type": "text", - "groupId": "puWCBhGWSQRbqTkVH89RCf", "content": { "richText": [ { @@ -228,36 +188,29 @@ { "id": "so4GiKFWWjKCjXgmMJYCGbe", "type": "image", - "groupId": "puWCBhGWSQRbqTkVH89RCf", "content": { "url": "https://media0.giphy.com/media/rhgwg4qBu97ISgbfni/giphy-downsized.gif?cid=fe3852a3wimy48e55djt23j44uto7gdlu8ksytylafisvr0q&rid=giphy-downsized.gif&ct=g" } }, { "id": "sjd4qACugMarB7gJC8nMhb3", + "outgoingEdgeId": "cl1571ktd00032e6dyti22850", "type": "text input", - "groupId": "puWCBhGWSQRbqTkVH89RCf", "options": { - "isLong": true, - "labels": { - "button": "Send", - "placeholder": "Type your answer..." - }, - "variableId": "v51BcuecnB6kRU1tsttaGyR" - }, - "outgoingEdgeId": "cl1571ktd00032e6dyti22850" + "variableId": "v51BcuecnB6kRU1tsttaGyR", + "isLong": true + } } - ], - "title": "Question", - "graphCoordinates": { "x": 476, "y": 399 } + ] }, { "id": "1GvxCAAEysxJMxrVngud3X", + "title": "Bye", + "graphCoordinates": { "x": 1115.81, "y": 728.71 }, "blocks": [ { "id": "s6uLw72EAKbACrpYHr7DSyY", "type": "text", - "groupId": "1GvxCAAEysxJMxrVngud3X", "content": { "richText": [ { @@ -272,7 +225,6 @@ { "id": "stM7cTBFCLhpQagRHT64K6u", "type": "text", - "groupId": "1GvxCAAEysxJMxrVngud3X", "content": { "richText": [ { @@ -289,38 +241,23 @@ { "id": "s4JATFkBxzmcqqEKQB2xFfa", "type": "choice input", - "items": [ - { - "id": "jqm8wZa5yYb73493n5s3Uc", - "type": 0, - "blockId": "s4JATFkBxzmcqqEKQB2xFfa", - "content": "Restart" - } - ], - "groupId": "1GvxCAAEysxJMxrVngud3X", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + "items": [{ "id": "jqm8wZa5yYb73493n5s3Uc", "content": "Restart" }] }, { - "id": "cl14qlt8600072e69rez236gx", - "type": "Typebot link", - "groupId": "1GvxCAAEysxJMxrVngud3X", - "options": { - "groupId": "vLUAPaxKwPF49iZhg4XZYa", - "typebotId": "current", - "mergeResults": false - } + "id": "igdnc34rcmiyamazghr8s708", + "type": "Jump", + "options": { "groupId": "vLUAPaxKwPF49iZhg4XZYa" } } - ], - "title": "Bye", - "graphCoordinates": { "x": 1177, "y": 113 } + ] }, { "id": "wncvzVDFJDvhh1M3CXJ6aL", + "title": "Email", + "graphCoordinates": { "x": 746.29, "y": 577.22 }, "blocks": [ { "id": "soiDpBL5r1dbvHxuT2Sd3mH", "type": "text", - "groupId": "wncvzVDFJDvhh1M3CXJ6aL", "content": { "richText": [ { @@ -332,117 +269,77 @@ }, { "id": "s5Fh7zHUw3j4zDM5xjzwsXB", + "outgoingEdgeId": "cl1571xtc00042e6dcptam5jw", "type": "email input", - "groupId": "wncvzVDFJDvhh1M3CXJ6aL", "options": { - "labels": { "button": "Send", "placeholder": "Type your email..." }, - "variableId": "t2k6cj3uYfNdJX13APA4b9", - "retryMessageContent": "This email doesn't seem to be valid. Can you type it again?" - }, - "outgoingEdgeId": "cl1571xtc00042e6dcptam5jw" + "variableId": "t2k6cj3uYfNdJX13APA4b9" + } } - ], - "title": "Email", - "graphCoordinates": { "x": 830, "y": 115 } + ] } ], - "variables": [ - { "id": "t2k6cj3uYfNdJX13APA4b9", "name": "Email" }, - { "id": "v51BcuecnB6kRU1tsttaGyR", "name": "Content" } - ], "edges": [ { "id": "2dzxChB1qm9WGfzNF91tfg", - "to": { "groupId": "vLUAPaxKwPF49iZhg4XZYa" }, - "from": { - "blockId": "bFHwV7tnY5dke8pQeFY8v6", - "groupId": "uG1tt8JdDyu2nju3oJ4wc1" - } + "from": { "eventId": "uG1tt8JdDyu2nju3oJ4wc1" }, + "to": { "groupId": "vLUAPaxKwPF49iZhg4XZYa" } }, { "id": "dhniFxrsH5r54aEE5JXwK2", - "to": { "groupId": "kyK8JQ77NodUYaz3JLS88A" }, "from": { - "itemId": "fQ8oLDnKmDBuPDK7riJ2kt", "blockId": "s6kp2Z4igeY3kL7B64qBdUg", - "groupId": "vLUAPaxKwPF49iZhg4XZYa" - } + "itemId": "fQ8oLDnKmDBuPDK7riJ2kt" + }, + "to": { "groupId": "kyK8JQ77NodUYaz3JLS88A" } }, { "id": "2C4mhU5o2Hdm7dztR9xNE9", - "to": { "groupId": "7MuqF6nen1ZTwGB53Mz8VY" }, "from": { - "itemId": "h2rFDX2UnKS4Kdu3Eyuqq3", "blockId": "s6kp2Z4igeY3kL7B64qBdUg", - "groupId": "vLUAPaxKwPF49iZhg4XZYa" - } + "itemId": "h2rFDX2UnKS4Kdu3Eyuqq3" + }, + "to": { "groupId": "7MuqF6nen1ZTwGB53Mz8VY" } }, { "id": "bTo6CZD1YapDDyVdvJgFDV", - "to": { "groupId": "puWCBhGWSQRbqTkVH89RCf" }, "from": { - "itemId": "hcUFBPeQA3gSyXRprRk2v9", "blockId": "s6kp2Z4igeY3kL7B64qBdUg", - "groupId": "vLUAPaxKwPF49iZhg4XZYa" - } + "itemId": "hcUFBPeQA3gSyXRprRk2v9" + }, + "to": { "groupId": "puWCBhGWSQRbqTkVH89RCf" } }, { "id": "cl1571jhh00022e6dk77f52wg", - "to": { "groupId": "wncvzVDFJDvhh1M3CXJ6aL" }, - "from": { - "blockId": "s3LYyyYtjdQ88jkMMV5DSW7", - "groupId": "7MuqF6nen1ZTwGB53Mz8VY" - } + "from": { "blockId": "s3LYyyYtjdQ88jkMMV5DSW7" }, + "to": { "groupId": "wncvzVDFJDvhh1M3CXJ6aL" } }, { "id": "cl1571ktd00032e6dyti22850", - "to": { "groupId": "wncvzVDFJDvhh1M3CXJ6aL" }, - "from": { - "blockId": "sjd4qACugMarB7gJC8nMhb3", - "groupId": "puWCBhGWSQRbqTkVH89RCf" - } + "from": { "blockId": "sjd4qACugMarB7gJC8nMhb3" }, + "to": { "groupId": "wncvzVDFJDvhh1M3CXJ6aL" } }, { "id": "cl1571xtc00042e6dcptam5jw", - "to": { "groupId": "1GvxCAAEysxJMxrVngud3X" }, - "from": { - "blockId": "s5Fh7zHUw3j4zDM5xjzwsXB", - "groupId": "wncvzVDFJDvhh1M3CXJ6aL" - } + "from": { "blockId": "s5Fh7zHUw3j4zDM5xjzwsXB" }, + "to": { "groupId": "1GvxCAAEysxJMxrVngud3X" } } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": 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 } - }, + "variables": [ + { "id": "t2k6cj3uYfNdJX13APA4b9", "name": "Email" }, + { "id": "v51BcuecnB6kRU1tsttaGyR", "name": "Content" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-07T07:20:05.823Z", + "updatedAt": "2023-11-07T07:24:28.824Z", + "icon": "๐Ÿ˜", + "folderId": null, "publicId": null, - "customDomain": null + "customDomain": null, + "workspaceId": "proWorkspace", + "resultsTablePreferences": null, + "isArchived": false, + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/digital-product-payment.json b/apps/builder/public/templates/digital-product-payment.json index 96e5d0258f..340dbcd51c 100644 --- a/apps/builder/public/templates/digital-product-payment.json +++ b/apps/builder/public/templates/digital-product-payment.json @@ -1,34 +1,23 @@ { - "id": "cl3u43chu40824z1acel3iw1c", - "version": "4", - "createdAt": "2022-05-31T12:04:12.930Z", - "updatedAt": "2022-05-31T12:31:12.867Z", - "icon": "๐Ÿ–ผ๏ธ", + "version": "6", + "id": "cloo0oket000d1aortnxzuslp", "name": "Digital Product Payment", - "folderId": null, - "groups": [ + "events": [ { "id": "cl3u43cht00044z1adg20ffni", - "blocks": [ - { - "id": "cl3u43chu00054z1abb5x7fzk", - "type": "start", - "label": "Start", - "groupId": "cl3u43cht00044z1adg20ffni", - "outgoingEdgeId": "cl3u448z200062e6gr653itny" - } - ], - "title": "Start", - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "cl3u448z200062e6gr653itny", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "cl3u4431400042e6go5nd0euq", - "graphCoordinates": { "x": 365, "y": 126 }, "title": "Name", + "graphCoordinates": { "x": 257.86, "y": 0.85 }, "blocks": [ { "id": "cl3u4431500052e6gruhlxklx", - "groupId": "cl3u4431400042e6go5nd0euq", "type": "text", "content": { "richText": [ @@ -38,7 +27,6 @@ }, { "id": "cl3u4592z00082e6go92cuu43", - "groupId": "cl3u4431400042e6go5nd0euq", "type": "text", "content": { "richText": [ @@ -48,28 +36,22 @@ }, { "id": "cl3u45f0n000a2e6gci2xgmph", - "groupId": "cl3u4431400042e6go5nd0euq", + "outgoingEdgeId": "cl3u45j0n000c2e6go4nnaavg", "type": "text input", "options": { - "isLong": false, - "labels": { - "button": "Send", - "placeholder": "John" - }, + "labels": { "placeholder": "Type your name..." }, "variableId": "vcl3u45hek000b2e6gkl05z1da" - }, - "outgoingEdgeId": "cl3u45j0n000c2e6go4nnaavg" + } } ] }, { "id": "cl3u45dib00092e6g4q2tdkpu", - "graphCoordinates": { "x": 705, "y": 121 }, "title": "Product demo", + "graphCoordinates": { "x": 613.7, "y": 1.82 }, "blocks": [ { "id": "cl3u45lqz000d2e6gxo4n5ets", - "groupId": "cl3u45dib00092e6g4q2tdkpu", "type": "text", "content": { "richText": [ @@ -82,7 +64,6 @@ }, { "id": "cl3u44adg00072e6gc13e1n12", - "groupId": "cl3u45dib00092e6g4q2tdkpu", "type": "text", "content": { "richText": [ @@ -99,7 +80,6 @@ }, { "id": "cl3u46b0i000e2e6gkpf4qiry", - "groupId": "cl3u45dib00092e6g4q2tdkpu", "type": "text", "content": { "richText": [ @@ -114,33 +94,23 @@ }, { "id": "cl3u49lmg000f2e6guhhgf825", - "groupId": "cl3u45dib00092e6g4q2tdkpu", "type": "video", "content": { - "type": "url", - "url": "https://typebot.s3.eu-west-3.amazonaws.com/assets/bullseye+template+preview.mp4" + "url": "https://typebot.s3.eu-west-3.amazonaws.com/assets/bullseye+template+preview.mp4", + "type": "url" } }, { "id": "cl3u4hyl9000i2e6gtdz8m04b", - "groupId": "cl3u45dib00092e6g4q2tdkpu", "type": "text", "content": { "richText": [ - { - "type": "p", - "children": [ - { - "text": "It's yours for $9" - } - ] - } + { "type": "p", "children": [{ "text": "It's yours for $9" }] } ] } }, { "id": "cl3u4hyl9000i2e6gtdz8m04a", - "groupId": "cl3u45dib00092e6g4q2tdkpu", "type": "text", "content": { "richText": [ @@ -157,23 +127,17 @@ }, { "id": "cl3u4id67000l2e6gahw4v1ny", - "groupId": "cl3u45dib00092e6g4q2tdkpu", "type": "choice input", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, "items": [ { "id": "cl3u4id67000m2e6g3x3do8kd", - "blockId": "cl3u4id67000l2e6gahw4v1ny", - "type": 0, - "content": "Hell yes!", - "outgoingEdgeId": "cl3u4l4do00102e6ghd9s5p3f" + "outgoingEdgeId": "cl3u4l4do00102e6ghd9s5p3f", + "content": "Hell yes!" }, { - "blockId": "cl3u4id67000l2e6gahw4v1ny", - "type": 0, "id": "cl3u4iexy000o2e6gbagmrxcc", - "content": "I'm ok, thanks.", - "outgoingEdgeId": "cl3u4jxq2000v2e6gkpwko0uo" + "outgoingEdgeId": "cl3u4jxq2000v2e6gkpwko0uo", + "content": "I'm ok, thanks." } ] } @@ -181,12 +145,11 @@ }, { "id": "cl3u4iw28000s2e6gdmukl6qb", - "graphCoordinates": { "x": 897, "y": 960 }, "title": "Bye", + "graphCoordinates": { "x": 795.34, "y": 877.43 }, "blocks": [ { "id": "cl3u4iw29000t2e6gakbxvz4u", - "groupId": "cl3u4iw28000s2e6gdmukl6qb", "type": "text", "content": { "richText": [ @@ -203,7 +166,6 @@ }, { "id": "cl3u4jcyt000u2e6gzyj2p5ss", - "groupId": "cl3u4iw28000s2e6gdmukl6qb", "type": "image", "content": { "url": "https://media3.giphy.com/media/48FhEMYGWji8/giphy.gif?cid=fe3852a32dqdmhdazal2zzctxpxukjx171k0e4eflp0w36jf&rid=giphy.gif&ct=g" @@ -213,12 +175,11 @@ }, { "id": "cl3u4kblb000w2e6gfflsq56p", - "graphCoordinates": { "x": 1072, "y": 588 }, "title": "Email", + "graphCoordinates": { "x": 992.42, "y": 342.36 }, "blocks": [ { "id": "cl3u4kblb000x2e6g49rot8h0", - "groupId": "cl3u4kblb000w2e6gfflsq56p", "type": "text", "content": { "richText": [ @@ -228,7 +189,6 @@ }, { "id": "cl3u4khsx000y2e6gx9iysgt4", - "groupId": "cl3u4kblb000w2e6gfflsq56p", "type": "text", "content": { "richText": [ @@ -245,25 +205,21 @@ }, { "id": "cl3u4l2et000z2e6gjlmh45jp", - "groupId": "cl3u4kblb000w2e6gfflsq56p", + "outgoingEdgeId": "dstr8midu9f0x6ylyet7dljw", "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": "vcl3u4n1vk00162e6gs6x59o2k" - }, - "outgoingEdgeId": "cl3u4mbrj00142e6gxif5x53i" + } } ] }, { "id": "cl3u4leig00112e6gxbk65r7y", - "graphCoordinates": { "x": 1400, "y": 589 }, "title": "Payment", + "graphCoordinates": { "x": 1338.38, "y": 343.48 }, "blocks": [ { "id": "cl3u4leig00122e6gqx7skfhb", - "groupId": "cl3u4leig00112e6gxbk65r7y", "type": "text", "content": { "richText": [ @@ -273,7 +229,6 @@ }, { "id": "cl3u4llj300132e6gciw2ivyv", - "groupId": "cl3u4leig00112e6gxbk65r7y", "type": "text", "content": { "richText": [ @@ -290,30 +245,25 @@ }, { "id": "cl3u4mjq900152e6grwyg90zt", - "groupId": "cl3u4leig00112e6gxbk65r7y", + "outgoingEdgeId": "cl3u4wynv001b2e6g6pxc7int", "type": "payment input", "options": { - "provider": "Stripe", - "labels": { "button": "Pay" }, - "currency": "USD", - "amount": "9", "additionalInformation": { "name": "{{Name}}", "email": "{{Email}}" - } - }, - "outgoingEdgeId": "cl3u4wynv001b2e6g6pxc7int" + }, + "amount": "9" + } } ] }, { "id": "cl3u4vnth00182e6g2hh0gewl", - "graphCoordinates": { "x": 1731.4449652273986, "y": 586.6975439409757 }, "title": "Send email", + "graphCoordinates": { "x": 1683.86, "y": 346.93 }, "blocks": [ { "id": "cl3u4wi2d001a2e6gznp1r9d4", - "groupId": "cl3u4vnth00182e6g2hh0gewl", "type": "image", "content": { "url": "https://media1.giphy.com/media/s2qXK8wAvkHTO/giphy.gif?cid=fe3852a3edx7hsbquhw3lu17c422yzc6wsiplnpn02rzm2kf&rid=giphy.gif&ct=g" @@ -321,10 +271,9 @@ }, { "id": "cl3u4xcqc001c2e6g355vnigh", - "groupId": "cl3u4vnth00182e6g2hh0gewl", "type": "Email", "options": { - "credentialsId": "default", + "isCustomBody": true, "recipients": ["{{Email}}"], "subject": "Here is your Bullseye Framework template ๐ŸŽ‰", "body": "Hey {{Name}},\n\nThank you again for buying the template.\n\nHere is the link where you can duplicate it:\n\nhttps://baptistearno.notion.site/Growth-Framework-Bullseye-c2166e03d99340daa1aa87e4356bdc83\n\nFeel free to tell me what I can improve.\n\nBaptiste." @@ -332,7 +281,6 @@ }, { "id": "cl3u5189q001d2e6gd1q7qshq", - "groupId": "cl3u4vnth00182e6g2hh0gewl", "type": "text", "content": { "richText": [ @@ -349,7 +297,6 @@ }, { "id": "cl3u51mpe001e2e6ggrjjzxek", - "groupId": "cl3u4vnth00182e6g2hh0gewl", "type": "text", "content": { "richText": [ @@ -362,104 +309,110 @@ }, { "id": "cl3u51z0o001f2e6gbl96p7bi", - "groupId": "cl3u4vnth00182e6g2hh0gewl", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Bye ๐Ÿ‘‹" }] }] } } ] + }, + { + "id": "i47yu1c1pjhsqoe68kktbxgl", + "title": "", + "graphCoordinates": { "x": 1336.77, "y": 43.66 }, + "blocks": [ + { + "id": "unw1076x8ematnu6jrbop8sv", + "type": "text", + "content": { + "richText": [ + { + "type": "p", + "children": [ + { + "text": "You need to add your Stripe credentials in the next Payment block." + } + ] + } + ] + } + }, + { + "id": "ck19ttflkp6mbxnxpnyxp7vh", + "type": "text", + "content": { + "richText": [ + { + "type": "p", + "children": [ + { + "text": "Once it's done, you can remove this group and connect the email input to the \"Payment\" group ๐Ÿช„" + } + ] + } + ] + } + } + ] } ], - "variables": [ - { "id": "vcl3u45hek000b2e6gkl05z1da", "name": "Name" }, - { "id": "vcl3u4n1vk00162e6gs6x59o2k", "name": "Email" } - ], "edges": [ { - "from": { - "groupId": "cl3u43cht00044z1adg20ffni", - "blockId": "cl3u43chu00054z1abb5x7fzk" - }, - "to": { "groupId": "cl3u4431400042e6go5nd0euq" }, - "id": "cl3u448z200062e6gr653itny" + "id": "cl3u448z200062e6gr653itny", + "from": { "eventId": "cl3u43cht00044z1adg20ffni" }, + "to": { "groupId": "cl3u4431400042e6go5nd0euq" } }, { - "from": { - "groupId": "cl3u4431400042e6go5nd0euq", - "blockId": "cl3u45f0n000a2e6gci2xgmph" - }, - "to": { "groupId": "cl3u45dib00092e6g4q2tdkpu" }, - "id": "cl3u45j0n000c2e6go4nnaavg" + "id": "cl3u45j0n000c2e6go4nnaavg", + "from": { "blockId": "cl3u45f0n000a2e6gci2xgmph" }, + "to": { "groupId": "cl3u45dib00092e6g4q2tdkpu" } }, { + "id": "cl3u4jxq2000v2e6gkpwko0uo", "from": { - "groupId": "cl3u45dib00092e6g4q2tdkpu", "blockId": "cl3u4id67000l2e6gahw4v1ny", "itemId": "cl3u4iexy000o2e6gbagmrxcc" }, - "to": { "groupId": "cl3u4iw28000s2e6gdmukl6qb" }, - "id": "cl3u4jxq2000v2e6gkpwko0uo" + "to": { "groupId": "cl3u4iw28000s2e6gdmukl6qb" } }, { + "id": "cl3u4l4do00102e6ghd9s5p3f", "from": { - "groupId": "cl3u45dib00092e6g4q2tdkpu", "blockId": "cl3u4id67000l2e6gahw4v1ny", "itemId": "cl3u4id67000m2e6g3x3do8kd" }, - "to": { "groupId": "cl3u4kblb000w2e6gfflsq56p" }, - "id": "cl3u4l4do00102e6ghd9s5p3f" + "to": { "groupId": "cl3u4kblb000w2e6gfflsq56p" } }, { - "from": { - "groupId": "cl3u4kblb000w2e6gfflsq56p", - "blockId": "cl3u4l2et000z2e6gjlmh45jp" - }, - "to": { "groupId": "cl3u4leig00112e6gxbk65r7y" }, - "id": "cl3u4mbrj00142e6gxif5x53i" + "id": "cl3u4wynv001b2e6g6pxc7int", + "from": { "blockId": "cl3u4mjq900152e6grwyg90zt" }, + "to": { "groupId": "cl3u4vnth00182e6g2hh0gewl" } }, { "from": { - "groupId": "cl3u4leig00112e6gxbk65r7y", - "blockId": "cl3u4mjq900152e6grwyg90zt" + "blockId": "cl3u4l2et000z2e6gjlmh45jp", + "groupId": "cl3u4kblb000w2e6gfflsq56p" }, - "to": { "groupId": "cl3u4vnth00182e6g2hh0gewl" }, - "id": "cl3u4wynv001b2e6g6pxc7int" + "to": { "groupId": "i47yu1c1pjhsqoe68kktbxgl" }, + "id": "dstr8midu9f0x6ylyet7dljw" } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": 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 } - }, + "variables": [ + { "id": "vcl3u45hek000b2e6gkl05z1da", "name": "Name" }, + { "id": "vcl3u4n1vk00162e6gs6x59o2k", "name": "Email" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-07T07:35:56.501Z", + "updatedAt": "2023-11-07T07:40:03.471Z", + "icon": "๐Ÿ–ผ๏ธ", + "folderId": null, "publicId": null, "customDomain": null, - "workspaceId": "cl3ncues300081a1as58wmkxz" + "workspaceId": "proWorkspace", + "resultsTablePreferences": null, + "isArchived": false, + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/dog-insurance-offer.json b/apps/builder/public/templates/dog-insurance-offer.json index 46d547681f..f9402bad1e 100644 --- a/apps/builder/public/templates/dog-insurance-offer.json +++ b/apps/builder/public/templates/dog-insurance-offer.json @@ -1,36 +1,25 @@ { - "id": "clh9fzu4b00031aotzr1ik4ba", - "version": "4", - "createdAt": "2023-05-04T18:10:07.548Z", - "updatedAt": "2023-05-04T19:13:45.356Z", - "icon": "๐Ÿถ", + "version": "6", + "id": "clonzza7600031aorlgsreya0", "name": "Insurance offer", - "folderId": null, - "groups": [ + "events": [ { "id": "f4ef28wxteh0wdjgubtojnkr", - "title": "Start", - "blocks": [ - { - "id": "wj0uw1i63j4j4xe1q8xxmda0", - "type": "start", - "label": "Start", - "groupId": "f4ef28wxteh0wdjgubtojnkr", - "outgoingEdgeId": "u0009iy3sakdgh3k1x41i5yr" - } - ], - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "u0009iy3sakdgh3k1x41i5yr", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "av0jzkh3qhgdyjrouvl2zywe", "title": "Welcome", + "graphCoordinates": { "x": 68.4296875, "y": 176.178531769944 }, "blocks": [ { "id": "y0iukpry1i6h8sv22gz4ffsg", "type": "Set variable", - "groupId": "av0jzkh3qhgdyjrouvl2zywe", "options": { - "isCode": true, "variableId": "vq61f8ykwadq1pj8389qf9h91", "expressionToEvaluate": "0" } @@ -40,8 +29,7 @@ "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Hey ๐Ÿ‘‹" }] }] - }, - "groupId": "av0jzkh3qhgdyjrouvl2zywe" + } }, { "id": "rhp6p4obkdehddhm6j7tqxe0", @@ -50,8 +38,7 @@ "richText": [ { "type": "p", "children": [{ "text": "I'm John from Dogz" }] } ] - }, - "groupId": "av0jzkh3qhgdyjrouvl2zywe" + } }, { "id": "tizd6f2qo70g59lz1rnnvho7", @@ -67,8 +54,7 @@ ] } ] - }, - "groupId": "av0jzkh3qhgdyjrouvl2zywe" + } }, { "id": "dtvbio4qytr3iojc7tq2quvy", @@ -76,26 +62,17 @@ "items": [ { "id": "m7l8u4y5vmwozvdtsmhq3q49", - "type": 0, - "blockId": "dtvbio4qytr3iojc7tq2quvy", - "content": "Let's go!", - "outgoingEdgeId": "vl23l0ak8w2qxj9wrgxhznz3" + "outgoingEdgeId": "vl23l0ak8w2qxj9wrgxhznz3", + "content": "Let's go!" } - ], - "groupId": "av0jzkh3qhgdyjrouvl2zywe", - "options": { - "buttonLabel": "Send", - "isSearchable": false, - "isMultipleChoice": false, - "searchInputPlaceholder": "Filter the options..." - } + ] } - ], - "graphCoordinates": { "x": 68.4296875, "y": 176.178531769944 } + ] }, { "id": "dh3wz001jaclg8ifc1vhovlq", "title": "Breed", + "graphCoordinates": { "x": 431.756656769944, "y": 177.60546875 }, "blocks": [ { "id": "mvdogpw4qucgot4yzabpxtcl", @@ -107,65 +84,27 @@ "children": [{ "text": "What breed is your dog?" }] } ] - }, - "groupId": "dh3wz001jaclg8ifc1vhovlq" + } }, { "id": "f2902yy6o00fwe5h4xihrntj", + "outgoingEdgeId": "moj9ezfl6bvpr4aj76cztkiu", "type": "choice input", "items": [ - { - "id": "q7ydcwda7rsfn1w5ep9ur4y3", - "type": 0, - "blockId": "f2902yy6o00fwe5h4xihrntj", - "content": "Crossbreed" - }, - { - "id": "q33qu26t8uhtp63rl7th4p0u", - "type": 0, - "blockId": "f2902yy6o00fwe5h4xihrntj", - "content": "Labrador" - }, - { - "id": "c9fy5o23cuanywze536ie071", - "type": 0, - "blockId": "f2902yy6o00fwe5h4xihrntj", - "content": "Golden Retriever" - }, - { - "id": "xmozt619ao4pn3lcovs6e1wp", - "type": 0, - "blockId": "f2902yy6o00fwe5h4xihrntj", - "content": "Jack Russel" - }, - { - "id": "qhc245vs9s3vhq8oz9sur4jy", - "type": 0, - "blockId": "f2902yy6o00fwe5h4xihrntj", - "content": "Husky" - }, - { - "id": "bqt7o8aotn5wwye98vw2u8is", - "type": 0, - "blockId": "f2902yy6o00fwe5h4xihrntj", - "content": "Other" - } - ], - "groupId": "dh3wz001jaclg8ifc1vhovlq", - "options": { - "buttonLabel": "Send", - "isSearchable": false, - "isMultipleChoice": false, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "moj9ezfl6bvpr4aj76cztkiu" + { "id": "q7ydcwda7rsfn1w5ep9ur4y3", "content": "Crossbreed" }, + { "id": "q33qu26t8uhtp63rl7th4p0u", "content": "Labrador" }, + { "id": "c9fy5o23cuanywze536ie071", "content": "Golden Retriever" }, + { "id": "xmozt619ao4pn3lcovs6e1wp", "content": "Jack Russel" }, + { "id": "qhc245vs9s3vhq8oz9sur4jy", "content": "Husky" }, + { "id": "bqt7o8aotn5wwye98vw2u8is", "content": "Other" } + ] } - ], - "graphCoordinates": { "x": 431.756656769944, "y": 177.60546875 } + ] }, { "id": "ynt0ya95bvuqj8mf39e938k4", "title": "Sex", + "graphCoordinates": { "x": 786.06640625, "y": 173.0310202976334 }, "blocks": [ { "id": "u4voz45sk9gh4khul8c519df", @@ -177,8 +116,7 @@ "children": [{ "text": "Is it a male or a female?" }] } ] - }, - "groupId": "ynt0ya95bvuqj8mf39e938k4" + } }, { "id": "zuza6om08ubafgqhbadwv60i", @@ -186,38 +124,26 @@ "items": [ { "id": "mrca2ini7z81ik4k1o9g3a1s", - "type": 0, - "blockId": "zuza6om08ubafgqhbadwv60i", - "content": "โ™‚๏ธ Male", - "outgoingEdgeId": "wciafstvwt3m4lhrejlgl0s0" + "outgoingEdgeId": "wciafstvwt3m4lhrejlgl0s0", + "content": "โ™‚๏ธ Male" }, { "id": "ymxxgoxxbfcmnhudwmerfgbx", - "type": 0, - "blockId": "zuza6om08ubafgqhbadwv60i", - "content": "โ™€๏ธ Female", - "outgoingEdgeId": "f60ldz2g58kfkvsfmnf39fjb" + "outgoingEdgeId": "f60ldz2g58kfkvsfmnf39fjb", + "content": "โ™€๏ธ Female" } - ], - "groupId": "ynt0ya95bvuqj8mf39e938k4", - "options": { - "buttonLabel": "Send", - "isSearchable": false, - "isMultipleChoice": false, - "searchInputPlaceholder": "Filter the options..." - } + ] } - ], - "graphCoordinates": { "x": 786.06640625, "y": 173.03102029763343 } + ] }, { "id": "c59xwfc18i4xjpaeu9dzrjcu", "title": "", + "graphCoordinates": { "x": 1142.220231700246, "y": 145.316328962412 }, "blocks": [ { "id": "meoptkjq8tupr3qkyqkpaxqq", "type": "Set variable", - "groupId": "c59xwfc18i4xjpaeu9dzrjcu", "options": { "variableId": "vhl1s7qoksnw7r8b1soocxwsd", "expressionToEvaluate": "he" @@ -225,26 +151,24 @@ }, { "id": "kqbiaq87al2uq07vuno69syo", + "outgoingEdgeId": "to4im28nzrg3yk0ama07l2oz", "type": "text", "content": { "richText": [ { "type": "p", "children": [{ "text": "What's his name?" }] } ] - }, - "groupId": "c59xwfc18i4xjpaeu9dzrjcu", - "outgoingEdgeId": "to4im28nzrg3yk0ama07l2oz" + } } - ], - "graphCoordinates": { "x": 1142.2202317002457, "y": 145.31632896241197 } + ] }, { "id": "qzge99trjqvp7vjmjo6rk56o", "title": "", + "graphCoordinates": { "x": 1140.34375, "y": 328.5390625 }, "blocks": [ { "id": "jyi9t11totyrw2jeohfhvfw1", "type": "Set variable", - "groupId": "qzge99trjqvp7vjmjo6rk56o", "options": { "variableId": "vhl1s7qoksnw7r8b1soocxwsd", "expressionToEvaluate": "she" @@ -252,42 +176,35 @@ }, { "id": "f9qyzjo67x7zen5q4xih3xv2", + "outgoingEdgeId": "c6x6fubn2qu5vvgfc6d14krl", "type": "text", "content": { "richText": [ { "type": "p", "children": [{ "text": "What's her name?" }] } ] - }, - "groupId": "qzge99trjqvp7vjmjo6rk56o", - "outgoingEdgeId": "c6x6fubn2qu5vvgfc6d14krl" + } } - ], - "graphCoordinates": { "x": 1140.34375, "y": 328.5390625 } + ] }, { "id": "eq1tnkdfxxf8q08vxckl3md6", "title": "Name", + "graphCoordinates": { "x": 1501.890625, "y": 169.65234375 }, "blocks": [ { "id": "kxzi32ioxwqpdy9yy0ktoavu", + "outgoingEdgeId": "g4do01p1scej1trqlbidbrw1", "type": "text input", - "groupId": "eq1tnkdfxxf8q08vxckl3md6", "options": { - "isLong": false, - "labels": { - "button": "Send", - "placeholder": "Type your answer..." - }, "variableId": "vgl2m65vej3cjwqvkawnpih2l" - }, - "outgoingEdgeId": "g4do01p1scej1trqlbidbrw1" + } } - ], - "graphCoordinates": { "x": 1501.890625, "y": 169.65234375 } + ] }, { "id": "xgulc4hfxlmjmr288ghillwz", "title": "Age", + "graphCoordinates": { "x": 1846.419374527324, "y": 168.0560932773236 }, "blocks": [ { "id": "e61e41j7wdisp1yxlr78gjxs", @@ -296,8 +213,7 @@ "richText": [ { "type": "p", "children": [{ "text": "How cute ๐Ÿ˜Š" }] } ] - }, - "groupId": "xgulc4hfxlmjmr288ghillwz" + } }, { "id": "ep4iqxpgalslj0blt71rglbv", @@ -306,8 +222,7 @@ "richText": [ { "type": "p", "children": [{ "text": "How old is {{Name}}?" }] } ] - }, - "groupId": "xgulc4hfxlmjmr288ghillwz" + } }, { "id": "y2fcko12ha5n9zjxickaakxt", @@ -315,49 +230,36 @@ "items": [ { "id": "vliolql8p4vo58pvsz7olf5w", - "type": 3, - "title": "Less than 1 year", - "blockId": "y2fcko12ha5n9zjxickaakxt", + "outgoingEdgeId": "pehpu3fo38ofsgh6b9dli0i4", "pictureSrc": "https://images.unsplash.com/photo-1592924728350-f7d4fd5d1655?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=Mnw0MjU2MDR8MHwxfHNlYXJjaHwxNXx8cHVwcHl8ZW58MHwwfHx8MTY4MzIyNDMxOA&ixlib=rb-4.0.3&q=80&w=1080", - "outgoingEdgeId": "pehpu3fo38ofsgh6b9dli0i4" + "title": "Less than 1 year" }, { "id": "b3ci3fpppgsu312gsl4hs6au", - "type": 3, - "title": "1-5 years", - "blockId": "y2fcko12ha5n9zjxickaakxt", + "outgoingEdgeId": "ilvu55d6cmembesg0askzgzh", "pictureSrc": "https://images.unsplash.com/photo-1672363340663-37526fffa24d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=Mnw0MjU2MDR8MHwxfHNlYXJjaHwxMHx8eW91bmclMjBkb2d8ZW58MHwwfHx8MTY4MzIyNDM0OA&ixlib=rb-4.0.3&q=80&w=1080", - "outgoingEdgeId": "ilvu55d6cmembesg0askzgzh" + "title": "1-5 years" }, { "id": "asi8dmhlwnysvm4tmvoipglz", - "type": 3, - "title": "5-10 years", - "blockId": "y2fcko12ha5n9zjxickaakxt", + "outgoingEdgeId": "kvlz0ly8o4h99997ijiejwe8", "pictureSrc": "https://images.unsplash.com/photo-1587300003388-59208cc962cb?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=Mnw0MjU2MDR8MHwxfHNlYXJjaHwzfHxkb2d8ZW58MHwwfHx8MTY4MzIyNDEwNg&ixlib=rb-4.0.3&q=80&w=1080", - "outgoingEdgeId": "kvlz0ly8o4h99997ijiejwe8" + "title": "5-10 years" }, { "id": "w9eeiclycv7nm0ennaxbxo1d", - "type": 3, - "title": "Above 10 years", - "blockId": "y2fcko12ha5n9zjxickaakxt", + "outgoingEdgeId": "y8v7vkh236e4o4f2latpb7mr", "pictureSrc": "https://images.unsplash.com/photo-1553531009-7e4b807a0673?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=Mnw0MjU2MDR8MHwxfHNlYXJjaHw4fHxvbGQlMjBkb2d8ZW58MHwwfHx8MTY4MzIyNDQxNw&ixlib=rb-4.0.3&q=80&w=1080", - "outgoingEdgeId": "y8v7vkh236e4o4f2latpb7mr" + "title": "Above 10 years" } - ], - "groupId": "xgulc4hfxlmjmr288ghillwz", - "options": { - "buttonLabel": "Send", - "searchInputPlaceholder": "Filter the options..." - } + ] } - ], - "graphCoordinates": { "x": 1846.4193745273237, "y": 168.05609327732364 } + ] }, { "id": "s4cccw69brg5ipyakvsoaioo", "title": "Spayed", + "graphCoordinates": { "x": 2535.586058093481, "y": 164.2060504876776 }, "blocks": [ { "id": "zw0mfpqem8eib75qs5brnfnu", @@ -369,8 +271,7 @@ "children": [{ "text": "Is {{Pronoun}} spayed or neutered" }] } ] - }, - "groupId": "s4cccw69brg5ipyakvsoaioo" + } }, { "id": "w8l8qekmkjwdct0f73f64yke", @@ -378,33 +279,22 @@ "items": [ { "id": "njc0kol8iicj5xo06gezhl52", - "type": 0, - "blockId": "w8l8qekmkjwdct0f73f64yke", - "content": "โŒ No", - "outgoingEdgeId": "bindxs5p6lbkszkuw7rhpvh1" + "outgoingEdgeId": "bindxs5p6lbkszkuw7rhpvh1", + "content": "โŒ No" }, { "id": "jp5k0mx1drijt7k1v4a2z6t8", - "type": 0, - "blockId": "w8l8qekmkjwdct0f73f64yke", - "content": "โœ… Yes", - "outgoingEdgeId": "igwjs895n7q48h47xhpc90wc" + "outgoingEdgeId": "igwjs895n7q48h47xhpc90wc", + "content": "โœ… Yes" } - ], - "groupId": "s4cccw69brg5ipyakvsoaioo", - "options": { - "buttonLabel": "Send", - "isSearchable": false, - "isMultipleChoice": false, - "searchInputPlaceholder": "Filter the options..." - } + ] } - ], - "graphCoordinates": { "x": 2535.5860580934814, "y": 164.20605048767763 } + ] }, { "id": "j19dlmdh2ojntwk1lzqemo7a", "title": "Email", + "graphCoordinates": { "x": 2989.53096827949, "y": 367.6582890794456 }, "blocks": [ { "id": "os3ecqb05r4todaekg0206t4", @@ -416,8 +306,7 @@ "children": [{ "text": "Thank you for all this information." }] } ] - }, - "groupId": "j19dlmdh2ojntwk1lzqemo7a" + } }, { "id": "v5sxfs35u83hqfsh9970flj7", @@ -433,8 +322,7 @@ ] } ] - }, - "groupId": "j19dlmdh2ojntwk1lzqemo7a" + } }, { "id": "sutyhv073mi6p80115jyu8s4", @@ -448,116 +336,102 @@ ] } ] - }, - "groupId": "j19dlmdh2ojntwk1lzqemo7a" + } }, { "id": "ouu081yxvf9raf522k08vr6g", + "outgoingEdgeId": "bw2ddpla0a4qggv8b7et3m12", "type": "email input", - "groupId": "j19dlmdh2ojntwk1lzqemo7a", "options": { - "labels": { "button": "Send", "placeholder": "Type your email..." }, - "variableId": "vzhkagzjqqa0amfc78jekl2gz", - "retryMessageContent": "This email doesn't seem to be valid. Can you type it again?" - }, - "outgoingEdgeId": "bw2ddpla0a4qggv8b7et3m12" + "variableId": "vzhkagzjqqa0amfc78jekl2gz" + } } - ], - "graphCoordinates": { "x": 2989.53096827949, "y": 367.6582890794456 } + ] }, { "id": "rly6ojrxf1oo4augnflhj0kj", "title": "", + "graphCoordinates": { "x": 2186.904241629908, "y": 387.2160670995469 }, "blocks": [ { "id": "cubvtqhhgvf6k9597von95bt", + "outgoingEdgeId": "wtbthu0nu61a6qijaranccfw", "type": "Set variable", - "groupId": "rly6ojrxf1oo4augnflhj0kj", "options": { - "isCode": true, "variableId": "vq61f8ykwadq1pj8389qf9h91", "expressionToEvaluate": "{{Estimated price}} + 5" - }, - "outgoingEdgeId": "wtbthu0nu61a6qijaranccfw" + } } - ], - "graphCoordinates": { "x": 2186.904241629908, "y": 387.2160670995469 } + ] }, { "id": "ggiqdlnnh0urjn8r5d0wip5u", "title": "", + "graphCoordinates": { "x": 2892.884331508873, "y": 193.3583588107446 }, "blocks": [ { "id": "ww4zmawu2jbvrykqwqq7fnh5", + "outgoingEdgeId": "kuh8vfaq0nazrtpkif9pzrpu", "type": "Set variable", - "groupId": "ggiqdlnnh0urjn8r5d0wip5u", "options": { - "isCode": true, "variableId": "vq61f8ykwadq1pj8389qf9h91", "expressionToEvaluate": "{{Estimated price}} + 20" - }, - "outgoingEdgeId": "kuh8vfaq0nazrtpkif9pzrpu" + } } - ], - "graphCoordinates": { "x": 2892.8843315088734, "y": 193.35835881074462 } + ] }, { "id": "trjrsr2xpg0idmldl9pwcqry", "title": "", + "graphCoordinates": { "x": 2187.765700621067, "y": 522.8303147750385 }, "blocks": [ { "id": "gdujudl5bf90oayj6z96ghv8", + "outgoingEdgeId": "dvaakgyx7rteqs23qxz8uqx8", "type": "Set variable", - "groupId": "trjrsr2xpg0idmldl9pwcqry", "options": { - "isCode": true, "variableId": "vq61f8ykwadq1pj8389qf9h91", "expressionToEvaluate": "{{Estimated price}} + 10" - }, - "outgoingEdgeId": "dvaakgyx7rteqs23qxz8uqx8" + } } - ], - "graphCoordinates": { "x": 2187.7657006210675, "y": 522.8303147750385 } + ] }, { "id": "ykjr48s18zp8a0tiwik18mum", "title": "", + "graphCoordinates": { "x": 2187.927544552159, "y": 661.0263366270658 }, "blocks": [ { "id": "sevhy7y6pkbss80rph5blunn", + "outgoingEdgeId": "opipj5xi262umvn98kkga4tx", "type": "Set variable", - "groupId": "ykjr48s18zp8a0tiwik18mum", "options": { - "isCode": true, "variableId": "vq61f8ykwadq1pj8389qf9h91", "expressionToEvaluate": "{{Estimated price}} + 25" - }, - "outgoingEdgeId": "opipj5xi262umvn98kkga4tx" + } } - ], - "graphCoordinates": { "x": 2187.927544552159, "y": 661.0263366270658 } + ] }, { "id": "c1x4umwx2g4j39peylr9rfor", "title": "", + "graphCoordinates": { "x": 2189.67995427391, "y": 796.4435670811636 }, "blocks": [ { "id": "bw9d73ypbvc83ltqme9kwwzc", + "outgoingEdgeId": "ozsoiu70hbqp5pqucstlnh3b", "type": "Set variable", - "groupId": "c1x4umwx2g4j39peylr9rfor", "options": { - "isCode": true, "variableId": "vq61f8ykwadq1pj8389qf9h91", "expressionToEvaluate": "{{Estimated price}} + 55" - }, - "outgoingEdgeId": "ozsoiu70hbqp5pqucstlnh3b" + } } - ], - "graphCoordinates": { "x": 2189.6799542739104, "y": 796.4435670811636 } + ] }, { "id": "lmrd5falh8nkdizqy9obpeqi", "title": "Bye", + "graphCoordinates": { "x": 3340.474508360785, "y": 365.6627012838016 }, "blocks": [ { "id": "ddpum0cjrd2bredvakte914k", @@ -566,8 +440,7 @@ "richText": [ { "type": "p", "children": [{ "text": "Perfect ๐Ÿ‘Œ" }] } ] - }, - "groupId": "lmrd5falh8nkdizqy9obpeqi" + } }, { "id": "qabtk59h81p0fv14au584ay8", @@ -583,226 +456,158 @@ ] } ] - }, - "groupId": "lmrd5falh8nkdizqy9obpeqi" + } } - ], - "graphCoordinates": { "x": 3340.474508360785, "y": 365.6627012838016 } + ] } ], - "variables": [ - { "id": "vgl2m65vej3cjwqvkawnpih2l", "name": "Name" }, - { "id": "vhl1s7qoksnw7r8b1soocxwsd", "name": "Pronoun" }, - { "id": "vq61f8ykwadq1pj8389qf9h91", "name": "Estimated price" }, - { "id": "vzhkagzjqqa0amfc78jekl2gz", "name": "Email" } - ], "edges": [ { "id": "u0009iy3sakdgh3k1x41i5yr", - "to": { "groupId": "av0jzkh3qhgdyjrouvl2zywe" }, - "from": { - "blockId": "wj0uw1i63j4j4xe1q8xxmda0", - "groupId": "f4ef28wxteh0wdjgubtojnkr" - } + "from": { "eventId": "f4ef28wxteh0wdjgubtojnkr" }, + "to": { "groupId": "av0jzkh3qhgdyjrouvl2zywe" } }, { "id": "vl23l0ak8w2qxj9wrgxhznz3", - "to": { "groupId": "dh3wz001jaclg8ifc1vhovlq" }, "from": { - "itemId": "m7l8u4y5vmwozvdtsmhq3q49", "blockId": "dtvbio4qytr3iojc7tq2quvy", - "groupId": "av0jzkh3qhgdyjrouvl2zywe" - } + "itemId": "m7l8u4y5vmwozvdtsmhq3q49" + }, + "to": { "groupId": "dh3wz001jaclg8ifc1vhovlq" } }, { "id": "moj9ezfl6bvpr4aj76cztkiu", - "to": { "groupId": "ynt0ya95bvuqj8mf39e938k4" }, - "from": { - "blockId": "f2902yy6o00fwe5h4xihrntj", - "groupId": "dh3wz001jaclg8ifc1vhovlq" - } + "from": { "blockId": "f2902yy6o00fwe5h4xihrntj" }, + "to": { "groupId": "ynt0ya95bvuqj8mf39e938k4" } }, { "id": "wciafstvwt3m4lhrejlgl0s0", - "to": { "groupId": "c59xwfc18i4xjpaeu9dzrjcu" }, "from": { - "itemId": "mrca2ini7z81ik4k1o9g3a1s", "blockId": "zuza6om08ubafgqhbadwv60i", - "groupId": "ynt0ya95bvuqj8mf39e938k4" - } + "itemId": "mrca2ini7z81ik4k1o9g3a1s" + }, + "to": { "groupId": "c59xwfc18i4xjpaeu9dzrjcu" } }, { "id": "f60ldz2g58kfkvsfmnf39fjb", - "to": { "groupId": "qzge99trjqvp7vjmjo6rk56o" }, "from": { - "itemId": "ymxxgoxxbfcmnhudwmerfgbx", "blockId": "zuza6om08ubafgqhbadwv60i", - "groupId": "ynt0ya95bvuqj8mf39e938k4" - } + "itemId": "ymxxgoxxbfcmnhudwmerfgbx" + }, + "to": { "groupId": "qzge99trjqvp7vjmjo6rk56o" } }, { "id": "to4im28nzrg3yk0ama07l2oz", - "to": { "groupId": "eq1tnkdfxxf8q08vxckl3md6" }, - "from": { - "blockId": "kqbiaq87al2uq07vuno69syo", - "groupId": "c59xwfc18i4xjpaeu9dzrjcu" - } + "from": { "blockId": "kqbiaq87al2uq07vuno69syo" }, + "to": { "groupId": "eq1tnkdfxxf8q08vxckl3md6" } }, { "id": "c6x6fubn2qu5vvgfc6d14krl", - "to": { "groupId": "eq1tnkdfxxf8q08vxckl3md6" }, - "from": { - "blockId": "f9qyzjo67x7zen5q4xih3xv2", - "groupId": "qzge99trjqvp7vjmjo6rk56o" - } + "from": { "blockId": "f9qyzjo67x7zen5q4xih3xv2" }, + "to": { "groupId": "eq1tnkdfxxf8q08vxckl3md6" } }, { "id": "g4do01p1scej1trqlbidbrw1", - "to": { "groupId": "xgulc4hfxlmjmr288ghillwz" }, - "from": { - "blockId": "kxzi32ioxwqpdy9yy0ktoavu", - "groupId": "eq1tnkdfxxf8q08vxckl3md6" - } + "from": { "blockId": "kxzi32ioxwqpdy9yy0ktoavu" }, + "to": { "groupId": "xgulc4hfxlmjmr288ghillwz" } }, { "id": "pehpu3fo38ofsgh6b9dli0i4", - "to": { "groupId": "rly6ojrxf1oo4augnflhj0kj" }, "from": { - "itemId": "vliolql8p4vo58pvsz7olf5w", "blockId": "y2fcko12ha5n9zjxickaakxt", - "groupId": "xgulc4hfxlmjmr288ghillwz" - } + "itemId": "vliolql8p4vo58pvsz7olf5w" + }, + "to": { "groupId": "rly6ojrxf1oo4augnflhj0kj" } }, { "id": "ilvu55d6cmembesg0askzgzh", - "to": { "groupId": "trjrsr2xpg0idmldl9pwcqry" }, "from": { - "itemId": "b3ci3fpppgsu312gsl4hs6au", "blockId": "y2fcko12ha5n9zjxickaakxt", - "groupId": "xgulc4hfxlmjmr288ghillwz" - } + "itemId": "b3ci3fpppgsu312gsl4hs6au" + }, + "to": { "groupId": "trjrsr2xpg0idmldl9pwcqry" } }, { "id": "kvlz0ly8o4h99997ijiejwe8", - "to": { "groupId": "ykjr48s18zp8a0tiwik18mum" }, "from": { - "itemId": "asi8dmhlwnysvm4tmvoipglz", "blockId": "y2fcko12ha5n9zjxickaakxt", - "groupId": "xgulc4hfxlmjmr288ghillwz" - } + "itemId": "asi8dmhlwnysvm4tmvoipglz" + }, + "to": { "groupId": "ykjr48s18zp8a0tiwik18mum" } }, { "id": "y8v7vkh236e4o4f2latpb7mr", - "to": { "groupId": "c1x4umwx2g4j39peylr9rfor" }, "from": { - "itemId": "w9eeiclycv7nm0ennaxbxo1d", "blockId": "y2fcko12ha5n9zjxickaakxt", - "groupId": "xgulc4hfxlmjmr288ghillwz" - } + "itemId": "w9eeiclycv7nm0ennaxbxo1d" + }, + "to": { "groupId": "c1x4umwx2g4j39peylr9rfor" } }, { "id": "wtbthu0nu61a6qijaranccfw", - "to": { "groupId": "s4cccw69brg5ipyakvsoaioo" }, - "from": { - "blockId": "cubvtqhhgvf6k9597von95bt", - "groupId": "rly6ojrxf1oo4augnflhj0kj" - } + "from": { "blockId": "cubvtqhhgvf6k9597von95bt" }, + "to": { "groupId": "s4cccw69brg5ipyakvsoaioo" } }, { "id": "dvaakgyx7rteqs23qxz8uqx8", - "to": { "groupId": "s4cccw69brg5ipyakvsoaioo" }, - "from": { - "blockId": "gdujudl5bf90oayj6z96ghv8", - "groupId": "trjrsr2xpg0idmldl9pwcqry" - } + "from": { "blockId": "gdujudl5bf90oayj6z96ghv8" }, + "to": { "groupId": "s4cccw69brg5ipyakvsoaioo" } }, { "id": "opipj5xi262umvn98kkga4tx", - "to": { "groupId": "s4cccw69brg5ipyakvsoaioo" }, - "from": { - "blockId": "sevhy7y6pkbss80rph5blunn", - "groupId": "ykjr48s18zp8a0tiwik18mum" - } + "from": { "blockId": "sevhy7y6pkbss80rph5blunn" }, + "to": { "groupId": "s4cccw69brg5ipyakvsoaioo" } }, { "id": "ozsoiu70hbqp5pqucstlnh3b", - "to": { "groupId": "s4cccw69brg5ipyakvsoaioo" }, - "from": { - "blockId": "bw9d73ypbvc83ltqme9kwwzc", - "groupId": "c1x4umwx2g4j39peylr9rfor" - } + "from": { "blockId": "bw9d73ypbvc83ltqme9kwwzc" }, + "to": { "groupId": "s4cccw69brg5ipyakvsoaioo" } }, { "id": "bindxs5p6lbkszkuw7rhpvh1", - "to": { "groupId": "ggiqdlnnh0urjn8r5d0wip5u" }, "from": { - "itemId": "njc0kol8iicj5xo06gezhl52", "blockId": "w8l8qekmkjwdct0f73f64yke", - "groupId": "s4cccw69brg5ipyakvsoaioo" - } + "itemId": "njc0kol8iicj5xo06gezhl52" + }, + "to": { "groupId": "ggiqdlnnh0urjn8r5d0wip5u" } }, { "id": "igwjs895n7q48h47xhpc90wc", - "to": { "groupId": "j19dlmdh2ojntwk1lzqemo7a" }, "from": { - "itemId": "jp5k0mx1drijt7k1v4a2z6t8", "blockId": "w8l8qekmkjwdct0f73f64yke", - "groupId": "s4cccw69brg5ipyakvsoaioo" - } + "itemId": "jp5k0mx1drijt7k1v4a2z6t8" + }, + "to": { "groupId": "j19dlmdh2ojntwk1lzqemo7a" } }, { "id": "kuh8vfaq0nazrtpkif9pzrpu", - "to": { "groupId": "j19dlmdh2ojntwk1lzqemo7a" }, - "from": { - "blockId": "ww4zmawu2jbvrykqwqq7fnh5", - "groupId": "ggiqdlnnh0urjn8r5d0wip5u" - } + "from": { "blockId": "ww4zmawu2jbvrykqwqq7fnh5" }, + "to": { "groupId": "j19dlmdh2ojntwk1lzqemo7a" } }, { "id": "bw2ddpla0a4qggv8b7et3m12", - "to": { "groupId": "lmrd5falh8nkdizqy9obpeqi" }, - "from": { - "blockId": "ouu081yxvf9raf522k08vr6g", - "groupId": "j19dlmdh2ojntwk1lzqemo7a" - } + "from": { "blockId": "ouu081yxvf9raf522k08vr6g" }, + "to": { "groupId": "lmrd5falh8nkdizqy9obpeqi" } } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, + "variables": [ + { "id": "vgl2m65vej3cjwqvkawnpih2l", "name": "Name" }, + { "id": "vhl1s7qoksnw7r8b1soocxwsd", "name": "Pronoun" }, + { "id": "vq61f8ykwadq1pj8389qf9h91", "name": "Estimated price" }, + { "id": "vzhkagzjqqa0amfc78jekl2gz", "name": "Email" } + ], + "theme": {}, "selectedThemeTemplateId": null, - "settings": { - "general": { - "isBrandingEnabled": true, - "isInputPrefillEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": 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 } - }, + "settings": {}, + "createdAt": "2023-11-07T07:16:16.866Z", + "updatedAt": "2023-11-07T07:16:16.866Z", + "icon": "๐Ÿถ", + "folderId": null, "publicId": null, "customDomain": null, - "workspaceId": "freeWorkspace", + "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/faq.json b/apps/builder/public/templates/faq.json index 7c904a86a8..f9b320bbe9 100644 --- a/apps/builder/public/templates/faq.json +++ b/apps/builder/public/templates/faq.json @@ -1,34 +1,23 @@ { - "id": "cl96ns7zc000dky099ku4bmav", - "version": "4", - "createdAt": "2022-10-13T06:07:11.976Z", - "updatedAt": "2022-10-13T06:27:31.951Z", - "icon": "๐Ÿ’ฌ", + "version": "6", + "id": "cloo0iymj000b1aoraoto4iom", "name": "FAQ", - "folderId": null, - "groups": [ + "events": [ { "id": "cl96ns7za000309kyewk56s22", - "title": "Start", - "blocks": [ - { - "id": "cl96ns7za000409kydoui7mpu", - "type": "start", - "label": "Start", - "groupId": "cl96ns7za000309kyewk56s22", - "outgoingEdgeId": "cl96nv0ij00093b6id4t83dvu" - } - ], - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "cl96nv0ij00093b6id4t83dvu", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "cl96ns9qr00043b6ii07bo25o", - "graphCoordinates": { "x": 392, "y": 181 }, "title": "Menu", + "graphCoordinates": { "x": 385.68, "y": 86.92 }, "blocks": [ { "id": "cl96ns9qr00053b6igebgtl5q", - "groupId": "cl96ns9qr00043b6ii07bo25o", "type": "text", "content": { "richText": [ @@ -45,37 +34,27 @@ }, { "id": "cl96nv877000b3b6i7p69ss2o", - "groupId": "cl96ns9qr00043b6ii07bo25o", "type": "choice input", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, "items": [ { "id": "cl96nv877000c3b6idyepv694", - "blockId": "cl96nv877000b3b6i7p69ss2o", - "type": 0, - "content": "What's Analyzr?", - "outgoingEdgeId": "cl96o2u6h000t3b6izmh4pguj" + "outgoingEdgeId": "cl96o2u6h000t3b6izmh4pguj", + "content": "What's Analyzr?" }, { - "blockId": "cl96nv877000b3b6i7p69ss2o", - "type": 0, "id": "cl96nvcwi000d3b6ipyfzcyaw", - "content": "Can I use your tool for free?", - "outgoingEdgeId": "cl96o6hxh00173b6ix83nn581" + "outgoingEdgeId": "cl96o6hxh00173b6ix83nn581", + "content": "Can I use your tool for free?" }, { - "blockId": "cl96nv877000b3b6i7p69ss2o", - "type": 0, "id": "cl96obwgy001k3b6ir1a8qk5w", - "content": "Tell me about the company", - "outgoingEdgeId": "cl96ofn4s001q3b6i482xx6jp" + "outgoingEdgeId": "cl96ofn4s001q3b6i482xx6jp", + "content": "Tell me about the company" }, { - "blockId": "cl96nv877000b3b6i7p69ss2o", - "type": 0, "id": "cl96nvstv000e3b6itm8cj1s5", - "content": "I have another question", - "outgoingEdgeId": "cl96ogaa0001x3b6izae2alxq" + "outgoingEdgeId": "cl96ogaa0001x3b6izae2alxq", + "content": "I have another question" } ] } @@ -83,12 +62,11 @@ }, { "id": "cl96nt9ob00063b6ii2pktlxq", - "graphCoordinates": { "x": 26.51592874499341, "y": 202.71976248331134 }, "title": "Welcom", + "graphCoordinates": { "x": 43.5, "y": 89.92 }, "blocks": [ { "id": "cl96nt9ob00073b6ionlvakha", - "groupId": "cl96nt9ob00063b6ii2pktlxq", "type": "text", "content": { "richText": [ @@ -98,7 +76,7 @@ }, { "id": "cl96ntraa00083b6ij922v2qh", - "groupId": "cl96nt9ob00063b6ii2pktlxq", + "outgoingEdgeId": "cl96nv51s000a3b6i3wmlcmdt", "type": "text", "content": { "richText": [ @@ -111,19 +89,17 @@ ] } ] - }, - "outgoingEdgeId": "cl96nv51s000a3b6i3wmlcmdt" + } } ] }, { "id": "cl96o2cgi000r3b6iljr1iwdl", - "graphCoordinates": { "x": 787, "y": -534 }, "title": "What's Analyzr", + "graphCoordinates": { "x": 774.53, "y": -513.14 }, "blocks": [ { "id": "cl96o2cgi000s3b6ikdv6iogz", - "groupId": "cl96o2cgi000r3b6iljr1iwdl", "type": "text", "content": { "richText": [ @@ -140,7 +116,6 @@ }, { "id": "cl96o3260000u3b6i9czqm52g", - "groupId": "cl96o2cgi000r3b6iljr1iwdl", "type": "text", "content": { "richText": [ @@ -156,29 +131,28 @@ }, { "id": "cl96o55z3000x3b6ikq14g2tu", - "groupId": "cl96o2cgi000r3b6iljr1iwdl", "type": "choice input", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, "items": [ - { - "id": "cl96o55z3000y3b6idpn54byw", - "blockId": "cl96o55z3000x3b6ikq14g2tu", - "type": 0, - "content": "Sounds good!", - "outgoingEdgeId": "cl96o5k4n00103b6irh2dfp2r" - } + { "id": "cl96o55z3000y3b6idpn54byw", "content": "Sounds good!" } ] + }, + { + "id": "qrg1xtxxbmyo8a6mztma3dvr", + "type": "Jump", + "options": { + "groupId": "cl96ns9qr00043b6ii07bo25o", + "blockId": "cl96nv877000b3b6i7p69ss2o" + } } ] }, { "id": "cl96o6a2700123b6ie4efb6bb", - "graphCoordinates": { "x": 803.5720553542924, "y": 7.420010744791735 }, "title": "Use for free", + "graphCoordinates": { "x": 775.05, "y": 7.42 }, "blocks": [ { "id": "cl96o6a2700133b6ii5n027h2", - "groupId": "cl96o6a2700123b6ie4efb6bb", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "You can!" }] }] @@ -186,7 +160,6 @@ }, { "id": "cl96o6a2700143b6ija9jqhky", - "groupId": "cl96o6a2700123b6ie4efb6bb", "type": "text", "content": { "richText": [ @@ -203,23 +176,17 @@ }, { "id": "cl96o6a2700153b6il1wj2aev", - "groupId": "cl96o6a2700123b6ie4efb6bb", "type": "choice input", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, "items": [ { "id": "cl96o6a2700163b6i818ywnqv", - "blockId": "cl96o6a2700153b6il1wj2aev", - "type": 0, - "content": "Awesome!", - "outgoingEdgeId": "cl96oa6kn001g3b6iaormwu2j" + "outgoingEdgeId": "n4rgj2fmqrmnkvo9m9ebzak7", + "content": "Awesome!" }, { - "blockId": "cl96o6a2700153b6il1wj2aev", - "type": 0, "id": "cl96o83lo00183b6igen42ivq", - "content": "What's an event?", - "outgoingEdgeId": "cl96oa83f001h3b6i81wodnjx" + "outgoingEdgeId": "cl96oa83f001h3b6i81wodnjx", + "content": "What's an event?" } ] } @@ -227,12 +194,11 @@ }, { "id": "cl96o8eym001a3b6i3lxh7kw0", - "graphCoordinates": { "x": 1179.4933795363515, "y": 7.7432256889634 }, "title": "User event", + "graphCoordinates": { "x": 1158.01, "y": 322.44 }, "blocks": [ { "id": "cl96o8eyn001b3b6icmbgg7lw", - "groupId": "cl96o8eym001a3b6i3lxh7kw0", "type": "text", "content": { "richText": [ @@ -247,7 +213,6 @@ }, { "id": "cl96o990s001c3b6ie2jjefhf", - "groupId": "cl96o8eym001a3b6i3lxh7kw0", "type": "text", "content": { "richText": [ @@ -264,38 +229,28 @@ }, { "id": "cl96o9xba001d3b6i9004l33e", - "groupId": "cl96o8eym001a3b6i3lxh7kw0", "type": "choice input", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, "items": [ - { - "id": "cl96o9xbd001e3b6i6ag5ooo7", - "blockId": "cl96o9xba001d3b6i9004l33e", - "type": 0, - "content": "Ok, got it!" - } + { "id": "cl96o9xbd001e3b6i6ag5ooo7", "content": "Ok, got it!" } ] }, { - "id": "cl96oaa8n001j3b6ieqe5r775", - "groupId": "cl96o8eym001a3b6i3lxh7kw0", - "type": "Typebot link", + "id": "bkmgmgxa96k5261su12hv58k", + "type": "Jump", "options": { - "typebotId": "current", "groupId": "cl96ns9qr00043b6ii07bo25o", - "mergeResults": false + "blockId": "cl96nv877000b3b6i7p69ss2o" } } ] }, { "id": "cl96oc274001m3b6ig3beli9v", - "graphCoordinates": { "x": 802.8616130197884, "y": 477.1611550243932 }, "title": "Company", + "graphCoordinates": { "x": 772.59, "y": 432 }, "blocks": [ { "id": "cl96ods3i001o3b6iiyboljuf", - "groupId": "cl96oc274001m3b6ig3beli9v", "type": "text", "content": { "richText": [ @@ -310,7 +265,6 @@ }, { "id": "cl96oc277001n3b6if8wv6hzl", - "groupId": "cl96oc274001m3b6ig3beli9v", "type": "text", "content": { "richText": [ @@ -323,7 +277,6 @@ }, { "id": "cl96oenlh001p3b6iutaiw9wl", - "groupId": "cl96oc274001m3b6ig3beli9v", "type": "text", "content": { "richText": [ @@ -340,29 +293,26 @@ }, { "id": "cl96oftnv001r3b6ixen8g0bv", - "groupId": "cl96oc274001m3b6ig3beli9v", "type": "choice input", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, - "items": [ - { - "id": "cl96oftnv001s3b6i7kjyq7me", - "blockId": "cl96oftnv001r3b6ixen8g0bv", - "type": 0, - "content": "Cool!", - "outgoingEdgeId": "cl96ofyy3001u3b6iro2dkp0w" - } - ] + "items": [{ "id": "cl96oftnv001s3b6i7kjyq7me", "content": "Cool!" }] + }, + { + "id": "js5pbqj76g67yvs6wz99rcbm", + "type": "Jump", + "options": { + "groupId": "cl96ns9qr00043b6ii07bo25o", + "blockId": "cl96nv877000b3b6i7p69ss2o" + } } ] }, { "id": "cl96og2yr001v3b6ivhzb1x34", - "graphCoordinates": { "x": 798.1737080264639, "y": 1045.5696354649942 }, "title": "Question", + "graphCoordinates": { "x": 773.69, "y": 1020.26 }, "blocks": [ { "id": "cl96og2yu001w3b6ijqgstubu", - "groupId": "cl96og2yr001v3b6ivhzb1x34", "type": "text", "content": { "richText": [ @@ -372,27 +322,24 @@ }, { "id": "cl96ogmjx001y3b6iwfosloet", - "groupId": "cl96og2yr001v3b6ivhzb1x34", + "outgoingEdgeId": "cl96ohn9900213b6ibex8g6my", "type": "text input", "options": { - "isLong": true, "labels": { - "button": "Send", "placeholder": "Type your question..." - } - }, - "outgoingEdgeId": "cl96ohn9900213b6ibex8g6my" + }, + "isLong": true + } } ] }, { "id": "cl96oh3mn001z3b6i2b0no81w", - "graphCoordinates": { "x": 1174.378083740756, "y": 1049.0855642099898 }, "title": "Bye", + "graphCoordinates": { "x": 1174.378083740756, "y": 1049.08556420999 }, "blocks": [ { "id": "cl96oh3mn00203b6iahw2x1ns", - "groupId": "cl96oh3mn001z3b6i2b0no81w", "type": "text", "content": { "richText": [ @@ -408,143 +355,101 @@ } } ] + }, + { + "id": "pqldfrkh43ncm39lzyeartv3", + "title": "", + "graphCoordinates": { "x": 1151.09, "y": 194.39 }, + "blocks": [ + { + "id": "ifaxemnkm6ikjfv2ozzeg1o3", + "type": "Jump", + "options": { + "groupId": "cl96ns9qr00043b6ii07bo25o", + "blockId": "cl96nv877000b3b6i7p69ss2o" + } + } + ] } ], - "variables": [], "edges": [ { - "from": { - "groupId": "cl96ns7za000309kyewk56s22", - "blockId": "cl96ns7za000409kydoui7mpu" - }, - "to": { "groupId": "cl96nt9ob00063b6ii2pktlxq" }, - "id": "cl96nv0ij00093b6id4t83dvu" + "id": "cl96nv0ij00093b6id4t83dvu", + "from": { "eventId": "cl96ns7za000309kyewk56s22" }, + "to": { "groupId": "cl96nt9ob00063b6ii2pktlxq" } }, { - "from": { - "groupId": "cl96nt9ob00063b6ii2pktlxq", - "blockId": "cl96ntraa00083b6ij922v2qh" - }, - "to": { "groupId": "cl96ns9qr00043b6ii07bo25o" }, - "id": "cl96nv51s000a3b6i3wmlcmdt" + "id": "cl96nv51s000a3b6i3wmlcmdt", + "from": { "blockId": "cl96ntraa00083b6ij922v2qh" }, + "to": { "groupId": "cl96ns9qr00043b6ii07bo25o" } }, { + "id": "cl96o2u6h000t3b6izmh4pguj", "from": { - "groupId": "cl96ns9qr00043b6ii07bo25o", "blockId": "cl96nv877000b3b6i7p69ss2o", "itemId": "cl96nv877000c3b6idyepv694" }, - "to": { "groupId": "cl96o2cgi000r3b6iljr1iwdl" }, - "id": "cl96o2u6h000t3b6izmh4pguj" + "to": { "groupId": "cl96o2cgi000r3b6iljr1iwdl" } }, { + "id": "cl96o6hxh00173b6ix83nn581", "from": { - "groupId": "cl96o2cgi000r3b6iljr1iwdl", - "blockId": "cl96o55z3000x3b6ikq14g2tu", - "itemId": "cl96o55z3000y3b6idpn54byw" - }, - "to": { "groupId": "cl96ns9qr00043b6ii07bo25o" }, - "id": "cl96o5k4n00103b6irh2dfp2r" - }, - { - "from": { - "groupId": "cl96ns9qr00043b6ii07bo25o", "blockId": "cl96nv877000b3b6i7p69ss2o", "itemId": "cl96nvcwi000d3b6ipyfzcyaw" }, - "to": { "groupId": "cl96o6a2700123b6ie4efb6bb" }, - "id": "cl96o6hxh00173b6ix83nn581" - }, - { - "from": { - "groupId": "cl96o6a2700123b6ie4efb6bb", - "blockId": "cl96o6a2700153b6il1wj2aev", - "itemId": "cl96o6a2700163b6i818ywnqv" - }, - "to": { "groupId": "cl96ns9qr00043b6ii07bo25o" }, - "id": "cl96oa6kn001g3b6iaormwu2j" + "to": { "groupId": "cl96o6a2700123b6ie4efb6bb" } }, { + "id": "cl96oa83f001h3b6i81wodnjx", "from": { - "groupId": "cl96o6a2700123b6ie4efb6bb", "blockId": "cl96o6a2700153b6il1wj2aev", "itemId": "cl96o83lo00183b6igen42ivq" }, - "to": { "groupId": "cl96o8eym001a3b6i3lxh7kw0" }, - "id": "cl96oa83f001h3b6i81wodnjx" + "to": { "groupId": "cl96o8eym001a3b6i3lxh7kw0" } }, { + "id": "cl96ofn4s001q3b6i482xx6jp", "from": { - "groupId": "cl96ns9qr00043b6ii07bo25o", "blockId": "cl96nv877000b3b6i7p69ss2o", "itemId": "cl96obwgy001k3b6ir1a8qk5w" }, - "to": { "groupId": "cl96oc274001m3b6ig3beli9v" }, - "id": "cl96ofn4s001q3b6i482xx6jp" - }, - { - "from": { - "groupId": "cl96oc274001m3b6ig3beli9v", - "blockId": "cl96oftnv001r3b6ixen8g0bv", - "itemId": "cl96oftnv001s3b6i7kjyq7me" - }, - "to": { "groupId": "cl96ns9qr00043b6ii07bo25o" }, - "id": "cl96ofyy3001u3b6iro2dkp0w" + "to": { "groupId": "cl96oc274001m3b6ig3beli9v" } }, { + "id": "cl96ogaa0001x3b6izae2alxq", "from": { - "groupId": "cl96ns9qr00043b6ii07bo25o", "blockId": "cl96nv877000b3b6i7p69ss2o", "itemId": "cl96nvstv000e3b6itm8cj1s5" }, - "to": { "groupId": "cl96og2yr001v3b6ivhzb1x34" }, - "id": "cl96ogaa0001x3b6izae2alxq" + "to": { "groupId": "cl96og2yr001v3b6ivhzb1x34" } }, { + "id": "cl96ohn9900213b6ibex8g6my", + "from": { "blockId": "cl96ogmjx001y3b6iwfosloet" }, + "to": { "groupId": "cl96oh3mn001z3b6i2b0no81w" } + }, + { + "id": "n4rgj2fmqrmnkvo9m9ebzak7", "from": { - "groupId": "cl96og2yr001v3b6ivhzb1x34", - "blockId": "cl96ogmjx001y3b6iwfosloet" + "blockId": "cl96o6a2700153b6il1wj2aev", + "itemId": "cl96o6a2700163b6i818ywnqv" }, - "to": { "groupId": "cl96oh3mn001z3b6i2b0no81w" }, - "id": "cl96ohn9900213b6ibex8g6my" + "to": { "groupId": "pqldfrkh43ncm39lzyeartv3" } } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": 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 } - }, + "variables": [], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-07T07:31:34.987Z", + "updatedAt": "2023-11-07T07:34:11.360Z", + "icon": "๐Ÿ’ฌ", + "folderId": null, "publicId": null, "customDomain": null, - "workspaceId": "cl35yesle00188gcpgqu70ia1", + "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/lead-gen-ai.json b/apps/builder/public/templates/lead-gen-ai.json index eab3ed48a0..e89480c3ed 100644 --- a/apps/builder/public/templates/lead-gen-ai.json +++ b/apps/builder/public/templates/lead-gen-ai.json @@ -1,45 +1,34 @@ { - "id": "pjkxzxkujkbk2oml3d35w6zz", - "version": "4", - "createdAt": "2023-04-20T12:29:18.633Z", - "updatedAt": "2023-04-20T12:50:12.385Z", - "icon": "๐Ÿฆพ", + "version": "6", + "id": "clon6cteb000i1avnrdaj92au", "name": "Lead Gen with AI", - "folderId": null, - "groups": [ + "events": [ { "id": "i6xofskq0vdlnfyvf28hzcle", - "title": "Start", - "blocks": [ - { - "id": "22HP69iipkLjJDTUcc1AWW", - "type": "start", - "label": "Start", - "groupId": "i6xofskq0vdlnfyvf28hzcle", - "outgoingEdgeId": "dkgy7qanybx0d9zl2ke2aa03" - } - ], - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "dkgy7qanybx0d9zl2ke2aa03", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "nmlij3lrk42cymsu1tj6b9nv", "title": "Welcome", + "graphCoordinates": { "x": 1, "y": 148 }, "blocks": [ { "id": "sc1y8VwDabNJgiVTBi4qtif", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Hey ๐Ÿ‘‹" }] }] - }, - "groupId": "nmlij3lrk42cymsu1tj6b9nv" + } }, { "id": "s7YqZTBeyCa4Hp3wN2j922c", "type": "image", "content": { "url": "https://media0.giphy.com/media/2f7RQiiWMJc40/giphy.gif?cid=fe3852a34jqk83z51tbm8a1jxmqpuckxxwef79p5myafdlw5&rid=giphy.gif&ct=g" - }, - "groupId": "nmlij3lrk42cymsu1tj6b9nv" + } }, { "id": "z5tydv4qcam6xnh1ehm8hask", @@ -55,8 +44,7 @@ ] } ] - }, - "groupId": "nmlij3lrk42cymsu1tj6b9nv" + } }, { "id": "ygo5cubnk50m5jt6ull3bn0i", @@ -72,38 +60,27 @@ ] } ] - }, - "groupId": "nmlij3lrk42cymsu1tj6b9nv" + } }, { "id": "vw9s76hgwu749gw15bqk4vd3", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Ready?" }] }] - }, - "groupId": "nmlij3lrk42cymsu1tj6b9nv" + } }, { "id": "sbjZWLJGVkHAkDqS4JQeGow", + "outgoingEdgeId": "vgi4r3yjle17balwlhpas25t", "type": "choice input", - "items": [ - { - "id": "hQw2zbp7FDX7XYK9cFpbgC", - "type": 0, - "blockId": "sbjZWLJGVkHAkDqS4JQeGow", - "content": "Yes!" - } - ], - "groupId": "nmlij3lrk42cymsu1tj6b9nv", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, - "outgoingEdgeId": "vgi4r3yjle17balwlhpas25t" + "items": [{ "id": "hQw2zbp7FDX7XYK9cFpbgC", "content": "Yes!" }] } - ], - "graphCoordinates": { "x": 1, "y": 148 } + ] }, { "id": "vrv6xoriyl74wcz34gqlvc0q", "title": "Email", + "graphCoordinates": { "x": 666.07421875, "y": 141 }, "blocks": [ { "id": "scQ5kduafAtfP9T8SHUJnGi", @@ -117,26 +94,22 @@ ] } ] - }, - "groupId": "vrv6xoriyl74wcz34gqlvc0q" + } }, { "id": "snbsad18Bgry8yZ8DZCfdFD", + "outgoingEdgeId": "piew4sf9dpafiweghqvucmax", "type": "email input", - "groupId": "vrv6xoriyl74wcz34gqlvc0q", "options": { - "labels": { "button": "Send", "placeholder": "Type your email..." }, - "variableId": "v3VFChNVSCXQ2rXv4DrJ8Ah", - "retryMessageContent": "This email doesn't seem to be valid. Can you type it again?" - }, - "outgoingEdgeId": "piew4sf9dpafiweghqvucmax" + "variableId": "v3VFChNVSCXQ2rXv4DrJ8Ah" + } } - ], - "graphCoordinates": { "x": 666.07421875, "y": 141 } + ] }, { "id": "wlcaalj5zej2sl1t9kkq55se", "title": "Company", + "graphCoordinates": { "x": 325.22265625, "y": 144.37890625 }, "blocks": [ { "id": "sgtE2Sy7cKykac9B223Kq9R", @@ -148,29 +121,26 @@ "children": [{ "text": "What company do you work for?" }] } ] - }, - "groupId": "wlcaalj5zej2sl1t9kkq55se" + } }, { "id": "sqEsMo747LTDnY9FjQcEwUv", + "outgoingEdgeId": "wlzesf38jzeyf65i1aj6j517", "type": "text input", - "groupId": "wlcaalj5zej2sl1t9kkq55se", "options": { - "isLong": false, "labels": { - "button": "Send", - "placeholder": "Type your answer..." + "placeholder": "Type your answer...", + "button": "Send" }, "variableId": "giiLFGw5xXBCHzvp1qAbdX" - }, - "outgoingEdgeId": "wlzesf38jzeyf65i1aj6j517" + } } - ], - "graphCoordinates": { "x": 325.22265625, "y": 144.37890625 } + ] }, { "id": "trcslng32mdxkjmrw8zxpnpj", "title": "Services", + "graphCoordinates": { "x": 999.90625, "y": 143.7578125 }, "blocks": [ { "id": "su7HceVXWyTCzi2vv3m4QbK", @@ -182,52 +152,29 @@ "children": [{ "text": "What services are you interested in?" }] } ] - }, - "groupId": "trcslng32mdxkjmrw8zxpnpj" + } }, { "id": "s5VQGsVF4hQgziQsXVdwPDW", + "outgoingEdgeId": "wtw2lm86g46ehgvp43fcfks6", "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" - } + { "id": "fnLCBF4NdraSwcubnBhk8H", "content": "Website dev" }, + { "id": "a782h8ynMouY84QjH7XSnR", "content": "Content Marketing" }, + { "id": "jGvh94zBByvVFpSS3w97zY", "content": "Social Media" }, + { "id": "6PRLbKUezuFmwWtLVbvAQ7", "content": "UI / UX Design" } ], - "groupId": "trcslng32mdxkjmrw8zxpnpj", "options": { "variableId": "vi0mmx9o2m4s8z9cccsjcvpj5", - "buttonLabel": "Send", "isMultipleChoice": true - }, - "outgoingEdgeId": "gcbys1rzwi0dscvjodyygfme" + } } - ], - "graphCoordinates": { "x": 999.90625, "y": 143.7578125 } + ] }, { "id": "m4oxxhg9wfv3wc6n8rhzy6ga", "title": "[AI] Additional information", + "graphCoordinates": { "x": 1340.59, "y": 41.79 }, "blocks": [ { "id": "px8ciz2nu2frvdqjporqpg95", @@ -235,28 +182,23 @@ "items": [ { "id": "w1cg5txczy2qmn4kbh1eybkk", - "type": 1, - "blockId": "px8ciz2nu2frvdqjporqpg95", + "outgoingEdgeId": "tfixdvay6mxj4g7z7bfmjthc", "content": { "comparisons": [ { "id": "r9ju98p1i6tevti45tt6jwk8", - "value": "3", - "variableId": "vpvkbogoj3rmogz0ssh5odmnn", - "comparisonOperator": "Greater than" + "variableId": "vi5ta5lktses2h6skf5ky2zs0", + "comparisonOperator": "Greater than", + "value": "5" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "tfixdvay6mxj4g7z7bfmjthc" + ] + } } - ], - "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga" + ] }, { "id": "dc58mxvcstc2rdwnlg4yd2aa", "type": "OpenAI", - "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga", "options": { "task": "Create chat completion", "model": "gpt-3.5-turbo", @@ -288,21 +230,28 @@ }, { "id": "j1pgsjm0snn3pz034h8y91vg", - "role": "Messages sequence โœจ", - "content": { - "userMessagesVariableId": "vhp0ymgwq4id82l97g0kliglf", - "assistantMessagesVariableId": "vpvkbogoj3rmogz0ssh5odmnn" - } + "role": "Dialogue", + "dialogueVariableId": "vi5ta5lktses2h6skf5ky2zs0", + "startsBy": "assistant" } ], - "credentialsId": "clgp3rhio00011a0b1ai2dfne", "responseMapping": [ { "id": "krixyhr7qw5ow52yf3i11y3a", - "variableId": "vpvkbogoj3rmogz0ssh5odmnn", - "valueToExtract": "Message content" + "valueToExtract": "Message content", + "variableId": "vpvkbogoj3rmogz0ssh5odmnn" } - ] + ], + "credentialsId": "clocxtxlc00031an2uc59hdpb" + } + }, + { + "id": "vssvfz99ain77sc5w07ci5a1", + "type": "Set variable", + "options": { + "variableId": "vi5ta5lktses2h6skf5ky2zs0", + "type": "Append value(s)", + "item": "{{AI reply}}" } }, { @@ -310,39 +259,44 @@ "type": "text", "content": { "richText": [ - { "type": "p", "children": [{ "text": "{{AI replies}}" }] } + { "type": "p", "children": [{ "text": "{{AI reply}}" }] } ] - }, - "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga" + } }, { "id": "sqFy2G3C1mh9p6s3QBdSS5x", "type": "text input", - "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga", "options": { - "isLong": true, "labels": { - "button": "Send", - "placeholder": "Type your answer..." + "placeholder": "Type your answer...", + "button": "Send" }, "variableId": "vhp0ymgwq4id82l97g0kliglf" - }, - "outgoingEdgeId": "tc9irw81xlw9ghv68fp8p8xl" + } + }, + { + "id": "t8s54i11vfebpp5cbc7xukn5", + "outgoingEdgeId": "buwcxt81dfrh6prteij8cvo8", + "type": "Set variable", + "options": { + "variableId": "vi5ta5lktses2h6skf5ky2zs0", + "type": "Append value(s)", + "item": "{{Additional information}}" + } } - ], - "graphCoordinates": { "x": 1339.1953125, "y": 146.37890625 } + ] }, { "id": "gjahzyusg4mlpvpaeov0awtm", "title": "Bye", + "graphCoordinates": { "x": 1676.6171875, "y": 142.7109375 }, "blocks": [ { "id": "seLegenCgUwMopRFeAefqZ7", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Perfect!" }] }] - }, - "groupId": "gjahzyusg4mlpvpaeov0awtm" + } }, { "id": "s779Q1y51aVaDUJVrFb16vv", @@ -354,15 +308,14 @@ "children": [{ "text": "We'll get back to you at {{Email}}" }] } ] - }, - "groupId": "gjahzyusg4mlpvpaeov0awtm" + } } - ], - "graphCoordinates": { "x": 1676.6171875, "y": 142.7109375 } + ] }, { "id": "l0223zmqvndj1irhk68yh10v", "title": "", + "graphCoordinates": { "x": 1342.76, "y": 692.3 }, "blocks": [ { "id": "l7r996nrnqb937nzyrprcvs0", @@ -378,8 +331,7 @@ ] } ] - }, - "groupId": "l0223zmqvndj1irhk68yh10v" + } }, { "id": "jxrp7xdzmnqnfmzfvid2u4s1", @@ -399,116 +351,74 @@ ] } ] - }, - "groupId": "l0223zmqvndj1irhk68yh10v" + } } - ], - "graphCoordinates": { "x": 1342.1015625, "y": 627.70703125 } + ] } ], - "variables": [ - { "id": "giiLFGw5xXBCHzvp1qAbdX", "name": "Company" }, - { "id": "v3VFChNVSCXQ2rXv4DrJ8Ah", "name": "Email" }, - { "id": "vi0mmx9o2m4s8z9cccsjcvpj5", "name": "Services" }, - { "id": "vpvkbogoj3rmogz0ssh5odmnn", "name": "AI replies" }, - { "id": "vhp0ymgwq4id82l97g0kliglf", "name": "Additional informations" } - ], "edges": [ { "id": "dkgy7qanybx0d9zl2ke2aa03", - "to": { "groupId": "nmlij3lrk42cymsu1tj6b9nv" }, - "from": { - "blockId": "22HP69iipkLjJDTUcc1AWW", - "groupId": "i6xofskq0vdlnfyvf28hzcle" - } + "from": { "eventId": "i6xofskq0vdlnfyvf28hzcle" }, + "to": { "groupId": "nmlij3lrk42cymsu1tj6b9nv" } }, { "id": "vgi4r3yjle17balwlhpas25t", - "to": { "groupId": "wlcaalj5zej2sl1t9kkq55se" }, - "from": { - "blockId": "sbjZWLJGVkHAkDqS4JQeGow", - "groupId": "nmlij3lrk42cymsu1tj6b9nv" - } + "from": { "blockId": "sbjZWLJGVkHAkDqS4JQeGow" }, + "to": { "groupId": "wlcaalj5zej2sl1t9kkq55se" } }, { "id": "wlzesf38jzeyf65i1aj6j517", - "to": { "groupId": "vrv6xoriyl74wcz34gqlvc0q" }, - "from": { - "blockId": "sqEsMo747LTDnY9FjQcEwUv", - "groupId": "wlcaalj5zej2sl1t9kkq55se" - } + "from": { "blockId": "sqEsMo747LTDnY9FjQcEwUv" }, + "to": { "groupId": "vrv6xoriyl74wcz34gqlvc0q" } }, { "id": "piew4sf9dpafiweghqvucmax", - "to": { "groupId": "trcslng32mdxkjmrw8zxpnpj" }, - "from": { - "blockId": "snbsad18Bgry8yZ8DZCfdFD", - "groupId": "vrv6xoriyl74wcz34gqlvc0q" - } + "from": { "blockId": "snbsad18Bgry8yZ8DZCfdFD" }, + "to": { "groupId": "trcslng32mdxkjmrw8zxpnpj" } }, { "id": "tfixdvay6mxj4g7z7bfmjthc", - "to": { "groupId": "gjahzyusg4mlpvpaeov0awtm" }, "from": { - "itemId": "w1cg5txczy2qmn4kbh1eybkk", "blockId": "px8ciz2nu2frvdqjporqpg95", - "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga" - } + "itemId": "w1cg5txczy2qmn4kbh1eybkk" + }, + "to": { "groupId": "gjahzyusg4mlpvpaeov0awtm" } }, { - "id": "tc9irw81xlw9ghv68fp8p8xl", - "to": { "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga" }, - "from": { - "blockId": "sqFy2G3C1mh9p6s3QBdSS5x", - "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga" - } + "id": "buwcxt81dfrh6prteij8cvo8", + "from": { "blockId": "t8s54i11vfebpp5cbc7xukn5" }, + "to": { "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga" } }, { - "id": "gcbys1rzwi0dscvjodyygfme", - "to": { "groupId": "l0223zmqvndj1irhk68yh10v" }, "from": { "blockId": "s5VQGsVF4hQgziQsXVdwPDW", "groupId": "trcslng32mdxkjmrw8zxpnpj" - } - } - ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } + "to": { "groupId": "l0223zmqvndj1irhk68yh10v" }, + "id": "wtw2lm86g46ehgvp43fcfks6" } - }, + ], + "variables": [ + { "id": "giiLFGw5xXBCHzvp1qAbdX", "name": "Company" }, + { "id": "v3VFChNVSCXQ2rXv4DrJ8Ah", "name": "Email" }, + { "id": "vi0mmx9o2m4s8z9cccsjcvpj5", "name": "Services" }, + { "id": "vpvkbogoj3rmogz0ssh5odmnn", "name": "AI reply" }, + { "id": "vhp0ymgwq4id82l97g0kliglf", "name": "Additional information" }, + { "id": "vi5ta5lktses2h6skf5ky2zs0", "name": "AI Dialogue" } + ], + "theme": {}, "selectedThemeTemplateId": null, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": 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 } - }, + "settings": {}, + "createdAt": "2023-11-06T17:26:59.795Z", + "updatedAt": "2023-11-07T06:50:56.154Z", + "icon": "๐Ÿฆพ", + "folderId": null, "publicId": null, "customDomain": null, "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/lead-gen.json b/apps/builder/public/templates/lead-gen.json index a4d7144008..5d7187aa0b 100644 --- a/apps/builder/public/templates/lead-gen.json +++ b/apps/builder/public/templates/lead-gen.json @@ -1,33 +1,24 @@ { - "id": "qgMiLSr4W1ftXocFncin1G", - "version": "4", - "createdAt": "2022-02-05T06:21:16.522Z", - "updatedAt": "2022-02-05T06:21:16.522Z", + "version": "6", + "id": "cloiafj9e00091aqj6o9nfrww", "name": "Lead Generation", - "icon": "๐Ÿค", - "folderId": null, - "groups": [ + "events": [ { "id": "k6kY6gwRE6noPoYQNGzgUq", - "blocks": [ - { - "id": "22HP69iipkLjJDTUcc1AWW", - "type": "start", - "label": "Start", - "groupId": "k6kY6gwRE6noPoYQNGzgUq", - "outgoingEdgeId": "oNvqaqNExdSH2kKEhKZHuE" - } - ], - "title": "Start", - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "oNvqaqNExdSH2kKEhKZHuE", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "kinRXxYop2X4d7F9qt8WNB", + "title": "Welcome", + "graphCoordinates": { "x": 1, "y": 148 }, "blocks": [ { "id": "sc1y8VwDabNJgiVTBi4qtif", "type": "text", - "groupId": "kinRXxYop2X4d7F9qt8WNB", "content": { "richText": [ { @@ -44,37 +35,31 @@ { "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", + "outgoingEdgeId": "i51YhHpk1dtSyduFNf5Wim", "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", + "title": "Email", + "graphCoordinates": { "x": 669, "y": 141 }, "blocks": [ { "id": "sxeYubYN6XzhAfG7m9Fivhc", "type": "text", - "groupId": "o4SH1UtKANnW5N5D67oZUz", "content": { "richText": [ { @@ -87,7 +72,6 @@ { "id": "scQ5kduafAtfP9T8SHUJnGi", "type": "text", - "groupId": "o4SH1UtKANnW5N5D67oZUz", "content": { "richText": [ { @@ -101,26 +85,22 @@ }, { "id": "snbsad18Bgry8yZ8DZCfdFD", + "outgoingEdgeId": "w3MiN1Ct38jT5NykVsgmb5", "type": "email input", - "groupId": "o4SH1UtKANnW5N5D67oZUz", "options": { - "labels": { "button": "Send", "placeholder": "Type your email..." }, - "variableId": "v3VFChNVSCXQ2rXv4DrJ8Ah", - "retryMessageContent": "This email doesn't seem to be valid. Can you type it again?" - }, - "outgoingEdgeId": "w3MiN1Ct38jT5NykVsgmb5" + "variableId": "v3VFChNVSCXQ2rXv4DrJ8Ah" + } } - ], - "title": "Email", - "graphCoordinates": { "x": 669, "y": 141 } + ] }, { "id": "q5dAhqSTCaNdiGSJm9B9Rw", + "title": "Name", + "graphCoordinates": { "x": 340, "y": 143 }, "blocks": [ { "id": "sgtE2Sy7cKykac9B223Kq9R", "type": "text", - "groupId": "q5dAhqSTCaNdiGSJm9B9Rw", "content": { "richText": [ { "type": "p", "children": [{ "text": "What's your name?" }] } @@ -129,29 +109,22 @@ }, { "id": "sqEsMo747LTDnY9FjQcEwUv", + "outgoingEdgeId": "4tYbERpi5Po4goVgt6rWXg", "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", + "title": "Services", + "graphCoordinates": { "x": 1002, "y": 144 }, "blocks": [ { "id": "su7HceVXWyTCzi2vv3m4QbK", "type": "text", - "groupId": "fKqRz7iswk7ULaj5PJocZL", "content": { "richText": [ { @@ -163,48 +136,37 @@ }, { "id": "s5VQGsVF4hQgziQsXVdwPDW", + "outgoingEdgeId": "ohTRakmcYJ7GdFWRZrWRjk", "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", + "title": "Additional information", + "graphCoordinates": { "x": 1337, "y": 145 }, "blocks": [ { "id": "sqR8Sz9gW21aUYKtUikq7qZ", "type": "text", - "groupId": "7qHBEyCMvKEJryBHzPmHjV", "content": { "richText": [ { @@ -218,25 +180,22 @@ }, { "id": "sqFy2G3C1mh9p6s3QBdSS5x", + "outgoingEdgeId": "sH5nUssG2XQbm6ZidGv9BY", "type": "text input", - "groupId": "7qHBEyCMvKEJryBHzPmHjV", "options": { - "isLong": true, - "labels": { "button": "Send", "placeholder": "Type your answer..." } - }, - "outgoingEdgeId": "sH5nUssG2XQbm6ZidGv9BY" + "isLong": true + } } - ], - "title": "Additional information", - "graphCoordinates": { "x": 1337, "y": 145 } + ] }, { "id": "vF7AD7zSAj7SNvN3gr9N94", + "title": "Bye", + "graphCoordinates": { "x": 1668, "y": 143 }, "blocks": [ { "id": "seLegenCgUwMopRFeAefqZ7", "type": "text", - "groupId": "vF7AD7zSAj7SNvN3gr9N94", "content": { "richText": [{ "type": "p", "children": [{ "text": "Perfect!" }] }] } @@ -244,7 +203,6 @@ { "id": "s779Q1y51aVaDUJVrFb16vv", "type": "text", - "groupId": "vF7AD7zSAj7SNvN3gr9N94", "content": { "richText": [ { @@ -254,96 +212,57 @@ ] } } - ], - "title": "Bye", - "graphCoordinates": { "x": 1668, "y": 143 } + ] } ], - "variables": [ - { "id": "giiLFGw5xXBCHzvp1qAbdX", "name": "Name" }, - { "id": "v3VFChNVSCXQ2rXv4DrJ8Ah", "name": "Email" } - ], "edges": [ { "id": "oNvqaqNExdSH2kKEhKZHuE", - "to": { "groupId": "kinRXxYop2X4d7F9qt8WNB" }, - "from": { - "blockId": "22HP69iipkLjJDTUcc1AWW", - "groupId": "k6kY6gwRE6noPoYQNGzgUq" - } + "from": { "eventId": "k6kY6gwRE6noPoYQNGzgUq" }, + "to": { "groupId": "kinRXxYop2X4d7F9qt8WNB" } }, { "id": "i51YhHpk1dtSyduFNf5Wim", - "to": { "groupId": "q5dAhqSTCaNdiGSJm9B9Rw" }, - "from": { - "blockId": "sbjZWLJGVkHAkDqS4JQeGow", - "groupId": "kinRXxYop2X4d7F9qt8WNB" - } + "from": { "blockId": "sbjZWLJGVkHAkDqS4JQeGow" }, + "to": { "groupId": "q5dAhqSTCaNdiGSJm9B9Rw" } }, { "id": "4tYbERpi5Po4goVgt6rWXg", - "to": { "groupId": "o4SH1UtKANnW5N5D67oZUz" }, - "from": { - "blockId": "sqEsMo747LTDnY9FjQcEwUv", - "groupId": "q5dAhqSTCaNdiGSJm9B9Rw" - } + "from": { "blockId": "sqEsMo747LTDnY9FjQcEwUv" }, + "to": { "groupId": "o4SH1UtKANnW5N5D67oZUz" } }, { "id": "w3MiN1Ct38jT5NykVsgmb5", - "to": { "groupId": "fKqRz7iswk7ULaj5PJocZL" }, - "from": { - "blockId": "snbsad18Bgry8yZ8DZCfdFD", - "groupId": "o4SH1UtKANnW5N5D67oZUz" - } + "from": { "blockId": "snbsad18Bgry8yZ8DZCfdFD" }, + "to": { "groupId": "fKqRz7iswk7ULaj5PJocZL" } }, { "id": "ohTRakmcYJ7GdFWRZrWRjk", - "to": { "groupId": "7qHBEyCMvKEJryBHzPmHjV" }, - "from": { - "blockId": "s5VQGsVF4hQgziQsXVdwPDW", - "groupId": "fKqRz7iswk7ULaj5PJocZL" - } + "from": { "blockId": "s5VQGsVF4hQgziQsXVdwPDW" }, + "to": { "groupId": "7qHBEyCMvKEJryBHzPmHjV" } }, { "id": "sH5nUssG2XQbm6ZidGv9BY", - "to": { "groupId": "vF7AD7zSAj7SNvN3gr9N94" }, - "from": { - "blockId": "sqFy2G3C1mh9p6s3QBdSS5x", - "groupId": "7qHBEyCMvKEJryBHzPmHjV" - } + "from": { "blockId": "sqFy2G3C1mh9p6s3QBdSS5x" }, + "to": { "groupId": "vF7AD7zSAj7SNvN3gr9N94" } } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": 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 + "variables": [ + { "id": "giiLFGw5xXBCHzvp1qAbdX", "name": "Name" }, + { "id": "v3VFChNVSCXQ2rXv4DrJ8Ah", "name": "Email" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-03T07:22:14.210Z", + "updatedAt": "2023-11-03T07:22:14.210Z", + "icon": "๐Ÿค", + "folderId": null, + "publicId": null, + "customDomain": null, + "workspaceId": "proWorkspace", + "resultsTablePreferences": null, + "isArchived": false, + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/lead-magnet.json b/apps/builder/public/templates/lead-magnet.json index f842ba58af..9fca15b92e 100644 --- a/apps/builder/public/templates/lead-magnet.json +++ b/apps/builder/public/templates/lead-magnet.json @@ -1,29 +1,20 @@ { - "id": "clg69gafk00011ar14aryt8ej", - "version": "4", - "createdAt": "2023-04-07T08:03:57.008Z", - "updatedAt": "2023-04-07T08:22:10.285Z", - "icon": "๐Ÿงฒ", + "version": "6", + "id": "clon5n2yo00091avnmbju5698", "name": "Lead magnet", - "folderId": null, - "groups": [ + "events": [ { "id": "emejg92oa3743x6z556xi1ig", - "title": "Start", - "blocks": [ - { - "id": "fp82tc3nolkjpw38j60xxemb", - "type": "start", - "label": "Start", - "groupId": "emejg92oa3743x6z556xi1ig", - "outgoingEdgeId": "hfugjlwxkt5eqvxe5poimt6w" - } - ], - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "hfugjlwxkt5eqvxe5poimt6w", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "gr9wedxcqxie11ki9yss1h5o", "title": "Intro", + "graphCoordinates": { "x": 209.12109375, "y": 176.5703125 }, "blocks": [ { "id": "uaks8b01ec3fln8g5iq9gnv7", @@ -32,8 +23,7 @@ "richText": [ { "type": "p", "children": [{ "text": "Hi there! ๐Ÿ‘‹" }] } ] - }, - "groupId": "gr9wedxcqxie11ki9yss1h5o" + } }, { "id": "iy9brewiabfhv7ctsvdd5fg6", @@ -51,8 +41,7 @@ ] } ] - }, - "groupId": "gr9wedxcqxie11ki9yss1h5o" + } }, { "id": "immlrmjc0tnvc0rd1552c0ey", @@ -68,8 +57,7 @@ ] } ] - }, - "groupId": "gr9wedxcqxie11ki9yss1h5o" + } }, { "id": "i1pv6t8sj9wdzoheplwj1cnr", @@ -78,26 +66,23 @@ "richText": [ { "type": "p", "children": [{ "text": "What's your name?" }] } ] - }, - "groupId": "gr9wedxcqxie11ki9yss1h5o" + } }, { "id": "uocaxxtg26btl2zytwy09jh9", + "outgoingEdgeId": "rczh7k3r065okzax6za00lvh", "type": "text input", - "groupId": "gr9wedxcqxie11ki9yss1h5o", "options": { - "isLong": false, - "labels": { "button": "Send", "placeholder": "Your first name" }, + "labels": { "placeholder": "Your first name" }, "variableId": "vyu4paeim4jcjgmxr26bdk286" - }, - "outgoingEdgeId": "rczh7k3r065okzax6za00lvh" + } } - ], - "graphCoordinates": { "x": 209.12109375, "y": 176.5703125 } + ] }, { "id": "xaloto3qrrbtcdcrob013xcx", "title": "Email", + "graphCoordinates": { "x": 563.2421875, "y": 177.484375 }, "blocks": [ { "id": "pcx0bo7egsq3il16707mkuzc", @@ -113,26 +98,21 @@ ] } ] - }, - "groupId": "xaloto3qrrbtcdcrob013xcx" + } }, { - "id": "fu17h0e24vpplfnrhla0t5id", - "type": "text input", + "id": "nu9ibw4r4q9piwl3b308bezp", "groupId": "xaloto3qrrbtcdcrob013xcx", - "options": { - "isLong": false, - "labels": { "button": "Send", "placeholder": "Your email address" }, - "variableId": "vrhd0bug6b6dzgijevfoonvo2" - }, - "outgoingEdgeId": "x9hmtjizy3cl3kzyagf0ucnp" + "type": "email input", + "options": { "variableId": "vrhd0bug6b6dzgijevfoonvo2" }, + "outgoingEdgeId": "dxj0x2miwwkxsesp4chyjqek" } - ], - "graphCoordinates": { "x": 563.2421875, "y": 177.484375 } + ] }, { "id": "tp9r95ay5vm9zlgzw8twtxn3", "title": "Goal", + "graphCoordinates": { "x": 1243.07421875, "y": 172.2421875 }, "blocks": [ { "id": "o6helbp9c682dur5e8bt9yov", @@ -144,52 +124,31 @@ "children": [{ "text": "What's your goal with the community?" }] } ] - }, - "groupId": "tp9r95ay5vm9zlgzw8twtxn3" + } }, { "id": "wq7yofni4bqr9rt5qrzk6928", + "outgoingEdgeId": "on3al6xuczmckpu3roboo9te", "type": "choice input", "items": [ - { - "id": "ux0ly8ocxfm8i8ivdbwjnmnt", - "type": 0, - "blockId": "wq7yofni4bqr9rt5qrzk6928", - "content": "Win loyal fans" - }, + { "id": "ux0ly8ocxfm8i8ivdbwjnmnt", "content": "Win loyal fans" }, { "id": "izz0nwo2iy2kmlif5fav2oc5", - "type": 0, - "blockId": "wq7yofni4bqr9rt5qrzk6928", "content": "Competitive advantage" }, - { - "id": "jtkx9v5uqjw84hapq3umqlb5", - "type": 0, - "blockId": "wq7yofni4bqr9rt5qrzk6928", - "content": "Better product" - }, - { - "id": "k7a7rkpoigrtrulilap7q6fw", - "type": 0, - "blockId": "wq7yofni4bqr9rt5qrzk6928", - "content": "Support" - } + { "id": "jtkx9v5uqjw84hapq3umqlb5", "content": "Better product" }, + { "id": "k7a7rkpoigrtrulilap7q6fw", "content": "Support" } ], - "groupId": "tp9r95ay5vm9zlgzw8twtxn3", "options": { - "variableId": "vf49immob0ih3kxn5b0nraqkq", - "buttonLabel": "Send", - "isMultipleChoice": false - }, - "outgoingEdgeId": "on3al6xuczmckpu3roboo9te" + "variableId": "vf49immob0ih3kxn5b0nraqkq" + } } - ], - "graphCoordinates": { "x": 1243.07421875, "y": 172.2421875 } + ] }, { "id": "cszciavjonb2qp0ga0pladoj", "title": "Goal", + "graphCoordinates": { "x": 1590.85546875, "y": 164.02734375 }, "blocks": [ { "id": "tfqqveo72xt7i7ii9imztcd4", @@ -205,8 +164,7 @@ ] } ] - }, - "groupId": "cszciavjonb2qp0ga0pladoj" + } }, { "id": "yxuk1bhfas07i4bxq64hi0vj", @@ -214,102 +172,86 @@ "items": [ { "id": "qn6w72jgckfz777e9ehb421v", - "type": 1, - "blockId": "yxuk1bhfas07i4bxq64hi0vj", + "outgoingEdgeId": "yml7f2btr9q4hptk06cqn2xv", "content": { "comparisons": [ { "id": "nt0c7o7w0elbbrfde8nned76", - "value": "Win loyal fans", "variableId": "vf49immob0ih3kxn5b0nraqkq", - "comparisonOperator": "Equal to" + "comparisonOperator": "Equal to", + "value": "Win loyal fans" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "yml7f2btr9q4hptk06cqn2xv" + ] + } }, { "id": "vuun8mijpfzcu0o9qk0vtift", - "type": 1, - "blockId": "yxuk1bhfas07i4bxq64hi0vj", + "outgoingEdgeId": "qhpximatxzjmmm1njwoqzplw", "content": { "comparisons": [ { "id": "yf6asq9i97ap9y2jxibmjylv", - "value": "Competitive advantage", "variableId": "vf49immob0ih3kxn5b0nraqkq", - "comparisonOperator": "Equal to" + "comparisonOperator": "Equal to", + "value": "Competitive advantage" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "qhpximatxzjmmm1njwoqzplw" + ] + } }, { "id": "dg28mo88efs00p8ech81qxmu", - "type": 1, - "blockId": "yxuk1bhfas07i4bxq64hi0vj", + "outgoingEdgeId": "xa5z7a7en5vfevqk5e5q05go", "content": { "comparisons": [ { "id": "x7tbo8q47r1wdlg6w3c48mru", - "value": "Better product", "variableId": "vf49immob0ih3kxn5b0nraqkq", - "comparisonOperator": "Equal to" + "comparisonOperator": "Equal to", + "value": "Better product" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "xa5z7a7en5vfevqk5e5q05go" + ] + } }, { "id": "lrj50vf8c0cj46jrtxid5a60", - "type": 1, - "blockId": "yxuk1bhfas07i4bxq64hi0vj", + "outgoingEdgeId": "ogpmoxw3lrt12rgxnq0wajrj", "content": { "comparisons": [ { "id": "hkb9qy6un3yrhhxtm0s6c8rg", - "value": "Support", "variableId": "vf49immob0ih3kxn5b0nraqkq", - "comparisonOperator": "Equal to" + "comparisonOperator": "Equal to", + "value": "Support" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "ogpmoxw3lrt12rgxnq0wajrj" + ] + } } - ], - "groupId": "cszciavjonb2qp0ga0pladoj" + ] } - ], - "graphCoordinates": { "x": 1590.85546875, "y": 164.02734375 } + ] }, { "id": "vvlecgglxadq0x2eg7ozr535", "title": "Send bundle", + "graphCoordinates": { "x": 901.6953125, "y": 180.0546875 }, "blocks": [ { "id": "w53cmmn4iowq753r8jmvk7o7", + "outgoingEdgeId": "qkrpdn1z0bv1xvsa3wrdyyn3", "type": "Email", - "groupId": "vvlecgglxadq0x2eg7ozr535", "options": { - "body": "Hey {{Name}},\n\nHere is a link to download the community bundle:\n\nhttps://typebot.io\n\nI hope it will help you create the right community for your project ๐Ÿš€\n\nBest,\nTypebot team.", - "replyTo": "", - "subject": "Here is your community bundle โœจ", - "recipients": ["{{Email}}"], "isCustomBody": true, - "credentialsId": "default" - }, - "outgoingEdgeId": "qkrpdn1z0bv1xvsa3wrdyyn3" + "recipients": ["{{Email}}"], + "subject": "Here is your community bundle โœจ", + "body": "Hey {{Name}},\n\nHere is a link to download the community bundle:\n\nhttps://typebot.io\n\nI hope it will help you create the right community for your project ๐Ÿš€\n\nBest,\nTypebot team." + } } - ], - "graphCoordinates": { "x": 901.6953125, "y": 180.0546875 } + ] }, { "id": "k2sbuizycrpuyf44v9eebebr", "title": "Win loyal fans video", + "graphCoordinates": { "x": 1969.18359375, "y": -205.76171875 }, "blocks": [ { "id": "dzcw0vwo23vhp2nwyxl99va8", @@ -321,8 +263,7 @@ "children": [{ "text": "Want to know how to win loyal fans?" }] } ] - }, - "groupId": "k2sbuizycrpuyf44v9eebebr" + } }, { "id": "yh8ueuio717ceybrcsqa1ekq", @@ -331,25 +272,23 @@ "richText": [ { "type": "p", "children": [{ "text": "Check out this video:" }] } ] - }, - "groupId": "k2sbuizycrpuyf44v9eebebr" + } }, { "id": "z3ffqugex7gipsb4ke6ov874", "type": "video", "content": { - "id": "jp3ggg_42-M", "url": "https://www.youtube.com/watch?v=jp3ggg_42-M&t=22s", + "id": "jp3ggg_42-M", "type": "youtube" - }, - "groupId": "k2sbuizycrpuyf44v9eebebr" + } } - ], - "graphCoordinates": { "x": 1969.18359375, "y": -205.76171875 } + ] }, { "id": "v6s5yza7kgretdmbke7lg5u7", "title": "Competitive advantage video", + "graphCoordinates": { "x": 1968.1484375, "y": 181.5703125 }, "blocks": [ { "id": "anu87wo53n3ihq4xl8smprwg", @@ -365,8 +304,7 @@ ] } ] - }, - "groupId": "v6s5yza7kgretdmbke7lg5u7" + } }, { "id": "ku2scubf21eqnip3ig3rc7n9", @@ -375,25 +313,23 @@ "richText": [ { "type": "p", "children": [{ "text": "Check out this video:" }] } ] - }, - "groupId": "v6s5yza7kgretdmbke7lg5u7" + } }, { "id": "rvdh4tk0ebg7t9tdga9aw8ao", "type": "video", "content": { - "id": "jp3ggg_42-M", "url": "https://www.youtube.com/watch?v=jp3ggg_42-M&t=22s", + "id": "jp3ggg_42-M", "type": "youtube" - }, - "groupId": "v6s5yza7kgretdmbke7lg5u7" + } } - ], - "graphCoordinates": { "x": 1968.1484375, "y": 181.5703125 } + ] }, { "id": "l3pc0992zp0hw8ea83b7aky3", "title": "Better product", + "graphCoordinates": { "x": 1968.703125, "y": 600.07421875 }, "blocks": [ { "id": "ysedrtj5q17usk5ezpa5g88e", @@ -409,8 +345,7 @@ ] } ] - }, - "groupId": "l3pc0992zp0hw8ea83b7aky3" + } }, { "id": "xy08sticb76u82sgcfaeqpe2", @@ -419,25 +354,23 @@ "richText": [ { "type": "p", "children": [{ "text": "Check out this video:" }] } ] - }, - "groupId": "l3pc0992zp0hw8ea83b7aky3" + } }, { "id": "jiz2uvo89456jpy081hazkd4", "type": "video", "content": { - "id": "jp3ggg_42-M", "url": "https://www.youtube.com/watch?v=jp3ggg_42-M&t=22s", + "id": "jp3ggg_42-M", "type": "youtube" - }, - "groupId": "l3pc0992zp0hw8ea83b7aky3" + } } - ], - "graphCoordinates": { "x": 1968.703125, "y": 600.07421875 } + ] }, { "id": "f4hlh2oq8viwxrpl9ppq5d42", "title": "Support", + "graphCoordinates": { "x": 1970.0234375, "y": 1025.99609375 }, "blocks": [ { "id": "lu0bevnjfkor1ugbnbkev7t3", @@ -451,8 +384,7 @@ ] } ] - }, - "groupId": "f4hlh2oq8viwxrpl9ppq5d42" + } }, { "id": "jrhdfrdn4gdstpktq1q0gk1q", @@ -461,142 +393,99 @@ "richText": [ { "type": "p", "children": [{ "text": "Check out this video:" }] } ] - }, - "groupId": "f4hlh2oq8viwxrpl9ppq5d42" + } }, { "id": "e3tlj1y4vyhtwcabzifv63q2", "type": "video", "content": { - "id": "jp3ggg_42-M", "url": "https://www.youtube.com/watch?v=jp3ggg_42-M&t=22s", + "id": "jp3ggg_42-M", "type": "youtube" - }, - "groupId": "f4hlh2oq8viwxrpl9ppq5d42" + } } - ], - "graphCoordinates": { "x": 1970.0234375, "y": 1025.99609375 } + ] } ], - "variables": [ - { "id": "vyu4paeim4jcjgmxr26bdk286", "name": "Name" }, - { "id": "vf49immob0ih3kxn5b0nraqkq", "name": "Goal" }, - { "id": "vrhd0bug6b6dzgijevfoonvo2", "name": "Email" } - ], "edges": [ { "id": "hfugjlwxkt5eqvxe5poimt6w", - "to": { "groupId": "gr9wedxcqxie11ki9yss1h5o" }, - "from": { - "blockId": "fp82tc3nolkjpw38j60xxemb", - "groupId": "emejg92oa3743x6z556xi1ig" - } + "from": { "eventId": "emejg92oa3743x6z556xi1ig" }, + "to": { "groupId": "gr9wedxcqxie11ki9yss1h5o" } }, { "id": "rczh7k3r065okzax6za00lvh", - "to": { "groupId": "xaloto3qrrbtcdcrob013xcx" }, - "from": { - "blockId": "uocaxxtg26btl2zytwy09jh9", - "groupId": "gr9wedxcqxie11ki9yss1h5o" - } + "from": { "blockId": "uocaxxtg26btl2zytwy09jh9" }, + "to": { "groupId": "xaloto3qrrbtcdcrob013xcx" } }, { "id": "on3al6xuczmckpu3roboo9te", - "to": { "groupId": "cszciavjonb2qp0ga0pladoj" }, - "from": { - "blockId": "wq7yofni4bqr9rt5qrzk6928", - "groupId": "tp9r95ay5vm9zlgzw8twtxn3" - } - }, - { - "id": "x9hmtjizy3cl3kzyagf0ucnp", - "to": { "groupId": "vvlecgglxadq0x2eg7ozr535" }, - "from": { - "blockId": "fu17h0e24vpplfnrhla0t5id", - "groupId": "xaloto3qrrbtcdcrob013xcx" - } + "from": { "blockId": "wq7yofni4bqr9rt5qrzk6928" }, + "to": { "groupId": "cszciavjonb2qp0ga0pladoj" } }, { "id": "qkrpdn1z0bv1xvsa3wrdyyn3", - "to": { "groupId": "tp9r95ay5vm9zlgzw8twtxn3" }, - "from": { - "blockId": "w53cmmn4iowq753r8jmvk7o7", - "groupId": "vvlecgglxadq0x2eg7ozr535" - } + "from": { "blockId": "w53cmmn4iowq753r8jmvk7o7" }, + "to": { "groupId": "tp9r95ay5vm9zlgzw8twtxn3" } }, { "id": "yml7f2btr9q4hptk06cqn2xv", - "to": { "groupId": "k2sbuizycrpuyf44v9eebebr" }, "from": { - "itemId": "qn6w72jgckfz777e9ehb421v", "blockId": "yxuk1bhfas07i4bxq64hi0vj", - "groupId": "cszciavjonb2qp0ga0pladoj" - } + "itemId": "qn6w72jgckfz777e9ehb421v" + }, + "to": { "groupId": "k2sbuizycrpuyf44v9eebebr" } }, { "id": "qhpximatxzjmmm1njwoqzplw", - "to": { "groupId": "v6s5yza7kgretdmbke7lg5u7" }, "from": { - "itemId": "vuun8mijpfzcu0o9qk0vtift", "blockId": "yxuk1bhfas07i4bxq64hi0vj", - "groupId": "cszciavjonb2qp0ga0pladoj" - } + "itemId": "vuun8mijpfzcu0o9qk0vtift" + }, + "to": { "groupId": "v6s5yza7kgretdmbke7lg5u7" } }, { "id": "xa5z7a7en5vfevqk5e5q05go", - "to": { "groupId": "l3pc0992zp0hw8ea83b7aky3" }, "from": { - "itemId": "dg28mo88efs00p8ech81qxmu", "blockId": "yxuk1bhfas07i4bxq64hi0vj", - "groupId": "cszciavjonb2qp0ga0pladoj" - } + "itemId": "dg28mo88efs00p8ech81qxmu" + }, + "to": { "groupId": "l3pc0992zp0hw8ea83b7aky3" } }, { "id": "ogpmoxw3lrt12rgxnq0wajrj", - "to": { "groupId": "f4hlh2oq8viwxrpl9ppq5d42" }, "from": { - "itemId": "lrj50vf8c0cj46jrtxid5a60", "blockId": "yxuk1bhfas07i4bxq64hi0vj", - "groupId": "cszciavjonb2qp0ga0pladoj" - } - } - ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true + "itemId": "lrj50vf8c0cj46jrtxid5a60" }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } + "to": { "groupId": "f4hlh2oq8viwxrpl9ppq5d42" } }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } + { + "from": { + "blockId": "nu9ibw4r4q9piwl3b308bezp", + "groupId": "xaloto3qrrbtcdcrob013xcx" + }, + "to": { "groupId": "vvlecgglxadq0x2eg7ozr535" }, + "id": "dxj0x2miwwkxsesp4chyjqek" } - }, + ], + "variables": [ + { "id": "vyu4paeim4jcjgmxr26bdk286", "name": "Name" }, + { "id": "vf49immob0ih3kxn5b0nraqkq", "name": "Goal" }, + { "id": "vrhd0bug6b6dzgijevfoonvo2", "name": "Email" } + ], + "theme": {}, "selectedThemeTemplateId": null, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": 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 } - }, + "settings": {}, + "createdAt": "2023-11-06T17:06:59.136Z", + "updatedAt": "2023-11-06T17:06:59.136Z", + "icon": "๐Ÿงฒ", + "folderId": null, "publicId": null, "customDomain": null, - "workspaceId": "freeWorkspace", + "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/lead-scoring.json b/apps/builder/public/templates/lead-scoring.json index da8e242352..89ae24a8b8 100644 --- a/apps/builder/public/templates/lead-scoring.json +++ b/apps/builder/public/templates/lead-scoring.json @@ -1,34 +1,23 @@ { - "id": "cl1seoz582103xk1at12y4ucb", - "version": "4", - "createdAt": "2022-04-09T22:06:01.196Z", - "updatedAt": "2022-04-09T22:35:22.449Z", - "icon": "๐Ÿ†", + "version": "6", + "id": "clon58wkg00051avnkor66u6m", "name": "Lead Scoring", - "folderId": null, - "groups": [ + "events": [ { "id": "cl1seoz560000xk1ags8s67b0", - "blocks": [ - { - "id": "cl1seoz570001xk1ab0rd05k6", - "type": "start", - "label": "Start", - "groupId": "cl1seoz560000xk1ags8s67b0", - "outgoingEdgeId": "cl1seraz9001z2e6e85zrx08l" - } - ], - "title": "Start", - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "cl1seraz9001z2e6e85zrx08l", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "cl1sep1c5001w2e6e77bb1uwb", - "graphCoordinates": { "x": 0, "y": 171 }, "title": "Welcome", + "graphCoordinates": { "x": 0, "y": 171 }, "blocks": [ { "id": "cl1sep1cc001x2e6eikrwf9jy", - "groupId": "cl1sep1c5001w2e6e77bb1uwb", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Hi! ๐Ÿ‘‹" }] }] @@ -36,7 +25,6 @@ }, { "id": "cl1sep7jn001y2e6ez7ee7eiw", - "groupId": "cl1sep1c5001w2e6e77bb1uwb", "type": "text", "content": { "richText": [ @@ -51,7 +39,6 @@ }, { "id": "cl1seyazl00252e6e3zsbosvm", - "groupId": "cl1sep1c5001w2e6e77bb1uwb", "type": "text", "content": { "richText": [ @@ -66,24 +53,22 @@ }, { "id": "cl1sezuul002a2e6ex7nc444j", - "groupId": "cl1sep1c5001w2e6e77bb1uwb", + "outgoingEdgeId": "cl1sf8v96003k2e6e2rbcfjmz", "type": "Set variable", "options": { "variableId": "vcl1sezzln002b2e6e6ssxh9bf", "expressionToEvaluate": "0" - }, - "outgoingEdgeId": "cl1sf8v96003k2e6e2rbcfjmz" + } } ] }, { "id": "cl1sern8w00202e6ez69l190j", - "graphCoordinates": { "x": 377, "y": 166 }, "title": "Q1", + "graphCoordinates": { "x": 377, "y": 166 }, "blocks": [ { "id": "cl1sern9200212e6esrid307i", - "groupId": "cl1sern8w00202e6ez69l190j", "type": "text", "content": { "richText": [ @@ -96,23 +81,17 @@ }, { "id": "cl1ses31000222e6ebrb4wxo0", - "groupId": "cl1sern8w00202e6ez69l190j", "type": "choice input", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, "items": [ { "id": "cl1ses31100232e6eq3nnp2mm", - "blockId": "cl1ses31000222e6ebrb4wxo0", - "type": 0, - "content": "Yes", - "outgoingEdgeId": "cl1sezo4z00292e6ean8s487x" + "outgoingEdgeId": "cl1sezo4z00292e6ean8s487x", + "content": "Yes" }, { - "blockId": "cl1ses31000222e6ebrb4wxo0", - "type": 0, "id": "cl1ses3y400242e6e1qjwkhq4", - "content": "No", - "outgoingEdgeId": "cl1sfertf004i2e6epf68fwri" + "outgoingEdgeId": "cl1sfertf004i2e6epf68fwri", + "content": "No" } ] } @@ -120,12 +99,11 @@ }, { "id": "cl1sez6zd00262e6ebh59k1bs", - "graphCoordinates": { "x": 748, "y": 135 }, "title": "Company", + "graphCoordinates": { "x": 748, "y": 135 }, "blocks": [ { "id": "cl1sf04yl002c2e6eaeu463cq", - "groupId": "cl1sez6zd00262e6ebh59k1bs", "type": "Set variable", "options": { "variableId": "vcl1sezzln002b2e6e6ssxh9bf", @@ -134,7 +112,6 @@ }, { "id": "cl1sez6zt00272e6ecsefq05y", - "groupId": "cl1sez6zd00262e6ebh59k1bs", "type": "text", "content": { "richText": [ @@ -144,28 +121,21 @@ }, { "id": "cl1sezlw700282e6eozkzmed0", - "groupId": "cl1sez6zd00262e6ebh59k1bs", + "outgoingEdgeId": "cl1sf1mm0002h2e6eurv21l5n", "type": "text input", "options": { - "isLong": false, - "labels": { - "button": "Send", - "placeholder": "Type your answer..." - }, "variableId": "vcl1sf93s2003l2e6eojomb66g" - }, - "outgoingEdgeId": "cl1sf1mm0002h2e6eurv21l5n" + } } ] }, { "id": "cl1sf0ogu002d2e6edyhcuu6f", - "graphCoordinates": { "x": 1096, "y": -62 }, "title": "Q2", + "graphCoordinates": { "x": 1096, "y": -62 }, "blocks": [ { "id": "cl1sf0ohc002e2e6egrjoj10z", - "groupId": "cl1sf0ogu002d2e6edyhcuu6f", "type": "text", "content": { "richText": [ @@ -180,22 +150,18 @@ }, { "id": "cl1sf1er7002f2e6eakhc25yy", - "groupId": "cl1sf0ogu002d2e6edyhcuu6f", "type": "number input", "options": { - "labels": { "button": "Send", "placeholder": "Type a number..." }, "variableId": "vcl1sf1ko5002g2e6egjmyb16v" } }, { "id": "cl1sf1vkf002j2e6e971somqx", - "groupId": "cl1sf0ogu002d2e6edyhcuu6f", "type": "Condition", "items": [ { "id": "cl1sf1vkg002k2e6ec54p0s4v", - "blockId": "cl1sf1vkf002j2e6e971somqx", - "type": 1, + "outgoingEdgeId": "cl1sf35fh002t2e6e8u68r9gz", "content": { "comparisons": [ { @@ -204,22 +170,19 @@ "comparisonOperator": "Greater than", "value": "30" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "cl1sf35fh002t2e6e8u68r9gz" + ] + } } ] }, { "id": "cl1sf2iix002n2e6egibs95yb", - "groupId": "cl1sf0ogu002d2e6edyhcuu6f", + "outgoingEdgeId": "cl1sfen6a004f2e6estkfooss", "type": "Condition", "items": [ { "id": "cl1sf2iix002o2e6eai567rnj", - "blockId": "cl1sf2iix002n2e6egibs95yb", - "type": 1, + "outgoingEdgeId": "cl1sf37rv002x2e6e7wz3lawd", "content": { "comparisons": [ { @@ -227,58 +190,52 @@ "variableId": "vcl1sf1ko5002g2e6egjmyb16v", "value": "10" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "cl1sf37rv002x2e6e7wz3lawd" + ] + } } - ], - "outgoingEdgeId": "cl1sfen6a004f2e6estkfooss" + ] } ] }, { "id": "cl1sf2wnu002r2e6ehdp859qv", - "graphCoordinates": { "x": 1458, "y": -72 }, "title": "Add 20", + "graphCoordinates": { "x": 1458, "y": -72 }, "blocks": [ { "id": "cl1sf2wom002s2e6e8cmcnhpn", - "groupId": "cl1sf2wnu002r2e6ehdp859qv", + "outgoingEdgeId": "cl1sfeq3f004h2e6eglhjyx2o", "type": "Set variable", "options": { "variableId": "vcl1sezzln002b2e6e6ssxh9bf", "expressionToEvaluate": "{{Lead Score}} + 20" - }, - "outgoingEdgeId": "cl1sfeq3f004h2e6eglhjyx2o" + } } ] }, { "id": "cl1sf36ia002u2e6e16ifow0z", - "graphCoordinates": { "x": 1458, "y": 88 }, "title": "Add 10", + "graphCoordinates": { "x": 1458, "y": 88 }, "blocks": [ { "id": "cl1sf36ib002v2e6ejyyrrjnh", - "groupId": "cl1sf36ia002u2e6e16ifow0z", + "outgoingEdgeId": "cl1sfeog5004g2e6eiil842nb", "type": "Set variable", "options": { "variableId": "vcl1sezzln002b2e6e6ssxh9bf", "expressionToEvaluate": "{{Lead Score}} + 10" - }, - "outgoingEdgeId": "cl1sfeog5004g2e6eiil842nb" + } } ] }, { "id": "cl1sf4qk500332e6e8gs5mn3t", - "graphCoordinates": { "x": 2442.929831215626, "y": 391 }, "title": "Q4", + "graphCoordinates": { "x": 2442.929831215626, "y": 391 }, "blocks": [ { "id": "cl1sf4ql500342e6ebj863aex", - "groupId": "cl1sf4qk500332e6e8gs5mn3t", "type": "text", "content": { "richText": [ @@ -288,12 +245,9 @@ }, { "id": "cl1sf4z8n00352e6ejypaeinl", - "groupId": "cl1sf4qk500332e6e8gs5mn3t", "type": "text input", "options": { - "isLong": false, "labels": { - "button": "Send", "placeholder": "Type your country..." }, "variableId": "vcl1sf525q00362e6eoyosycte" @@ -301,13 +255,12 @@ }, { "id": "cl1sf738d003c2e6eswslikio", - "groupId": "cl1sf4qk500332e6e8gs5mn3t", + "outgoingEdgeId": "cl1sf9acz003n2e6ekwjq7209", "type": "Condition", "items": [ { "id": "cl1sf738d003d2e6eqpzlxh8f", - "blockId": "cl1sf738d003c2e6eswslikio", - "type": 1, + "outgoingEdgeId": "cl1sf7qlx003h2e6e60635qrt", "content": { "comparisons": [ { @@ -316,41 +269,36 @@ "comparisonOperator": "Equal to", "value": "United States" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "cl1sf7qlx003h2e6e60635qrt" + ] + } } - ], - "outgoingEdgeId": "cl1sf9acz003n2e6ekwjq7209" + ] } ] }, { "id": "cl1sf7jbi003f2e6euy48woy4", - "graphCoordinates": { "x": 2765.4297996080672, "y": 386.7142676528225 }, "title": "Add 10", + "graphCoordinates": { "x": 2765.429799608067, "y": 386.7142676528225 }, "blocks": [ { "id": "cl1sf7jcx003g2e6ec1z9xh0w", - "groupId": "cl1sf7jbi003f2e6euy48woy4", + "outgoingEdgeId": "cl1sf99bb003m2e6eywy661ww", "type": "Set variable", "options": { "variableId": "vcl1sezzln002b2e6e6ssxh9bf", "expressionToEvaluate": "10" - }, - "outgoingEdgeId": "cl1sf99bb003m2e6eywy661ww" + } } ] }, { "id": "cl1sf85am003i2e6e1yq8eoa7", - "graphCoordinates": { "x": 2953.7865857513116, "y": 570.3154133255522 }, "title": "Filtering", + "graphCoordinates": { "x": 2953.786585751312, "y": 570.3154133255522 }, "blocks": [ { "id": "cl1sf85bm003j2e6e04d210vs", - "groupId": "cl1sf85am003i2e6e1yq8eoa7", "type": "text", "content": { "richText": [ @@ -365,13 +313,12 @@ }, { "id": "cl1sfat0h003p2e6e7j0hpilh", - "groupId": "cl1sf85am003i2e6e1yq8eoa7", + "outgoingEdgeId": "cl1sfgtau004n2e6ev68sikcr", "type": "Condition", "items": [ { "id": "cl1sfat0h003q2e6eyx6vxe0f", - "blockId": "cl1sfat0h003p2e6e7j0hpilh", - "type": 1, + "outgoingEdgeId": "cl1sfg9fc004k2e6egywpim9v", "content": { "comparisons": [ { @@ -380,24 +327,20 @@ "comparisonOperator": "Greater than", "value": "20" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "cl1sfg9fc004k2e6egywpim9v" + ] + } } - ], - "outgoingEdgeId": "cl1sfgtau004n2e6ev68sikcr" + ] } ] }, { "id": "cl1sfbbv0003s2e6eheyhv7ke", - "graphCoordinates": { "x": 1632.8573866868949, "y": 465.7855110942534 }, "title": "Q3", + "graphCoordinates": { "x": 1632.857386686895, "y": 465.7855110942534 }, "blocks": [ { "id": "cl1sfcqjw003z2e6ebmyzey4o", - "groupId": "cl1sfbbv0003s2e6eheyhv7ke", "type": "text", "content": { "richText": [ @@ -407,86 +350,64 @@ }, { "id": "cl1sfbbw3003t2e6e16ec9w29", - "groupId": "cl1sfbbv0003s2e6eheyhv7ke", + "outgoingEdgeId": "cl1sfek9r004e2e6elkh3h7a2", "type": "choice input", - "options": { - "buttonLabel": "Send", - "isMultipleChoice": false - }, "items": [ + { "id": "cl1sfbbw3003u2e6e7luhj0n1", "content": "UI/UX Designer" }, + { "id": "cl1sfbq6z003v2e6egnctk2n2", "content": "Product Owner" }, { - "id": "cl1sfbbw3003u2e6e7luhj0n1", - "blockId": "cl1sfbbw3003t2e6e16ec9w29", - "type": 0, - "content": "UI/UX Designer" - }, - { - "blockId": "cl1sfbbw3003t2e6e16ec9w29", - "type": 0, - "id": "cl1sfbq6z003v2e6egnctk2n2", - "content": "Product Owner" - }, - { - "blockId": "cl1sfbbw3003t2e6e16ec9w29", - "type": 0, "id": "cl1sfbtz8003w2e6eodbt4ogs", - "content": "Marketing Officer", - "outgoingEdgeId": "cl1sfebs9004a2e6ere0zokyo" + "outgoingEdgeId": "cl1sfebs9004a2e6ere0zokyo", + "content": "Marketing Officer" }, { - "blockId": "cl1sfbbw3003t2e6e16ec9w29", - "type": 0, "id": "cl1sfc545003x2e6e833juo6m", - "content": "Developer", - "outgoingEdgeId": "cl1sfedcd004b2e6eerh8hz33" + "outgoingEdgeId": "cl1sfedcd004b2e6eerh8hz33", + "content": "Developer" } - ], - "outgoingEdgeId": "cl1sfek9r004e2e6elkh3h7a2" + ] } ] }, { "id": "cl1sfdroa00452e6e5o458z9h", - "graphCoordinates": { "x": 1983.1431822491943, "y": 82.85612238447435 }, "title": "Add 20", + "graphCoordinates": { "x": 1983.143182249194, "y": 82.85612238447435 }, "blocks": [ { "id": "cl1sfdrpi00462e6emfd9sj14", - "groupId": "cl1sfdroa00452e6e5o458z9h", + "outgoingEdgeId": "cl1sfeg2k004c2e6eu9rjnski", "type": "Set variable", "options": { "variableId": "vcl1sezzln002b2e6e6ssxh9bf", "expressionToEvaluate": "{{Lead Score}} + 20" - }, - "outgoingEdgeId": "cl1sfeg2k004c2e6eu9rjnski" + } } ] }, { "id": "cl1sfe2kn00472e6ead4qs2d9", - "graphCoordinates": { "x": 1984.2856059169358, "y": 240.8562488147158 }, "title": "Add 10", + "graphCoordinates": { "x": 1984.285605916936, "y": 240.8562488147158 }, "blocks": [ { "id": "cl1sfe2kn00482e6eukp8r9bj", - "groupId": "cl1sfe2kn00472e6ead4qs2d9", + "outgoingEdgeId": "cl1sfeik5004d2e6ejj03f1gn", "type": "Set variable", "options": { "variableId": "vcl1sezzln002b2e6e6ssxh9bf", "expressionToEvaluate": "{{Lead Score}} + 20" - }, - "outgoingEdgeId": "cl1sfeik5004d2e6ejj03f1gn" + } } ] }, { "id": "cl1sffxet004j2e6ec6gfbffh", - "graphCoordinates": { "x": 3350.0874940277185, "y": 509.77356639445065 }, "title": "Conclusion - Qualified", + "graphCoordinates": { "x": 3350.087494027719, "y": 509.7735663944507 }, "blocks": [ { "id": "cl1sfgwox004o2e6evzi0n7hk", - "groupId": "cl1sffxet004j2e6ec6gfbffh", "type": "text", "content": { "richText": [ @@ -503,7 +424,6 @@ }, { "id": "cl1sfhz4f004p2e6esidqktmr", - "groupId": "cl1sffxet004j2e6ec6gfbffh", "type": "text", "content": { "richText": [ @@ -518,12 +438,11 @@ }, { "id": "cl1sfgjlr004l2e6erykli1ud", - "graphCoordinates": { "x": 3352.8943392345736, "y": 786.5865419115444 }, "title": "Conclusion - Not qualified", + "graphCoordinates": { "x": 3352.894339234574, "y": 786.5865419115444 }, "blocks": [ { "id": "cl1sfgjnr004m2e6e63sqh0dh", - "groupId": "cl1sfgjlr004l2e6erykli1ud", "type": "text", "content": { "richText": [ @@ -538,7 +457,6 @@ }, { "id": "cl1sfikh5004q2e6elyvzgd0s", - "groupId": "cl1sfgjlr004l2e6erykli1ud", "type": "text", "content": { "richText": [ @@ -553,7 +471,6 @@ }, { "id": "cl1sfitz4004r2e6e3ge4x7uy", - "groupId": "cl1sfgjlr004l2e6erykli1ud", "type": "text", "content": { "richText": [ @@ -564,214 +481,150 @@ ] } ], - "variables": [ - { "id": "vcl1sezzln002b2e6e6ssxh9bf", "name": "Lead Score" }, - { "id": "vcl1sf1ko5002g2e6egjmyb16v", "name": "Team size" }, - { "id": "vcl1sf525q00362e6eoyosycte", "name": "Country" }, - { "id": "vcl1sf93s2003l2e6eojomb66g", "name": "Company" } - ], "edges": [ { - "from": { - "groupId": "cl1seoz560000xk1ags8s67b0", - "blockId": "cl1seoz570001xk1ab0rd05k6" - }, - "to": { "groupId": "cl1sep1c5001w2e6e77bb1uwb" }, - "id": "cl1seraz9001z2e6e85zrx08l" + "id": "cl1seraz9001z2e6e85zrx08l", + "from": { "eventId": "cl1seoz560000xk1ags8s67b0" }, + "to": { "groupId": "cl1sep1c5001w2e6e77bb1uwb" } }, { + "id": "cl1sezo4z00292e6ean8s487x", "from": { - "groupId": "cl1sern8w00202e6ez69l190j", "blockId": "cl1ses31000222e6ebrb4wxo0", "itemId": "cl1ses31100232e6eq3nnp2mm" }, - "to": { "groupId": "cl1sez6zd00262e6ebh59k1bs" }, - "id": "cl1sezo4z00292e6ean8s487x" + "to": { "groupId": "cl1sez6zd00262e6ebh59k1bs" } }, { - "from": { - "groupId": "cl1sez6zd00262e6ebh59k1bs", - "blockId": "cl1sezlw700282e6eozkzmed0" - }, - "to": { "groupId": "cl1sf0ogu002d2e6edyhcuu6f" }, - "id": "cl1sf1mm0002h2e6eurv21l5n" + "id": "cl1sf1mm0002h2e6eurv21l5n", + "from": { "blockId": "cl1sezlw700282e6eozkzmed0" }, + "to": { "groupId": "cl1sf0ogu002d2e6edyhcuu6f" } }, { + "id": "cl1sf35fh002t2e6e8u68r9gz", "from": { - "groupId": "cl1sf0ogu002d2e6edyhcuu6f", "blockId": "cl1sf1vkf002j2e6e971somqx", "itemId": "cl1sf1vkg002k2e6ec54p0s4v" }, - "to": { "groupId": "cl1sf2wnu002r2e6ehdp859qv" }, - "id": "cl1sf35fh002t2e6e8u68r9gz" + "to": { "groupId": "cl1sf2wnu002r2e6ehdp859qv" } }, { + "id": "cl1sf37rv002x2e6e7wz3lawd", "from": { - "groupId": "cl1sf0ogu002d2e6edyhcuu6f", "blockId": "cl1sf2iix002n2e6egibs95yb", "itemId": "cl1sf2iix002o2e6eai567rnj" }, - "to": { "groupId": "cl1sf36ia002u2e6e16ifow0z" }, - "id": "cl1sf37rv002x2e6e7wz3lawd" + "to": { "groupId": "cl1sf36ia002u2e6e16ifow0z" } }, { + "id": "cl1sf7qlx003h2e6e60635qrt", "from": { - "groupId": "cl1sf4qk500332e6e8gs5mn3t", "blockId": "cl1sf738d003c2e6eswslikio", "itemId": "cl1sf738d003d2e6eqpzlxh8f" }, - "to": { "groupId": "cl1sf7jbi003f2e6euy48woy4" }, - "id": "cl1sf7qlx003h2e6e60635qrt" + "to": { "groupId": "cl1sf7jbi003f2e6euy48woy4" } }, { - "from": { - "groupId": "cl1sep1c5001w2e6e77bb1uwb", - "blockId": "cl1sezuul002a2e6ex7nc444j" - }, - "to": { "groupId": "cl1sern8w00202e6ez69l190j" }, - "id": "cl1sf8v96003k2e6e2rbcfjmz" + "id": "cl1sf8v96003k2e6e2rbcfjmz", + "from": { "blockId": "cl1sezuul002a2e6ex7nc444j" }, + "to": { "groupId": "cl1sern8w00202e6ez69l190j" } }, { - "from": { - "groupId": "cl1sf7jbi003f2e6euy48woy4", - "blockId": "cl1sf7jcx003g2e6ec1z9xh0w" - }, - "to": { "groupId": "cl1sf85am003i2e6e1yq8eoa7" }, - "id": "cl1sf99bb003m2e6eywy661ww" + "id": "cl1sf99bb003m2e6eywy661ww", + "from": { "blockId": "cl1sf7jcx003g2e6ec1z9xh0w" }, + "to": { "groupId": "cl1sf85am003i2e6e1yq8eoa7" } }, { - "from": { - "groupId": "cl1sf4qk500332e6e8gs5mn3t", - "blockId": "cl1sf738d003c2e6eswslikio" - }, - "to": { "groupId": "cl1sf85am003i2e6e1yq8eoa7" }, - "id": "cl1sf9acz003n2e6ekwjq7209" + "id": "cl1sf9acz003n2e6ekwjq7209", + "from": { "blockId": "cl1sf738d003c2e6eswslikio" }, + "to": { "groupId": "cl1sf85am003i2e6e1yq8eoa7" } }, { + "id": "cl1sfebs9004a2e6ere0zokyo", "from": { - "groupId": "cl1sfbbv0003s2e6eheyhv7ke", "blockId": "cl1sfbbw3003t2e6e16ec9w29", "itemId": "cl1sfbtz8003w2e6eodbt4ogs" }, - "to": { "groupId": "cl1sfdroa00452e6e5o458z9h" }, - "id": "cl1sfebs9004a2e6ere0zokyo" + "to": { "groupId": "cl1sfdroa00452e6e5o458z9h" } }, { + "id": "cl1sfedcd004b2e6eerh8hz33", "from": { - "groupId": "cl1sfbbv0003s2e6eheyhv7ke", "blockId": "cl1sfbbw3003t2e6e16ec9w29", "itemId": "cl1sfc545003x2e6e833juo6m" }, - "to": { "groupId": "cl1sfe2kn00472e6ead4qs2d9" }, - "id": "cl1sfedcd004b2e6eerh8hz33" + "to": { "groupId": "cl1sfe2kn00472e6ead4qs2d9" } }, { - "from": { - "groupId": "cl1sfdroa00452e6e5o458z9h", - "blockId": "cl1sfdrpi00462e6emfd9sj14" - }, - "to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" }, - "id": "cl1sfeg2k004c2e6eu9rjnski" + "id": "cl1sfeg2k004c2e6eu9rjnski", + "from": { "blockId": "cl1sfdrpi00462e6emfd9sj14" }, + "to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" } }, { - "from": { - "groupId": "cl1sfe2kn00472e6ead4qs2d9", - "blockId": "cl1sfe2kn00482e6eukp8r9bj" - }, - "to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" }, - "id": "cl1sfeik5004d2e6ejj03f1gn" + "id": "cl1sfeik5004d2e6ejj03f1gn", + "from": { "blockId": "cl1sfe2kn00482e6eukp8r9bj" }, + "to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" } }, { - "from": { - "groupId": "cl1sfbbv0003s2e6eheyhv7ke", - "blockId": "cl1sfbbw3003t2e6e16ec9w29" - }, - "to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" }, - "id": "cl1sfek9r004e2e6elkh3h7a2" + "id": "cl1sfek9r004e2e6elkh3h7a2", + "from": { "blockId": "cl1sfbbw3003t2e6e16ec9w29" }, + "to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" } }, { - "from": { - "groupId": "cl1sf0ogu002d2e6edyhcuu6f", - "blockId": "cl1sf2iix002n2e6egibs95yb" - }, - "to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" }, - "id": "cl1sfen6a004f2e6estkfooss" + "id": "cl1sfen6a004f2e6estkfooss", + "from": { "blockId": "cl1sf2iix002n2e6egibs95yb" }, + "to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" } }, { - "from": { - "groupId": "cl1sf36ia002u2e6e16ifow0z", - "blockId": "cl1sf36ib002v2e6ejyyrrjnh" - }, - "to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" }, - "id": "cl1sfeog5004g2e6eiil842nb" + "id": "cl1sfeog5004g2e6eiil842nb", + "from": { "blockId": "cl1sf36ib002v2e6ejyyrrjnh" }, + "to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" } }, { - "from": { - "groupId": "cl1sf2wnu002r2e6ehdp859qv", - "blockId": "cl1sf2wom002s2e6e8cmcnhpn" - }, - "to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" }, - "id": "cl1sfeq3f004h2e6eglhjyx2o" + "id": "cl1sfeq3f004h2e6eglhjyx2o", + "from": { "blockId": "cl1sf2wom002s2e6e8cmcnhpn" }, + "to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" } }, { + "id": "cl1sfertf004i2e6epf68fwri", "from": { - "groupId": "cl1sern8w00202e6ez69l190j", "blockId": "cl1ses31000222e6ebrb4wxo0", "itemId": "cl1ses3y400242e6e1qjwkhq4" }, - "to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" }, - "id": "cl1sfertf004i2e6epf68fwri" + "to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" } }, { + "id": "cl1sfg9fc004k2e6egywpim9v", "from": { - "groupId": "cl1sf85am003i2e6e1yq8eoa7", "blockId": "cl1sfat0h003p2e6e7j0hpilh", "itemId": "cl1sfat0h003q2e6eyx6vxe0f" }, - "to": { "groupId": "cl1sffxet004j2e6ec6gfbffh" }, - "id": "cl1sfg9fc004k2e6egywpim9v" + "to": { "groupId": "cl1sffxet004j2e6ec6gfbffh" } }, { - "from": { - "groupId": "cl1sf85am003i2e6e1yq8eoa7", - "blockId": "cl1sfat0h003p2e6e7j0hpilh" - }, - "to": { "groupId": "cl1sfgjlr004l2e6erykli1ud" }, - "id": "cl1sfgtau004n2e6ev68sikcr" + "id": "cl1sfgtau004n2e6ev68sikcr", + "from": { "blockId": "cl1sfat0h003p2e6e7j0hpilh" }, + "to": { "groupId": "cl1sfgjlr004l2e6erykli1ud" } } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": 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 } - }, + "variables": [ + { "id": "vcl1sezzln002b2e6e6ssxh9bf", "name": "Lead Score" }, + { "id": "vcl1sf1ko5002g2e6egjmyb16v", "name": "Team size" }, + { "id": "vcl1sf525q00362e6eoyosycte", "name": "Country" }, + { "id": "vcl1sf93s2003l2e6eojomb66g", "name": "Company" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-06T16:55:57.664Z", + "updatedAt": "2023-11-06T16:55:57.664Z", + "icon": "๐Ÿ†", + "folderId": null, "publicId": null, - "customDomain": null + "customDomain": null, + "workspaceId": "proWorkspace", + "resultsTablePreferences": null, + "isArchived": false, + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/movie-recommendation.json b/apps/builder/public/templates/movie-recommendation.json index e40b70b4ea..369b6f0b10 100644 --- a/apps/builder/public/templates/movie-recommendation.json +++ b/apps/builder/public/templates/movie-recommendation.json @@ -1,34 +1,24 @@ { - "id": "d8z3y5ats5r0lyptw938re79", - "version": "4", - "createdAt": "2023-08-06T05:56:35.727Z", - "updatedAt": "2023-08-06T06:39:16.019Z", - "icon": "๐Ÿฟ", + "version": "6", + "id": "cloo0wet7000h1aor38uwjxjw", "name": "Movie recommendation", - "folderId": null, - "groups": [ + "events": [ { "id": "u6lpjibfjhyoqij5wjf9kvnl", - "title": "Start", - "blocks": [ - { - "id": "rha69fygov33vym1hf6z837p", - "type": "start", - "label": "Start", - "groupId": "u6lpjibfjhyoqij5wjf9kvnl", - "outgoingEdgeId": "wfec8f4e1jtden2wqna6nrso" - } - ], - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "wfec8f4e1jtden2wqna6nrso", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "mjnkukpkpvf4ha2g4n5m804v", "title": "Menu", + "graphCoordinates": { "x": 243.1, "y": 12.32 }, "blocks": [ { "id": "kjlf184vxf0uorniwje28iqb", "type": "Set variable", - "groupId": "mjnkukpkpvf4ha2g4n5m804v", "options": { "variableId": "vh5bxx07kl3016wr1undh2yb3", "expressionToEvaluate": "2f584d1ffe2b7fb082dd4e05038e9bd7" @@ -46,16 +36,14 @@ ] } ] - }, - "groupId": "mjnkukpkpvf4ha2g4n5m804v" + } }, { "id": "c7swi84rmdvrul0wz5kxtplm", "type": "image", "content": { "url": "https://media3.giphy.com/media/BElb9DVpHezcZufOhl/giphy-downsized.gif?cid=fe3852a3uwhsp1sc3j6avr625v5e94h1v8o3wfb1ii3xwswk&rid=giphy-downsized.gif&ct=g" - }, - "groupId": "mjnkukpkpvf4ha2g4n5m804v" + } }, { "id": "nlihfc4ptxnxoktqblh6mcql", @@ -67,16 +55,14 @@ "children": [{ "text": "It is powered by The Movie DB API ๐Ÿš€" }] } ] - }, - "groupId": "mjnkukpkpvf4ha2g4n5m804v" + } }, { "id": "vr73urm54d9mq2oqg7ey1xh8", "type": "image", "content": { "url": "https://www.themoviedb.org/assets/2/v4/logos/v2/blue_square_1-5bdc75aaebeb75dc7ae79426ddd9be3b2be1e342510f8202baf6bffa71d7f5c4.svg" - }, - "groupId": "mjnkukpkpvf4ha2g4n5m804v" + } }, { "id": "g5yyuh9g75x7xa7fgqhhi1zz", @@ -85,8 +71,7 @@ "richText": [ { "type": "p", "children": [{ "text": "How can I we help?" }] } ] - }, - "groupId": "mjnkukpkpvf4ha2g4n5m804v" + } }, { "id": "tzf45bvd8iquoxz7qgta8v94", @@ -94,76 +79,65 @@ "items": [ { "id": "kaimvzg9igdtktgou5m3s1bw", - "type": 0, - "blockId": "sodsq9mcigwvogmwx0t4jvil", - "content": "Select a genre ๐Ÿ’…", - "outgoingEdgeId": "t8qyjpigrz7cdl8gxl1wxlwj" + "outgoingEdgeId": "t8qyjpigrz7cdl8gxl1wxlwj", + "content": "Select a genre ๐Ÿ’…" }, { "id": "i8ls2f8inq2ovuijj6l7rbcq", - "type": 0, - "blockId": "sodsq9mcigwvogmwx0t4jvil", - "content": "See what's trending ๐Ÿ”", - "outgoingEdgeId": "tjn2ljosqyd4aj9dk8mnifsu" + "outgoingEdgeId": "tjn2ljosqyd4aj9dk8mnifsu", + "content": "See what's trending ๐Ÿ”" } - ], - "groupId": "mjnkukpkpvf4ha2g4n5m804v", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] } - ], - "graphCoordinates": { "x": 255.25, "y": 172.89 } + ] }, { "id": "kq1g5z6pz4buot7sawqdrr3s", "title": "Genre", + "graphCoordinates": { "x": 607.85, "y": 295.32 }, "blocks": [ { "id": "ecwz96cghzp4ji3lyx7taxt1", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Sure!" }] }] - }, - "groupId": "kq1g5z6pz4buot7sawqdrr3s" + } }, { "id": "gd4lt2pcljer6zaf7v9hkr1k", "type": "Webhook", - "groupId": "kq1g5z6pz4buot7sawqdrr3s", "options": { - "webhook": { - "id": "t4pht3ndfc8tu9geovi7czqm", - "url": "https://api.themoviedb.org/3/genre/movie/list", - "method": "GET", - "headers": [], - "queryParams": [ - { - "id": "gq6m7x2k20qzrj752qi2zpmu", - "key": "api_key", - "value": "{{API Key}}" - } - ] - }, - "isCustomBody": false, - "isAdvancedConfig": true, "variablesForTest": [ { "id": "oqbhwya4cewto5pfjmftjmpn", - "value": "2f584d1ffe2b7fb082dd4e05038e9bd7", - "variableId": "vh5bxx07kl3016wr1undh2yb3" + "variableId": "vh5bxx07kl3016wr1undh2yb3", + "value": "2f584d1ffe2b7fb082dd4e05038e9bd7" } ], "responseVariableMapping": [ { "id": "bm186wvb4e2aqj1myx5gc251", - "bodyPath": "data.genres.flatMap(item => item.name)", - "variableId": "vx0bbqzug4vk3zpc31ly8k7al" + "variableId": "vx0bbqzug4vk3zpc31ly8k7al", + "bodyPath": "data.genres.flatMap(item => item.name)" }, { "id": "xsrhvxf3hv74e2hkokmdflbc", - "bodyPath": "data.genres.flatMap(item => item.id)", - "variableId": "vwc00rydyp035vtb0nlaqyzwr" + "variableId": "vwc00rydyp035vtb0nlaqyzwr", + "bodyPath": "data.genres.flatMap(item => item.id)" } - ] + ], + "isAdvancedConfig": true, + "webhook": { + "queryParams": [ + { + "id": "gq6m7x2k20qzrj752qi2zpmu", + "key": "api_key", + "value": "{{API Key}}" + } + ], + "method": "GET", + "url": "https://api.themoviedb.org/3/genre/movie/list" + } } }, { @@ -176,99 +150,82 @@ "children": [{ "text": "Select your desired genre ๐Ÿ‘‡" }] } ] - }, - "groupId": "kq1g5z6pz4buot7sawqdrr3s" + } }, { "id": "nwuk2clo78hmnh4d0g31u9xg", "type": "choice input", "items": [ - { - "id": "ri3avm9p0i96p8gx4028b6ye", - "type": 0, - "blockId": "eqm19tzeh7kullwld8auoqy4", - "content": "Click to edit" - } + { "id": "ri3avm9p0i96p8gx4028b6ye", "content": "Click to edit" } ], - "groupId": "kq1g5z6pz4buot7sawqdrr3s", "options": { "variableId": "vkmbb3rb2hcfd2io1fhf7rz5x", - "buttonLabel": "Send", - "isMultipleChoice": false, "dynamicVariableId": "vx0bbqzug4vk3zpc31ly8k7al" } }, { "id": "j7pm34um4piuyabwlobjc356", + "outgoingEdgeId": "tfuuwjnpn7mftd5s65mbhytd", "type": "Set variable", - "groupId": "kq1g5z6pz4buot7sawqdrr3s", "options": { - "type": "Map item with same index", - "isCode": true, "variableId": "vwewa4yugqch2sswdpneszk3i", + "type": "Map item with same index", "mapListItemParams": { "baseItemVariableId": "vkmbb3rb2hcfd2io1fhf7rz5x", "baseListVariableId": "vx0bbqzug4vk3zpc31ly8k7al", "targetListVariableId": "vwc00rydyp035vtb0nlaqyzwr" - }, - "expressionToEvaluate": "{{Genre IDs}}.at({{Genres}}.indexOf({{Selected genre}}))" - }, - "outgoingEdgeId": "tfuuwjnpn7mftd5s65mbhytd" + } + } } - ], - "graphCoordinates": { "x": 630.85, "y": 333.68 } + ] }, { "id": "d6v9lh83c7zuwrhf2mmo6nxo", "title": "Trending", + "graphCoordinates": { "x": 599.83, "y": 880.98 }, "blocks": [ { "id": "edokvbp15ubqeuydw9n7wf4w", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Sure!" }] }] - }, - "groupId": "d6v9lh83c7zuwrhf2mmo6nxo" + } }, { "id": "pwxb57b8nc2bp764vcdstois", "type": "Webhook", - "groupId": "d6v9lh83c7zuwrhf2mmo6nxo", "options": { - "webhook": { - "id": "a5oaijpqxo5a0mqrnjqg3tyt", - "url": "https://api.themoviedb.org/3/trending/movie/week", - "method": "GET", - "headers": [], - "queryParams": [ - { - "id": "x9nxr63itm2lvbe8dmi53mi7", - "key": "api_key", - "value": "{{API Key}}" - } - ] - }, - "isCustomBody": false, - "isAdvancedConfig": true, "variablesForTest": [ { "id": "oqbhwya4cewto5pfjmftjmpn", - "value": "2f584d1ffe2b7fb082dd4e05038e9bd7", - "variableId": "vh5bxx07kl3016wr1undh2yb3" + "variableId": "vh5bxx07kl3016wr1undh2yb3", + "value": "2f584d1ffe2b7fb082dd4e05038e9bd7" } ], "responseVariableMapping": [ { "id": "g5ga79m1dzgp28chaxlj2i72", - "bodyPath": "data.results.flatMap(item => item.title)", - "variableId": "vkzk96oh1pmdjv2bt5ps60qc0" + "variableId": "vkzk96oh1pmdjv2bt5ps60qc0", + "bodyPath": "data.results.flatMap(item => item.title)" }, { "id": "albmykstahw37np5gjuafxie", - "bodyPath": "data.results.flatMap(item => item.id)", - "variableId": "vcmybxcoaytd2geo5sqx7v8hw" + "variableId": "vcmybxcoaytd2geo5sqx7v8hw", + "bodyPath": "data.results.flatMap(item => item.id)" } - ] + ], + "isAdvancedConfig": true, + "webhook": { + "queryParams": [ + { + "id": "x9nxr63itm2lvbe8dmi53mi7", + "key": "api_key", + "value": "{{API Key}}" + } + ], + "method": "GET", + "url": "https://api.themoviedb.org/3/trending/movie/week" + } } }, { @@ -281,51 +238,39 @@ "children": [{ "text": "Here are popular movies this week ๐Ÿ‘‡" }] } ] - }, - "groupId": "d6v9lh83c7zuwrhf2mmo6nxo" + } }, { "id": "krcvvncnqtn99v0qe1dzudrk", "type": "choice input", "items": [ - { - "id": "dicb6lnv5kapkq0tygnx1abh", - "type": 0, - "blockId": "stlcncbupmsjxjipi86s45hy", - "content": "Click to edit" - } + { "id": "dicb6lnv5kapkq0tygnx1abh", "content": "Click to edit" } ], - "groupId": "d6v9lh83c7zuwrhf2mmo6nxo", "options": { "variableId": "vulnb1om2fk8mvkcesl8s15cr", - "buttonLabel": "Send", - "isMultipleChoice": false, "dynamicVariableId": "vkzk96oh1pmdjv2bt5ps60qc0" } }, { "id": "mgn6uuw2yebmengsukjramjx", + "outgoingEdgeId": "ual6xszx6tfcxqrnihc6zrvx", "type": "Set variable", - "groupId": "d6v9lh83c7zuwrhf2mmo6nxo", "options": { - "type": "Map item with same index", - "isCode": true, "variableId": "vzslfw8oyo1f08uo5rpkegn0x", + "type": "Map item with same index", "mapListItemParams": { "baseItemVariableId": "vulnb1om2fk8mvkcesl8s15cr", "baseListVariableId": "vkzk96oh1pmdjv2bt5ps60qc0", "targetListVariableId": "vcmybxcoaytd2geo5sqx7v8hw" - }, - "expressionToEvaluate": "{{Trending IDs}}.at({{Trending Movies}}.indexOf({{Selected Trending Movie}}))" - }, - "outgoingEdgeId": "ual6xszx6tfcxqrnihc6zrvx" + } + } } - ], - "graphCoordinates": { "x": 628.03, "y": 965.53 } + ] }, { "id": "v35sky44jzz9fkwwul2qxufl", "title": "Movies by genre", + "graphCoordinates": { "x": 952.84, "y": 294.85 }, "blocks": [ { "id": "g2pgwx5yr1ou9vkoy6gdwuor", @@ -341,102 +286,86 @@ ] } ] - }, - "groupId": "v35sky44jzz9fkwwul2qxufl" + } }, { "id": "a2datk3pv8o6xgitwjsq61m2", "type": "Webhook", - "groupId": "v35sky44jzz9fkwwul2qxufl", "options": { - "webhook": { - "id": "em7huyvp98pd6hr25md0l6hb", - "url": "https://api.themoviedb.org/3/discover/movie", - "method": "GET", - "headers": [], - "queryParams": [ - { - "id": "mgwlp399a056o9jo93tjqp02", - "key": "api_key", - "value": "{{API Key}}" - }, - { - "id": "dv4wioynywqo57jq8lakq3yr", - "key": "with_genres", - "value": "{{Selected genre ID}}" - } - ] - }, - "isCustomBody": false, - "isAdvancedConfig": true, "variablesForTest": [ { "id": "oqbhwya4cewto5pfjmftjmpn", - "value": "2f584d1ffe2b7fb082dd4e05038e9bd7", - "variableId": "vh5bxx07kl3016wr1undh2yb3" + "variableId": "vh5bxx07kl3016wr1undh2yb3", + "value": "2f584d1ffe2b7fb082dd4e05038e9bd7" }, { "id": "rofxlzwrcv1ksy8aub8cfi6p", - "value": "16", - "variableId": "vwewa4yugqch2sswdpneszk3i" + "variableId": "vwewa4yugqch2sswdpneszk3i", + "value": "16" } ], "responseVariableMapping": [ { "id": "w8k1bxjsfkjxt64eev1ib96w", - "bodyPath": "data.results.flatMap(item => item.title)", - "variableId": "vad8vq3jfyybxo4la57hfd529" + "variableId": "vad8vq3jfyybxo4la57hfd529", + "bodyPath": "data.results.flatMap(item => item.title)" }, { "id": "zysikjyevakboax3czzec7nt", - "bodyPath": "data.results.flatMap(item => item.id)", - "variableId": "vhc2pc1sv4xc778r9od2ctooz" + "variableId": "vhc2pc1sv4xc778r9od2ctooz", + "bodyPath": "data.results.flatMap(item => item.id)" } - ] + ], + "isAdvancedConfig": true, + "webhook": { + "queryParams": [ + { + "id": "mgwlp399a056o9jo93tjqp02", + "key": "api_key", + "value": "{{API Key}}" + }, + { + "id": "dv4wioynywqo57jq8lakq3yr", + "key": "with_genres", + "value": "{{Selected genre ID}}" + } + ], + "method": "GET", + "url": "https://api.themoviedb.org/3/discover/movie" + } } }, { "id": "tr5y76tx9ca336f8ob9odfa6", "type": "choice input", "items": [ - { - "id": "uy2xwxoqhqol852cqsq17r9l", - "type": 0, - "blockId": "dxp0gakw90f3ckahjuphx5ir", - "content": "Click to edit" - } + { "id": "uy2xwxoqhqol852cqsq17r9l", "content": "Click to edit" } ], - "groupId": "v35sky44jzz9fkwwul2qxufl", "options": { "variableId": "vyyr3j2pu76uzvf88laai8snl", - "buttonLabel": "Send", - "isMultipleChoice": false, "dynamicVariableId": "vad8vq3jfyybxo4la57hfd529" } }, { "id": "vudr8jrv2k3x0ubemt39tv7a", + "outgoingEdgeId": "r4wyd2185zhen98r5pmx53g9", "type": "Set variable", - "groupId": "v35sky44jzz9fkwwul2qxufl", "options": { - "type": "Map item with same index", - "isCode": true, "variableId": "vzslfw8oyo1f08uo5rpkegn0x", + "type": "Map item with same index", "mapListItemParams": { "baseItemVariableId": "vyyr3j2pu76uzvf88laai8snl", "baseListVariableId": "vad8vq3jfyybxo4la57hfd529", "targetListVariableId": "vhc2pc1sv4xc778r9od2ctooz" - }, - "expressionToEvaluate": "const movieIndex = {{Movies}}.indexOf({{Selected Movie}})\n\nreturn {{Movie IDs}}.at(movieIndex)" - }, - "outgoingEdgeId": "r4wyd2185zhen98r5pmx53g9" + } + } } - ], - "graphCoordinates": { "x": 977.48, "y": 330.85 } + ] }, { "id": "uozlg88loeb8xegu6y4le6k8", "title": "Movie details", + "graphCoordinates": { "x": 1151.05, "y": 913.34 }, "blocks": [ { "id": "ve9m7fromxw4tbm8558n8520", @@ -445,66 +374,59 @@ "richText": [ { "type": "p", "children": [{ "text": "Excellent choice ๐Ÿ”ฅ" }] } ] - }, - "groupId": "uozlg88loeb8xegu6y4le6k8" + } }, { "id": "xag9d5i5td40kdt3poyq5g4b", "type": "Webhook", - "groupId": "uozlg88loeb8xegu6y4le6k8", "options": { - "webhook": { - "id": "ewrjdmbrm2yksvjrbp0z9duy", - "url": "https://api.themoviedb.org/3/movie/{{Selected Movie ID}}", - "method": "GET", - "headers": [], - "queryParams": [ - { - "id": "f33u3unbezibfdv54kbkien3", - "key": "api_key", - "value": "{{API Key}}" - } - ] - }, - "isCustomBody": false, - "isAdvancedConfig": true, "variablesForTest": [ { "id": "oqbhwya4cewto5pfjmftjmpn", - "value": "2f584d1ffe2b7fb082dd4e05038e9bd7", - "variableId": "vh5bxx07kl3016wr1undh2yb3" + "variableId": "vh5bxx07kl3016wr1undh2yb3", + "value": "2f584d1ffe2b7fb082dd4e05038e9bd7" }, { "id": "ja5qwkznouhm00x8zvlghuk4", - "value": "965839", - "variableId": "vzslfw8oyo1f08uo5rpkegn0x" + "variableId": "vzslfw8oyo1f08uo5rpkegn0x", + "value": "965839" } ], "responseVariableMapping": [ { "id": "dsfek7nejs1a7qqs4v61z709", - "bodyPath": "data.imdb_id", - "variableId": "vdvjx1w1sorma4zq0qtsdqrdi" + "variableId": "vdvjx1w1sorma4zq0qtsdqrdi", + "bodyPath": "data.imdb_id" }, { "id": "dtd0rrmz04m5gsi1gq855v1d", - "bodyPath": "data.overview", - "variableId": "vzns0wpumgo8vxjdty2w5t54a" + "variableId": "vzns0wpumgo8vxjdty2w5t54a", + "bodyPath": "data.overview" }, { "id": "y53g06r3xml0f3jmpctlsgm1", - "bodyPath": "data.poster_path", - "variableId": "vzf5ryexokpr4dihiur2spm8z" + "variableId": "vzf5ryexokpr4dihiur2spm8z", + "bodyPath": "data.poster_path" } - ] + ], + "isAdvancedConfig": true, + "webhook": { + "queryParams": [ + { + "id": "f33u3unbezibfdv54kbkien3", + "key": "api_key", + "value": "{{API Key}}" + } + ], + "method": "GET", + "url": "https://api.themoviedb.org/3/movie/{{Selected Movie ID}}" + } } }, { "id": "d0rsus9shxj8iowczbcaw53i", "type": "Set variable", - "groupId": "uozlg88loeb8xegu6y4le6k8", "options": { - "isCode": false, "variableId": "vwitf3um5uweynypc0hxxwm14", "expressionToEvaluate": "https://image.tmdb.org/t/p/w185{{Poster path}}" } @@ -512,8 +434,7 @@ { "id": "nqnry4c1z3wwcni8rwpduuhe", "type": "image", - "content": { "url": "{{Poster URL}}" }, - "groupId": "uozlg88loeb8xegu6y4le6k8" + "content": { "url": "{{Poster URL}}" } }, { "id": "lhljw54rdykyqtjiuh6jsl5c", @@ -522,8 +443,7 @@ "richText": [ { "type": "p", "children": [{ "text": "{{Movie Overview}}" }] } ] - }, - "groupId": "uozlg88loeb8xegu6y4le6k8" + } }, { "id": "yifjhiamifo1y4ay7vols0mm", @@ -531,179 +451,132 @@ "items": [ { "id": "n4818dnrb4arw1xh5v0ot8vz", - "type": 0, - "blockId": "nahhsfc6hsok5sufxcknopxr", - "content": "Watch the movie", - "outgoingEdgeId": "fteu5frsbj8wejfhhwzuv8t1" + "outgoingEdgeId": "fteu5frsbj8wejfhhwzuv8t1", + "content": "Watch the movie" }, { "id": "j9d1pf2tndax0itezys7t73c", - "type": 0, - "blockId": "nahhsfc6hsok5sufxcknopxr", + "outgoingEdgeId": "zb79atxs2itliks4d00e35uy", "content": "Find something else" } - ], - "groupId": "uozlg88loeb8xegu6y4le6k8", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, - "outgoingEdgeId": "ntef5v9bt7vn4wg8s3dfm8yl" + ] } - ], - "graphCoordinates": { "x": 1151.05, "y": 913.34 } + ] }, { "id": "x4d8cdsyzoqz6vzsurnb8twc", "title": "Redirect to IMDB", + "graphCoordinates": { "x": 1523.21, "y": 1433.33 }, "blocks": [ { "id": "mw0e0bzwiokhndkkncp9niu2", "type": "Redirect", - "groupId": "x4d8cdsyzoqz6vzsurnb8twc", "options": { - "url": "https://m.imdb.com/title/{{IMDB ID}}", - "isNewTab": false + "url": "https://m.imdb.com/title/{{IMDB ID}}" } } - ], - "graphCoordinates": { "x": 1616.55, "y": 1411.44 } + ] }, { "id": "x9610wtdv125hg56wicm2qmv", - "title": "Return to menu", + "title": "", + "graphCoordinates": { "x": 1523.2, "y": 1620.1 }, "blocks": [ { "id": "efto9jivvcvomj3kltf57hbb", "type": "Jump", - "groupId": "x9610wtdv125hg56wicm2qmv", "options": { - "blockId": "sodsq9mcigwvogmwx0t4jvil", - "groupId": "mjnkukpkpvf4ha2g4n5m804v" + "groupId": "mjnkukpkpvf4ha2g4n5m804v", + "blockId": "tzf45bvd8iquoxz7qgta8v94" } } - ], - "graphCoordinates": { "x": 1619.34, "y": 1586.5 } + ] } ], - "variables": [ - { "id": "vh5bxx07kl3016wr1undh2yb3", "name": "API Key" }, - { "id": "vx0bbqzug4vk3zpc31ly8k7al", "name": "Genres" }, - { "id": "vkmbb3rb2hcfd2io1fhf7rz5x", "name": "Selected genre" }, - { "id": "vwc00rydyp035vtb0nlaqyzwr", "name": "Genre IDs" }, - { "id": "vwewa4yugqch2sswdpneszk3i", "name": "Selected genre ID" }, - { "id": "vad8vq3jfyybxo4la57hfd529", "name": "Movies" }, - { "id": "vhc2pc1sv4xc778r9od2ctooz", "name": "Movie IDs" }, - { "id": "vyyr3j2pu76uzvf88laai8snl", "name": "Selected Movie" }, - { "id": "vzslfw8oyo1f08uo5rpkegn0x", "name": "Selected Movie ID" }, - { "id": "vdvjx1w1sorma4zq0qtsdqrdi", "name": "IMDB ID" }, - { "id": "vzns0wpumgo8vxjdty2w5t54a", "name": "Movie Overview" }, - { "id": "vzf5ryexokpr4dihiur2spm8z", "name": "Poster path" }, - { "id": "vwitf3um5uweynypc0hxxwm14", "name": "Poster URL" }, - { "id": "vkzk96oh1pmdjv2bt5ps60qc0", "name": "Trending Movies" }, - { "id": "vcmybxcoaytd2geo5sqx7v8hw", "name": "Trending IDs" }, - { "id": "vulnb1om2fk8mvkcesl8s15cr", "name": "Selected Trending Movie" } - ], "edges": [ { "id": "wfec8f4e1jtden2wqna6nrso", - "to": { "groupId": "mjnkukpkpvf4ha2g4n5m804v" }, - "from": { - "blockId": "rha69fygov33vym1hf6z837p", - "groupId": "u6lpjibfjhyoqij5wjf9kvnl" - } + "from": { "eventId": "u6lpjibfjhyoqij5wjf9kvnl" }, + "to": { "groupId": "mjnkukpkpvf4ha2g4n5m804v" } }, { "id": "t8qyjpigrz7cdl8gxl1wxlwj", - "to": { "groupId": "kq1g5z6pz4buot7sawqdrr3s" }, "from": { - "itemId": "kaimvzg9igdtktgou5m3s1bw", "blockId": "tzf45bvd8iquoxz7qgta8v94", - "groupId": "mjnkukpkpvf4ha2g4n5m804v" - } + "itemId": "kaimvzg9igdtktgou5m3s1bw" + }, + "to": { "groupId": "kq1g5z6pz4buot7sawqdrr3s" } }, { "id": "tfuuwjnpn7mftd5s65mbhytd", - "to": { "groupId": "v35sky44jzz9fkwwul2qxufl" }, - "from": { - "blockId": "j7pm34um4piuyabwlobjc356", - "groupId": "kq1g5z6pz4buot7sawqdrr3s" - } + "from": { "blockId": "j7pm34um4piuyabwlobjc356" }, + "to": { "groupId": "v35sky44jzz9fkwwul2qxufl" } }, { "id": "r4wyd2185zhen98r5pmx53g9", - "to": { "groupId": "uozlg88loeb8xegu6y4le6k8" }, - "from": { - "blockId": "vudr8jrv2k3x0ubemt39tv7a", - "groupId": "v35sky44jzz9fkwwul2qxufl" - } + "from": { "blockId": "vudr8jrv2k3x0ubemt39tv7a" }, + "to": { "groupId": "uozlg88loeb8xegu6y4le6k8" } }, { "id": "fteu5frsbj8wejfhhwzuv8t1", - "to": { "groupId": "x4d8cdsyzoqz6vzsurnb8twc" }, "from": { - "itemId": "n4818dnrb4arw1xh5v0ot8vz", "blockId": "yifjhiamifo1y4ay7vols0mm", - "groupId": "uozlg88loeb8xegu6y4le6k8" - } + "itemId": "n4818dnrb4arw1xh5v0ot8vz" + }, + "to": { "groupId": "x4d8cdsyzoqz6vzsurnb8twc" } }, { "id": "tjn2ljosqyd4aj9dk8mnifsu", - "to": { "groupId": "d6v9lh83c7zuwrhf2mmo6nxo" }, "from": { - "itemId": "i8ls2f8inq2ovuijj6l7rbcq", "blockId": "tzf45bvd8iquoxz7qgta8v94", - "groupId": "mjnkukpkpvf4ha2g4n5m804v" - } + "itemId": "i8ls2f8inq2ovuijj6l7rbcq" + }, + "to": { "groupId": "d6v9lh83c7zuwrhf2mmo6nxo" } }, { - "id": "ntef5v9bt7vn4wg8s3dfm8yl", - "to": { "groupId": "x9610wtdv125hg56wicm2qmv" }, - "from": { - "blockId": "yifjhiamifo1y4ay7vols0mm", - "groupId": "uozlg88loeb8xegu6y4le6k8" - } + "id": "ual6xszx6tfcxqrnihc6zrvx", + "from": { "blockId": "mgn6uuw2yebmengsukjramjx" }, + "to": { "groupId": "uozlg88loeb8xegu6y4le6k8" } }, { - "id": "ual6xszx6tfcxqrnihc6zrvx", - "to": { "groupId": "uozlg88loeb8xegu6y4le6k8" }, + "id": "zb79atxs2itliks4d00e35uy", "from": { - "blockId": "mgn6uuw2yebmengsukjramjx", - "groupId": "d6v9lh83c7zuwrhf2mmo6nxo" - } - } - ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0d253f" }, - "hostAvatar": { - "isEnabled": true + "blockId": "yifjhiamifo1y4ay7vols0mm", + "itemId": "j9d1pf2tndax0itezys7t73c" }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#01b4e4" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } + "to": { "groupId": "x9610wtdv125hg56wicm2qmv" } } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": 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 } - }, + ], + "variables": [ + { "id": "vh5bxx07kl3016wr1undh2yb3", "name": "API Key" }, + { "id": "vx0bbqzug4vk3zpc31ly8k7al", "name": "Genres" }, + { "id": "vkmbb3rb2hcfd2io1fhf7rz5x", "name": "Selected genre" }, + { "id": "vwc00rydyp035vtb0nlaqyzwr", "name": "Genre IDs" }, + { "id": "vwewa4yugqch2sswdpneszk3i", "name": "Selected genre ID" }, + { "id": "vad8vq3jfyybxo4la57hfd529", "name": "Movies" }, + { "id": "vhc2pc1sv4xc778r9od2ctooz", "name": "Movie IDs" }, + { "id": "vyyr3j2pu76uzvf88laai8snl", "name": "Selected Movie" }, + { "id": "vzslfw8oyo1f08uo5rpkegn0x", "name": "Selected Movie ID" }, + { "id": "vdvjx1w1sorma4zq0qtsdqrdi", "name": "IMDB ID" }, + { "id": "vzns0wpumgo8vxjdty2w5t54a", "name": "Movie Overview" }, + { "id": "vzf5ryexokpr4dihiur2spm8z", "name": "Poster path" }, + { "id": "vwitf3um5uweynypc0hxxwm14", "name": "Poster URL" }, + { "id": "vkzk96oh1pmdjv2bt5ps60qc0", "name": "Trending Movies" }, + { "id": "vcmybxcoaytd2geo5sqx7v8hw", "name": "Trending IDs" }, + { "id": "vulnb1om2fk8mvkcesl8s15cr", "name": "Selected Trending Movie" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-07T07:42:02.490Z", + "updatedAt": "2023-11-07T07:55:03.222Z", + "icon": "๐Ÿฟ", + "folderId": null, "publicId": null, "customDomain": null, + "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/nps.json b/apps/builder/public/templates/nps.json index 38f0447acf..0525722872 100644 --- a/apps/builder/public/templates/nps.json +++ b/apps/builder/public/templates/nps.json @@ -1,37 +1,27 @@ { - "id": "clesntjqu00011a4xkgffc3p0", - "version": "4", - "createdAt": "2023-03-03T14:57:41.430Z", - "updatedAt": "2023-03-03T16:14:29.268Z", - "icon": "โญ", + "version": "6", + "id": "cloo0bge500071aorb4dadsju", "name": "NPS Survey", - "folderId": null, - "groups": [ + "events": [ { "id": "yu8qfeteutmum1ghb0wqshu9", - "title": "Start", - "blocks": [ - { - "id": "up8jk4o8xvbfqtzyd63hsrm5", - "type": "start", - "label": "Start", - "groupId": "yu8qfeteutmum1ghb0wqshu9", - "outgoingEdgeId": "qtd5p5sya9w8yoknvbhy493i" - } - ], - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "qtd5p5sya9w8yoknvbhy493i", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "g7l1tc86ty1r6x0yn0r2g1xo", "title": "Intro", + "graphCoordinates": { "x": 10.99, "y": 85.96 }, "blocks": [ { "id": "vep990mmfbe64nqczp66xebw", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Hey! ๐Ÿ‘‹" }] }] - }, - "groupId": "g7l1tc86ty1r6x0yn0r2g1xo" + } }, { "id": "u1oeokc5j8bzwi4lwqyf7c8q", @@ -49,8 +39,7 @@ ] } ] - }, - "groupId": "g7l1tc86ty1r6x0yn0r2g1xo" + } }, { "id": "d3asw3zs2gahpxs3usun6lm5", @@ -58,21 +47,17 @@ "items": [ { "id": "wvjhc2vrkqy8512y0wvmciex", - "type": 0, - "blockId": "d3asw3zs2gahpxs3usun6lm5", - "content": "Sure!", - "outgoingEdgeId": "sjeyoptun1yu805ry37je1ni" + "outgoingEdgeId": "sjeyoptun1yu805ry37je1ni", + "content": "Sure!" } - ], - "groupId": "g7l1tc86ty1r6x0yn0r2g1xo", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] } - ], - "graphCoordinates": { "x": 8.6484375, "y": 168.64453125 } + ] }, { "id": "xgqei015z6d58gefpviz8053", "title": "Recommendation", + "graphCoordinates": { "x": 360.5, "y": 86.64 }, "blocks": [ { "id": "jcp3qhpb4wf95g0ylrp4e8zb", @@ -88,74 +73,61 @@ ] } ] - }, - "groupId": "xgqei015z6d58gefpviz8053" + } }, { "id": "bfvv74k8oz57kaqeqek3uen7", "type": "rating input", - "groupId": "xgqei015z6d58gefpviz8053", "options": { + "variableId": "vwqc8tzl0380h30vxh07fekmm", "labels": { "left": "Very unlikely", - "right": "Very likely", - "button": "Send" + "right": "Very likely" }, - "length": 10, - "buttonType": "Numbers", - "customIcon": { "isEnabled": false }, - "variableId": "vwqc8tzl0380h30vxh07fekmm", "isOneClickSubmitEnabled": true } }, { "id": "z76m5qjuy15sa6b0p1re0nkp", + "outgoingEdgeId": "niec249stbfa2obm9mkd1pgw", "type": "Condition", "items": [ { "id": "xy6ni2aj5dxys27itzbtvdzw", - "type": 1, - "blockId": "z76m5qjuy15sa6b0p1re0nkp", + "outgoingEdgeId": "zug5c4jy98sywgp1amtms6oc", "content": { "comparisons": [ { "id": "r7s1l7ljsv7ugnbaz4u3gy5a", - "value": "8", "variableId": "vwqc8tzl0380h30vxh07fekmm", - "comparisonOperator": "Greater than" + "comparisonOperator": "Greater than", + "value": "8" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "zug5c4jy98sywgp1amtms6oc" + ] + } }, { "id": "vrhf4u4dt6u146eywqybgrk2", - "type": 1, - "blockId": "z76m5qjuy15sa6b0p1re0nkp", + "outgoingEdgeId": "qb38wjfqzksaujoppzrrto25", "content": { "comparisons": [ { "id": "chowr4hsu9butjlwo0ul874g", - "value": "6", "variableId": "vwqc8tzl0380h30vxh07fekmm", - "comparisonOperator": "Greater than" + "comparisonOperator": "Greater than", + "value": "6" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "qb38wjfqzksaujoppzrrto25" + ] + } } - ], - "groupId": "xgqei015z6d58gefpviz8053", - "outgoingEdgeId": "niec249stbfa2obm9mkd1pgw" + ] } - ], - "graphCoordinates": { "x": 368.4088194304369, "y": 168.5078125 } + ] }, { "id": "rp2r31gn1w5t1aeej96bhjj3", "title": "Good", + "graphCoordinates": { "x": 1078.85, "y": 292.9 }, "blocks": [ { "id": "izehojk23xug74tylpm0wbib", @@ -167,11 +139,11 @@ "children": [{ "text": "I'm glad to hear that ๐Ÿ˜" }] } ] - }, - "groupId": "rp2r31gn1w5t1aeej96bhjj3" + } }, { "id": "qj3e1cxwjub800r6g3lfa4ei", + "outgoingEdgeId": "hycn6wx0j9ug4wf5vzz9aytx", "type": "text", "content": { "richText": [ @@ -180,36 +152,33 @@ "children": [{ "text": "Could you tell us why?" }] } ] - }, - "groupId": "rp2r31gn1w5t1aeej96bhjj3", - "outgoingEdgeId": "hycn6wx0j9ug4wf5vzz9aytx" + } } - ], - "graphCoordinates": { "x": 1089.022509866445, "y": 366.18359375 } + ] }, { "id": "sk1n3wpfit3uvfrh42fgcykm", "title": "Why?", + "graphCoordinates": { "x": 1425.22, "y": 445.48 }, "blocks": [ { "id": "ro6a6dt7j3x99unduh5jm6an", + "outgoingEdgeId": "y6gsa6pjrfeu8zi6evtzirs1", "type": "text input", - "groupId": "sk1n3wpfit3uvfrh42fgcykm", "options": { - "isLong": true, - "labels": { "button": "Send", "placeholder": "Type your answer..." } - }, - "outgoingEdgeId": "y6gsa6pjrfeu8zi6evtzirs1" + "isLong": true + } } - ], - "graphCoordinates": { "x": 1448.80078125, "y": 435.79296875 } + ] }, { "id": "qj9qgsbfv6u1f5oe1bjnwnu9", "title": "Bad", + "graphCoordinates": { "x": 1067.22, "y": 575.86 }, "blocks": [ { "id": "ou7airondk1mxm4inzzyyr1x", + "outgoingEdgeId": "glj5ishgke8i6s6eyjnmbel1", "type": "text", "content": { "richText": [ @@ -218,67 +187,62 @@ "children": [{ "text": "Could you tell us what went wrong?" }] } ] - }, - "groupId": "qj9qgsbfv6u1f5oe1bjnwnu9", - "outgoingEdgeId": "glj5ishgke8i6s6eyjnmbel1" + } } - ], - "graphCoordinates": { "x": 1089.9140625, "y": 574.9296875 } + ] }, { "id": "tavt0nuh54ck1hvq74kt74vf", "title": "Set type", + "graphCoordinates": { "x": 726.83, "y": 234.02 }, "blocks": [ { "id": "vdythdfi91vr47ipbfalddc6", + "outgoingEdgeId": "r74zv3gamsln3dbmp1gvxpa2", "type": "Set variable", - "groupId": "tavt0nuh54ck1hvq74kt74vf", "options": { "variableId": "vcgkjbh8intf2cql1oteyj4mu", "expressionToEvaluate": "Promoter" - }, - "outgoingEdgeId": "r74zv3gamsln3dbmp1gvxpa2" + } } - ], - "graphCoordinates": { "x": 740.34375, "y": 319.4375 } + ] }, { "id": "e887eoxfamv45hj8bz47jize", "title": "Set type", + "graphCoordinates": { "x": 722.39, "y": 399.91 }, "blocks": [ { "id": "w40rjuv0avoetpdj6l5nbiz6", + "outgoingEdgeId": "x62wj4inzidyj03ktiyu0g81", "type": "Set variable", - "groupId": "e887eoxfamv45hj8bz47jize", "options": { "variableId": "vcgkjbh8intf2cql1oteyj4mu", "expressionToEvaluate": "Neutral" - }, - "outgoingEdgeId": "x62wj4inzidyj03ktiyu0g81" + } } - ], - "graphCoordinates": { "x": 738.046875, "y": 480.91015625 } + ] }, { "id": "z4qtvedlz3mzcj4jdnfet2dc", "title": "Set type", + "graphCoordinates": { "x": 722.56, "y": 566.11 }, "blocks": [ { "id": "melr0p8nxssxe1qyat748uyy", + "outgoingEdgeId": "q5xllqzy4x1q3tdvpr1piwgi", "type": "Set variable", - "groupId": "z4qtvedlz3mzcj4jdnfet2dc", "options": { "variableId": "vcgkjbh8intf2cql1oteyj4mu", "expressionToEvaluate": "Detractor" - }, - "outgoingEdgeId": "q5xllqzy4x1q3tdvpr1piwgi" + } } - ], - "graphCoordinates": { "x": 738.5078125, "y": 635.96484375 } + ] }, { "id": "l7fupza0yi6os0ix6heyd7jz", "title": "Final segmentation", + "graphCoordinates": { "x": 1777.5859375, "y": 396.8453917968819 }, "blocks": [ { "id": "z4gsshsckqdu6m1umartgxgb", @@ -286,64 +250,54 @@ "items": [ { "id": "vd6ls562brvt5kld746ao63x", - "type": 1, - "blockId": "z4gsshsckqdu6m1umartgxgb", + "outgoingEdgeId": "fcels3dp2kabntjscmirxtl7", "content": { "comparisons": [ { "id": "gclfcip3hr0p4vzk5o8n60ru", - "value": "Promoter", "variableId": "vcgkjbh8intf2cql1oteyj4mu", - "comparisonOperator": "Equal to" + "comparisonOperator": "Equal to", + "value": "Promoter" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "fcels3dp2kabntjscmirxtl7" + ] + } }, { "id": "vey2i7kouphj3dgzz1rtwuxb", - "type": 1, - "blockId": "z4gsshsckqdu6m1umartgxgb", + "outgoingEdgeId": "jyen1rcq5cxek118gkio0u6d", "content": { "comparisons": [ { "id": "p7shnc0g3b377oip57r7xneq", - "value": "Neutral", "variableId": "vcgkjbh8intf2cql1oteyj4mu", - "comparisonOperator": "Equal to" + "comparisonOperator": "Equal to", + "value": "Neutral" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "jyen1rcq5cxek118gkio0u6d" + ] + } }, { "id": "cdi4c43wbyi3ajdns5klfg1g", - "type": 1, - "blockId": "z4gsshsckqdu6m1umartgxgb", + "outgoingEdgeId": "jjymvdpeyfqu2qpo6hh2zxeo", "content": { "comparisons": [ { "id": "iy13qo2guletobbkauklye7a", - "value": "Detractor", "variableId": "vcgkjbh8intf2cql1oteyj4mu", - "comparisonOperator": "Equal to" + "comparisonOperator": "Equal to", + "value": "Detractor" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "jjymvdpeyfqu2qpo6hh2zxeo" + ] + } } - ], - "groupId": "l7fupza0yi6os0ix6heyd7jz" + ] } - ], - "graphCoordinates": { "x": 1777.5859375, "y": 396.8453917968819 } + ] }, { "id": "pp1ncsdaki07pfq5pjl53v6r", "title": "Capterra?", + "graphCoordinates": { "x": 2160.71875, "y": 69.58984375 }, "blocks": [ { "id": "eixinwxcgsng6v8blw6jdgwy", @@ -352,8 +306,7 @@ "richText": [ { "type": "p", "children": [{ "text": "Thank you! ๐Ÿ™" }] } ] - }, - "groupId": "pp1ncsdaki07pfq5pjl53v6r" + } }, { "id": "cjqu4wje2zr8i5ehivxv5567", @@ -367,8 +320,7 @@ ] } ] - }, - "groupId": "pp1ncsdaki07pfq5pjl53v6r" + } }, { "id": "v9pf4n5kcwon4g0yvwwc6vk3", @@ -376,28 +328,22 @@ "items": [ { "id": "y34d4iij8y9qrt28y240x7vm", - "type": 0, - "blockId": "v9pf4n5kcwon4g0yvwwc6vk3", - "content": "Sure!", - "outgoingEdgeId": "lw33kviri91z1mvxb87kaew0" + "outgoingEdgeId": "lw33kviri91z1mvxb87kaew0", + "content": "Sure!" }, { "id": "l7txnq6jtm0niynklcpzb21u", - "type": 0, - "blockId": "v9pf4n5kcwon4g0yvwwc6vk3", - "content": "Maybe later", - "outgoingEdgeId": "wjcvbnj1drs6if1p21a8yokf" + "outgoingEdgeId": "wjcvbnj1drs6if1p21a8yokf", + "content": "Maybe later" } - ], - "groupId": "pp1ncsdaki07pfq5pjl53v6r", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] } - ], - "graphCoordinates": { "x": 2160.71875, "y": 69.58984375 } + ] }, { "id": "znljx8q0q2ggih0ipu28ryby", "title": "Bye cheerful", + "graphCoordinates": { "x": 2167.570274174784, "y": 543.712381679639 }, "blocks": [ { "id": "m1my2b6gqq2hgfecw1vs2vcm", @@ -411,8 +357,7 @@ ] } ] - }, - "groupId": "znljx8q0q2ggih0ipu28ryby" + } }, { "id": "fyl3k7qc6jdmc8t38b9wkcrh", @@ -421,23 +366,21 @@ "richText": [ { "type": "p", "children": [{ "text": "Have a beautiful day!" }] } ] - }, - "groupId": "znljx8q0q2ggih0ipu28ryby" + } }, { "id": "qobvos2ihgxb8e729ur8b2rv", "type": "image", "content": { "url": "https://media3.giphy.com/media/qC2REWsp3fQ1v2mm74/giphy.gif?cid=fe3852a38k350b15tly68dp7plh5iskmlonklrofvce975cq&rid=giphy.gif&ct=g" - }, - "groupId": "znljx8q0q2ggih0ipu28ryby" + } } - ], - "graphCoordinates": { "x": 2167.5702741747837, "y": 543.712381679639 } + ] }, { "id": "vvbtgh5ptk49shyjn3zn6d71", "title": "Bye sad", + "graphCoordinates": { "x": 2173.366603864535, "y": 949.7063235658585 }, "blocks": [ { "id": "dfisk4xq8csn0t2aute6hbsd", @@ -453,8 +396,7 @@ ] } ] - }, - "groupId": "vvbtgh5ptk49shyjn3zn6d71" + } }, { "id": "u6vs0akagfjg63zq8z1rcc14", @@ -471,23 +413,21 @@ ] } ] - }, - "groupId": "vvbtgh5ptk49shyjn3zn6d71" + } }, { "id": "lfk1wt96u8yrtfkof6lrianc", "type": "image", "content": { "url": "https://media1.giphy.com/media/kaBU6pgv0OsPHz2yxy/giphy-downsized.gif?cid=fe3852a30aonhd3he63idx7116fsc1sydsan2ggr9uq4hs9j&rid=giphy-downsized.gif&ct=g" - }, - "groupId": "vvbtgh5ptk49shyjn3zn6d71" + } } - ], - "graphCoordinates": { "x": 2173.3666038645347, "y": 949.7063235658585 } + ] }, { "id": "mwfu8ot0z37zfq2fbo5rcyrl", "title": "Redirect Capterra", + "graphCoordinates": { "x": 2531.28515625, "y": 300.828125 }, "blocks": [ { "id": "cd8ftyg6tkjggncxuo242u3j", @@ -496,8 +436,7 @@ "richText": [ { "type": "p", "children": [{ "text": "Amazing ๐Ÿคฉ" }] } ] - }, - "groupId": "mwfu8ot0z37zfq2fbo5rcyrl" + } }, { "id": "nigypz7fhnt07440o0829o81", @@ -509,209 +448,148 @@ "children": [{ "text": "Let me take you there..." }] } ] - }, - "groupId": "mwfu8ot0z37zfq2fbo5rcyrl" + } }, { "id": "xr1or6dcptogabyvv6zepmw8", "type": "Wait", - "groupId": "mwfu8ot0z37zfq2fbo5rcyrl", "options": { "secondsToWaitFor": "1" } }, { "id": "bfyw1eabougkp2aqlrcrf6lz", "type": "Redirect", - "groupId": "mwfu8ot0z37zfq2fbo5rcyrl", "options": { - "url": "https://www.capterra.com/p/233968/Typebot/", - "isNewTab": false + "url": "https://www.capterra.com/p/233968/Typebot/" } } - ], - "graphCoordinates": { "x": 2531.28515625, "y": 300.828125 } + ] } ], - "variables": [ - { "id": "vwqc8tzl0380h30vxh07fekmm", "name": "Recommend rate" }, - { "id": "vcgkjbh8intf2cql1oteyj4mu", "name": "Type" } - ], "edges": [ { "id": "qtd5p5sya9w8yoknvbhy493i", - "to": { "groupId": "g7l1tc86ty1r6x0yn0r2g1xo" }, - "from": { - "blockId": "up8jk4o8xvbfqtzyd63hsrm5", - "groupId": "yu8qfeteutmum1ghb0wqshu9" - } + "from": { "eventId": "yu8qfeteutmum1ghb0wqshu9" }, + "to": { "groupId": "g7l1tc86ty1r6x0yn0r2g1xo" } }, { "id": "glj5ishgke8i6s6eyjnmbel1", - "to": { "groupId": "sk1n3wpfit3uvfrh42fgcykm" }, - "from": { - "blockId": "ou7airondk1mxm4inzzyyr1x", - "groupId": "qj9qgsbfv6u1f5oe1bjnwnu9" - } + "from": { "blockId": "ou7airondk1mxm4inzzyyr1x" }, + "to": { "groupId": "sk1n3wpfit3uvfrh42fgcykm" } }, { "id": "hycn6wx0j9ug4wf5vzz9aytx", - "to": { "groupId": "sk1n3wpfit3uvfrh42fgcykm" }, - "from": { - "blockId": "qj3e1cxwjub800r6g3lfa4ei", - "groupId": "rp2r31gn1w5t1aeej96bhjj3" - } + "from": { "blockId": "qj3e1cxwjub800r6g3lfa4ei" }, + "to": { "groupId": "sk1n3wpfit3uvfrh42fgcykm" } }, { "id": "zug5c4jy98sywgp1amtms6oc", - "to": { "groupId": "tavt0nuh54ck1hvq74kt74vf" }, "from": { - "itemId": "xy6ni2aj5dxys27itzbtvdzw", "blockId": "z76m5qjuy15sa6b0p1re0nkp", - "groupId": "xgqei015z6d58gefpviz8053" - } + "itemId": "xy6ni2aj5dxys27itzbtvdzw" + }, + "to": { "groupId": "tavt0nuh54ck1hvq74kt74vf" } }, { "id": "niec249stbfa2obm9mkd1pgw", - "to": { "groupId": "z4qtvedlz3mzcj4jdnfet2dc" }, - "from": { - "blockId": "z76m5qjuy15sa6b0p1re0nkp", - "groupId": "xgqei015z6d58gefpviz8053" - } + "from": { "blockId": "z76m5qjuy15sa6b0p1re0nkp" }, + "to": { "groupId": "z4qtvedlz3mzcj4jdnfet2dc" } }, { "id": "qb38wjfqzksaujoppzrrto25", - "to": { "groupId": "e887eoxfamv45hj8bz47jize" }, "from": { - "itemId": "vrhf4u4dt6u146eywqybgrk2", "blockId": "z76m5qjuy15sa6b0p1re0nkp", - "groupId": "xgqei015z6d58gefpviz8053" - } + "itemId": "vrhf4u4dt6u146eywqybgrk2" + }, + "to": { "groupId": "e887eoxfamv45hj8bz47jize" } }, { "id": "r74zv3gamsln3dbmp1gvxpa2", - "to": { "groupId": "rp2r31gn1w5t1aeej96bhjj3" }, - "from": { - "blockId": "vdythdfi91vr47ipbfalddc6", - "groupId": "tavt0nuh54ck1hvq74kt74vf" - } + "from": { "blockId": "vdythdfi91vr47ipbfalddc6" }, + "to": { "groupId": "rp2r31gn1w5t1aeej96bhjj3" } }, { "id": "x62wj4inzidyj03ktiyu0g81", + "from": { "blockId": "w40rjuv0avoetpdj6l5nbiz6" }, "to": { - "blockId": "qj3e1cxwjub800r6g3lfa4ei", - "groupId": "rp2r31gn1w5t1aeej96bhjj3" - }, - "from": { - "blockId": "w40rjuv0avoetpdj6l5nbiz6", - "groupId": "e887eoxfamv45hj8bz47jize" + "groupId": "rp2r31gn1w5t1aeej96bhjj3", + "blockId": "qj3e1cxwjub800r6g3lfa4ei" } }, { "id": "q5xllqzy4x1q3tdvpr1piwgi", - "to": { "groupId": "qj9qgsbfv6u1f5oe1bjnwnu9" }, - "from": { - "blockId": "melr0p8nxssxe1qyat748uyy", - "groupId": "z4qtvedlz3mzcj4jdnfet2dc" - } + "from": { "blockId": "melr0p8nxssxe1qyat748uyy" }, + "to": { "groupId": "qj9qgsbfv6u1f5oe1bjnwnu9" } }, { "id": "y6gsa6pjrfeu8zi6evtzirs1", - "to": { "groupId": "l7fupza0yi6os0ix6heyd7jz" }, - "from": { - "blockId": "ro6a6dt7j3x99unduh5jm6an", - "groupId": "sk1n3wpfit3uvfrh42fgcykm" - } + "from": { "blockId": "ro6a6dt7j3x99unduh5jm6an" }, + "to": { "groupId": "l7fupza0yi6os0ix6heyd7jz" } }, { "id": "jjymvdpeyfqu2qpo6hh2zxeo", - "to": { "groupId": "vvbtgh5ptk49shyjn3zn6d71" }, "from": { - "itemId": "cdi4c43wbyi3ajdns5klfg1g", "blockId": "z4gsshsckqdu6m1umartgxgb", - "groupId": "l7fupza0yi6os0ix6heyd7jz" - } + "itemId": "cdi4c43wbyi3ajdns5klfg1g" + }, + "to": { "groupId": "vvbtgh5ptk49shyjn3zn6d71" } }, { "id": "jyen1rcq5cxek118gkio0u6d", - "to": { "groupId": "znljx8q0q2ggih0ipu28ryby" }, "from": { - "itemId": "vey2i7kouphj3dgzz1rtwuxb", "blockId": "z4gsshsckqdu6m1umartgxgb", - "groupId": "l7fupza0yi6os0ix6heyd7jz" - } + "itemId": "vey2i7kouphj3dgzz1rtwuxb" + }, + "to": { "groupId": "znljx8q0q2ggih0ipu28ryby" } }, { "id": "wjcvbnj1drs6if1p21a8yokf", - "to": { "groupId": "znljx8q0q2ggih0ipu28ryby" }, "from": { - "itemId": "l7txnq6jtm0niynklcpzb21u", "blockId": "v9pf4n5kcwon4g0yvwwc6vk3", - "groupId": "pp1ncsdaki07pfq5pjl53v6r" - } + "itemId": "l7txnq6jtm0niynklcpzb21u" + }, + "to": { "groupId": "znljx8q0q2ggih0ipu28ryby" } }, { "id": "lw33kviri91z1mvxb87kaew0", - "to": { "groupId": "mwfu8ot0z37zfq2fbo5rcyrl" }, "from": { - "itemId": "y34d4iij8y9qrt28y240x7vm", "blockId": "v9pf4n5kcwon4g0yvwwc6vk3", - "groupId": "pp1ncsdaki07pfq5pjl53v6r" - } + "itemId": "y34d4iij8y9qrt28y240x7vm" + }, + "to": { "groupId": "mwfu8ot0z37zfq2fbo5rcyrl" } }, { "id": "sjeyoptun1yu805ry37je1ni", - "to": { "groupId": "xgqei015z6d58gefpviz8053" }, "from": { - "itemId": "wvjhc2vrkqy8512y0wvmciex", "blockId": "d3asw3zs2gahpxs3usun6lm5", - "groupId": "g7l1tc86ty1r6x0yn0r2g1xo" - } + "itemId": "wvjhc2vrkqy8512y0wvmciex" + }, + "to": { "groupId": "xgqei015z6d58gefpviz8053" } }, { "id": "fcels3dp2kabntjscmirxtl7", - "to": { "groupId": "pp1ncsdaki07pfq5pjl53v6r" }, "from": { - "itemId": "vd6ls562brvt5kld746ao63x", "blockId": "z4gsshsckqdu6m1umartgxgb", - "groupId": "l7fupza0yi6os0ix6heyd7jz" - } - } - ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" + "itemId": "vd6ls562brvt5kld746ao63x" }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } + "to": { "groupId": "pp1ncsdaki07pfq5pjl53v6r" } } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": 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 } - }, + ], + "variables": [ + { "id": "vwqc8tzl0380h30vxh07fekmm", "name": "Recommend rate" }, + { "id": "vcgkjbh8intf2cql1oteyj4mu", "name": "Type" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-07T07:25:44.765Z", + "updatedAt": "2023-11-07T07:26:12.044Z", + "icon": "โญ", + "folderId": null, "publicId": null, "customDomain": null, "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/onboarding.json b/apps/builder/public/templates/onboarding.json index cdc01f27e7..ff0d42556b 100644 --- a/apps/builder/public/templates/onboarding.json +++ b/apps/builder/public/templates/onboarding.json @@ -1,29 +1,20 @@ { - "id": "qkvenb8ur2y0ahlbckmx7law", - "version": "4", - "createdAt": "2023-02-22T14:26:28.592Z", - "updatedAt": "2023-02-22T14:28:05.063Z", - "icon": null, + "version": "6", + "id": "cloo0gjvx00091aoryw72ns37", "name": "Onboarding copy", - "folderId": null, - "groups": [ + "events": [ { "id": "yp9qsayuwzhihxc7gzt68osm", - "title": "Start", - "blocks": [ - { - "id": "cl1265zct0001mb1afel460do", - "type": "start", - "label": "Start", - "groupId": "yp9qsayuwzhihxc7gzt68osm", - "outgoingEdgeId": "qehono05saho85xk59apfvtr" - } - ], - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "qehono05saho85xk59apfvtr", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "az9nafw4tu9b6dyh3cvutlek", "title": "Name", + "graphCoordinates": { "x": 247.01, "y": 1.45 }, "blocks": [ { "id": "cl1267q2c000e2e6dynjeg83n", @@ -32,8 +23,7 @@ "richText": [ { "type": "p", "children": [{ "text": "Welcome ๐Ÿ‘‹" }] } ] - }, - "groupId": "az9nafw4tu9b6dyh3cvutlek" + } }, { "id": "cl1267y1u000f2e6d4rlglv6g", @@ -42,29 +32,22 @@ "richText": [ { "type": "p", "children": [{ "text": "What's your name?" }] } ] - }, - "groupId": "az9nafw4tu9b6dyh3cvutlek" + } }, { "id": "cl126820m000g2e6dfleq78bt", + "outgoingEdgeId": "j6x356fbxo32zd9ezje77t4j", "type": "text input", - "groupId": "az9nafw4tu9b6dyh3cvutlek", "options": { - "isLong": false, - "labels": { - "button": "Send", - "placeholder": "Type your answer..." - }, "variableId": "cl126f4hf000i2e6d8zvzc3t1" - }, - "outgoingEdgeId": "j6x356fbxo32zd9ezje77t4j" + } } - ], - "graphCoordinates": { "x": 329.13877189828236, "y": 5.648473810990222 } + ] }, { "id": "s3hgjtmb1bzq6ip2bm9w1r53", "title": "Company", + "graphCoordinates": { "x": 603.62, "y": 1.09 }, "blocks": [ { "id": "cl1266v6f000a2e6db7wj3ux7", @@ -73,8 +56,7 @@ "richText": [ { "type": "p", "children": [{ "text": "Welcome {{Name}} ๐Ÿ‘‹" }] } ] - }, - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" + } }, { "id": "cl126hb9m000l2e6d5qk3mohn", @@ -90,8 +72,7 @@ ] } ] - }, - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" + } }, { "id": "cl126hpw1000m2e6dneousygl", @@ -107,8 +88,7 @@ ] } ] - }, - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" + } }, { "id": "cl126guhd000k2e6d6ypkex9z", @@ -122,8 +102,7 @@ ] } ] - }, - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" + } }, { "id": "cl126ixp9000q2e6dslh0zypi", @@ -135,50 +114,37 @@ "children": [{ "text": "Do you work for a specific company?" }] } ] - }, - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" + } }, { "id": "cl126jb2q000r2e6dgqlnxnt8", "type": "choice input", "items": [ - { - "id": "cl126jb2q000s2e6dm60yq5p2", - "type": 0, - "blockId": "cl126jb2q000r2e6dgqlnxnt8", - "content": "Yes" - }, + { "id": "cl126jb2q000s2e6dm60yq5p2", "content": "Yes" }, { "id": "cl126jc5a000t2e6dqv91w7j6", - "type": 0, - "blockId": "cl126jb2q000r2e6dgqlnxnt8", - "content": "No", - "outgoingEdgeId": "dhva247te6v1cwfbte78bx4v" + "outgoingEdgeId": "dhva247te6v1cwfbte78bx4v", + "content": "No" } - ], - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] }, { "id": "cl126jioz000v2e6dwrk1f2cb", + "outgoingEdgeId": "c5qdoivxsbhu1mkxkmw9yxft", "type": "text input", - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53", "options": { - "isLong": false, "labels": { - "button": "Send", "placeholder": "Type the company name..." }, "variableId": "cl126jqww000w2e6dq9yv4ifq" - }, - "outgoingEdgeId": "c5qdoivxsbhu1mkxkmw9yxft" + } } - ], - "graphCoordinates": { "x": 679.828061917379, "y": 3.351428911218571 } + ] }, { "id": "m8k3pv1rjckh3arxgitwo43i", "title": "Bot category", + "graphCoordinates": { "x": 972.94, "y": -0.07 }, "blocks": [ { "id": "cl126krck00112e6d1m6ctxpn", @@ -194,8 +160,7 @@ ] } ] - }, - "groupId": "m8k3pv1rjckh3arxgitwo43i" + } }, { "id": "cl126lb8v00142e6duv5qe08l", @@ -203,91 +168,57 @@ "items": [ { "id": "cl126onz9001g2e6dk0nbjeu6", - "type": 0, - "blockId": "cl126lb8v00142e6duv5qe08l", "content": "Lead qualification" }, { "id": "cl126lm6c00172e6d1pfvdiju", - "type": 0, - "blockId": "cl126lb8v00142e6duv5qe08l", "content": "Customer support" }, { "id": "cl126orr2001h2e6d0fqs7737", - "type": 0, - "blockId": "cl126lb8v00142e6duv5qe08l", "content": "Customer research" }, - { - "id": "cl126oudu001i2e6dktwi7qwv", - "type": 0, - "blockId": "cl126lb8v00142e6duv5qe08l", - "content": "User onboarding" - }, - { - "id": "cl126luv500192e6dl317ssyr", - "type": 0, - "blockId": "cl126lb8v00142e6duv5qe08l", - "content": "Quizzes" - }, + { "id": "cl126oudu001i2e6dktwi7qwv", "content": "User onboarding" }, + { "id": "cl126luv500192e6dl317ssyr", "content": "Quizzes" }, { "id": "cl126lz8q001a2e6d8b9lb3b5", - "type": 0, - "blockId": "cl126lb8v00142e6duv5qe08l", "content": "Content distribution" }, - { - "id": "cl126nf7k001d2e6dg2zczjgz", - "type": 0, - "blockId": "cl126lb8v00142e6duv5qe08l", - "content": "FAQ" - }, - { - "id": "cl126ngy8001e2e6ddfo5s9fm", - "type": 0, - "blockId": "cl126lb8v00142e6duv5qe08l", - "content": "Other" - } + { "id": "cl126nf7k001d2e6dg2zczjgz", "content": "FAQ" }, + { "id": "cl126ngy8001e2e6ddfo5s9fm", "content": "Other" } ], - "groupId": "m8k3pv1rjckh3arxgitwo43i", "options": { "variableId": "cl126mo3t001b2e6dvyi16bkd", - "buttonLabel": "Send", "isMultipleChoice": true } }, { "id": "cl1278gyk002w2e6d744eb87n", + "outgoingEdgeId": "zvr4qou4drmkvyyikya9y6ku", "type": "Condition", "items": [ { "id": "cl1278gyk002x2e6dwmpzs3nf", - "type": 1, - "blockId": "cl1278gyk002w2e6d744eb87n", + "outgoingEdgeId": "mgsnzw7w104odi0mz9qjg8hf", "content": { "comparisons": [ { "id": "cl1278irq002y2e6dv4965diw", - "value": "Other", "variableId": "cl126mo3t001b2e6dvyi16bkd", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Other" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "mgsnzw7w104odi0mz9qjg8hf" + ] + } } - ], - "groupId": "m8k3pv1rjckh3arxgitwo43i", - "outgoingEdgeId": "zvr4qou4drmkvyyikya9y6ku" + ] } - ], - "graphCoordinates": { "x": 1030.2081982319628, "y": -0.2818258211374715 } + ] }, { "id": "cnf2ljrlt875d005783ju7hc", "title": "Bye", + "graphCoordinates": { "x": 1522.31, "y": 220.27 }, "blocks": [ { "id": "cl126p76d001k2e6dbhnf2ysq", @@ -301,20 +232,17 @@ ] } ] - }, - "groupId": "cnf2ljrlt875d005783ju7hc" + } }, { "id": "cl126rfy6001t2e6d21gcb6b0", "type": "image", "content": { "url": "https://media4.giphy.com/media/l0amJzVHIAfl7jMDos/giphy.gif?cid=fe3852a3i4c33635xdtj3nesr9uq4zteujaab6b0jr42gpxx&rid=giphy.gif&ct=g" - }, - "groupId": "cnf2ljrlt875d005783ju7hc" + } }, { "id": "agi2i9xxed4jvv40rnrkf23r", - "groupId": "cnf2ljrlt875d005783ju7hc", "type": "text", "content": { "richText": [ @@ -322,12 +250,12 @@ ] } } - ], - "graphCoordinates": { "x": 1585.6402200792238, "y": 219.28927860860924 } + ] }, { "id": "hduy797g246pj8qnhsxy5kt5", "title": "Other category", + "graphCoordinates": { "x": 1310.68, "y": -6.8 }, "blocks": [ { "id": "cl127yxym000b2e6d9hksxo6h", @@ -336,126 +264,80 @@ "richText": [ { "type": "p", "children": [{ "text": "What else?" }] } ] - }, - "groupId": "hduy797g246pj8qnhsxy5kt5" + } }, { "id": "cl126pv7n001o2e6dajltc4qz", + "outgoingEdgeId": "vk0mgizwhw761s9eo9lx88yv", "type": "text input", - "groupId": "hduy797g246pj8qnhsxy5kt5", "options": { - "isLong": false, - "labels": { "button": "Send", "placeholder": "Type your answer" }, "variableId": "cl126q38p001q2e6d0hj23f6b" - }, - "outgoingEdgeId": "vk0mgizwhw761s9eo9lx88yv" + } } - ], - "graphCoordinates": { "x": 1369.6844213687823, "y": -7.90789096298402 } + ] } ], - "variables": [ - { "id": "cl126f4hf000i2e6d8zvzc3t1", "name": "Name" }, - { "id": "cl126jqww000w2e6dq9yv4ifq", "name": "Company" }, - { "id": "cl126mo3t001b2e6dvyi16bkd", "name": "Categories" }, - { "id": "cl126q38p001q2e6d0hj23f6b", "name": "Other categories" } - ], "edges": [ + { + "id": "qehono05saho85xk59apfvtr", + "from": { "eventId": "yp9qsayuwzhihxc7gzt68osm" }, + "to": { "groupId": "az9nafw4tu9b6dyh3cvutlek" } + }, { "id": "dhva247te6v1cwfbte78bx4v", - "to": { "groupId": "m8k3pv1rjckh3arxgitwo43i" }, "from": { - "itemId": "cl126jc5a000t2e6dqv91w7j6", "blockId": "cl126jb2q000r2e6dgqlnxnt8", - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" - } + "itemId": "cl126jc5a000t2e6dqv91w7j6" + }, + "to": { "groupId": "m8k3pv1rjckh3arxgitwo43i" } }, { "id": "mgsnzw7w104odi0mz9qjg8hf", - "to": { "groupId": "hduy797g246pj8qnhsxy5kt5" }, "from": { - "itemId": "cl1278gyk002x2e6dwmpzs3nf", "blockId": "cl1278gyk002w2e6d744eb87n", - "groupId": "m8k3pv1rjckh3arxgitwo43i" - } + "itemId": "cl1278gyk002x2e6dwmpzs3nf" + }, + "to": { "groupId": "hduy797g246pj8qnhsxy5kt5" } }, { "id": "zvr4qou4drmkvyyikya9y6ku", - "to": { "groupId": "cnf2ljrlt875d005783ju7hc" }, - "from": { - "blockId": "cl1278gyk002w2e6d744eb87n", - "groupId": "m8k3pv1rjckh3arxgitwo43i" - } + "from": { "blockId": "cl1278gyk002w2e6d744eb87n" }, + "to": { "groupId": "cnf2ljrlt875d005783ju7hc" } }, { "id": "c5qdoivxsbhu1mkxkmw9yxft", - "to": { "groupId": "m8k3pv1rjckh3arxgitwo43i" }, - "from": { - "blockId": "cl126jioz000v2e6dwrk1f2cb", - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" - } + "from": { "blockId": "cl126jioz000v2e6dwrk1f2cb" }, + "to": { "groupId": "m8k3pv1rjckh3arxgitwo43i" } }, { "id": "j6x356fbxo32zd9ezje77t4j", - "to": { "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" }, - "from": { - "blockId": "cl126820m000g2e6dfleq78bt", - "groupId": "az9nafw4tu9b6dyh3cvutlek" - } - }, - { - "id": "qehono05saho85xk59apfvtr", - "to": { "groupId": "az9nafw4tu9b6dyh3cvutlek" }, - "from": { - "blockId": "cl1265zct0001mb1afel460do", - "groupId": "yp9qsayuwzhihxc7gzt68osm" - } + "from": { "blockId": "cl126820m000g2e6dfleq78bt" }, + "to": { "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" } }, { "id": "vk0mgizwhw761s9eo9lx88yv", - "to": { "groupId": "cnf2ljrlt875d005783ju7hc" }, - "from": { - "blockId": "cl126pv7n001o2e6dajltc4qz", - "groupId": "hduy797g246pj8qnhsxy5kt5" - } + "from": { "blockId": "cl126pv7n001o2e6dajltc4qz" }, + "to": { "groupId": "cnf2ljrlt875d005783ju7hc" } } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": 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 } - }, + "variables": [ + { "id": "cl126f4hf000i2e6d8zvzc3t1", "name": "Name" }, + { "id": "cl126jqww000w2e6dq9yv4ifq", "name": "Company" }, + { "id": "cl126mo3t001b2e6dvyi16bkd", "name": "Categories" }, + { "id": "cl126q38p001q2e6d0hj23f6b", "name": "Other categories" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-07T07:29:42.573Z", + "updatedAt": "2023-11-07T07:30:16.347Z", + "icon": null, + "folderId": null, "publicId": null, "customDomain": null, - "workspaceId": "freeWorkspace", + "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/openai-conditions.json b/apps/builder/public/templates/openai-conditions.json new file mode 100644 index 0000000000..6fe7fc3745 --- /dev/null +++ b/apps/builder/public/templates/openai-conditions.json @@ -0,0 +1,290 @@ +{ + "version": "6", + "id": "clp6pe8dy00051ab3n6coxt62", + "name": "ChatGPT condition", + "events": [ + { + "id": "ewnfbo0exlu7ihfu2lu2lusm", + "outgoingEdgeId": "gj1gs8hdembrsw84aafd1hbj", + "graphCoordinates": { "x": -228.25, "y": -123.31 }, + "type": "start" + } + ], + "groups": [ + { + "id": "qfrz5nwm63g12dajsjxothb5", + "title": "User input", + "graphCoordinates": { "x": -107.01, "y": -53.23 }, + "blocks": [ + { + "id": "emjcjxlvzm2xex10exq4wf5h", + "type": "text", + "content": { + "richText": [ + { "type": "p", "children": [{ "text": "How can we help?" }] } + ] + } + }, + { + "id": "ovgk70u0kfxrbtz9dy4e040o", + "outgoingEdgeId": "n396v90ad7quz0gwygr6n5fc", + "type": "text input", + "options": { "variableId": "vudksu3zyrat6s1bq6qne0rx3" } + } + ] + }, + { + "id": "bh3uva3254p0jgp46gj92way", + "title": "Condition ๐Ÿง ", + "graphCoordinates": { "x": 228.67, "y": -50.67 }, + "blocks": [ + { + "id": "wdg7upk4oqp602jqjn06gjf6", + "type": "OpenAI", + "options": { + "task": "Create chat completion", + "model": "gpt-4-1106-preview", + "messages": [ + { + "id": "s7s7uaurqlmsn3r89c10mk98", + "role": "system", + "content": "You are helpful assistant doing customer support for a software called Typebot.\n\nIf the user is asking a question about his account, please say \"ACCOUNT\".\n\nIf the user wants to talk to a human, please say \"HUMAN\".\n\nOtherwise, say \"OK\"" + }, + { + "id": "zrgypmt1wlogakfl06gfxpgk", + "role": "user", + "content": "Can I talk to a human?" + }, + { + "id": "i6ldg74yr9n185oumozb3r6b", + "role": "assistant", + "content": "HUMAN" + }, + { + "id": "eoxa3dxtw8wjdyv9efnxryxk", + "role": "user", + "content": "I need to check my account" + }, + { + "id": "nb7sy9x7g07w5s1sxb83v295", + "role": "assistant", + "content": "ACCOUNT" + }, + { + "id": "zazen7p0cyawtix7der2e923", + "role": "user", + "content": "{{User Message}}" + } + ], + "responseMapping": [ + { + "id": "s7s7uaurqlmsn3r89c10mk98", + "valueToExtract": "Message content", + "variableId": "vni6kwbch8zlq92dclgcivzyr" + } + ] + } + }, + { + "id": "b63f0et5y70mragfcrmezifh", + "outgoingEdgeId": "wkecv7zg757mbsnbfdej6uph", + "type": "Condition", + "items": [ + { + "id": "d0bax1yf18x2bj5zt38vr6xs", + "outgoingEdgeId": "optu30rn5vjiwueijh0utvoi", + "content": { + "comparisons": [ + { + "id": "iiv6h6ssgusrfza4vped0iqe", + "variableId": "vni6kwbch8zlq92dclgcivzyr", + "comparisonOperator": "Contains", + "value": "ACCOUNT" + } + ] + } + }, + { + "id": "ulf15sjzk9b7df95rzaqe40j", + "outgoingEdgeId": "ft02qowy1n8uy2k5dzdo0j22", + "content": { + "comparisons": [ + { + "id": "qekpq2av325h7rkmnrvtumxn", + "variableId": "vni6kwbch8zlq92dclgcivzyr", + "comparisonOperator": "Contains", + "value": "HUMAN" + } + ] + } + } + ] + } + ] + }, + { + "id": "flt2vtb4pb6mvlvyrrxonzwf", + "title": "Account", + "graphCoordinates": { "x": 585.48, "y": -214.13 }, + "blocks": [ + { + "id": "h45t9e5yxc2fpfiv49gvmwjj", + "type": "text", + "content": { + "richText": [ + { + "type": "p", + "children": [ + { "text": "Ok feel free to check your account here" } + ] + } + ] + } + }, + { + "id": "fn0s0ezabail96c5n0xs24aq", + "type": "choice input", + "items": [{ "id": "tslv59v8oqbfpnd21la8qnz4", "content": "Account" }] + }, + { + "id": "r16g3avw7mwzi12srqisuex0", + "type": "Redirect", + "options": { "url": "https://google.com" } + } + ] + }, + { + "id": "jn9w80afa6a66czzjfto8tmt", + "title": "Human", + "graphCoordinates": { "x": 586.68, "y": 153.73 }, + "blocks": [ + { + "id": "nvkp4zm7f24b0g3b25u3rb59", + "type": "text", + "content": { + "richText": [ + { "type": "p", "children": [{ "text": "I'm a human" }] } + ] + } + } + ] + }, + { + "id": "el01d0j1db9kp6v8wlrk9dob", + "title": "Else", + "graphCoordinates": { "x": 581.46, "y": 315.66 }, + "blocks": [ + { + "id": "tpy9wjrwmhw16xjgs8htao04", + "type": "text", + "content": { + "richText": [{ "type": "p", "children": [{ "text": "Else" }] }] + } + } + ] + }, + { + "id": "vafybpsjqcbrbbhi8pwl0gic", + "title": "", + "graphCoordinates": { "x": 6.52, "y": -346.17 }, + "blocks": [ + { + "id": "q1tc6z6xfl4jtrxdvv8phgil", + "type": "text", + "content": { + "richText": [ + { + "type": "p", + "children": [ + { + "text": "You need to add your OpenAI credentials to make this bot work. ๐Ÿช„\n" + } + ] + } + ] + } + }, + { + "id": "b3ahk7pzsh4abp3bkdlijc0v", + "type": "text", + "content": { + "richText": [ + { + "type": "p", + "children": [ + { + "text": "Once it's done, delete this group and connect the " + }, + { "text": "Start", "bold": true }, + { "text": " event with " }, + { "text": "Intro", "bold": true }, + { "text": " ๐Ÿš€\n" } + ] + } + ] + } + } + ] + } + ], + "edges": [ + { + "id": "h5sk58j0ryrxmfv4gmw7r4dw", + "from": { "blockId": "gphm5wy1md9cunwkdtbzg6nq" }, + "to": { "groupId": "qfrz5nwm63g12dajsjxothb5" } + }, + { + "id": "y8ml9ljnsydol9b42fd9zdve", + "from": { "blockId": "myldn1l1nfdwwm8qvza71rwv" }, + "to": { "groupId": "qfrz5nwm63g12dajsjxothb5" } + }, + { + "id": "optu30rn5vjiwueijh0utvoi", + "from": { + "blockId": "b63f0et5y70mragfcrmezifh", + "itemId": "d0bax1yf18x2bj5zt38vr6xs" + }, + "to": { "groupId": "flt2vtb4pb6mvlvyrrxonzwf" } + }, + { + "id": "ft02qowy1n8uy2k5dzdo0j22", + "from": { + "blockId": "b63f0et5y70mragfcrmezifh", + "itemId": "ulf15sjzk9b7df95rzaqe40j" + }, + "to": { "groupId": "jn9w80afa6a66czzjfto8tmt" } + }, + { + "id": "wkecv7zg757mbsnbfdej6uph", + "from": { "blockId": "b63f0et5y70mragfcrmezifh" }, + "to": { "groupId": "el01d0j1db9kp6v8wlrk9dob" } + }, + { + "id": "n396v90ad7quz0gwygr6n5fc", + "from": { "blockId": "ovgk70u0kfxrbtz9dy4e040o" }, + "to": { "groupId": "bh3uva3254p0jgp46gj92way" } + }, + { + "from": { "eventId": "ewnfbo0exlu7ihfu2lu2lusm" }, + "to": { "groupId": "vafybpsjqcbrbbhi8pwl0gic" }, + "id": "gj1gs8hdembrsw84aafd1hbj" + } + ], + "variables": [ + { "id": "vni6kwbch8zlq92dclgcivzyr", "name": "Assistant Message" }, + { "id": "vudksu3zyrat6s1bq6qne0rx3", "name": "User Message" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-20T09:27:35.926Z", + "updatedAt": "2023-11-20T09:27:59.586Z", + "icon": "๐Ÿง ", + "folderId": null, + "publicId": null, + "customDomain": null, + "resultsTablePreferences": null, + "isArchived": false, + "isClosed": false, + "whatsAppCredentialsId": null +} diff --git a/apps/builder/public/templates/product-recommendation.json b/apps/builder/public/templates/product-recommendation.json index 4a8690206d..5a18fd7d28 100644 --- a/apps/builder/public/templates/product-recommendation.json +++ b/apps/builder/public/templates/product-recommendation.json @@ -1,29 +1,20 @@ { - "id": "mdbjvgqhqypbsdd0airkzcwu", - "version": "4", - "createdAt": "2023-06-05T15:40:37.278Z", - "updatedAt": "2023-06-05T15:45:43.049Z", - "icon": "๐Ÿซ", + "version": "6", + "id": "clon5zh7w000e1avnec16apet", "name": "Product recommendation", - "folderId": null, - "groups": [ + "events": [ { "id": "af8ny8rpbejnlkitr2s29ro1", - "title": "Start", - "blocks": [ - { - "id": "li6nyybzaojujnz241jv5rr1", - "type": "start", - "label": "Start", - "groupId": "af8ny8rpbejnlkitr2s29ro1", - "outgoingEdgeId": "aj9vphwwva87uh9f1w7mm999" - } - ], - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "aj9vphwwva87uh9f1w7mm999", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "buk5exhk13g3npkaiaw87tvs", "title": "Continent", + "graphCoordinates": { "x": 367.8151290581508, "y": 175.39453125 }, "blocks": [ { "id": "ub5tforva9nlqky5lbrfrsdb", @@ -32,8 +23,7 @@ "richText": [ { "type": "p", "children": [{ "text": "Ok {{Name}}" }] } ] - }, - "groupId": "buk5exhk13g3npkaiaw87tvs" + } }, { "id": "jaj0pyfmlf4hb4suglr3v0be", @@ -49,8 +39,7 @@ ] } ] - }, - "groupId": "buk5exhk13g3npkaiaw87tvs" + } }, { "id": "x6lj1mhze2xtc0h3ln42xg84", @@ -59,42 +48,26 @@ "richText": [ { "type": "p", "children": [{ "text": "Where do you live?" }] } ] - }, - "groupId": "buk5exhk13g3npkaiaw87tvs" + } }, { "id": "lwtynqjykiem5zdtns3fwhu2", + "outgoingEdgeId": "zlab2pp5tfih56jcw6vtjs03", "type": "choice input", "items": [ - { - "id": "b6mg694wlrmx4k1fgc46co57", - "type": 0, - "blockId": "lwtynqjykiem5zdtns3fwhu2", - "content": "North America" - }, - { - "id": "fpey0ohbvgvg7b86y4ol8wr7", - "type": 0, - "blockId": "lwtynqjykiem5zdtns3fwhu2", - "content": "Europe" - } + { "id": "b6mg694wlrmx4k1fgc46co57", "content": "North America" }, + { "id": "fpey0ohbvgvg7b86y4ol8wr7", "content": "Europe" } ], - "groupId": "buk5exhk13g3npkaiaw87tvs", "options": { - "variableId": "vma96g9rw8oaosc0ei2iacqig", - "buttonLabel": "Send", - "isSearchable": false, - "isMultipleChoice": false, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "zlab2pp5tfih56jcw6vtjs03" + "variableId": "vma96g9rw8oaosc0ei2iacqig" + } } - ], - "graphCoordinates": { "x": 367.81512905815083, "y": 175.39453125 } + ] }, { "id": "gafkgilrandk3cwydpzq21oy", "title": "Name", + "graphCoordinates": { "x": 21.63671875, "y": 176.3203125 }, "blocks": [ { "id": "mu6ygqqpi48dacy1n4xj6x4y", @@ -110,8 +83,7 @@ ] } ] - }, - "groupId": "gafkgilrandk3cwydpzq21oy" + } }, { "id": "w9rc4yf0ytnzqy16r938h094", @@ -120,29 +92,22 @@ "richText": [ { "type": "p", "children": [{ "text": "What's your name?" }] } ] - }, - "groupId": "gafkgilrandk3cwydpzq21oy" + } }, { "id": "xobx3g928f9zj220n5qe1ih6", + "outgoingEdgeId": "gnh6uloe0a8ciwahgq0gnx4k", "type": "text input", - "groupId": "gafkgilrandk3cwydpzq21oy", "options": { - "isLong": false, - "labels": { - "button": "Send", - "placeholder": "Type your answer..." - }, "variableId": "vp1r2yrb6xgmi2aq3x6x73vaz" - }, - "outgoingEdgeId": "gnh6uloe0a8ciwahgq0gnx4k" + } } - ], - "graphCoordinates": { "x": 21.63671875, "y": 176.3203125 } + ] }, { "id": "z40ynhndj5r4038u3ha39c14", "title": "Sport", + "graphCoordinates": { "x": 721.140625, "y": 173.953125 }, "blocks": [ { "id": "xpbrytz3gucp0xzf1qs8mlwe", @@ -151,64 +116,48 @@ "richText": [ { "type": "p", "children": [{ "text": "What's your sport?" }] } ] - }, - "groupId": "z40ynhndj5r4038u3ha39c14" + } }, { "id": "zesp4ro7ltjmh64sn8d4912c", + "outgoingEdgeId": "hwbbi48q0u8xnlqbpq53cdju", "type": "picture choice input", "items": [ { "id": "l4y5s4rz63g3kl91sq5h6401", - "type": 3, - "title": "Running", - "blockId": "zesp4ro7ltjmh64sn8d4912c", - "pictureSrc": "https://images.unsplash.com/photo-1456613820599-bfe244172af5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw0fHx0cmFpbHxlbnwwfDB8fHwxNjg1MzYyOTQ2fDA&ixlib=rb-4.0.3&q=80&w=1080" + "pictureSrc": "https://images.unsplash.com/photo-1456613820599-bfe244172af5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw0fHx0cmFpbHxlbnwwfDB8fHwxNjg1MzYyOTQ2fDA&ixlib=rb-4.0.3&q=80&w=1080", + "title": "Running" }, { "id": "urqlzmsiixatiamg06pexhsn", - "type": 3, - "title": "Cycling", - "blockId": "zesp4ro7ltjmh64sn8d4912c", - "pictureSrc": "https://images.unsplash.com/photo-1545575439-3261931f52f1?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw3fHxjeWNsaW5nfGVufDB8MHx8fDE2ODUzNjI5NjJ8MA&ixlib=rb-4.0.3&q=80&w=1080" + "pictureSrc": "https://images.unsplash.com/photo-1545575439-3261931f52f1?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw3fHxjeWNsaW5nfGVufDB8MHx8fDE2ODUzNjI5NjJ8MA&ixlib=rb-4.0.3&q=80&w=1080", + "title": "Cycling" }, { "id": "go2ko2zs5haeairrtfw7jqb2", - "type": 3, - "title": "Triathlon", - "blockId": "zesp4ro7ltjmh64sn8d4912c", - "pictureSrc": "https://images.unsplash.com/photo-1627900258552-50850df9dbc5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw0fHxUcmlhdGhsb258ZW58MHwwfHx8MTY4NTM2Mjk3N3ww&ixlib=rb-4.0.3&q=80&w=1080" + "pictureSrc": "https://images.unsplash.com/photo-1627900258552-50850df9dbc5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw0fHxUcmlhdGhsb258ZW58MHwwfHx8MTY4NTM2Mjk3N3ww&ixlib=rb-4.0.3&q=80&w=1080", + "title": "Triathlon" }, { "id": "ctvsb2gsogkbaj9sxsgw25p9", - "type": 3, - "title": "Hiking", - "blockId": "zesp4ro7ltjmh64sn8d4912c", - "pictureSrc": "https://images.unsplash.com/photo-1551632811-561732d1e306?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHwyfHxIaWtpbmd8ZW58MHwwfHx8MTY4NTM2Mjk5NXww&ixlib=rb-4.0.3&q=80&w=1080" + "pictureSrc": "https://images.unsplash.com/photo-1551632811-561732d1e306?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHwyfHxIaWtpbmd8ZW58MHwwfHx8MTY4NTM2Mjk5NXww&ixlib=rb-4.0.3&q=80&w=1080", + "title": "Hiking" } - ], - "groupId": "z40ynhndj5r4038u3ha39c14", - "options": { - "buttonLabel": "Send", - "isMultipleChoice": false, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "hwbbi48q0u8xnlqbpq53cdju" + ] } - ], - "graphCoordinates": { "x": 721.140625, "y": 173.953125 } + ] }, { "id": "mncr0l180vs07gc1difaovjx", "title": "Gender", + "graphCoordinates": { "x": 1071, "y": 173.953125 }, "blocks": [ { "id": "ahuasm8oa058gl4np96qadox", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Nice! ๐Ÿ˜Ž" }] }] - }, - "groupId": "mncr0l180vs07gc1difaovjx" + } }, { "id": "phbeq3fg1jp2ktmz2blr6bzf", @@ -217,61 +166,27 @@ "richText": [ { "type": "p", "children": [{ "text": "What's your gender?" }] } ] - }, - "groupId": "mncr0l180vs07gc1difaovjx" + } }, { "id": "mfz600vwgfjcisahf5tdnz7l", + "outgoingEdgeId": "bf16js59cs2hmicrkbc7nv1q", "type": "choice input", "items": [ { "id": "zv2np66vgqoruntfh9h9vidx", - "type": 0, - "blockId": "mfz600vwgfjcisahf5tdnz7l", - "content": "โ™‚๏ธ Men", - "displayCondition": { - "condition": { - "comparisons": [ - { - "id": "r7gcyof1nhavgaap1uhvw3ox", - "value": "test", - "variableId": "vp1r2yrb6xgmi2aq3x6x73vaz", - "comparisonOperator": "Equal to" - } - ], - "logicalOperator": "AND" - }, - "isEnabled": false - } + "content": "โ™‚๏ธ Men" }, - { - "id": "w5e2h4n10u1l2pap1vtm68ma", - "type": 0, - "blockId": "mfz600vwgfjcisahf5tdnz7l", - "content": "โ™€๏ธ Women" - }, - { - "id": "m1t9qrfs4z998ogqd4ttueus", - "type": 0, - "blockId": "mfz600vwgfjcisahf5tdnz7l", - "content": "Other" - } - ], - "groupId": "mncr0l180vs07gc1difaovjx", - "options": { - "buttonLabel": "Send", - "isSearchable": false, - "isMultipleChoice": false, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "bf16js59cs2hmicrkbc7nv1q" + { "id": "w5e2h4n10u1l2pap1vtm68ma", "content": "โ™€๏ธ Women" }, + { "id": "m1t9qrfs4z998ogqd4ttueus", "content": "Other" } + ] } - ], - "graphCoordinates": { "x": 1071, "y": 173.953125 } + ] }, { "id": "mqt2qcyld5du8ecmbphjxpwu", "title": "Goals", + "graphCoordinates": { "x": 1412.34375, "y": 174.76953125 }, "blocks": [ { "id": "pksck9ppag8q24ou26ewgodw", @@ -285,50 +200,40 @@ ] } ] - }, - "groupId": "mqt2qcyld5du8ecmbphjxpwu" + } }, { "id": "cx2v8nfb4kxvk58bbu6w85uy", + "outgoingEdgeId": "drxu7gyz2trqjtv5nnfv1x9l", "type": "picture choice input", "items": [ { "id": "fmhwukhd2112743tgrmv85st", - "type": 3, - "title": "Energy", - "blockId": "cx2v8nfb4kxvk58bbu6w85uy", - "pictureSrc": "https://images.unsplash.com/photo-1615845522103-82f98cd2a9de?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw5fHxlbmR1cmFuY2V8ZW58MHwwfHx8MTY4NTM2MzY3Nnww&ixlib=rb-4.0.3&q=80&w=1080" + "pictureSrc": "https://images.unsplash.com/photo-1615845522103-82f98cd2a9de?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw5fHxlbmR1cmFuY2V8ZW58MHwwfHx8MTY4NTM2MzY3Nnww&ixlib=rb-4.0.3&q=80&w=1080", + "title": "Energy" }, { "id": "hkzoroc6mf9tt9g2uxppweay", - "type": 3, - "title": "Hydration", - "blockId": "cx2v8nfb4kxvk58bbu6w85uy", - "pictureSrc": "https://images.unsplash.com/photo-1536044635785-467d51fc5880?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHwxMnx8ZHJpbmslMjBzcG9ydHxlbnwwfDB8fHwxNjg1MzYzNzIxfDA&ixlib=rb-4.0.3&q=80&w=1080" + "pictureSrc": "https://images.unsplash.com/photo-1536044635785-467d51fc5880?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHwxMnx8ZHJpbmslMjBzcG9ydHxlbnwwfDB8fHwxNjg1MzYzNzIxfDA&ixlib=rb-4.0.3&q=80&w=1080", + "title": "Hydration" }, { "id": "nn5629jaux41qo0fhl1yj3zi", - "type": 3, - "title": "Recovery", - "blockId": "cx2v8nfb4kxvk58bbu6w85uy", - "pictureSrc": "https://images.unsplash.com/photo-1531403939386-c08a16cd7eef?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw3fHxzdHJldGNofGVufDB8MHx8fDE2ODUzNjM2OTl8MA&ixlib=rb-4.0.3&q=80&w=1080" + "pictureSrc": "https://images.unsplash.com/photo-1531403939386-c08a16cd7eef?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw3fHxzdHJldGNofGVufDB8MHx8fDE2ODUzNjM2OTl8MA&ixlib=rb-4.0.3&q=80&w=1080", + "title": "Recovery" } ], - "groupId": "mqt2qcyld5du8ecmbphjxpwu", "options": { "variableId": "vgz8fr5u7q0p4jdef1krz2vm3", - "buttonLabel": "Send", - "isMultipleChoice": true, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "drxu7gyz2trqjtv5nnfv1x9l" + "isMultipleChoice": true + } } - ], - "graphCoordinates": { "x": 1412.34375, "y": 174.76953125 } + ] }, { "id": "n3zqahk50kb05th7zbycin5w", "title": "Protein source", + "graphCoordinates": { "x": 1745.61328125, "y": 183.87109375 }, "blocks": [ { "id": "ife4ujh1l5ljpp3x4gnram1z", @@ -342,42 +247,27 @@ ] } ] - }, - "groupId": "n3zqahk50kb05th7zbycin5w" + } }, { "id": "ogy9ng7q9jglxg2ivb39tzeh", + "outgoingEdgeId": "umuilo9l4t27kcpnx5ybnr08", "type": "choice input", "items": [ - { - "id": "exj60v3j83wx9yjbdsm8gwzj", - "type": 0, - "blockId": "ogy9ng7q9jglxg2ivb39tzeh", - "content": "Cricket-based" - }, - { - "id": "kvqeznudz85jbqwxzfpwz8z8", - "type": 0, - "blockId": "ogy9ng7q9jglxg2ivb39tzeh", - "content": "Plant-based" - } + { "id": "exj60v3j83wx9yjbdsm8gwzj", "content": "Cricket-based" }, + { "id": "kvqeznudz85jbqwxzfpwz8z8", "content": "Plant-based" } ], - "groupId": "n3zqahk50kb05th7zbycin5w", "options": { "variableId": "vlgo7i0r514jkd9a9f24otm4m", - "buttonLabel": "Send", - "isSearchable": false, - "isMultipleChoice": true, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "umuilo9l4t27kcpnx5ybnr08" + "isMultipleChoice": true + } } - ], - "graphCoordinates": { "x": 1745.61328125, "y": 183.87109375 } + ] }, { "id": "y2jfx62oea6q0rxjby9tzqi6", "title": "Flavours", + "graphCoordinates": { "x": 2077.765625, "y": 182.74609375 }, "blocks": [ { "id": "muy0ptwahuy20bhs5b9npz2m", @@ -389,88 +279,38 @@ "children": [{ "text": "What are flavors do you enjoy?" }] } ] - }, - "groupId": "y2jfx62oea6q0rxjby9tzqi6" + } }, { "id": "p71conb1ln7f3m41ca6pxetz", + "outgoingEdgeId": "i3za7jvz8g7m7588g7i1ue9i", "type": "choice input", "items": [ { "id": "t7fkowjzn7eygfn6q1r4a8l9", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Chocolate", - "displayCondition": { - "condition": { "comparisons": [], "logicalOperator": "AND" }, - "isEnabled": false - } - }, - { - "id": "b1a0qlhtirnxqaqudskc4hnb", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Vanilla" - }, - { - "id": "vef4uodxrj05lp2i5k3uhdd5", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Berries" - }, - { - "id": "oyyx5j4j5fee37rc47adb5m8", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Caramel" - }, - { - "id": "myapux2pojdtbdy0gyc47rhq", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Nuts" - }, - { - "id": "aegltvuw163qqx88rwzjrg3v", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Coffee" - }, - { - "id": "zql5o66rry2ab3ofxa1y8kll", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Lime" + "content": "Chocolate" }, - { - "id": "ecvbkdakesh18zn5bfkylvt1", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Watermelon" - }, - { - "id": "b1xcrk5tv1b1rkjy40uhp44d", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Maple Syrup" - } + { "id": "b1a0qlhtirnxqaqudskc4hnb", "content": "Vanilla" }, + { "id": "vef4uodxrj05lp2i5k3uhdd5", "content": "Berries" }, + { "id": "oyyx5j4j5fee37rc47adb5m8", "content": "Caramel" }, + { "id": "myapux2pojdtbdy0gyc47rhq", "content": "Nuts" }, + { "id": "aegltvuw163qqx88rwzjrg3v", "content": "Coffee" }, + { "id": "zql5o66rry2ab3ofxa1y8kll", "content": "Lime" }, + { "id": "ecvbkdakesh18zn5bfkylvt1", "content": "Watermelon" }, + { "id": "b1xcrk5tv1b1rkjy40uhp44d", "content": "Maple Syrup" } ], - "groupId": "y2jfx62oea6q0rxjby9tzqi6", "options": { "variableId": "vhbd5800sc98l1lk8wf7fe742", - "buttonLabel": "Next", - "isSearchable": false, "isMultipleChoice": true, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "i3za7jvz8g7m7588g7i1ue9i" + "buttonLabel": "Next" + } } - ], - "graphCoordinates": { "x": 2077.765625, "y": 182.74609375 } + ] }, { "id": "x14lejru0gv2c7afc68nuezy", "title": "Diet restrictions", + "graphCoordinates": { "x": 2424.828125, "y": 184.4765625 }, "blocks": [ { "id": "bwqiy7w4x6egwozthsvraeup", @@ -479,8 +319,7 @@ "richText": [ { "type": "p", "children": [{ "text": "Great choice ๐Ÿ˜‹" }] } ] - }, - "groupId": "x14lejru0gv2c7afc68nuezy" + } }, { "id": "n6ns6i9z8qyk83wg5f8bn2j8", @@ -494,54 +333,28 @@ ] } ] - }, - "groupId": "x14lejru0gv2c7afc68nuezy" + } }, { "id": "cbcz08dj67rkx8k1cbj2ybz8", + "outgoingEdgeId": "erx9wo3svpfxs2cteknbhfaz", "type": "choice input", "items": [ - { - "id": "u9gi0gnaza6ottid74l82wlm", - "type": 0, - "blockId": "cbcz08dj67rkx8k1cbj2ybz8", - "content": "Non GMO" - }, - { - "id": "yr7q8fcyi6l1sw83t37fjosj", - "type": 0, - "blockId": "cbcz08dj67rkx8k1cbj2ybz8", - "content": "No palm oil" - }, - { - "id": "gckqnnt2but4d6wwsfia3035", - "type": 0, - "blockId": "cbcz08dj67rkx8k1cbj2ybz8", - "content": "Gluten free" - }, - { - "id": "m3qdwzep7uugpejvga0yqorg", - "type": 0, - "blockId": "cbcz08dj67rkx8k1cbj2ybz8", - "content": "Nut free" - } + { "id": "u9gi0gnaza6ottid74l82wlm", "content": "Non GMO" }, + { "id": "yr7q8fcyi6l1sw83t37fjosj", "content": "No palm oil" }, + { "id": "gckqnnt2but4d6wwsfia3035", "content": "Gluten free" }, + { "id": "m3qdwzep7uugpejvga0yqorg", "content": "Nut free" } ], - "groupId": "x14lejru0gv2c7afc68nuezy", "options": { - "variableId": "vz4fqc40gkk99h0qeus2tjwhx", - "buttonLabel": "Send", - "isSearchable": false, - "isMultipleChoice": false, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "erx9wo3svpfxs2cteknbhfaz" + "variableId": "vz4fqc40gkk99h0qeus2tjwhx" + } } - ], - "graphCoordinates": { "x": 2424.828125, "y": 184.4765625 } + ] }, { "id": "q9z4xrzf9z7sgl69rrrhiyoh", "title": "Email", + "graphCoordinates": { "x": 2765.89453125, "y": 187.64453125 }, "blocks": [ { "id": "fynckthiy3zq7selucjvp44q", @@ -557,8 +370,7 @@ ] } ] - }, - "groupId": "q9z4xrzf9z7sgl69rrrhiyoh" + } }, { "id": "pbn0oib7yt3uspici7to3i9f", @@ -574,8 +386,7 @@ ] } ] - }, - "groupId": "q9z4xrzf9z7sgl69rrrhiyoh" + } }, { "id": "rez1phkqpkeoj7u2kzmde653", @@ -587,63 +398,53 @@ "children": [{ "text": "We will also send a little gift ๐ŸŽ" }] } ] - }, - "groupId": "q9z4xrzf9z7sgl69rrrhiyoh" + } }, { "id": "vdzzxwdocfxdvqnqwwvjymzw", - "type": "email input", - "groupId": "q9z4xrzf9z7sgl69rrrhiyoh", - "options": { - "labels": { "button": "Send", "placeholder": "Type your email..." }, - "retryMessageContent": "This email doesn't seem to be valid. Can you type it again?" - }, - "outgoingEdgeId": "vnqu52ld3usezpnrgu2l7ul0" + "outgoingEdgeId": "vnqu52ld3usezpnrgu2l7ul0", + "type": "email input" } - ], - "graphCoordinates": { "x": 2765.89453125, "y": 187.64453125 } + ] }, { "id": "g27q0psplvzht5xg9erxw738", "title": "If cricket", + "graphCoordinates": { "x": 3107.953125, "y": 187.3515625 }, "blocks": [ { "id": "l16y2qzslakgl2up4jybj5m4", + "outgoingEdgeId": "j6d1kch478t4ov4bbz1yshhl", "type": "Condition", "items": [ { "id": "yffl8ja17g5fr9rpi4d0cl36", - "type": 1, - "blockId": "l16y2qzslakgl2up4jybj5m4", + "outgoingEdgeId": "iszgvtfetursv4ktm9mdtxhy", "content": { "comparisons": [ { "id": "g995jwhkyj8e5tv4ci7gd5fi", - "value": "Cricket-based", "variableId": "vlgo7i0r514jkd9a9f24otm4m", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Cricket-based" }, { "id": "qjhmaage7fe1i5e0nscr0954", - "value": "Europe", "variableId": "vma96g9rw8oaosc0ei2iacqig", - "comparisonOperator": "Equal to" + "comparisonOperator": "Equal to", + "value": "Europe" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "iszgvtfetursv4ktm9mdtxhy" + ] + } } - ], - "groupId": "g27q0psplvzht5xg9erxw738", - "outgoingEdgeId": "j6d1kch478t4ov4bbz1yshhl" + ] } - ], - "graphCoordinates": { "x": 3107.953125, "y": 187.3515625 } + ] }, { "id": "qjoc17kdjrpkaoxesoeqzmjt", "title": "No cricket in Europe", + "graphCoordinates": { "x": 3452.45703125, "y": 113.35546875 }, "blocks": [ { "id": "c3m4f1kcyf3dnsdlykjrxytm", @@ -659,11 +460,11 @@ ] } ] - }, - "groupId": "qjoc17kdjrpkaoxesoeqzmjt" + } }, { "id": "pxb59zd4bjqmva9er47l6x15", + "outgoingEdgeId": "apvktyu7x3wks4z9xflecu91", "type": "text", "content": { "richText": [ @@ -676,80 +477,70 @@ ] } ] - }, - "groupId": "qjoc17kdjrpkaoxesoeqzmjt", - "outgoingEdgeId": "apvktyu7x3wks4z9xflecu91" + } } - ], - "graphCoordinates": { "x": 3452.45703125, "y": 113.35546875 } + ] }, { "id": "b94nqmbqp0ezfazu0kekqioa", "title": "If Energy", + "graphCoordinates": { "x": 3646.396113301624, "y": 447.8859463616741 }, "blocks": [ { "id": "okl6akklm8djknl7lofqr3cm", + "outgoingEdgeId": "xblzklrcdkmxeu8y5xbicz09", "type": "Condition", "items": [ { "id": "vyjgfexvyrijez06kpxi1mva", - "type": 1, - "blockId": "okl6akklm8djknl7lofqr3cm", + "outgoingEdgeId": "lk5ghbqljt2f43w1d47rowns", "content": { "comparisons": [ { "id": "w3ii2flw8vz608pm45j92nli", - "value": "Energy", "variableId": "vgz8fr5u7q0p4jdef1krz2vm3", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Energy" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "lk5ghbqljt2f43w1d47rowns" + ] + } } - ], - "groupId": "b94nqmbqp0ezfazu0kekqioa", - "outgoingEdgeId": "xblzklrcdkmxeu8y5xbicz09" + ] } - ], - "graphCoordinates": { "x": 3646.396113301624, "y": 447.8859463616741 } + ] }, { "id": "co7gxaoxtf1xukmgbby73u6v", "title": "If hydration", + "graphCoordinates": { "x": 4165.908336104726, "y": 568.072108305734 }, "blocks": [ { "id": "styhci2fh3yi17b7cmv3x8cc", + "outgoingEdgeId": "dyvib6xwm0jieqp37mac1diq", "type": "Condition", "items": [ { "id": "okd2sbmr1mgoubpf7kdjr9ey", - "type": 1, - "blockId": "styhci2fh3yi17b7cmv3x8cc", + "outgoingEdgeId": "r2cx0lm6xkzjgv1hycekcp25", "content": { "comparisons": [ { "id": "w3ii2flw8vz608pm45j92nli", - "value": "Hydration", "variableId": "vgz8fr5u7q0p4jdef1krz2vm3", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Hydration" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "r2cx0lm6xkzjgv1hycekcp25" + ] + } } - ], - "groupId": "co7gxaoxtf1xukmgbby73u6v", - "outgoingEdgeId": "dyvib6xwm0jieqp37mac1diq" + ] } - ], - "graphCoordinates": { "x": 4165.908336104726, "y": 568.072108305734 } + ] }, { "id": "rcr9zqm4lnevx5dqf9k23m5u", "title": "If recovery", + "graphCoordinates": { "x": 4634.078450031568, "y": 886.3561931535737 }, "blocks": [ { "id": "m8o93n92t5wcy5bi8tgauc5f", @@ -757,30 +548,26 @@ "items": [ { "id": "yw3cil1rvf3iduc0mko0c8og", - "type": 1, - "blockId": "m8o93n92t5wcy5bi8tgauc5f", + "outgoingEdgeId": "choo26oflyx4c2em6msd7bum", "content": { "comparisons": [ { "id": "w3ii2flw8vz608pm45j92nli", - "value": "Recovery", "variableId": "vgz8fr5u7q0p4jdef1krz2vm3", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Recovery" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "choo26oflyx4c2em6msd7bum" + ] + } } - ], - "groupId": "rcr9zqm4lnevx5dqf9k23m5u" + ] } - ], - "graphCoordinates": { "x": 4634.078450031568, "y": 886.3561931535737 } + ] }, { "id": "ho2hskojxz8ac631driot5kh", "title": "Energy", + "graphCoordinates": { "x": 4001.801919721875, "y": -860.9371698075208 }, "blocks": [ { "id": "v4tvmb615jdg52vofgzlz7ai", @@ -795,8 +582,7 @@ ] } ] - }, - "groupId": "ho2hskojxz8ac631driot5kh" + } }, { "id": "vxadalubq6hnsywwt7w9tzoc", @@ -812,70 +598,65 @@ ] } ] - }, - "groupId": "ho2hskojxz8ac631driot5kh" + } }, { "id": "zzws62fe3zha7x7kln3kp0ko", + "outgoingEdgeId": "pk7d58d6qmxrylte434czz4x", "type": "Condition", "items": [ { "id": "kb6eovh6di5xqnkegms0ljee", - "type": 1, - "blockId": "zzws62fe3zha7x7kln3kp0ko", + "outgoingEdgeId": "achb4p7q0hnox3hy62ru7dtx", "content": { "comparisons": [ { "id": "ysu7q0adna5tyhaghtq9qzrj", - "value": "Chocolate", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Chocolate" }, { "id": "j7sune97lh32xukeil8poeif", - "value": "Berries", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Berries" }, { "id": "tsrm85u8demtuc95aootakrj", - "value": "Caramel", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Caramel" }, { "id": "gfqvik3txgrinlslj0jvs9gt", - "value": "Nuts", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Nuts" }, { "id": "yv3jre55h7w9qp55t5m8ax2p", - "value": "Coffee", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Coffee" }, { "id": "xksf2b1la2h8yy9lvn96yqo1", - "value": "Vanilla", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Vanilla" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "achb4p7q0hnox3hy62ru7dtx" + ] + } } - ], - "groupId": "ho2hskojxz8ac631driot5kh", - "outgoingEdgeId": "pk7d58d6qmxrylte434czz4x" + ] } - ], - "graphCoordinates": { "x": 4001.8019197218755, "y": -860.9371698075208 } + ] }, { "id": "w3f8ya4hmkuab55dh2ogsvtz", "title": "Hydration", + "graphCoordinates": { "x": 4604.393180386735, "y": 102.6192979908871 }, "blocks": [ { "id": "qsd35sfqjq1eskoovubrjc7k", @@ -890,8 +671,7 @@ ] } ] - }, - "groupId": "w3f8ya4hmkuab55dh2ogsvtz" + } }, { "id": "eobb04nb37ezx24go2iipm85", @@ -907,72 +687,50 @@ ] } ] - }, - "groupId": "w3f8ya4hmkuab55dh2ogsvtz" + } }, { "id": "ph2jgb8r0lyui0j6v3jtifo2", + "outgoingEdgeId": "l8g4gblcmzmiv4fsgjufviws", "type": "picture choice input", "items": [ { "id": "pkv4omwvnr338lkhwh6jglh6", - "type": 3, + "pictureSrc": "https://www.naak.com/cdn/shop/files/naak-energy-drink-mix-energy-drink-mix-lime-42434407891248_600x.png?v=1692717400", "title": "Lime Energy Drink Mix", - "blockId": "ph2jgb8r0lyui0j6v3jtifo2", - "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/naak-energy-drink-mix-1-sac-3-50-portion-energy-drink-mix-lime-eu-29868312887382_600x.png?v=1677355814", "description": "- 250 calories: get all your calories in a liquid form\n- 55g carbohydrates: simple and complex natural carbohydrates\n- 650mg electrolytes: replenish minerals lost in sweat\n- 1300mg BCAAs: prevent muscle breakdown during exercise\n- 8g protein: all essential amino acids to reduce muscle fatigue", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "ntnhk9cqrvogutrldgpm7d56", - "value": "Lime", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Lime" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } }, { "id": "s6nx86xyuclsjtqmr53ijea1", - "type": 3, + "pictureSrc": "https://eu.naak.com/cdn/shop/files/NewDrinkMixWatermelonBulk-Front_5_600x.png?v=1692716818", "title": "Watermelon Energy Drink Mix", - "blockId": "ph2jgb8r0lyui0j6v3jtifo2", - "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/naak-energy-drink-mix-1-sac-3-50-portion-energy-drink-mix-watermelon-eu-29868346605654_600x.png?v=1677355821", - "description": "- 250 calories: get all your calories in a liquid form\n- 55g carbohydrates: simple and complex natural carbohydrates\n- 650mg electrolytes: replenish minerals lost in sweat\n- 1300mg BCAAs: prevent muscle breakdown during exercise\n- 8g protein: all essential amino acids to reduce muscle fatigue", - "displayCondition": { - "condition": { - "comparisons": [ - { - "id": "r20yudlu77l7fhss45z87f7l", - "value": "Watermelon", - "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" - } - ], - "logicalOperator": "AND" - }, - "isEnabled": false - } + "description": "- 250 calories: get all your calories in a liquid form\n- 55g carbohydrates: simple and complex natural carbohydrates\n- 650mg electrolytes: replenish minerals lost in sweat\n- 1300mg BCAAs: prevent muscle breakdown during exercise\n- 8g protein: all essential amino acids to reduce muscle fatigue" } ], - "groupId": "w3f8ya4hmkuab55dh2ogsvtz", "options": { - "buttonLabel": "Next", "isMultipleChoice": true, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "l8g4gblcmzmiv4fsgjufviws" + "buttonLabel": "Next" + } } - ], - "graphCoordinates": { "x": 4604.393180386735, "y": 102.6192979908871 } + ] }, { "id": "jdd417tfj6hdu4pj6bkksgwa", "title": "Recovery", + "graphCoordinates": { "x": 5092.137492973015, "y": 286.5579598199387 }, "blocks": [ { "id": "xbbsd6xsl44fukz2ygdpjbd1", @@ -989,8 +747,7 @@ ] } ] - }, - "groupId": "jdd417tfj6hdu4pj6bkksgwa" + } }, { "id": "cgb8mt2krmq3mdddwjehtrzu", @@ -1006,8 +763,7 @@ ] } ] - }, - "groupId": "jdd417tfj6hdu4pj6bkksgwa" + } }, { "id": "mtj2j6zgnp50wpw9ewuwui5u", @@ -1015,54 +771,46 @@ "items": [ { "id": "s9nop23fmq55jilo9mntgpn8", - "type": 3, - "title": "Protein Nut Butter", - "blockId": "mtj2j6zgnp50wpw9ewuwui5u", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/naak-breakfast-340g-protein-nut-butter-peanut-40637318365488_600x.png?v=1678033822", + "title": "Protein Nut Butter", "description": "- 500mg super fats: promote heart and gut health\n- 640mg BCAAs: reduce muscle damage & soreness\n- 120mg electrolytes: replenish minerals lost in sweat\n- 4.3g protein: build & repair muscle post-workout", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "rm8omv5htisk7s4nzvmsvc5c", - "value": "Nuts", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Nuts" }, { "id": "xde05nklbld4u80qhs422y47", - "value": "Nut free", "variableId": "vz4fqc40gkk99h0qeus2tjwhx", - "comparisonOperator": "Does not contain" + "comparisonOperator": "Does not contain", + "value": "Nut free" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } }, { "id": "snr3wam9c0p1f191rf2587wz", - "type": 3, - "title": "Vanilla Protein Powder", - "blockId": "mtj2j6zgnp50wpw9ewuwui5u", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/naak-protein-powder-1-bag-2-75-serving-protein-powder-vanilla-29774755954774_600x.png?v=1677355777", + "title": "Vanilla Protein Powder", "description": "- 25g complete protein: build & repair muscle post-workout\n- 4g BCAAs: reduce muscle damage & soreness\n- 430mg electrolytes: replenish minerals lost in sweat\n- 1g carbohydrates: no added sugar" } ], - "groupId": "jdd417tfj6hdu4pj6bkksgwa", "options": { - "buttonLabel": "Send", - "isMultipleChoice": true, - "searchInputPlaceholder": "Filter the options..." + "isMultipleChoice": true } } - ], - "graphCoordinates": { "x": 5092.137492973015, "y": 286.5579598199387 } + ] }, { "id": "nh69j0kgfd5wdqshpdpjgqdh", "title": "", + "graphCoordinates": { "x": 4425.493571638971, "y": -1989.578763047769 }, "blocks": [ { "id": "bqq8o994nr8ltkkdc8bax01i", @@ -1078,464 +826,361 @@ ] } ] - }, - "groupId": "nh69j0kgfd5wdqshpdpjgqdh" + } }, { "id": "np8236cce7e79h8i21hg5ncp", + "outgoingEdgeId": "u57y4cl6042u5r34dahfhwus", "type": "picture choice input", "items": [ { "id": "smabu9g31qcovytdu2yyi86n", - "type": 3, - "title": "Bars - Variety pack", - "blockId": "np8236cce7e79h8i21hg5ncp", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/PACKS_8_600x.png?v=1680032168", + "title": "Bars - Variety pack", "description": "- 180 calories: long-lasting energy with no sugar crash\n- 65mg caffeine: increase focus and stamina\n- 29g carbohydrates: simple and complex natural carbohydrates\n- 480mg electrolytes: replenish minerals lost in sweat\n- 7g protein: essential amino acids to reduce muscle fatigue" }, { "id": "f8rm4b7ic73nq92u52717th5", - "type": 3, - "title": "Waffle - Variety pack", - "blockId": "np8236cce7e79h8i21hg5ncp", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/PACKS_7_600x.png?v=1680032183", + "title": "Waffle - Variety pack", "description": "- 140 calories: quick energy boost from high-quality ingredients\n- 16g carbohydrates: simple and complex natural carbohydrates\n- 200mg electrolytes: replenish minerals lost in sweat\n- 3g protein: all essential amino acids to reduce muscle fatigue" } ], - "groupId": "nh69j0kgfd5wdqshpdpjgqdh", "options": { - "buttonLabel": "Send", - "isMultipleChoice": true, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "u57y4cl6042u5r34dahfhwus" + "isMultipleChoice": true + } } - ], - "graphCoordinates": { "x": 4425.493571638971, "y": -1989.578763047769 } + ] }, { "id": "oq9jemd1endd8naxzatkkjbb", "title": "", + "graphCoordinates": { "x": 4431.336411421283, "y": -1425.83493478683 }, "blocks": [ { "id": "r5hq4sr8iovxqyixejparma7", + "outgoingEdgeId": "xevaekw7nv6zfmkijsortgk5", "type": "picture choice input", "items": [ { "id": "zc1c5ahukxhalbu9p6oqz4tw", - "type": 3, - "title": "Chocolate Energy Waffle", - "blockId": "r5hq4sr8iovxqyixejparma7", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/naak-energy-waffle-energy-waffle-chocolate-40633672728880_600x.png?v=1677355844", + "title": "Chocolate Energy Waffle", "description": "- 140 calories: quick energy boost from high-quality ingredients\n- 17g carbohydrates: simple and complex natural carbohydrates\n- 200mg electrolytes: replenish minerals lost in sweat\n- 3g protein: all essential amino acids to reduce muscle fatigue", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "pkmq8tabhm9nqi5oo8cmz2gz", - "value": "Chocolate", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Chocolate" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } }, { "id": "j953heg9dx2xzdhwk773fha0", - "type": 3, - "title": "Vanilla Energy Waffle", - "blockId": "r5hq4sr8iovxqyixejparma7", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/naak-energy-waffle-energy-waffle-vanilla-40633799246128_600x.png?v=1677355758", + "title": "Vanilla Energy Waffle", "description": "- 140 calories: quick energy boost from high-quality ingredients\n- 16g carbohydrates: simple and complex natural carbohydrates\n- 210mg electrolytes: replenish minerals lost in sweat\n- 4g protein: all essential amino acids to reduce muscle fatigue", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "l4cye2ndoqcdmhiylc4zyho9", - "value": "Vanilla", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Vanilla" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } }, { "id": "z8brrxkvbxfxfwryit6bjqb9", - "type": 3, - "title": "Maple Syrup Energy Waffle", - "blockId": "r5hq4sr8iovxqyixejparma7", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/naak-energy-waffle-energy-waffle-maple-syrup-40633783877936_600x.png?v=1678034628", + "title": "Maple Syrup Energy Waffle", "description": "- 140 calories: quick energy boost from high-quality ingredients\n- 16g carbohydrates: simple and complex natural carbohydrates\n- 210mg electrolytes: replenish minerals lost in sweat\n- 4g protein: all essential amino acids to reduce muscle fatigue", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "l4cye2ndoqcdmhiylc4zyho9", - "value": "Maple Syrup", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Maple Syrup" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } }, { "id": "ex1l3ynwk2iiz6wmavsr3l8y", - "type": 3, - "title": "Peanut Butter & Chocolate Bar", - "blockId": "r5hq4sr8iovxqyixejparma7", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/PACKS_600x.png?v=1678223153", + "title": "Peanut Butter & Chocolate Bar", "description": "- 200 calories: long-lasting energy with no sugar crash\n- 27g carbohydrates: simple and complex natural carbohydrates\n- 445mg electrolytes: replenish minerals lost in sweat\n- 7g protein: essential amino acids to reduce muscle fatigue", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "ez9ppwlsy77hzum27l7vxnu6", - "value": "Nuts", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Nuts" }, { "id": "s4khjdtxicrwpdelg41fs6d8", - "value": "Chocolate", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Chocolate" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } }, { "id": "x2octz0rxe0s8ach4zdf2gch", - "type": 3, - "title": "Mocha Energy Bar", - "blockId": "kl9cacv5pde99co9w9d9pmmq", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/98_600x.png?v=1678223518", + "title": "Mocha Energy Bar", "description": "- 180 calories: long-lasting energy with no sugar crash\n- 65mg caffeine: increase focus and stamina\n- 29g carbohydrates: simple and complex natural carbohydrates\n- 480mg electrolytes: replenish minerals lost in sweat\n- 7g protein: essential amino acids to reduce muscle fatigue", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "mz7hwzkpjycizegz5216as63", - "value": "Coffee", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Coffee" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } }, { "id": "hxcd05xn9rzhrvreh9bjqdbr", - "type": 3, - "title": "Caramel Macchiato Bar", - "blockId": "kl9cacv5pde99co9w9d9pmmq", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/101_600x.png?v=1678223652", + "title": "Caramel Macchiato Bar", "description": "- 180 calories: long-lasting energy with no sugar crash\n- 65mg caffeine: increase focus and stamina\n- 29g carbohydrates: simple and complex natural carbohydrates\n- 480mg electrolytes: replenish minerals lost in sweat\n- 7g protein: essential amino acids to reduce muscle fatigue", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "mz7hwzkpjycizegz5216as63", - "value": "Caramel", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Caramel" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } }, { "id": "qw9p8xrmvli4xsn019cddxbh", - "type": 3, - "title": "Berries & Nuts Bar", - "blockId": "kl9cacv5pde99co9w9d9pmmq", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/92_600x.png?v=1678222928", + "title": "Berries & Nuts Bar", "description": "- 200 calories: long-lasting energy with no sugar crash\n- 28g carbohydrates: simple and complex natural carbohydrates\n- 405mg electrolytes: replenish minerals lost in sweat\n- 7g protein: essential amino acids to reduce muscle fatigue", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "mz7hwzkpjycizegz5216as63", - "value": "Berries", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Berries" }, { "id": "m48fa084tvurk9nzcibm0d2d", - "value": "Nuts", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Nuts" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } } ], - "groupId": "oq9jemd1endd8naxzatkkjbb", "options": { - "buttonLabel": "Send", - "isMultipleChoice": true, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "xevaekw7nv6zfmkijsortgk5" + "isMultipleChoice": true + } } - ], - "graphCoordinates": { "x": 4431.336411421283, "y": -1425.8349347868302 } + ] } ], - "variables": [ - { "id": "vp1r2yrb6xgmi2aq3x6x73vaz", "name": "Name" }, - { "id": "vhbd5800sc98l1lk8wf7fe742", "name": "Flavour" }, - { "id": "vma96g9rw8oaosc0ei2iacqig", "name": "Continent" }, - { "id": "vlgo7i0r514jkd9a9f24otm4m", "name": "Protein source" }, - { "id": "vgz8fr5u7q0p4jdef1krz2vm3", "name": "Goals" }, - { "id": "vz4fqc40gkk99h0qeus2tjwhx", "name": "Diet restrictions" } - ], "edges": [ { "id": "aj9vphwwva87uh9f1w7mm999", - "to": { "groupId": "gafkgilrandk3cwydpzq21oy" }, - "from": { - "blockId": "li6nyybzaojujnz241jv5rr1", - "groupId": "af8ny8rpbejnlkitr2s29ro1" - } + "from": { "eventId": "af8ny8rpbejnlkitr2s29ro1" }, + "to": { "groupId": "gafkgilrandk3cwydpzq21oy" } }, { "id": "gnh6uloe0a8ciwahgq0gnx4k", - "to": { "groupId": "buk5exhk13g3npkaiaw87tvs" }, - "from": { - "blockId": "xobx3g928f9zj220n5qe1ih6", - "groupId": "gafkgilrandk3cwydpzq21oy" - } + "from": { "blockId": "xobx3g928f9zj220n5qe1ih6" }, + "to": { "groupId": "buk5exhk13g3npkaiaw87tvs" } }, { "id": "zlab2pp5tfih56jcw6vtjs03", - "to": { "groupId": "z40ynhndj5r4038u3ha39c14" }, - "from": { - "blockId": "lwtynqjykiem5zdtns3fwhu2", - "groupId": "buk5exhk13g3npkaiaw87tvs" - } + "from": { "blockId": "lwtynqjykiem5zdtns3fwhu2" }, + "to": { "groupId": "z40ynhndj5r4038u3ha39c14" } }, { "id": "hwbbi48q0u8xnlqbpq53cdju", - "to": { "groupId": "mncr0l180vs07gc1difaovjx" }, - "from": { - "blockId": "zesp4ro7ltjmh64sn8d4912c", - "groupId": "z40ynhndj5r4038u3ha39c14" - } + "from": { "blockId": "zesp4ro7ltjmh64sn8d4912c" }, + "to": { "groupId": "mncr0l180vs07gc1difaovjx" } }, { "id": "bf16js59cs2hmicrkbc7nv1q", - "to": { "groupId": "mqt2qcyld5du8ecmbphjxpwu" }, - "from": { - "blockId": "mfz600vwgfjcisahf5tdnz7l", - "groupId": "mncr0l180vs07gc1difaovjx" - } + "from": { "blockId": "mfz600vwgfjcisahf5tdnz7l" }, + "to": { "groupId": "mqt2qcyld5du8ecmbphjxpwu" } }, { "id": "umuilo9l4t27kcpnx5ybnr08", - "to": { "groupId": "y2jfx62oea6q0rxjby9tzqi6" }, - "from": { - "blockId": "ogy9ng7q9jglxg2ivb39tzeh", - "groupId": "n3zqahk50kb05th7zbycin5w" - } + "from": { "blockId": "ogy9ng7q9jglxg2ivb39tzeh" }, + "to": { "groupId": "y2jfx62oea6q0rxjby9tzqi6" } }, { "id": "i3za7jvz8g7m7588g7i1ue9i", - "to": { "groupId": "x14lejru0gv2c7afc68nuezy" }, - "from": { - "blockId": "p71conb1ln7f3m41ca6pxetz", - "groupId": "y2jfx62oea6q0rxjby9tzqi6" - } + "from": { "blockId": "p71conb1ln7f3m41ca6pxetz" }, + "to": { "groupId": "x14lejru0gv2c7afc68nuezy" } }, { "id": "erx9wo3svpfxs2cteknbhfaz", - "to": { "groupId": "q9z4xrzf9z7sgl69rrrhiyoh" }, - "from": { - "blockId": "cbcz08dj67rkx8k1cbj2ybz8", - "groupId": "x14lejru0gv2c7afc68nuezy" - } + "from": { "blockId": "cbcz08dj67rkx8k1cbj2ybz8" }, + "to": { "groupId": "q9z4xrzf9z7sgl69rrrhiyoh" } }, { "id": "drxu7gyz2trqjtv5nnfv1x9l", - "to": { "groupId": "n3zqahk50kb05th7zbycin5w" }, - "from": { - "blockId": "cx2v8nfb4kxvk58bbu6w85uy", - "groupId": "mqt2qcyld5du8ecmbphjxpwu" - } + "from": { "blockId": "cx2v8nfb4kxvk58bbu6w85uy" }, + "to": { "groupId": "n3zqahk50kb05th7zbycin5w" } }, { "id": "iszgvtfetursv4ktm9mdtxhy", - "to": { "groupId": "qjoc17kdjrpkaoxesoeqzmjt" }, "from": { - "itemId": "yffl8ja17g5fr9rpi4d0cl36", "blockId": "l16y2qzslakgl2up4jybj5m4", - "groupId": "g27q0psplvzht5xg9erxw738" - } + "itemId": "yffl8ja17g5fr9rpi4d0cl36" + }, + "to": { "groupId": "qjoc17kdjrpkaoxesoeqzmjt" } }, { "id": "vnqu52ld3usezpnrgu2l7ul0", - "to": { "groupId": "g27q0psplvzht5xg9erxw738" }, - "from": { - "blockId": "vdzzxwdocfxdvqnqwwvjymzw", - "groupId": "q9z4xrzf9z7sgl69rrrhiyoh" - } + "from": { "blockId": "vdzzxwdocfxdvqnqwwvjymzw" }, + "to": { "groupId": "g27q0psplvzht5xg9erxw738" } }, { "id": "apvktyu7x3wks4z9xflecu91", - "to": { "groupId": "b94nqmbqp0ezfazu0kekqioa" }, - "from": { - "blockId": "pxb59zd4bjqmva9er47l6x15", - "groupId": "qjoc17kdjrpkaoxesoeqzmjt" - } + "from": { "blockId": "pxb59zd4bjqmva9er47l6x15" }, + "to": { "groupId": "b94nqmbqp0ezfazu0kekqioa" } }, { "id": "j6d1kch478t4ov4bbz1yshhl", - "to": { "groupId": "b94nqmbqp0ezfazu0kekqioa" }, - "from": { - "blockId": "l16y2qzslakgl2up4jybj5m4", - "groupId": "g27q0psplvzht5xg9erxw738" - } + "from": { "blockId": "l16y2qzslakgl2up4jybj5m4" }, + "to": { "groupId": "b94nqmbqp0ezfazu0kekqioa" } }, { "id": "lk5ghbqljt2f43w1d47rowns", - "to": { "groupId": "ho2hskojxz8ac631driot5kh" }, "from": { - "itemId": "vyjgfexvyrijez06kpxi1mva", "blockId": "okl6akklm8djknl7lofqr3cm", - "groupId": "b94nqmbqp0ezfazu0kekqioa" - } + "itemId": "vyjgfexvyrijez06kpxi1mva" + }, + "to": { "groupId": "ho2hskojxz8ac631driot5kh" } }, { "id": "xblzklrcdkmxeu8y5xbicz09", - "to": { "groupId": "co7gxaoxtf1xukmgbby73u6v" }, - "from": { - "blockId": "okl6akklm8djknl7lofqr3cm", - "groupId": "b94nqmbqp0ezfazu0kekqioa" - } + "from": { "blockId": "okl6akklm8djknl7lofqr3cm" }, + "to": { "groupId": "co7gxaoxtf1xukmgbby73u6v" } }, { "id": "r2cx0lm6xkzjgv1hycekcp25", - "to": { "groupId": "w3f8ya4hmkuab55dh2ogsvtz" }, "from": { - "itemId": "okd2sbmr1mgoubpf7kdjr9ey", "blockId": "styhci2fh3yi17b7cmv3x8cc", - "groupId": "co7gxaoxtf1xukmgbby73u6v" - } + "itemId": "okd2sbmr1mgoubpf7kdjr9ey" + }, + "to": { "groupId": "w3f8ya4hmkuab55dh2ogsvtz" } }, { "id": "dyvib6xwm0jieqp37mac1diq", - "to": { "groupId": "rcr9zqm4lnevx5dqf9k23m5u" }, - "from": { - "blockId": "styhci2fh3yi17b7cmv3x8cc", - "groupId": "co7gxaoxtf1xukmgbby73u6v" - } + "from": { "blockId": "styhci2fh3yi17b7cmv3x8cc" }, + "to": { "groupId": "rcr9zqm4lnevx5dqf9k23m5u" } }, { "id": "choo26oflyx4c2em6msd7bum", - "to": { "groupId": "jdd417tfj6hdu4pj6bkksgwa" }, "from": { - "itemId": "yw3cil1rvf3iduc0mko0c8og", "blockId": "m8o93n92t5wcy5bi8tgauc5f", - "groupId": "rcr9zqm4lnevx5dqf9k23m5u" - } + "itemId": "yw3cil1rvf3iduc0mko0c8og" + }, + "to": { "groupId": "jdd417tfj6hdu4pj6bkksgwa" } }, { "id": "l8g4gblcmzmiv4fsgjufviws", - "to": { "groupId": "rcr9zqm4lnevx5dqf9k23m5u" }, - "from": { - "blockId": "ph2jgb8r0lyui0j6v3jtifo2", - "groupId": "w3f8ya4hmkuab55dh2ogsvtz" - } + "from": { "blockId": "ph2jgb8r0lyui0j6v3jtifo2" }, + "to": { "groupId": "rcr9zqm4lnevx5dqf9k23m5u" } }, { "id": "achb4p7q0hnox3hy62ru7dtx", - "to": { "groupId": "nh69j0kgfd5wdqshpdpjgqdh" }, "from": { - "itemId": "kb6eovh6di5xqnkegms0ljee", "blockId": "zzws62fe3zha7x7kln3kp0ko", - "groupId": "ho2hskojxz8ac631driot5kh" - } + "itemId": "kb6eovh6di5xqnkegms0ljee" + }, + "to": { "groupId": "nh69j0kgfd5wdqshpdpjgqdh" } }, { "id": "pk7d58d6qmxrylte434czz4x", - "to": { "groupId": "oq9jemd1endd8naxzatkkjbb" }, - "from": { - "blockId": "zzws62fe3zha7x7kln3kp0ko", - "groupId": "ho2hskojxz8ac631driot5kh" - } + "from": { "blockId": "zzws62fe3zha7x7kln3kp0ko" }, + "to": { "groupId": "oq9jemd1endd8naxzatkkjbb" } }, { "id": "xevaekw7nv6zfmkijsortgk5", - "to": { "groupId": "w3f8ya4hmkuab55dh2ogsvtz" }, - "from": { - "blockId": "r5hq4sr8iovxqyixejparma7", - "groupId": "oq9jemd1endd8naxzatkkjbb" - } + "from": { "blockId": "r5hq4sr8iovxqyixejparma7" }, + "to": { "groupId": "w3f8ya4hmkuab55dh2ogsvtz" } }, { "id": "u57y4cl6042u5r34dahfhwus", - "to": { "groupId": "w3f8ya4hmkuab55dh2ogsvtz" }, - "from": { - "blockId": "np8236cce7e79h8i21hg5ncp", - "groupId": "nh69j0kgfd5wdqshpdpjgqdh" - } + "from": { "blockId": "np8236cce7e79h8i21hg5ncp" }, + "to": { "groupId": "w3f8ya4hmkuab55dh2ogsvtz" } } ], + "variables": [ + { "id": "vp1r2yrb6xgmi2aq3x6x73vaz", "name": "Name" }, + { "id": "vhbd5800sc98l1lk8wf7fe742", "name": "Flavour" }, + { "id": "vma96g9rw8oaosc0ei2iacqig", "name": "Continent" }, + { "id": "vlgo7i0r514jkd9a9f24otm4m", "name": "Protein source" }, + { "id": "vgz8fr5u7q0p4jdef1krz2vm3", "name": "Goals" }, + { "id": "vz4fqc40gkk99h0qeus2tjwhx", "name": "Diet restrictions" } + ], "theme": { + "general": { + "background": { "type": "Color", "content": "#010000" } + }, "chat": { + "hostBubbles": { "backgroundColor": "#1B1A1A", "color": "#ffffff" }, + "guestBubbles": { "color": "#010000", "backgroundColor": "#FFFFFF" }, + "buttons": { "backgroundColor": "#FFEF02", "color": "#010000" }, "inputs": { - "color": "#ffffff", "backgroundColor": "#1B1A1A", + "color": "#ffffff", "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#010000", "backgroundColor": "#FFEF02" }, - "roundness": "medium", - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#ffffff", "backgroundColor": "#1B1A1A" }, - "guestBubbles": { "color": "#010000", "backgroundColor": "#FFFFFF" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#010000" } + } } }, "selectedThemeTemplateId": "typebot-dark", - "settings": { - "general": { - "rememberUser": { "isEnabled": false }, - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isHideQueryParamsEnabled": 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 } - }, + "settings": {}, + "createdAt": "2023-11-06T17:16:37.483Z", + "updatedAt": "2023-11-06T17:20:11.754Z", + "icon": "๐Ÿซ", + "folderId": null, "publicId": null, "customDomain": null, "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/quiz.json b/apps/builder/public/templates/quiz.json index 8196602398..4e1a6c1e26 100644 --- a/apps/builder/public/templates/quiz.json +++ b/apps/builder/public/templates/quiz.json @@ -1,33 +1,24 @@ { - "id": "cl1qz4luj04007w1ai7rk1j5q", - "version": "4", - "createdAt": "2022-04-08T22:02:30.427Z", - "updatedAt": "2022-04-08T23:03:34.726Z", - "icon": "๐Ÿ•น๏ธ", + "version": "6", + "id": "clon582of00031avnefkrpwrl", "name": "Digital Marketing Quiz", - "folderId": null, - "groups": [ + "events": [ { "id": "cl1qz4lui00017w1a505z15p0", - "blocks": [ - { - "id": "cl1qz4lui00027w1a19prdgzd", - "type": "start", - "label": "Start", - "groupId": "cl1qz4lui00017w1a505z15p0", - "outgoingEdgeId": "cl1r17gv3006h2e6dc9e7xob7" - } - ], - "title": "Start", - "graphCoordinates": { "x": -541.1926699141732, "y": -27.363674321503076 } - }, + "outgoingEdgeId": "cl1r17gv3006h2e6dc9e7xob7", + "graphCoordinates": { "x": -541.1926699141732, "y": -27.36367432150308 }, + "type": "start" + } + ], + "groups": [ { "id": "cl1r09bc6000h2e6dqml18p4p", + "title": "Q1", + "graphCoordinates": { "x": 3, "y": 180 }, "blocks": [ { "id": "cl1r0bva2000y2e6d2g88vmjk", "type": "Set variable", - "groupId": "cl1r09bc6000h2e6dqml18p4p", "options": { "variableId": "vcl1r0bxdj000z2e6d65u7n41b", "expressionToEvaluate": "0" @@ -36,7 +27,6 @@ { "id": "cl1r09bcc000i2e6dyyvskx75", "type": "text", - "groupId": "cl1r09bc6000h2e6dqml18p4p", "content": { "richText": [ { @@ -48,49 +38,35 @@ }, { "id": "cl1r09dl9000j2e6dhkc2h97y", + "outgoingEdgeId": "cl1r0cfjt00122e6dzwtamycl", "type": "choice input", "items": [ - { - "id": "cl1r09dl9000k2e6dvf7llzkd", - "type": 0, - "blockId": "cl1r09dl9000j2e6dhkc2h97y", - "content": "Send Email Out" - }, + { "id": "cl1r09dl9000k2e6dvf7llzkd", "content": "Send Email Out" }, { "id": "cl1r0a80k000l2e6dngppwyhm", - "type": 0, - "blockId": "cl1r09dl9000j2e6dhkc2h97y", "content": "Serial Editorial Output" }, { "id": "cl1r0adei000m2e6dfc8w5y4k", - "type": 0, - "blockId": "cl1r09dl9000j2e6dhkc2h97y", - "content": "Search Engine Optimization", - "outgoingEdgeId": "cl1r0dfip00152e6doo9duexn" + "outgoingEdgeId": "cl1r0dfip00152e6doo9duexn", + "content": "Search Engine Optimization" }, { "id": "cl1r0aiks000n2e6dc31e2db6", - "type": 0, - "blockId": "cl1r09dl9000j2e6dhkc2h97y", "content": "Search Expectation Order" } - ], - "groupId": "cl1r09bc6000h2e6dqml18p4p", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, - "outgoingEdgeId": "cl1r0cfjt00122e6dzwtamycl" + ] } - ], - "title": "Q1", - "graphCoordinates": { "x": 3, "y": 180 } + ] }, { "id": "cl1r0b3ww000q2e6d4aihat41", + "title": "Q2", + "graphCoordinates": { "x": 457.878775226166, "y": 159.8383669682208 }, "blocks": [ { "id": "cl1r0e8gq00172e6dq0bpxqsc", "type": "Set variable", - "groupId": "cl1r0b3ww000q2e6d4aihat41", "options": { "variableId": "vcl1r0bxdj000z2e6d65u7n41b", "expressionToEvaluate": "{{Score}} + 5" @@ -99,7 +75,6 @@ { "id": "cl1r0d8zi00142e6d4tl2yenk", "type": "text", - "groupId": "cl1r0b3ww000q2e6d4aihat41", "content": { "richText": [ { "type": "p", "children": [{ "text": "Well done!" }] } @@ -109,7 +84,6 @@ { "id": "cl1r0bgit000x2e6dvdre9wsj", "type": "text", - "groupId": "cl1r0b3ww000q2e6d4aihat41", "content": { "richText": [ { "type": "p", "children": [{ "text": "What is anchor text?" }] } @@ -118,49 +92,38 @@ }, { "id": "cl1r0b3x5000r2e6dqk8gzoim", + "outgoingEdgeId": "cl1r0f53y001q2e6dvuq434ru", "type": "choice input", "items": [ { "id": "cl1r0b3x5000s2e6dyq6bklbf", - "type": 0, - "blockId": "cl1r0b3x5000r2e6dqk8gzoim", - "content": "The visible text that is hyperlinked to another page", - "outgoingEdgeId": "cl1r0i4dj001r2e6dgb96tx9q" + "outgoingEdgeId": "cl1r0i4dj001r2e6dgb96tx9q", + "content": "The visible text that is hyperlinked to another page" }, { "id": "cl1r0b6jd000t2e6dkp3dxpp9", - "type": 0, - "blockId": "cl1r0b3x5000r2e6dqk8gzoim", "content": "The text in the top left of a webpage" }, { "id": "cl1r0b835000u2e6d22rw2gb5", - "type": 0, - "blockId": "cl1r0b3x5000r2e6dqk8gzoim", "content": "The most prominent text on a page, used by search engines to assign a title to the page" }, { "id": "cl1r0b9tl000v2e6dkligryj3", - "type": 0, - "blockId": "cl1r0b3x5000r2e6dqk8gzoim", "content": "A slogan that sticks in a consumerโ€™s mind" } - ], - "groupId": "cl1r0b3ww000q2e6d4aihat41", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, - "outgoingEdgeId": "cl1r0f53y001q2e6dvuq434ru" + ] } - ], - "title": "Q2", - "graphCoordinates": { "x": 457.878775226166, "y": 159.83836696822075 } + ] }, { "id": "cl1r0erik00182e6dfzezujj0", + "title": "Q3", + "graphCoordinates": { "x": 876.6414289028069, "y": 165.4393876130828 }, "blocks": [ { "id": "cl1r0eril00192e6d9yrtownz", "type": "Set variable", - "groupId": "cl1r0erik00182e6dfzezujj0", "options": { "variableId": "vcl1r0bxdj000z2e6d65u7n41b", "expressionToEvaluate": "{{Score}} + 5" @@ -169,7 +132,6 @@ { "id": "cl1r0eril001b2e6dh43cqhv5", "type": "text", - "groupId": "cl1r0erik00182e6dfzezujj0", "content": { "richText": [ { "type": "p", "children": [{ "text": "Well done!" }] } @@ -179,7 +141,6 @@ { "id": "cl1r0eril001d2e6d3gay9cls", "type": "text", - "groupId": "cl1r0erik00182e6dfzezujj0", "content": { "richText": [ { "type": "p", "children": [{ "text": "What is a persona ?" }] } @@ -188,49 +149,38 @@ }, { "id": "cl1r0eril001f2e6dk0fd0qpw", + "outgoingEdgeId": "cl1r0khb6002c2e6ddssbpj9z", "type": "choice input", "items": [ { "id": "cl1r0erim001g2e6d5zzn8q22", - "type": 0, - "blockId": "cl1r0eril001f2e6dk0fd0qpw", "content": "Your target audience" }, { "id": "cl1r0erim001h2e6dnwtiturl", - "type": 0, - "blockId": "cl1r0eril001f2e6dk0fd0qpw", "content": "Someone who joins your mailing list" }, { "id": "cl1r0erim001i2e6dbfhck09o", - "type": 0, - "blockId": "cl1r0eril001f2e6dk0fd0qpw", "content": "A repeat customer" }, { "id": "cl1r0erim001j2e6d2waa3374", - "type": 0, - "blockId": "cl1r0eril001f2e6dk0fd0qpw", - "content": "A fictional representation of a group of customers", - "outgoingEdgeId": "cl1r0k27y00262e6dflgcp3wa" + "outgoingEdgeId": "cl1r0k27y00262e6dflgcp3wa", + "content": "A fictional representation of a group of customers" } - ], - "groupId": "cl1r0erik00182e6dfzezujj0", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, - "outgoingEdgeId": "cl1r0khb6002c2e6ddssbpj9z" + ] } - ], - "title": "Q3", - "graphCoordinates": { "x": 876.6414289028069, "y": 165.43938761308277 } + ] }, { "id": "cl1r0j8u1001t2e6d42mjfcqo", + "title": "Q4", + "graphCoordinates": { "x": 1262.722245418697, "y": 156.2726513569937 }, "blocks": [ { "id": "cl1r0j8u2001u2e6dgdpvrnz5", "type": "Set variable", - "groupId": "cl1r0j8u1001t2e6d42mjfcqo", "options": { "variableId": "vcl1r0bxdj000z2e6d65u7n41b", "expressionToEvaluate": "{{Score}} + 5" @@ -239,7 +189,6 @@ { "id": "cl1r0j8u2001w2e6d3wnpzcj5", "type": "text", - "groupId": "cl1r0j8u1001t2e6d42mjfcqo", "content": { "richText": [ { "type": "p", "children": [{ "text": "Well done!" }] } @@ -249,7 +198,6 @@ { "id": "cl1r0j8u2001y2e6dr24ieifw", "type": "text", - "groupId": "cl1r0j8u1001t2e6d42mjfcqo", "content": { "richText": [ { @@ -261,57 +209,46 @@ }, { "id": "cl1r0j8u200202e6dun2d04gu", + "outgoingEdgeId": "cl1r0ktet002i2e6d5sh8gd2b", "type": "choice input", "items": [ { "id": "cl1r0j8u200212e6dov1xy5m4", - "type": 0, - "blockId": "cl1r0j8u200202e6dun2d04gu", "content": "Consequence To Advert" }, { "id": "cl1r0j8u300222e6dnj0i5fm8", - "type": 0, - "blockId": "cl1r0j8u200202e6dun2d04gu", - "content": "Call To Action", - "outgoingEdgeId": "cl1r0lm4e002m2e6d0g3h9pm7" + "outgoingEdgeId": "cl1r0lm4e002m2e6d0g3h9pm7", + "content": "Call To Action" }, { "id": "cl1r0j8u300232e6dxd8abojt", - "type": 0, - "blockId": "cl1r0j8u200202e6dun2d04gu", "content": "Computer Tracked Actions" }, { "id": "cl1r0j8u300242e6d0pki60w6", - "type": 0, - "blockId": "cl1r0j8u200202e6dun2d04gu", "content": "Characteristic Tracking Advert" } - ], - "groupId": "cl1r0j8u1001t2e6d42mjfcqo", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, - "outgoingEdgeId": "cl1r0ktet002i2e6d5sh8gd2b" + ] } - ], - "title": "Q4", - "graphCoordinates": { "x": 1262.7222454186965, "y": 156.27265135699366 } + ] }, { "id": "cl1r0c85100102e6d7uohf0cu", + "title": "Q1 - Wrong", + "graphCoordinates": { "x": 79.08, "y": 821.49 }, "blocks": [ { "id": "cl1r0c85i00112e6d8iwtrpvb", "type": "text", - "groupId": "cl1r0c85100102e6d7uohf0cu", "content": { "richText": [{ "type": "p", "children": [{ "text": "WRONG!" }] }] } }, { "id": "cl1r0crx600132e6d0u54j506", + "outgoingEdgeId": "cl1r0dibf00162e6dwuvli71j", "type": "text", - "groupId": "cl1r0c85100102e6d7uohf0cu", "content": { "richText": [ { @@ -321,28 +258,26 @@ ] } ] - }, - "outgoingEdgeId": "cl1r0dibf00162e6dwuvli71j" + } } - ], - "title": "Q1 - Wrong", - "graphCoordinates": { "x": 172.5253073532824, "y": 1013.0204128972396 } + ] }, { "id": "cl1r0exdi001l2e6drdwj3u96", + "title": "Q2 - Wrong", + "graphCoordinates": { "x": 542.94, "y": 996.75 }, "blocks": [ { "id": "cl1r0exdi001m2e6d7kge562x", "type": "text", - "groupId": "cl1r0exdi001l2e6drdwj3u96", "content": { "richText": [{ "type": "p", "children": [{ "text": "WRONG!" }] }] } }, { "id": "cl1r0exdi001o2e6d70s7si5y", + "outgoingEdgeId": "cl1r0ic5f001s2e6dw777scrq", "type": "text", - "groupId": "cl1r0exdi001l2e6drdwj3u96", "content": { "richText": [ { @@ -354,28 +289,26 @@ ] } ] - }, - "outgoingEdgeId": "cl1r0ic5f001s2e6dw777scrq" + } } - ], - "title": "Q2 - Wrong", - "graphCoordinates": { "x": 636.9595917420552, "y": 991.1969380654137 } + ] }, { "id": "cl1r0k3tq00272e6d1fwyajjx", + "title": "Q3 - Wrong", + "graphCoordinates": { "x": 916.73, "y": 925.61 }, "blocks": [ { "id": "cl1r0k3tq00282e6dl0av81kz", "type": "text", - "groupId": "cl1r0k3tq00272e6d1fwyajjx", "content": { "richText": [{ "type": "p", "children": [{ "text": "WRONG!" }] }] } }, { "id": "cl1r0k3tq002a2e6dv3s1eb6d", + "outgoingEdgeId": "cl1r0l7oa002j2e6dgtx0y1gh", "type": "text", - "groupId": "cl1r0k3tq00272e6d1fwyajjx", "content": { "richText": [ { @@ -387,28 +320,26 @@ ] } ] - }, - "outgoingEdgeId": "cl1r0l7oa002j2e6dgtx0y1gh" + } } - ], - "title": "Q3 - Wrong", - "graphCoordinates": { "x": 1050.202041289724, "y": 980.9697981906751 } + ] }, { "id": "cl1r0kqof002d2e6doqhpnuqy", + "title": "Q4 - Wrong", + "graphCoordinates": { "x": 1316.88, "y": 861.75 }, "blocks": [ { "id": "cl1r0kqof002e2e6dzjcw0kvs", "type": "text", - "groupId": "cl1r0kqof002d2e6doqhpnuqy", "content": { "richText": [{ "type": "p", "children": [{ "text": "WRONG!" }] }] } }, { "id": "cl1r0kqog002g2e6dizmxvz64", + "outgoingEdgeId": "cl1r0p4my00312e6d1wsgwohi", "type": "text", - "groupId": "cl1r0kqof002d2e6doqhpnuqy", "content": { "richText": [ { @@ -420,20 +351,18 @@ ] } ] - }, - "outgoingEdgeId": "cl1r0p4my00312e6d1wsgwohi" + } } - ], - "title": "Q4 - Wrong", - "graphCoordinates": { "x": 1443.1059151009042, "y": 986.0153096729298 } + ] }, { "id": "cl1r0lfb5002k2e6dd6as5kj5", + "title": "Filter", + "graphCoordinates": { "x": 1647.16, "y": 167.69 }, "blocks": [ { "id": "cl1r0lo97002n2e6dfx7fohju", "type": "Set variable", - "groupId": "cl1r0lfb5002k2e6dd6as5kj5", "options": { "variableId": "vcl1r0bxdj000z2e6d65u7n41b", "expressionToEvaluate": "{{Score}} + 5" @@ -445,60 +374,53 @@ "items": [ { "id": "cl1r0oqrr002z2e6dl821aaow", - "type": 1, - "blockId": "cl1r0oqrr002y2e6dsg0sa64g", + "outgoingEdgeId": "cl1r0rt88003a2e6dgq6beaq1", "content": { + "logicalOperator": "AND", "comparisons": [ { "id": "cl1r0osjs00302e6dc60nuk4y", - "value": "14", "variableId": "vcl1r0bxdj000z2e6d65u7n41b", - "comparisonOperator": "Greater than" + "comparisonOperator": "Greater than", + "value": "14" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "cl1r0rt88003a2e6dgq6beaq1" + ] + } } - ], - "groupId": "cl1r0lfb5002k2e6dd6as5kj5" + ] }, { "id": "cl1r0qvwy00342e6d7ww0oqar", + "outgoingEdgeId": "cl1r0sg9m003i2e6dbsc4cqjn", "type": "Condition", "items": [ { "id": "cl1r0qvwy00352e6dui5itgd1", - "type": 1, - "blockId": "cl1r0qvwy00342e6d7ww0oqar", + "outgoingEdgeId": "cl1r0s6qt003d2e6d5tk2um7y", "content": { + "logicalOperator": "AND", "comparisons": [ { "id": "cl1r0qx3k00362e6dg30jgpdt", - "value": "9", "variableId": "vcl1r0bxdj000z2e6d65u7n41b", - "comparisonOperator": "Greater than" + "comparisonOperator": "Greater than", + "value": "9" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "cl1r0s6qt003d2e6d5tk2um7y" + ] + } } - ], - "groupId": "cl1r0lfb5002k2e6dd6as5kj5", - "outgoingEdgeId": "cl1r0sg9m003i2e6dbsc4cqjn" + ] } - ], - "title": "Filter", - "graphCoordinates": { "x": 1625.4393876130825, "y": 163.71203897007632 } + ] }, { "id": "cl1r0mn2p002p2e6dijqbjzlh", + "title": "Result", + "graphCoordinates": { "x": 2508.594129051806, "y": 405.664166830421 }, "blocks": [ { "id": "cl1r0mn3t002q2e6dcmv4bzth", "type": "text", - "groupId": "cl1r0mn2p002p2e6dijqbjzlh", "content": { "richText": [ { @@ -511,7 +433,6 @@ { "id": "cl1r0nkdx002r2e6dwv0wclo0", "type": "text", - "groupId": "cl1r0mn2p002p2e6dijqbjzlh", "content": { "richText": [ { "type": "p", "children": [{ "text": "Try again?" }] } @@ -524,50 +445,40 @@ "items": [ { "id": "cl1r0nt85002t2e6dvb7si7ny", - "type": 0, - "blockId": "cl1r0nt85002s2e6dloupnhdq", - "content": "Yes!", - "outgoingEdgeId": "cl1r15gko005i2e6dn6rhifwe" + "outgoingEdgeId": "cl1r15gko005i2e6dn6rhifwe", + "content": "Yes!" }, - { - "id": "cl1r0nveb002u2e6dotjk6nuf", - "type": 0, - "blockId": "cl1r0nt85002s2e6dloupnhdq", - "content": "No, bye!" - } - ], - "groupId": "cl1r0mn2p002p2e6dijqbjzlh", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + { "id": "cl1r0nveb002u2e6dotjk6nuf", "content": "No, bye!" } + ] } - ], - "title": "Result", - "graphCoordinates": { "x": 2508.594129051806, "y": 405.664166830421 } + ] }, { "id": "cl1r0rgex00382e6dkayjbys6", + "title": "Great score", + "graphCoordinates": { "x": 1999.325745846056, "y": 159.3910979368924 }, "blocks": [ { "id": "cl1r0rggf00392e6dcc941700", + "outgoingEdgeId": "cl1r0s9g8003e2e6d5if2ywz9", "type": "text", - "groupId": "cl1r0rgex00382e6dkayjbys6", "content": { "richText": [ { "type": "p", "children": [{ "text": "Well done ๐Ÿ‘" }] } ] - }, - "outgoingEdgeId": "cl1r0s9g8003e2e6d5if2ywz9" + } } - ], - "title": "Great score", - "graphCoordinates": { "x": 1999.3257458460557, "y": 159.39109793689235 } + ] }, { "id": "cl1r0rvak003b2e6dejcdrooq", + "title": "Medium score", + "graphCoordinates": { "x": 2008.44697061989, "y": 315.9721232210492 }, "blocks": [ { "id": "cl1r0rvce003c2e6diusd3pxq", + "outgoingEdgeId": "cl1r0sarx003f2e6dbzmed9te", "type": "text", - "groupId": "cl1r0rvak003b2e6dejcdrooq", "content": { "richText": [ { @@ -577,20 +488,19 @@ ] } ] - }, - "outgoingEdgeId": "cl1r0sarx003f2e6dbzmed9te" + } } - ], - "title": "Medium score", - "graphCoordinates": { "x": 2008.4469706198897, "y": 315.9721232210492 } + ] }, { "id": "cl1r0seuj003h2e6dandwc43r", + "title": "Bad score", + "graphCoordinates": { "x": 2009.967174748862, "y": 499.9168228267089 }, "blocks": [ { "id": "cl1r0pe0x00332e6dxg6xdt2f", + "outgoingEdgeId": "cl1r0sbzh003g2e6dsqs48aoz", "type": "text", - "groupId": "cl1r0seuj003h2e6dandwc43r", "content": { "richText": [ { @@ -602,37 +512,34 @@ ] } ] - }, - "outgoingEdgeId": "cl1r0sbzh003g2e6dsqs48aoz" + } } - ], - "title": "Bad score", - "graphCoordinates": { "x": 2009.9671747488621, "y": 499.91682282670894 } + ] }, { "id": "cl1r15f68005f2e6dvdtal7cp", + "title": "Restart", + "graphCoordinates": { "x": 2850.766985281865, "y": 609.1892251509271 }, "blocks": [ { "id": "cl1r15f87005g2e6dp3srll8r", "type": "Typebot link", - "groupId": "cl1r15f68005f2e6dvdtal7cp", "options": { - "groupId": "cl1r09bc6000h2e6dqml18p4p", "typebotId": "current", + "groupId": "cl1r09bc6000h2e6dqml18p4p", "mergeResults": false } } - ], - "title": "Restart", - "graphCoordinates": { "x": 2850.766985281865, "y": 609.1892251509271 } + ] }, { "id": "cl1r15w3o005s2e6dr5l7csao", + "title": "Welcome", + "graphCoordinates": { "x": -361.5512664480758, "y": 166.9921185817542 }, "blocks": [ { "id": "cl1r16nes005z2e6d3aj23kfz", "type": "text", - "groupId": "cl1r15w3o005s2e6dr5l7csao", "content": { "richText": [{ "type": "p", "children": [{ "text": "Hi there!" }] }] } @@ -640,7 +547,6 @@ { "id": "cl1r15w5p005t2e6d670v9nbi", "type": "text", - "groupId": "cl1r15w3o005s2e6dr5l7csao", "content": { "richText": [ { @@ -657,7 +563,6 @@ { "id": "cl1r16rt400622e6d32uta7mi", "type": "text", - "groupId": "cl1r15w3o005s2e6dr5l7csao", "content": { "richText": [ { @@ -670,7 +575,6 @@ { "id": "cl1r1708n00662e6dv8900ixk", "type": "text", - "groupId": "cl1r15w3o005s2e6dr5l7csao", "content": { "richText": [ { "type": "p", "children": [{ "bold": true, "text": "Ready?" }] } @@ -683,243 +587,170 @@ "items": [ { "id": "cl1r176e9006a2e6dpvp0974z", - "type": 0, - "blockId": "cl1r176e900692e6d8u3k6sdq", - "content": "Go!", - "outgoingEdgeId": "cl1r17pzv006n2e6dpibxp9th" + "outgoingEdgeId": "cl1r17pzv006n2e6dpibxp9th", + "content": "Go!" } - ], - "groupId": "cl1r15w3o005s2e6dr5l7csao", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] } - ], - "title": "Welcome", - "graphCoordinates": { "x": -361.5512664480758, "y": 166.99211858175423 } + ] } ], - "variables": [{ "id": "vcl1r0bxdj000z2e6d65u7n41b", "name": "Score" }], "edges": [ + { + "id": "cl1r17gv3006h2e6dc9e7xob7", + "from": { "eventId": "cl1qz4lui00017w1a505z15p0" }, + "to": { "groupId": "cl1r15w3o005s2e6dr5l7csao" } + }, { "id": "cl1r0cfjt00122e6dzwtamycl", - "to": { "groupId": "cl1r0c85100102e6d7uohf0cu" }, - "from": { - "blockId": "cl1r09dl9000j2e6dhkc2h97y", - "groupId": "cl1r09bc6000h2e6dqml18p4p" - } + "from": { "blockId": "cl1r09dl9000j2e6dhkc2h97y" }, + "to": { "groupId": "cl1r0c85100102e6d7uohf0cu" } }, { "id": "cl1r0dfip00152e6doo9duexn", - "to": { "groupId": "cl1r0b3ww000q2e6d4aihat41" }, "from": { - "itemId": "cl1r0adei000m2e6dfc8w5y4k", "blockId": "cl1r09dl9000j2e6dhkc2h97y", - "groupId": "cl1r09bc6000h2e6dqml18p4p" - } + "itemId": "cl1r0adei000m2e6dfc8w5y4k" + }, + "to": { "groupId": "cl1r0b3ww000q2e6d4aihat41" } }, { "id": "cl1r0dibf00162e6dwuvli71j", + "from": { "blockId": "cl1r0crx600132e6d0u54j506" }, "to": { - "blockId": "cl1r0bgit000x2e6dvdre9wsj", - "groupId": "cl1r0b3ww000q2e6d4aihat41" - }, - "from": { - "blockId": "cl1r0crx600132e6d0u54j506", - "groupId": "cl1r0c85100102e6d7uohf0cu" + "groupId": "cl1r0b3ww000q2e6d4aihat41", + "blockId": "cl1r0bgit000x2e6dvdre9wsj" } }, { "id": "cl1r0f53y001q2e6dvuq434ru", - "to": { "groupId": "cl1r0exdi001l2e6drdwj3u96" }, - "from": { - "blockId": "cl1r0b3x5000r2e6dqk8gzoim", - "groupId": "cl1r0b3ww000q2e6d4aihat41" - } + "from": { "blockId": "cl1r0b3x5000r2e6dqk8gzoim" }, + "to": { "groupId": "cl1r0exdi001l2e6drdwj3u96" } }, { "id": "cl1r0i4dj001r2e6dgb96tx9q", - "to": { "groupId": "cl1r0erik00182e6dfzezujj0" }, "from": { - "itemId": "cl1r0b3x5000s2e6dyq6bklbf", "blockId": "cl1r0b3x5000r2e6dqk8gzoim", - "groupId": "cl1r0b3ww000q2e6d4aihat41" - } + "itemId": "cl1r0b3x5000s2e6dyq6bklbf" + }, + "to": { "groupId": "cl1r0erik00182e6dfzezujj0" } }, { "id": "cl1r0ic5f001s2e6dw777scrq", + "from": { "blockId": "cl1r0exdi001o2e6d70s7si5y" }, "to": { - "blockId": "cl1r0eril001d2e6d3gay9cls", - "groupId": "cl1r0erik00182e6dfzezujj0" - }, - "from": { - "blockId": "cl1r0exdi001o2e6d70s7si5y", - "groupId": "cl1r0exdi001l2e6drdwj3u96" + "groupId": "cl1r0erik00182e6dfzezujj0", + "blockId": "cl1r0eril001d2e6d3gay9cls" } }, { "id": "cl1r0k27y00262e6dflgcp3wa", - "to": { "groupId": "cl1r0j8u1001t2e6d42mjfcqo" }, "from": { - "itemId": "cl1r0erim001j2e6d2waa3374", "blockId": "cl1r0eril001f2e6dk0fd0qpw", - "groupId": "cl1r0erik00182e6dfzezujj0" - } + "itemId": "cl1r0erim001j2e6d2waa3374" + }, + "to": { "groupId": "cl1r0j8u1001t2e6d42mjfcqo" } }, { "id": "cl1r0khb6002c2e6ddssbpj9z", - "to": { "groupId": "cl1r0k3tq00272e6d1fwyajjx" }, - "from": { - "blockId": "cl1r0eril001f2e6dk0fd0qpw", - "groupId": "cl1r0erik00182e6dfzezujj0" - } + "from": { "blockId": "cl1r0eril001f2e6dk0fd0qpw" }, + "to": { "groupId": "cl1r0k3tq00272e6d1fwyajjx" } }, { "id": "cl1r0ktet002i2e6d5sh8gd2b", - "to": { "groupId": "cl1r0kqof002d2e6doqhpnuqy" }, - "from": { - "blockId": "cl1r0j8u200202e6dun2d04gu", - "groupId": "cl1r0j8u1001t2e6d42mjfcqo" - } + "from": { "blockId": "cl1r0j8u200202e6dun2d04gu" }, + "to": { "groupId": "cl1r0kqof002d2e6doqhpnuqy" } }, { "id": "cl1r0l7oa002j2e6dgtx0y1gh", + "from": { "blockId": "cl1r0k3tq002a2e6dv3s1eb6d" }, "to": { - "blockId": "cl1r0j8u2001y2e6dr24ieifw", - "groupId": "cl1r0j8u1001t2e6d42mjfcqo" - }, - "from": { - "blockId": "cl1r0k3tq002a2e6dv3s1eb6d", - "groupId": "cl1r0k3tq00272e6d1fwyajjx" + "groupId": "cl1r0j8u1001t2e6d42mjfcqo", + "blockId": "cl1r0j8u2001y2e6dr24ieifw" } }, { "id": "cl1r0lm4e002m2e6d0g3h9pm7", - "to": { "groupId": "cl1r0lfb5002k2e6dd6as5kj5" }, "from": { - "itemId": "cl1r0j8u300222e6dnj0i5fm8", "blockId": "cl1r0j8u200202e6dun2d04gu", - "groupId": "cl1r0j8u1001t2e6d42mjfcqo" - } + "itemId": "cl1r0j8u300222e6dnj0i5fm8" + }, + "to": { "groupId": "cl1r0lfb5002k2e6dd6as5kj5" } }, { "id": "cl1r0p4my00312e6d1wsgwohi", + "from": { "blockId": "cl1r0kqog002g2e6dizmxvz64" }, "to": { - "blockId": "cl1r0oqrr002y2e6dsg0sa64g", - "groupId": "cl1r0lfb5002k2e6dd6as5kj5" - }, - "from": { - "blockId": "cl1r0kqog002g2e6dizmxvz64", - "groupId": "cl1r0kqof002d2e6doqhpnuqy" + "groupId": "cl1r0lfb5002k2e6dd6as5kj5", + "blockId": "cl1r0oqrr002y2e6dsg0sa64g" } }, { "id": "cl1r0rt88003a2e6dgq6beaq1", - "to": { "groupId": "cl1r0rgex00382e6dkayjbys6" }, "from": { - "itemId": "cl1r0oqrr002z2e6dl821aaow", "blockId": "cl1r0oqrr002y2e6dsg0sa64g", - "groupId": "cl1r0lfb5002k2e6dd6as5kj5" - } + "itemId": "cl1r0oqrr002z2e6dl821aaow" + }, + "to": { "groupId": "cl1r0rgex00382e6dkayjbys6" } }, { "id": "cl1r0s6qt003d2e6d5tk2um7y", - "to": { "groupId": "cl1r0rvak003b2e6dejcdrooq" }, "from": { - "itemId": "cl1r0qvwy00352e6dui5itgd1", "blockId": "cl1r0qvwy00342e6d7ww0oqar", - "groupId": "cl1r0lfb5002k2e6dd6as5kj5" - } + "itemId": "cl1r0qvwy00352e6dui5itgd1" + }, + "to": { "groupId": "cl1r0rvak003b2e6dejcdrooq" } }, { "id": "cl1r0s9g8003e2e6d5if2ywz9", - "to": { "groupId": "cl1r0mn2p002p2e6dijqbjzlh" }, - "from": { - "blockId": "cl1r0rggf00392e6dcc941700", - "groupId": "cl1r0rgex00382e6dkayjbys6" - } + "from": { "blockId": "cl1r0rggf00392e6dcc941700" }, + "to": { "groupId": "cl1r0mn2p002p2e6dijqbjzlh" } }, { "id": "cl1r0sarx003f2e6dbzmed9te", - "to": { "groupId": "cl1r0mn2p002p2e6dijqbjzlh" }, - "from": { - "blockId": "cl1r0rvce003c2e6diusd3pxq", - "groupId": "cl1r0rvak003b2e6dejcdrooq" - } + "from": { "blockId": "cl1r0rvce003c2e6diusd3pxq" }, + "to": { "groupId": "cl1r0mn2p002p2e6dijqbjzlh" } }, { "id": "cl1r0sbzh003g2e6dsqs48aoz", - "to": { "groupId": "cl1r0mn2p002p2e6dijqbjzlh" }, - "from": { - "blockId": "cl1r0pe0x00332e6dxg6xdt2f", - "groupId": "cl1r0seuj003h2e6dandwc43r" - } + "from": { "blockId": "cl1r0pe0x00332e6dxg6xdt2f" }, + "to": { "groupId": "cl1r0mn2p002p2e6dijqbjzlh" } }, { "id": "cl1r0sg9m003i2e6dbsc4cqjn", - "to": { "groupId": "cl1r0seuj003h2e6dandwc43r" }, - "from": { - "blockId": "cl1r0qvwy00342e6d7ww0oqar", - "groupId": "cl1r0lfb5002k2e6dd6as5kj5" - } + "from": { "blockId": "cl1r0qvwy00342e6d7ww0oqar" }, + "to": { "groupId": "cl1r0seuj003h2e6dandwc43r" } }, { "id": "cl1r15gko005i2e6dn6rhifwe", - "to": { "groupId": "cl1r15f68005f2e6dvdtal7cp" }, "from": { - "itemId": "cl1r0nt85002t2e6dvb7si7ny", "blockId": "cl1r0nt85002s2e6dloupnhdq", - "groupId": "cl1r0mn2p002p2e6dijqbjzlh" - } - }, - { - "id": "cl1r17gv3006h2e6dc9e7xob7", - "to": { "groupId": "cl1r15w3o005s2e6dr5l7csao" }, - "from": { - "blockId": "cl1qz4lui00027w1a19prdgzd", - "groupId": "cl1qz4lui00017w1a505z15p0" - } + "itemId": "cl1r0nt85002t2e6dvb7si7ny" + }, + "to": { "groupId": "cl1r15f68005f2e6dvdtal7cp" } }, { "id": "cl1r17pzv006n2e6dpibxp9th", - "to": { "groupId": "cl1r09bc6000h2e6dqml18p4p" }, "from": { - "itemId": "cl1r176e9006a2e6dpvp0974z", "blockId": "cl1r176e900692e6d8u3k6sdq", - "groupId": "cl1r15w3o005s2e6dr5l7csao" - } - } - ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true + "itemId": "cl1r176e9006a2e6dpvp0974z" }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } + "to": { "groupId": "cl1r09bc6000h2e6dqml18p4p" } } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": 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 } - }, + ], + "variables": [{ "id": "vcl1r0bxdj000z2e6d65u7n41b", "name": "Score" }], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": { "general": {} }, + "createdAt": "2023-11-06T16:55:18.927Z", + "updatedAt": "2023-11-06T16:55:18.927Z", + "icon": "๐Ÿ•น๏ธ", + "folderId": null, "publicId": null, - "customDomain": null + "customDomain": null, + "workspaceId": "proWorkspace", + "resultsTablePreferences": null, + "isArchived": false, + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/sentry.client.config.js b/apps/builder/sentry.client.config.ts similarity index 100% rename from apps/builder/sentry.client.config.js rename to apps/builder/sentry.client.config.ts diff --git a/apps/builder/sentry.server.config.js b/apps/builder/sentry.server.config.ts similarity index 56% rename from apps/builder/sentry.server.config.js rename to apps/builder/sentry.server.config.ts index 05de5446c0..a0092a1ae6 100644 --- a/apps/builder/sentry.server.config.js +++ b/apps/builder/sentry.server.config.ts @@ -1,6 +1,12 @@ import * as Sentry from '@sentry/nextjs' +import prisma from '@typebot.io/lib/prisma' Sentry.init({ dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-builder', + integrations: [ + new Sentry.Integrations.Prisma({ + client: prisma, + }), + ], }) diff --git a/apps/builder/src/assets/styles/custom.css b/apps/builder/src/assets/styles/custom.css index dad68a0ee1..7f0a6e277f 100644 --- a/apps/builder/src/assets/styles/custom.css +++ b/apps/builder/src/assets/styles/custom.css @@ -22,3 +22,11 @@ opacity: 1 !important; visibility: visible !important; } */ + +/*Hide track timeline in audio tag in Windows*/ +audio::-webkit-media-controls-timeline{ + display:none; +} +audio::-webkit-media-controls-panel{ + justify-content:space-between; +} diff --git a/apps/builder/src/assets/styles/plate.css b/apps/builder/src/assets/styles/plate.css index 4523f1ee48..72845f86ff 100644 --- a/apps/builder/src/assets/styles/plate.css +++ b/apps/builder/src/assets/styles/plate.css @@ -1,3 +1,11 @@ +.slate-inline-code { + background-color: #a1a1aa; + color: white; + padding: 0.125rem 0.25rem; + border-radius: 0.35rem; + font-size: small; +} + .slate-variable { background-color: #ff8b1a; color: #ffffff; diff --git a/apps/builder/src/components/ConfirmModal.tsx b/apps/builder/src/components/ConfirmModal.tsx index f7c4250959..59e94a8c13 100644 --- a/apps/builder/src/components/ConfirmModal.tsx +++ b/apps/builder/src/components/ConfirmModal.tsx @@ -8,7 +8,7 @@ import { AlertDialogOverlay, Button, } from '@chakra-ui/react' -import { useScopedI18n } from '@/locales' +import { useTranslate } from '@tolgee/react' type ConfirmDeleteModalProps = { isOpen: boolean @@ -29,7 +29,7 @@ export const ConfirmModal = ({ onConfirm, confirmButtonColor = 'red', }: ConfirmDeleteModalProps) => { - const scopedT = useScopedI18n('confirmModal') + const { t } = useTranslate() const [confirmLoading, setConfirmLoading] = useState(false) const cancelRef = useRef(null) @@ -54,7 +54,7 @@ export const ConfirmModal = ({ - {title ?? scopedT('defaultTitle')} + {title ?? t('confirmModal.defaultTitle')} {message} diff --git a/apps/builder/src/components/CopyButton.tsx b/apps/builder/src/components/CopyButton.tsx index ca38f44f14..d21c2a3a5a 100644 --- a/apps/builder/src/components/CopyButton.tsx +++ b/apps/builder/src/components/CopyButton.tsx @@ -4,6 +4,10 @@ import { ButtonProps, Button, useClipboard } from '@chakra-ui/react' interface CopyButtonProps extends ButtonProps { textToCopy: string onCopied?: () => void + text?: { + copy: string + copied: string + } } export const CopyButton = (props: CopyButtonProps) => { @@ -23,7 +27,7 @@ export const CopyButton = (props: CopyButtonProps) => { }} {...buttonProps} > - {!hasCopied ? 'Copy' : 'Copied'} + {!hasCopied ? props.text?.copy ?? 'Copy' : props.text?.copied ?? 'Copied'} ) } diff --git a/apps/builder/src/components/DropdownList.tsx b/apps/builder/src/components/DropdownList.tsx index 4792d01761..45d33fdfc8 100644 --- a/apps/builder/src/components/DropdownList.tsx +++ b/apps/builder/src/components/DropdownList.tsx @@ -10,7 +10,7 @@ import { Stack, } from '@chakra-ui/react' import { ChevronLeftIcon } from '@/components/icons' -import React, { ReactNode } from 'react' +import React from 'react' // eslint-disable-next-line @typescript-eslint/no-explicit-any type Props = { @@ -42,7 +42,7 @@ export const DropdownList = ({ {...props} > - {(currentItem ?? placeholder) as unknown as ReactNode} + {currentItem ?? placeholder} @@ -57,7 +57,7 @@ export const DropdownList = ({ textOverflow="ellipsis" onClick={handleMenuItemClick(item)} > - {item as unknown as ReactNode} + {item} ))} diff --git a/apps/builder/src/components/ImageUploadContent/UploadButton.tsx b/apps/builder/src/components/ImageUploadContent/UploadButton.tsx index 9eb63ad6c8..f73e00369e 100644 --- a/apps/builder/src/components/ImageUploadContent/UploadButton.tsx +++ b/apps/builder/src/components/ImageUploadContent/UploadButton.tsx @@ -26,9 +26,15 @@ export const UploadButton = ({ setIsUploading(false) }, onSuccess: async (data) => { + if (!file) return + const formData = new FormData() + Object.entries(data.formData).forEach(([key, value]) => { + formData.append(key, value) + }) + formData.append('file', file) const upload = await fetch(data.presignedUrl, { - method: 'PUT', - body: file, + method: 'POST', + body: formData, }) if (!upload.ok) { diff --git a/apps/builder/src/components/Seo.tsx b/apps/builder/src/components/Seo.tsx index 599547a7bd..34dd9f8edb 100644 --- a/apps/builder/src/components/Seo.tsx +++ b/apps/builder/src/components/Seo.tsx @@ -1,9 +1,18 @@ +import { env } from '@typebot.io/env' import Head from 'next/head' +const getOrigin = () => { + if (typeof window !== 'undefined') { + return window.location.origin + } + + return env.NEXTAUTH_URL +} + export const Seo = ({ title, description = 'Create and publish conversational forms that collect 4 times more answers and feel native to your product', - imagePreviewUrl = 'https://app.typebot.io/site-preview.png', + imagePreviewUrl = `${getOrigin()}/images/og.png`, }: { title: string description?: string diff --git a/apps/builder/src/components/SupportBubble.tsx b/apps/builder/src/components/SupportBubble.tsx index fd9debbfd6..0ef191216e 100644 --- a/apps/builder/src/components/SupportBubble.tsx +++ b/apps/builder/src/components/SupportBubble.tsx @@ -20,7 +20,6 @@ export const SupportBubble = (props: Omit) => { return ( = T & { id: string } export type TableListItemProps = { @@ -19,10 +23,11 @@ export type TableListItemProps = { } type Props = { - initialItems: ItemWithId[] + initialItems?: ItemWithId[] isOrdered?: boolean addLabel?: string newItemDefaultProps?: Partial + hasDefaultItem?: boolean Item: (props: TableListItemProps) => JSX.Element ComponentBetweenItems?: (props: unknown) => JSX.Element onItemsChange: (items: ItemWithId[]) => void @@ -33,15 +38,19 @@ export const TableList = ({ isOrdered, addLabel = 'Add', newItemDefaultProps, + hasDefaultItem, Item, ComponentBetweenItems, onItemsChange, }: Props) => { - const [items, setItems] = useState(initialItems) + const [items, setItems] = useState( + initialItems ?? (hasDefaultItem ? ([defaultItem] as ItemWithId[]) : []) + ) const [showDeleteIndex, setShowDeleteIndex] = useState(null) useEffect(() => { - if (items.length && initialItems.length === 0) setItems(initialItems) + if (items.length && initialItems && initialItems?.length === 0) + setItems(initialItems) }, [initialItems, items.length]) const createItem = () => { diff --git a/apps/builder/src/components/UnlockPlanAlertInfo.tsx b/apps/builder/src/components/UnlockPlanAlertInfo.tsx index 0ae8f35842..29d726c6e0 100644 --- a/apps/builder/src/components/UnlockPlanAlertInfo.tsx +++ b/apps/builder/src/components/UnlockPlanAlertInfo.tsx @@ -8,22 +8,24 @@ import { useDisclosure, } from '@chakra-ui/react' import React from 'react' -import { ChangePlanModal } from '@/features/billing/components/ChangePlanModal' -import { useI18n } from '@/locales' +import { + ChangePlanModal, + ChangePlanModalProps, +} from '@/features/billing/components/ChangePlanModal' +import { useTranslate } from '@tolgee/react' type Props = { - contentLabel: React.ReactNode buttonLabel?: string - type?: string -} & AlertProps +} & AlertProps & + Pick export const UnlockPlanAlertInfo = ({ - contentLabel, buttonLabel, type, + excludedPlans, ...props }: Props) => { - const t = useI18n() + const { t } = useTranslate() const { isOpen, onOpen, onClose } = useDisclosure() return ( - {contentLabel} + {props.children} - + ) } diff --git a/apps/builder/src/components/icons.tsx b/apps/builder/src/components/icons.tsx index 844f6afef5..87b4ce2103 100644 --- a/apps/builder/src/components/icons.tsx +++ b/apps/builder/src/components/icons.tsx @@ -635,3 +635,11 @@ export const ChevronLastIcon = (props: IconProps) => ( ) + +export const XCircleIcon = (props: IconProps) => ( + + + + + +) diff --git a/apps/builder/src/components/inputs/AutocompleteInput.tsx b/apps/builder/src/components/inputs/AutocompleteInput.tsx index b7391586e4..8e85cf5629 100644 --- a/apps/builder/src/components/inputs/AutocompleteInput.tsx +++ b/apps/builder/src/components/inputs/AutocompleteInput.tsx @@ -9,9 +9,8 @@ import { Input, HStack, FormControl, - FormLabel, } from '@chakra-ui/react' -import { useState, useRef, useEffect, ReactNode } from 'react' +import { useState, useRef, useEffect } from 'react' import { useDebouncedCallback } from 'use-debounce' import { isDefined } from '@typebot.io/lib' import { useOutsideClick } from '@/hooks/useOutsideClick' @@ -20,7 +19,6 @@ import { VariablesButton } from '@/features/variables/components/VariablesButton import { Variable } from '@typebot.io/schemas' import { injectVariableInText } from '@/features/variables/helpers/injectVariableInTextInput' import { focusInput } from '@/helpers/focusInput' -import { MoreInfoTooltip } from '../MoreInfoTooltip' import { env } from '@typebot.io/env' type Props = { @@ -30,7 +28,6 @@ type Props = { debounceTimeout?: number placeholder?: string withVariableButton?: boolean - label?: ReactNode moreInfoTooltip?: string isRequired?: boolean onChange: (value: string) => void @@ -44,8 +41,6 @@ export const AutocompleteInput = ({ withVariableButton = true, value, defaultValue, - label, - moreInfoTooltip, isRequired, }: Props) => { const bg = useColorModeValue('gray.200', 'gray.700') @@ -161,14 +156,6 @@ export const AutocompleteInput = ({ return ( - {label && ( - - {label}{' '} - {moreInfoTooltip && ( - {moreInfoTooltip} - )} - - )} = { moreInfoTooltip?: string isRequired?: boolean direction?: 'row' | 'column' + suffix?: string onValueChange: (value?: Value) => void } & Omit @@ -41,6 +43,7 @@ export const NumberInput = ({ moreInfoTooltip, isRequired, direction, + suffix, ...props }: Props) => { const [value, setValue] = useState(defaultValue?.toString() ?? '') @@ -99,24 +102,27 @@ export const NumberInput = ({ isRequired={isRequired} justifyContent="space-between" width={label ? 'full' : 'auto'} - spacing={0} + spacing={direction === 'column' ? 2 : 3} > {label && ( - + {label}{' '} {moreInfoTooltip && ( {moreInfoTooltip} )} )} - {withVariableButton ?? true ? ( - - {Input} - - - ) : ( - Input - )} + + {withVariableButton ?? true ? ( + + {Input} + + + ) : ( + Input + )} + {suffix ? {suffix} : null} + ) } diff --git a/apps/builder/src/components/inputs/RadioButtons.tsx b/apps/builder/src/components/inputs/RadioButtons.tsx index 90345ce07c..a31134ecaf 100644 --- a/apps/builder/src/components/inputs/RadioButtons.tsx +++ b/apps/builder/src/components/inputs/RadioButtons.tsx @@ -1,7 +1,7 @@ import { Box, Flex, - HStack, + Stack, useColorModeValue, useRadio, useRadioGroup, @@ -13,12 +13,14 @@ type Props = { options: (T | { value: T; label: ReactNode })[] value?: T defaultValue?: T + direction?: 'row' | 'column' onSelect: (newValue: T) => void } export const RadioButtons = ({ options, value, defaultValue, + direction = 'row', onSelect, }: Props) => { const { getRootProps, getRadioProps } = useRadioGroup({ @@ -30,7 +32,7 @@ export const RadioButtons = ({ const group = getRootProps() return ( - + {options.map((item) => { const radio = getRadioProps({ value: parseValue(item) }) return ( @@ -39,7 +41,7 @@ export const RadioButtons = ({ ) })} - + ) } diff --git a/apps/builder/src/components/inputs/Select.tsx b/apps/builder/src/components/inputs/Select.tsx index 077b8b979a..63b6bdc47c 100644 --- a/apps/builder/src/components/inputs/Select.tsx +++ b/apps/builder/src/components/inputs/Select.tsx @@ -168,7 +168,7 @@ export const Select = ({ pr={selectedItem ? 16 : 8} w="full" > - {!isTouched && ( + {!isTouched && items && ( {inputValue} diff --git a/apps/builder/src/components/inputs/SwitchWithLabel.tsx b/apps/builder/src/components/inputs/SwitchWithLabel.tsx index b55ddeced6..0a50c5be0c 100644 --- a/apps/builder/src/components/inputs/SwitchWithLabel.tsx +++ b/apps/builder/src/components/inputs/SwitchWithLabel.tsx @@ -13,7 +13,7 @@ export type SwitchWithLabelProps = { label: string initialValue: boolean moreInfoContent?: string - onCheckChange: (isChecked: boolean) => void + onCheckChange?: (isChecked: boolean) => void justifyContent?: FormControlProps['justifyContent'] } & Omit @@ -29,7 +29,7 @@ export const SwitchWithLabel = ({ const handleChange = () => { setIsChecked(!isChecked) - onCheckChange(!isChecked) + if (onCheckChange) onCheckChange(!isChecked) } return ( diff --git a/apps/builder/src/components/inputs/TextInput.tsx b/apps/builder/src/components/inputs/TextInput.tsx index 13186c6e0c..7a23e876f3 100644 --- a/apps/builder/src/components/inputs/TextInput.tsx +++ b/apps/builder/src/components/inputs/TextInput.tsx @@ -8,6 +8,7 @@ import { HStack, Input as ChakraInput, InputProps, + Stack, } from '@chakra-ui/react' import { Variable } from '@typebot.io/schemas' import React, { @@ -33,6 +34,7 @@ export type TextInputProps = { isRequired?: boolean placeholder?: string isDisabled?: boolean + direction?: 'row' | 'column' } & Pick< InputProps, | 'autoComplete' @@ -63,6 +65,7 @@ export const TextInput = forwardRef(function TextInput( onKeyUp, size, maxWidth, + direction = 'column', }: TextInputProps, ref ) { @@ -134,9 +137,15 @@ export const TextInput = forwardRef(function TextInput( ) return ( - + {label && ( - + {label}{' '} {moreInfoTooltip && ( {moreInfoTooltip} diff --git a/apps/builder/src/components/logos/WhatsAppLogo.tsx b/apps/builder/src/components/logos/WhatsAppLogo.tsx index c2d1b9c319..a5b9a7d336 100644 --- a/apps/builder/src/components/logos/WhatsAppLogo.tsx +++ b/apps/builder/src/components/logos/WhatsAppLogo.tsx @@ -1,60 +1,14 @@ import { IconProps, Icon } from '@chakra-ui/react' +export const whatsAppBrandColor = '#25D366' + export const WhatsAppLogo = (props: IconProps) => ( - - - - - - + - - - - - - - - - - - ) diff --git a/apps/builder/src/features/account/UserProvider.tsx b/apps/builder/src/features/account/UserProvider.tsx index 47bc533e51..df4edefe71 100644 --- a/apps/builder/src/features/account/UserProvider.tsx +++ b/apps/builder/src/features/account/UserProvider.tsx @@ -1,4 +1,4 @@ -import { useSession } from 'next-auth/react' +import { signOut, useSession } from 'next-auth/react' import { useRouter } from 'next/router' import { createContext, ReactNode, useEffect, useState } from 'react' import { isDefined, isNotDefined } from '@typebot.io/lib' @@ -15,12 +15,12 @@ export const userContext = createContext<{ user?: User isLoading: boolean currentWorkspaceId?: string + logOut: () => void updateUser: (newUser: Partial) => void }>({ isLoading: false, - updateUser: () => { - console.log('updateUser not implemented') - }, + logOut: () => {}, + updateUser: () => {}, }) const debounceTimeout = 1000 @@ -34,17 +34,22 @@ export const UserProvider = ({ children }: { children: ReactNode }) => { const { setColorMode } = useColorMode() useEffect(() => { - if ( - !user?.preferredAppAppearance || - user.preferredAppAppearance === 'system' - ) - return const currentColorScheme = localStorage.getItem('chakra-ui-color-mode') as | 'light' | 'dark' | null - if (currentColorScheme === user.preferredAppAppearance) return - setColorMode(user.preferredAppAppearance) + if (!currentColorScheme) return + const systemColorScheme = window.matchMedia('(prefers-color-scheme: dark)') + .matches + ? 'dark' + : 'light' + const userPrefersSystemMode = + !user?.preferredAppAppearance || user.preferredAppAppearance === 'system' + const computedColorMode = userPrefersSystemMode + ? systemColorScheme + : user?.preferredAppAppearance + if (computedColorMode === currentColorScheme) return + setColorMode(computedColorMode) }, [setColorMode, user?.preferredAppAppearance]) useEffect(() => { @@ -64,8 +69,12 @@ export const UserProvider = ({ children }: { children: ReactNode }) => { useEffect(() => { if (!router.isReady) return if (status === 'loading') return - const isSigningIn = () => ['/signin', '/register'].includes(router.pathname) - if (!user && status === 'unauthenticated' && !isSigningIn()) + const isSignInPath = ['/signin', '/register'].includes(router.pathname) + const isPathPublicFriendly = /\/typebots\/.+\/(edit|theme|settings)/.test( + router.pathname + ) + if (isSignInPath || isPathPublicFriendly) return + if (!user && status === 'unauthenticated') router.replace({ pathname: '/signin', query: { @@ -91,6 +100,11 @@ export const UserProvider = ({ children }: { children: ReactNode }) => { env.NEXT_PUBLIC_E2E_TEST ? 0 : debounceTimeout ) + const logOut = () => { + signOut() + setUser(undefined) + } + useEffect(() => { return () => { saveUser.flush() @@ -103,6 +117,7 @@ export const UserProvider = ({ children }: { children: ReactNode }) => { user, isLoading: status === 'loading', currentWorkspaceId, + logOut, updateUser, }} > diff --git a/apps/builder/src/features/account/components/ApiTokensList.tsx b/apps/builder/src/features/account/components/ApiTokensList.tsx index af96b4637a..18836db852 100644 --- a/apps/builder/src/features/account/components/ApiTokensList.tsx +++ b/apps/builder/src/features/account/components/ApiTokensList.tsx @@ -25,12 +25,12 @@ import { useApiTokens } from '../hooks/useApiTokens' import { ApiTokenFromServer } from '../types' import { parseTimeSince } from '@/helpers/parseTimeSince' import { deleteApiTokenQuery } from '../queries/deleteApiTokenQuery' -import { useScopedI18n } from '@/locales' +import { T, useTranslate } from '@tolgee/react' type Props = { user: User } export const ApiTokensList = ({ user }: Props) => { - const scopedT = useScopedI18n('account.apiTokens') + const { t } = useTranslate() const { showToast } = useToast() const { apiTokens, isLoading, mutate } = useApiTokens({ userId: user.id, @@ -57,10 +57,12 @@ export const ApiTokensList = ({ user }: Props) => { return ( - {scopedT('heading')} - {scopedT('description')} + {t('account.apiTokens.heading')} + {t('account.apiTokens.description')} - + { - - + + @@ -90,7 +92,7 @@ export const ApiTokensList = ({ user }: Props) => { variant="outline" onClick={() => setDeletingId(token.id)} > - {scopedT('deleteButton.label')} + {t('account.apiTokens.deleteButton.label')} @@ -118,14 +120,17 @@ export const ApiTokensList = ({ user }: Props) => { onClose={() => setDeletingId(undefined)} message={ - {scopedT('deleteConfirmationMessage', { - tokenName: ( - {apiTokens?.find(byId(deletingId))?.name} - ), - })} + {apiTokens?.find(byId(deletingId))?.name} + ), + }} + /> } - confirmButtonLabel={scopedT('deleteButton.label')} + confirmButtonLabel={t('account.apiTokens.deleteButton.label')} /> ) diff --git a/apps/builder/src/features/account/components/AppearanceRadioGroup.tsx b/apps/builder/src/features/account/components/AppearanceRadioGroup.tsx index d8a17eb9b9..ff5d1aae01 100644 --- a/apps/builder/src/features/account/components/AppearanceRadioGroup.tsx +++ b/apps/builder/src/features/account/components/AppearanceRadioGroup.tsx @@ -10,7 +10,7 @@ import Image from 'next/image' import lightModeIllustration from 'public/images/light-mode.png' import darkModeIllustration from 'public/images/dark-mode.png' import systemModeIllustration from 'public/images/system-mode.png' -import { useScopedI18n } from '@/locales' +import { useTranslate } from '@tolgee/react' type Props = { defaultValue: string @@ -18,22 +18,22 @@ type Props = { } export const AppearanceRadioGroup = ({ defaultValue, onChange }: Props) => { - const scopedT = useScopedI18n('account.preferences.appearance') + const { t } = useTranslate() const appearanceData = [ { value: 'light', - label: scopedT('lightLabel'), + label: t('account.preferences.appearance.lightLabel'), image: lightModeIllustration, }, { value: 'dark', - label: scopedT('darkLabel'), + label: t('account.preferences.appearance.darkLabel'), image: darkModeIllustration, }, { value: 'system', - label: scopedT('systemLabel'), + label: t('account.preferences.appearance.systemLabel'), image: systemModeIllustration, }, ] diff --git a/apps/builder/src/features/account/components/CreateTokenModal.tsx b/apps/builder/src/features/account/components/CreateTokenModal.tsx index 6e64c6e474..4c1c631330 100644 --- a/apps/builder/src/features/account/components/CreateTokenModal.tsx +++ b/apps/builder/src/features/account/components/CreateTokenModal.tsx @@ -1,5 +1,5 @@ import { CopyButton } from '@/components/CopyButton' -import { useScopedI18n } from '@/locales' +import { useTranslate } from '@tolgee/react' import { Modal, ModalOverlay, @@ -33,7 +33,7 @@ export const CreateTokenModal = ({ onNewToken, }: Props) => { const inputRef = useRef(null) - const scopedT = useScopedI18n('account.apiTokens.createModal') + const { t } = useTranslate() const [name, setName] = useState('') const [isSubmitting, setIsSubmitting] = useState(false) const [newTokenValue, setNewTokenValue] = useState() @@ -54,14 +54,18 @@ export const CreateTokenModal = ({ - {newTokenValue ? scopedT('createdHeading') : scopedT('createHeading')} + {newTokenValue + ? t('account.apiTokens.createModal.createdHeading') + : t('account.apiTokens.createModal.createHeading')} {newTokenValue ? ( - {scopedT('copyInstruction')}{' '} - {scopedT('securityWarning')} + {t('account.apiTokens.createModal.copyInstruction')}{' '} + + {t('account.apiTokens.createModal.securityWarning')} + @@ -72,10 +76,14 @@ export const CreateTokenModal = ({ ) : ( - {scopedT('nameInput.label')} + + {t('account.apiTokens.createModal.nameInput.label')} + setName(e.target.value)} /> @@ -84,7 +92,7 @@ export const CreateTokenModal = ({ {newTokenValue ? ( ) : ( )} diff --git a/apps/builder/src/features/account/components/GraphNavigationRadioGroup.tsx b/apps/builder/src/features/account/components/GraphNavigationRadioGroup.tsx index 0b54d1bcb8..e66205032b 100644 --- a/apps/builder/src/features/account/components/GraphNavigationRadioGroup.tsx +++ b/apps/builder/src/features/account/components/GraphNavigationRadioGroup.tsx @@ -1,5 +1,5 @@ import { MouseIcon, LaptopIcon } from '@/components/icons' -import { useScopedI18n } from '@/locales' +import { useTranslate } from '@tolgee/react' import { HStack, Radio, @@ -18,18 +18,20 @@ export const GraphNavigationRadioGroup = ({ defaultValue, onChange, }: Props) => { - const scopedT = useScopedI18n('account.preferences.graphNavigation') + const { t } = useTranslate() const graphNavigationData = [ { value: GraphNavigation.MOUSE, - label: scopedT('mouse.label'), - description: scopedT('mouse.description'), + label: t('account.preferences.graphNavigation.mouse.label'), + description: t('account.preferences.graphNavigation.mouse.description'), icon: , }, { value: GraphNavigation.TRACKPAD, - label: scopedT('trackpad.label'), - description: scopedT('trackpad.description'), + label: t('account.preferences.graphNavigation.trackpad.label'), + description: t( + 'account.preferences.graphNavigation.trackpad.description' + ), icon: , }, ] diff --git a/apps/builder/src/features/account/components/MyAccountForm.tsx b/apps/builder/src/features/account/components/MyAccountForm.tsx index 439735f8fa..8979f01ea5 100644 --- a/apps/builder/src/features/account/components/MyAccountForm.tsx +++ b/apps/builder/src/features/account/components/MyAccountForm.tsx @@ -5,10 +5,10 @@ import { ApiTokensList } from './ApiTokensList' import { UploadButton } from '@/components/ImageUploadContent/UploadButton' import { useUser } from '../hooks/useUser' import { TextInput } from '@/components/inputs/TextInput' -import { useScopedI18n } from '@/locales' +import { useTranslate } from '@tolgee/react' export const MyAccountForm = () => { - const scopedT = useScopedI18n('account.myAccount') + const { t } = useTranslate() const { user, updateUser } = useUser() const [name, setName] = useState(user?.name ?? '') const [email, setEmail] = useState(user?.email ?? '') @@ -47,11 +47,11 @@ export const MyAccountForm = () => { leftIcon={} onFileUploaded={handleFileUploaded} > - {scopedT('changePhotoButton.label')} + {t('account.myAccount.changePhotoButton.label')} )} - {scopedT('changePhotoButton.specification')} + {t('account.myAccount.changePhotoButton.specification')} @@ -59,17 +59,17 @@ export const MyAccountForm = () => { - + { - const scopedT = useScopedI18n('account.preferences') - const { colorMode, setColorMode } = useColorMode() + const { getLanguage } = useTolgee() + const router = useRouter() + const { t } = useTranslate() + const { colorMode } = useColorMode() const { user, updateUser } = useUser() - const changeLocale = useChangeLocale() - const currentLocale = useCurrentLocale() useEffect(() => { if (!user?.graphNavigation) @@ -43,22 +46,34 @@ export const UserPreferencesForm = () => { } const changeAppearance = async (value: string) => { - setColorMode(value) updateUser({ preferredAppAppearance: value }) } const updateLocale = (locale: keyof typeof localeHumanReadable) => () => { - changeLocale(locale) document.cookie = `NEXT_LOCALE=${locale}; path=/; max-age=31536000` + router.replace( + { + pathname: router.pathname, + query: router.query, + }, + undefined, + { locale } + ) } + const currentLanguage = getLanguage() + return ( - {scopedT('language.heading')} + {t('account.preferences.language.heading')} }> - {localeHumanReadable[currentLocale]} + {currentLanguage + ? localeHumanReadable[ + currentLanguage as keyof typeof localeHumanReadable + ] + : 'Loading...'} {Object.keys(localeHumanReadable).map((locale) => ( @@ -77,19 +92,25 @@ export const UserPreferencesForm = () => { ))} - {currentLocale !== 'en' && ( - {scopedT('language.tooltip')} + {currentLanguage !== 'en' && ( + + {t('account.preferences.language.tooltip')} + )} - {scopedT('graphNavigation.heading')} + + {t('account.preferences.graphNavigation.heading')} + - {scopedT('appearance.heading')} + + {t('account.preferences.appearance.heading')} + { const typebot = await prisma.typebot.findFirst({ where: canReadTypebots(typebotId, user), @@ -33,17 +34,17 @@ export const getTotalAnswersInBlocks = authenticatedProcedure message: 'Published typebot not found', }) - const publishedTypebot = typebot.publishedTypebot as PublicTypebot - const totalAnswersPerBlock = await prisma.answer.groupBy({ - by: ['itemId', 'blockId'], + by: ['blockId'], where: { result: { typebotId: typebot.publishedTypebot.typebotId, }, blockId: { - in: publishedTypebot.groups.flatMap((group) => - group.blocks.map((block) => block.id) + in: parseGroups(typebot.publishedTypebot.groups, { + typebotVersion: typebot.publishedTypebot.version, + }).flatMap((group) => + group.blocks.filter(isInputBlock).map((block) => block.id) ), }, }, @@ -51,10 +52,9 @@ export const getTotalAnswersInBlocks = authenticatedProcedure }) return { - totalAnswersInBlocks: totalAnswersPerBlock.map((answer) => ({ - blockId: answer.blockId, - itemId: answer.itemId ?? undefined, - total: answer._count._all, + totalAnswers: totalAnswersPerBlock.map((a) => ({ + blockId: a.blockId, + total: a._count._all, })), } }) diff --git a/apps/builder/src/features/analytics/api/getTotalVisitedEdges.ts b/apps/builder/src/features/analytics/api/getTotalVisitedEdges.ts new file mode 100644 index 0000000000..e421376616 --- /dev/null +++ b/apps/builder/src/features/analytics/api/getTotalVisitedEdges.ts @@ -0,0 +1,55 @@ +import prisma from '@typebot.io/lib/prisma' +import { authenticatedProcedure } from '@/helpers/server/trpc' +import { TRPCError } from '@trpc/server' +import { z } from 'zod' +import { canReadTypebots } from '@/helpers/databaseRules' +import { totalVisitedEdgesSchema } from '@typebot.io/schemas' + +export const getTotalVisitedEdges = authenticatedProcedure + .meta({ + openapi: { + method: 'GET', + path: '/v1/typebots/{typebotId}/analytics/totalVisitedEdges', + protect: true, + summary: 'List total edges used in results', + tags: ['Analytics'], + }, + }) + .input( + z.object({ + typebotId: z.string(), + }) + ) + .output( + z.object({ + totalVisitedEdges: z.array(totalVisitedEdgesSchema), + }) + ) + .query(async ({ input: { typebotId }, ctx: { user } }) => { + const typebot = await prisma.typebot.findFirst({ + where: canReadTypebots(typebotId, user), + select: { id: true }, + }) + if (!typebot?.id) + throw new TRPCError({ + code: 'NOT_FOUND', + message: 'Published typebot not found', + }) + + const edges = await prisma.visitedEdge.groupBy({ + by: ['edgeId'], + where: { + result: { + typebotId: typebot.id, + }, + }, + _count: { resultId: true }, + }) + + return { + totalVisitedEdges: edges.map((e) => ({ + edgeId: e.edgeId, + total: e._count.resultId, + })), + } + }) diff --git a/apps/builder/src/features/analytics/api/router.ts b/apps/builder/src/features/analytics/api/router.ts index 77fee56174..d51c3d0ae3 100644 --- a/apps/builder/src/features/analytics/api/router.ts +++ b/apps/builder/src/features/analytics/api/router.ts @@ -1,6 +1,8 @@ import { router } from '@/helpers/server/trpc' -import { getTotalAnswersInBlocks } from './getTotalAnswersInBlocks' +import { getTotalAnswers } from './getTotalAnswers' +import { getTotalVisitedEdges } from './getTotalVisitedEdges' export const analyticsRouter = router({ - getTotalAnswersInBlocks, + getTotalAnswers, + getTotalVisitedEdges, }) diff --git a/apps/builder/src/features/analytics/components/AnalyticsGraphContainer.tsx b/apps/builder/src/features/analytics/components/AnalyticsGraphContainer.tsx index 3527603ca2..eeec583aa4 100644 --- a/apps/builder/src/features/analytics/components/AnalyticsGraphContainer.tsx +++ b/apps/builder/src/features/analytics/components/AnalyticsGraphContainer.tsx @@ -12,23 +12,28 @@ import { ChangePlanModal } from '@/features/billing/components/ChangePlanModal' import { Graph } from '@/features/graph/components/Graph' import { GraphProvider } from '@/features/graph/providers/GraphProvider' import { GroupsCoordinatesProvider } from '@/features/graph/providers/GroupsCoordinateProvider' -import { useI18n } from '@/locales' +import { useTranslate } from '@tolgee/react' import { trpc } from '@/lib/trpc' import { isDefined } from '@typebot.io/lib' +import { EventsCoordinatesProvider } from '@/features/graph/providers/EventsCoordinateProvider' export const AnalyticsGraphContainer = ({ stats }: { stats?: Stats }) => { - const t = useI18n() + const { t } = useTranslate() const { isOpen, onOpen, onClose } = useDisclosure() const { typebot, publishedTypebot } = useTypebot() - const { data } = trpc.analytics.getTotalAnswersInBlocks.useQuery( + const { data } = trpc.analytics.getTotalAnswers.useQuery( + { + typebotId: typebot?.id as string, + }, + { enabled: isDefined(publishedTypebot) } + ) + + const { data: edgesData } = trpc.analytics.getTotalVisitedEdges.useQuery( { typebotId: typebot?.id as string, }, { enabled: isDefined(publishedTypebot) } ) - const startBlockId = publishedTypebot?.groups - .find((group) => group.blocks.at(0)?.type === 'start') - ?.blocks.at(0)?.id return ( { h="full" justifyContent="center" > - {publishedTypebot && - data?.totalAnswersInBlocks && - stats && - startBlockId ? ( + {publishedTypebot && stats ? ( - + + + ) : ( @@ -82,6 +77,7 @@ export const AnalyticsGraphContainer = ({ stats }: { stats?: Stats }) => { onClose={onClose} isOpen={isOpen} type={t('billing.limitMessage.analytics')} + excludedPlans={['STARTER']} /> diff --git a/apps/builder/src/features/analytics/components/StatsCards.tsx b/apps/builder/src/features/analytics/components/StatsCards.tsx index 9066c06b16..f63e64ef38 100644 --- a/apps/builder/src/features/analytics/components/StatsCards.tsx +++ b/apps/builder/src/features/analytics/components/StatsCards.tsx @@ -1,4 +1,4 @@ -import { useScopedI18n } from '@/locales' +import { useTranslate } from '@tolgee/react' import { GridProps, SimpleGrid, @@ -22,13 +22,13 @@ export const StatsCards = ({ stats, ...props }: { stats?: Stats } & GridProps) => { - const scopedT = useScopedI18n('analytics') + const { t } = useTranslate() const bg = useColorModeValue('white', 'gray.900') return ( - {scopedT('viewsLabel')} + {t('analytics.viewsLabel')} {stats ? ( {stats.totalViews} ) : ( @@ -36,7 +36,7 @@ export const StatsCards = ({ )} - {scopedT('startsLabel')} + {t('analytics.startsLabel')} {stats ? ( {stats.totalStarts} ) : ( @@ -44,10 +44,10 @@ export const StatsCards = ({ )} - {scopedT('completionRateLabel')} + {t('analytics.completionRateLabel')} {stats ? ( - {computeCompletionRate(scopedT('notAvailableLabel'))( + {computeCompletionRate(t('analytics.notAvailableLabel'))( stats.totalCompleted, stats.totalStarts )} diff --git a/apps/builder/src/features/analytics/helpers/computePreviousTotalAnswers.ts b/apps/builder/src/features/analytics/helpers/computePreviousTotalAnswers.ts deleted file mode 100644 index a461529244..0000000000 --- a/apps/builder/src/features/analytics/helpers/computePreviousTotalAnswers.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { isInputBlock } from '@typebot.io/lib' -import { PublicTypebot } from '@typebot.io/schemas' -import { TotalAnswersInBlock } from '@typebot.io/schemas/features/analytics' - -export const computePreviousTotalAnswers = ( - publishedTypebot: PublicTypebot, - currentBlockId: string, - totalAnswersInBlocks: TotalAnswersInBlock[], - visitedBlocks: string[] = [] -): number => { - let totalAnswers = 0 - const allBlocks = publishedTypebot.groups.flatMap((group) => group.blocks) - const currentGroup = publishedTypebot.groups.find((group) => - group.blocks.find((block) => block.id === currentBlockId) - ) - if (!currentGroup) return 0 - const currentBlockIndex = currentGroup.blocks.findIndex( - (block) => block.id === currentBlockId - ) - const previousBlocks = currentGroup.blocks.slice(0, currentBlockIndex + 1) - for (const block of previousBlocks.reverse()) { - if (visitedBlocks.includes(block.id)) continue - if ( - currentBlockId !== block.id && - (isInputBlock(block) || block.type === 'start') - ) { - visitedBlocks.push(block.id) - return ( - totalAnswersInBlocks.find( - (totalAnswersInBlock) => - totalAnswersInBlock.blockId === block.id && - totalAnswersInBlock.itemId === undefined - )?.total ?? 0 - ) - } - const connectedEdges = publishedTypebot.edges.filter( - (edge) => edge.to.blockId === block.id - ) - if (connectedEdges.length) { - for (const connectedEdge of connectedEdges) { - const connectedBlock = allBlocks.find( - (block) => block.id === connectedEdge.from.blockId - ) - if (connectedBlock && !visitedBlocks.includes(connectedBlock.id)) { - if (isInputBlock(connectedBlock) || connectedBlock.type === 'start') { - visitedBlocks.push(connectedBlock.id) - totalAnswers += - totalAnswersInBlocks.find( - (totalAnswersInBlock) => - totalAnswersInBlock.blockId === connectedEdge.from.blockId && - totalAnswersInBlock.itemId === connectedEdge.from.itemId - )?.total ?? 0 - } else { - totalAnswers += computePreviousTotalAnswers( - publishedTypebot, - connectedBlock.id, - totalAnswersInBlocks, - visitedBlocks - ) - } - } - } - } - } - const edgesConnectedToGroup = publishedTypebot.edges.filter( - (edge) => edge.to.groupId === currentGroup.id - ) - - if (edgesConnectedToGroup.length) { - for (const connectedEdge of edgesConnectedToGroup) { - const connectedBlock = allBlocks.find( - (block) => block.id === connectedEdge.from.blockId - ) - if (connectedBlock && !visitedBlocks.includes(connectedBlock.id)) { - if (isInputBlock(connectedBlock) || connectedBlock.type === 'start') { - visitedBlocks.push(connectedBlock.id) - totalAnswers += - totalAnswersInBlocks.find( - (totalAnswersInBlock) => - totalAnswersInBlock.blockId === connectedEdge.from.blockId && - totalAnswersInBlock.itemId === connectedEdge.from.itemId - )?.total ?? 0 - } else { - totalAnswers += computePreviousTotalAnswers( - publishedTypebot, - connectedBlock.id, - totalAnswersInBlocks, - visitedBlocks - ) - } - } - } - } - - return totalAnswers -} diff --git a/apps/builder/src/features/analytics/helpers/computeTotalUsersAtBlock.ts b/apps/builder/src/features/analytics/helpers/computeTotalUsersAtBlock.ts new file mode 100644 index 0000000000..e2c944c5f6 --- /dev/null +++ b/apps/builder/src/features/analytics/helpers/computeTotalUsersAtBlock.ts @@ -0,0 +1,60 @@ +import { isInputBlock, isNotDefined } from '@typebot.io/lib' +import { PublicTypebotV6 } from '@typebot.io/schemas' +import { + TotalAnswers, + TotalVisitedEdges, +} from '@typebot.io/schemas/features/analytics' + +export const computeTotalUsersAtBlock = ( + currentBlockId: string, + { + publishedTypebot, + totalVisitedEdges, + totalAnswers, + }: { + publishedTypebot: PublicTypebotV6 + totalVisitedEdges: TotalVisitedEdges[] + totalAnswers: TotalAnswers[] + } +): number => { + let totalUsers = 0 + const currentGroup = publishedTypebot.groups.find((group) => + group.blocks.find((block) => block.id === currentBlockId) + ) + if (!currentGroup) return 0 + const currentBlockIndex = currentGroup.blocks.findIndex( + (block) => block.id === currentBlockId + ) + const previousBlocks = currentGroup.blocks.slice(0, currentBlockIndex + 1) + for (const block of previousBlocks.reverse()) { + if (currentBlockId !== block.id && isInputBlock(block)) + return totalAnswers.find((t) => t.blockId === block.id)?.total ?? 0 + const incomingEdges = publishedTypebot.edges.filter( + (edge) => edge.to.blockId === block.id + ) + if (!incomingEdges.length) continue + totalUsers += incomingEdges.reduce( + (acc, incomingEdge) => + acc + + (totalVisitedEdges.find( + (totalEdge) => totalEdge.edgeId === incomingEdge.id + )?.total ?? 0), + 0 + ) + } + const edgesConnectedToGroup = publishedTypebot.edges.filter( + (edge) => + edge.to.groupId === currentGroup.id && isNotDefined(edge.to.blockId) + ) + + totalUsers += edgesConnectedToGroup.reduce( + (acc, connectedEdge) => + acc + + (totalVisitedEdges.find( + (totalEdge) => totalEdge.edgeId === connectedEdge.id + )?.total ?? 0), + 0 + ) + + return totalUsers +} diff --git a/apps/builder/src/features/analytics/helpers/getTotalAnswersAtBlock.ts b/apps/builder/src/features/analytics/helpers/getTotalAnswersAtBlock.ts new file mode 100644 index 0000000000..c17769e707 --- /dev/null +++ b/apps/builder/src/features/analytics/helpers/getTotalAnswersAtBlock.ts @@ -0,0 +1,20 @@ +import { byId } from '@typebot.io/lib' +import { PublicTypebotV6 } from '@typebot.io/schemas' +import { TotalAnswers } from '@typebot.io/schemas/features/analytics' + +export const getTotalAnswersAtBlock = ( + currentBlockId: string, + { + publishedTypebot, + totalAnswers, + }: { + publishedTypebot: PublicTypebotV6 + totalAnswers: TotalAnswers[] + } +): number => { + const block = publishedTypebot.groups + .flatMap((g) => g.blocks) + .find(byId(currentBlockId)) + if (!block) throw new Error(`Block ${currentBlockId} not found`) + return totalAnswers.find((t) => t.blockId === block.id)?.total ?? 0 +} diff --git a/apps/builder/src/features/auth/components/OnboardingPage.tsx b/apps/builder/src/features/auth/components/OnboardingPage.tsx index 1f0a02c090..75424db862 100644 --- a/apps/builder/src/features/auth/components/OnboardingPage.tsx +++ b/apps/builder/src/features/auth/components/OnboardingPage.tsx @@ -13,14 +13,14 @@ import { useRouter } from 'next/router' import { useEffect, useRef, useState } from 'react' import confetti from 'canvas-confetti' import { useUser } from '@/features/account/hooks/useUser' -import { useI18n } from '@/locales' +import { useTranslate } from '@tolgee/react' import { env } from '@typebot.io/env' const totalSteps = 5 export const OnboardingPage = () => { - const t = useI18n() - const { push, replace } = useRouter() + const { t } = useTranslate() + const { replace, query } = useRouter() const confettiCanvaContainer = useRef(null) const confettiCanon = useRef() const { user, updateUser } = useUser() @@ -38,8 +38,8 @@ export const OnboardingPage = () => { useEffect(() => { if (!user?.createdAt) return if (isNewUser === false || !env.NEXT_PUBLIC_ONBOARDING_TYPEBOT_ID) - replace('/typebots') - }, [isNewUser, replace, user?.createdAt]) + replace({ pathname: '/typebots', query }) + }, [isNewUser, query, replace, user?.createdAt]) const initConfettis = () => { if (!confettiCanvaContainer.current || confettiCanon.current) return @@ -83,7 +83,7 @@ export const OnboardingPage = () => { right="5" variant="ghost" size="sm" - onClick={() => push('/typebots')} + onClick={() => replace({ pathname: '/typebots', query })} > {t('skip')} @@ -95,7 +95,10 @@ export const OnboardingPage = () => { prefilledVariables={{ Name: user?.name, Email: user?.email }} onEnd={() => { setTimeout(() => { - push('/typebots/create', { query: { isFirstBot: true } }) + replace({ + pathname: '/typebots', + query: { ...query, isFirstBot: true }, + }) }, 2000) }} onAnswer={updateUserInfo} diff --git a/apps/builder/src/features/auth/components/SignInError.tsx b/apps/builder/src/features/auth/components/SignInError.tsx index 0c4002ace6..e2496f5532 100644 --- a/apps/builder/src/features/auth/components/SignInError.tsx +++ b/apps/builder/src/features/auth/components/SignInError.tsx @@ -1,4 +1,4 @@ -import { useScopedI18n } from '@/locales' +import { useTranslate } from '@tolgee/react' import { Alert } from '@chakra-ui/react' type Props = { @@ -6,16 +6,16 @@ type Props = { } export const SignInError = ({ error }: Props) => { - const scopedT = useScopedI18n('auth.error') + const { t } = useTranslate() const errors: Record = { - Signin: scopedT('default'), - OAuthSignin: scopedT('default'), - OAuthCallback: scopedT('default'), - OAuthCreateAccount: scopedT('email'), - EmailCreateAccount: scopedT('default'), - Callback: scopedT('default'), - OAuthAccountNotLinked: scopedT('oauthNotLinked'), - default: scopedT('unknown'), + Signin: t('auth.error.default'), + OAuthSignin: t('auth.error.default'), + OAuthCallback: t('auth.error.default'), + OAuthCreateAccount: t('auth.error.email'), + EmailCreateAccount: t('auth.error.default'), + Callback: t('auth.error.default'), + OAuthAccountNotLinked: t('auth.error.oauthNotLinked'), + default: t('auth.error.unknown'), } return ( diff --git a/apps/builder/src/features/auth/components/SignInForm.tsx b/apps/builder/src/features/auth/components/SignInForm.tsx index 1cd28b82fb..475bbe222f 100644 --- a/apps/builder/src/features/auth/components/SignInForm.tsx +++ b/apps/builder/src/features/auth/components/SignInForm.tsx @@ -27,7 +27,7 @@ import { BuiltInProviderType } from 'next-auth/providers' import { useToast } from '@/hooks/useToast' import { TextLink } from '@/components/TextLink' import { SignInError } from './SignInError' -import { useScopedI18n } from '@/locales' +import { useTranslate } from '@tolgee/react' type Props = { defaultEmail?: string @@ -35,7 +35,7 @@ type Props = { export const SignInForm = ({ defaultEmail, }: Props & HTMLChakraProps<'form'>) => { - const scopedT = useScopedI18n('auth') + const { t } = useTranslate() const router = useRouter() const { status } = useSession() const [authLoading, setAuthLoading] = useState(false) @@ -55,7 +55,7 @@ export const SignInForm = ({ useEffect(() => { if (status === 'authenticated') { - router.replace(router.query.callbackUrl?.toString() ?? '/typebots') + router.replace(router.query.redirectPath?.toString() ?? '/typebots') return } ;(async () => { @@ -78,17 +78,29 @@ export const SignInForm = ({ redirect: false, }) if (response?.error) { - showToast({ - title: scopedT('signinErrorToast.title'), - description: scopedT('signinErrorToast.description'), - }) + if (response.error.includes('ip-banned')) + showToast({ + status: 'info', + description: + 'Your account has suspicious activity and is being reviewed by our team. Feel free to contact us.', + }) + else if (response.error.includes('rate-limited')) + showToast({ + status: 'info', + description: t('auth.signinErrorToast.tooManyRequests'), + }) + else + showToast({ + title: t('auth.signinErrorToast.title'), + description: t('auth.signinErrorToast.description'), + }) } else { setIsMagicLinkSent(true) } - } catch { + } catch (e) { showToast({ status: 'info', - description: scopedT('signinErrorToast.tooManyRequests'), + description: 'An error occured while signing in', }) } setAuthLoading(false) @@ -98,12 +110,12 @@ export const SignInForm = ({ if (hasNoAuthProvider) return ( - {scopedT('noProvider.preLink')}{' '} + {t('auth.noProvider.preLink')}{' '} - {scopedT('noProvider.link')} + {t('auth.noProvider.link')} ) @@ -114,9 +126,7 @@ export const SignInForm = ({ {providers?.email && ( <> - - {scopedT('orEmailLabel')} - + {t('auth.orEmailLabel')} - {scopedT('emailSubmitButton.label')} + {t('auth.emailSubmitButton.label')} @@ -150,8 +160,8 @@ export const SignInForm = ({ - {scopedT('magicLink.title')} - {scopedT('magicLink.description')} + {t('auth.magicLink.title')} + {t('auth.magicLink.description')} diff --git a/apps/builder/src/features/auth/components/SignInPage.tsx b/apps/builder/src/features/auth/components/SignInPage.tsx index 69442dab9a..e83b5b566a 100644 --- a/apps/builder/src/features/auth/components/SignInPage.tsx +++ b/apps/builder/src/features/auth/components/SignInPage.tsx @@ -1,7 +1,14 @@ import { Seo } from '@/components/Seo' import { TextLink } from '@/components/TextLink' -import { useScopedI18n } from '@/locales' -import { VStack, Heading, Text } from '@chakra-ui/react' +import { T, useTranslate } from '@tolgee/react' +import { + VStack, + Heading, + Text, + Image, + Box, + useColorMode, +} from '@chakra-ui/react' import { useRouter } from 'next/router' import { SignInForm } from './SignInForm' @@ -11,16 +18,37 @@ type Props = { } export const SignInPage = ({ type }: Props) => { - const scopedT = useScopedI18n('auth') + const { t } = useTranslate() const { query } = useRouter() + const { colorMode } = useColorMode() return ( + + + { }} > {type === 'signin' - ? scopedT('signin.heading') - : scopedT('register.heading')} + ? t('auth.signin.heading') + : t('auth.register.heading')} {type === 'signin' ? ( - {scopedT('signin.noAccountLabel.preLink')}{' '} + {t('auth.signin.noAccountLabel.preLink')}{' '} - {scopedT('signin.noAccountLabel.link')} + {t('auth.signin.noAccountLabel.link')} ) : ( - {scopedT('register.alreadyHaveAccountLabel.preLink')}{' '} + {t('auth.register.alreadyHaveAccountLabel.preLink')}{' '} - {scopedT('register.alreadyHaveAccountLabel.link')} + {t('auth.register.alreadyHaveAccountLabel.link')} )} {type === 'signup' ? ( - {scopedT('register.aggreeToTerms', { - termsOfService: ( - - {scopedT('register.termsOfService')} - - ), - privacyPolicy: ( - - {scopedT('register.privacyPolicy')} - - ), - })} + , + privacy: ( + + ), + }} + /> ) : null} diff --git a/apps/builder/src/features/auth/components/SocialLoginButtons.tsx b/apps/builder/src/features/auth/components/SocialLoginButtons.tsx index e974ebe38e..662398c850 100644 --- a/apps/builder/src/features/auth/components/SocialLoginButtons.tsx +++ b/apps/builder/src/features/auth/components/SocialLoginButtons.tsx @@ -15,7 +15,7 @@ import { omit } from '@typebot.io/lib' import { AzureAdLogo } from '@/components/logos/AzureAdLogo' import { FacebookLogo } from '@/components/logos/FacebookLogo' import { GitlabLogo } from '@/components/logos/GitlabLogo' -import { useScopedI18n } from '@/locales' +import { useTranslate } from '@tolgee/react' type Props = { providers: @@ -24,7 +24,7 @@ type Props = { } export const SocialLoginButtons = ({ providers }: Props) => { - const scopedT = useScopedI18n('auth.socialLogin') + const { t } = useTranslate() const { query } = useRouter() const { status } = useSession() const [authLoading, setAuthLoading] = @@ -65,7 +65,7 @@ export const SocialLoginButtons = ({ providers }: Props) => { } variant="outline" > - {scopedT('githubButton.label')} + {t('auth.socialLogin.githubButton.label')} )} {providers?.google && ( @@ -79,7 +79,7 @@ export const SocialLoginButtons = ({ providers }: Props) => { } variant="outline" > - {scopedT('googleButton.label')} + {t('auth.socialLogin.googleButton.label')} )} {providers?.facebook && ( @@ -93,7 +93,7 @@ export const SocialLoginButtons = ({ providers }: Props) => { } variant="outline" > - {scopedT('facebookButton.label')} + {t('auth.socialLogin.facebookButton.label')} )} {providers?.gitlab && ( @@ -107,7 +107,7 @@ export const SocialLoginButtons = ({ providers }: Props) => { } variant="outline" > - {scopedT('gitlabButton.label', { + {t('auth.socialLogin.gitlabButton.label', { gitlabProviderName: providers.gitlab.name, })} @@ -123,7 +123,7 @@ export const SocialLoginButtons = ({ providers }: Props) => { } variant="outline" > - {scopedT('azureButton.label', { + {t('auth.socialLogin.azureButton.label', { azureProviderName: providers['azure-ad'].name, })} @@ -137,7 +137,7 @@ export const SocialLoginButtons = ({ providers }: Props) => { } variant="outline" > - {scopedT('customButton.label', { + {t('auth.socialLogin.customButton.label', { customProviderName: providers['custom-oauth'].name, })} diff --git a/apps/builder/src/features/auth/helpers/getAuthenticatedUser.ts b/apps/builder/src/features/auth/helpers/getAuthenticatedUser.ts index 99e48c7043..38b456a051 100644 --- a/apps/builder/src/features/auth/helpers/getAuthenticatedUser.ts +++ b/apps/builder/src/features/auth/helpers/getAuthenticatedUser.ts @@ -1,11 +1,11 @@ -import prisma from '@/lib/prisma' -import { authOptions } from '@/pages/api/auth/[...nextauth]' -import { setUser } from '@sentry/nextjs' +import prisma from '@typebot.io/lib/prisma' +import { getAuthOptions } from '@/pages/api/auth/[...nextauth]' +import * as Sentry from '@sentry/nextjs' import { User } from '@typebot.io/prisma' import { NextApiRequest, NextApiResponse } from 'next' import { getServerSession } from 'next-auth' -import { mockedUser } from '../mockedUser' import { env } from '@typebot.io/env' +import { mockedUser } from '@typebot.io/lib/mockedUser' export const getAuthenticatedUser = async ( req: NextApiRequest, @@ -15,11 +15,11 @@ export const getAuthenticatedUser = async ( if (bearerToken) return authenticateByToken(bearerToken) const user = env.NEXT_PUBLIC_E2E_TEST ? mockedUser - : ((await getServerSession(req, res, authOptions))?.user as + : ((await getServerSession(req, res, getAuthOptions({})))?.user as | User | undefined) if (!user || !('id' in user)) return - setUser({ id: user.id }) + Sentry.setUser({ id: user.id }) return user } @@ -30,7 +30,7 @@ const authenticateByToken = async ( const user = (await prisma.user.findFirst({ where: { apiTokens: { some: { token: apiToken } } }, })) as User - setUser({ id: user.id }) + Sentry.setUser({ id: user.id }) return user } diff --git a/apps/builder/src/features/billing/api/createCheckoutSession.ts b/apps/builder/src/features/billing/api/createCheckoutSession.ts index de94a44aa7..9d44f8eb4d 100644 --- a/apps/builder/src/features/billing/api/createCheckoutSession.ts +++ b/apps/builder/src/features/billing/api/createCheckoutSession.ts @@ -1,10 +1,9 @@ -import prisma from '@/lib/prisma' +import prisma from '@typebot.io/lib/prisma' import { authenticatedProcedure } from '@/helpers/server/trpc' import { TRPCError } from '@trpc/server' import { Plan } from '@typebot.io/prisma' import Stripe from 'stripe' import { z } from 'zod' -import { parseSubscriptionItems } from '../helpers/parseSubscriptionItems' import { isAdminWriteWorkspaceForbidden } from '@/features/workspace/helpers/isAdminWriteWorkspaceForbidden' import { env } from '@typebot.io/env' @@ -12,7 +11,7 @@ export const createCheckoutSession = authenticatedProcedure .meta({ openapi: { method: 'POST', - path: '/billing/subscription/checkout', + path: '/v1/billing/subscription/checkout', protect: true, summary: 'Create checkout session to create a new subscription', tags: ['Billing'], @@ -26,15 +25,12 @@ export const createCheckoutSession = authenticatedProcedure currency: z.enum(['usd', 'eur']), plan: z.enum([Plan.STARTER, Plan.PRO]), returnUrl: z.string(), - additionalChats: z.number(), - additionalStorage: z.number(), vat: z .object({ type: z.string(), value: z.string(), }) .optional(), - isYearly: z.boolean(), }) ) .output( @@ -44,18 +40,7 @@ export const createCheckoutSession = authenticatedProcedure ) .mutation( async ({ - input: { - vat, - email, - company, - workspaceId, - currency, - plan, - returnUrl, - additionalChats, - additionalStorage, - isYearly, - }, + input: { vat, email, company, workspaceId, currency, plan, returnUrl }, ctx: { user }, }) => { if (!env.STRIPE_SECRET_KEY) @@ -118,9 +103,6 @@ export const createCheckoutSession = authenticatedProcedure currency, plan, returnUrl, - additionalChats, - additionalStorage, - isYearly, }) if (!checkoutUrl) @@ -141,24 +123,12 @@ type Props = { currency: 'usd' | 'eur' plan: 'STARTER' | 'PRO' returnUrl: string - additionalChats: number - additionalStorage: number - isYearly: boolean userId: string } export const createCheckoutSessionUrl = (stripe: Stripe) => - async ({ - customerId, - workspaceId, - currency, - plan, - returnUrl, - additionalChats, - additionalStorage, - isYearly, - }: Props) => { + async ({ customerId, workspaceId, currency, plan, returnUrl }: Props) => { const session = await stripe.checkout.sessions.create({ success_url: `${returnUrl}?stripe=${plan}&success=true`, cancel_url: `${returnUrl}?stripe=cancel`, @@ -172,18 +142,25 @@ export const createCheckoutSessionUrl = metadata: { workspaceId, plan, - additionalChats, - additionalStorage, }, currency, billing_address_collection: 'required', automatic_tax: { enabled: true }, - line_items: parseSubscriptionItems( - plan, - additionalChats, - additionalStorage, - isYearly - ), + line_items: [ + { + price: + plan === 'STARTER' + ? env.STRIPE_STARTER_PRICE_ID + : env.STRIPE_PRO_PRICE_ID, + quantity: 1, + }, + { + price: + plan === 'STARTER' + ? env.STRIPE_STARTER_CHATS_PRICE_ID + : env.STRIPE_PRO_CHATS_PRICE_ID, + }, + ], }) return session.url diff --git a/apps/builder/src/features/billing/api/createCustomCheckoutSession.ts b/apps/builder/src/features/billing/api/createCustomCheckoutSession.ts index 4498709774..697214d7a0 100644 --- a/apps/builder/src/features/billing/api/createCustomCheckoutSession.ts +++ b/apps/builder/src/features/billing/api/createCustomCheckoutSession.ts @@ -1,4 +1,4 @@ -import prisma from '@/lib/prisma' +import prisma from '@typebot.io/lib/prisma' import { authenticatedProcedure } from '@/helpers/server/trpc' import { TRPCError } from '@trpc/server' import { Plan } from '@typebot.io/prisma' @@ -11,7 +11,7 @@ export const createCustomCheckoutSession = authenticatedProcedure .meta({ openapi: { method: 'POST', - path: '/billing/subscription/custom-checkout', + path: '/v1/billing/subscription/custom-checkout', protect: true, summary: 'Create custom checkout session to make a workspace pay for a custom plan', diff --git a/apps/builder/src/features/billing/api/getBillingPortalUrl.ts b/apps/builder/src/features/billing/api/getBillingPortalUrl.ts index b79b7a4d57..48bb8405b5 100644 --- a/apps/builder/src/features/billing/api/getBillingPortalUrl.ts +++ b/apps/builder/src/features/billing/api/getBillingPortalUrl.ts @@ -1,4 +1,4 @@ -import prisma from '@/lib/prisma' +import prisma from '@typebot.io/lib/prisma' import { authenticatedProcedure } from '@/helpers/server/trpc' import { TRPCError } from '@trpc/server' import Stripe from 'stripe' @@ -10,7 +10,7 @@ export const getBillingPortalUrl = authenticatedProcedure .meta({ openapi: { method: 'GET', - path: '/billing/subscription/portal', + path: '/v1/billing/subscription/portal', protect: true, summary: 'Get Stripe billing portal URL', tags: ['Billing'], diff --git a/apps/builder/src/features/billing/api/getSubscription.ts b/apps/builder/src/features/billing/api/getSubscription.ts index 41ad02d7a1..bc71790053 100644 --- a/apps/builder/src/features/billing/api/getSubscription.ts +++ b/apps/builder/src/features/billing/api/getSubscription.ts @@ -1,18 +1,17 @@ -import prisma from '@/lib/prisma' +import prisma from '@typebot.io/lib/prisma' import { authenticatedProcedure } from '@/helpers/server/trpc' import { TRPCError } from '@trpc/server' import Stripe from 'stripe' import { z } from 'zod' import { subscriptionSchema } from '@typebot.io/schemas/features/billing/subscription' import { isReadWorkspaceFobidden } from '@/features/workspace/helpers/isReadWorkspaceFobidden' -import { priceIds } from '@typebot.io/lib/api/pricing' import { env } from '@typebot.io/env' export const getSubscription = authenticatedProcedure .meta({ openapi: { method: 'GET', - path: '/billing/subscription', + path: '/v1/billing/subscription', protect: true, summary: 'List invoices', tags: ['Billing'], @@ -75,17 +74,14 @@ export const getSubscription = authenticatedProcedure return { subscription: { + currentBillingPeriod: + subscriptionSchema.shape.currentBillingPeriod.parse({ + start: new Date(currentSubscription.current_period_start), + end: new Date(currentSubscription.current_period_end), + }), status: subscriptionSchema.shape.status.parse( currentSubscription.status ), - isYearly: currentSubscription.items.data.some((item) => { - return ( - priceIds.STARTER.chats.yearly === item.price.id || - priceIds.STARTER.storage.yearly === item.price.id || - priceIds.PRO.chats.yearly === item.price.id || - priceIds.PRO.storage.yearly === item.price.id - ) - }), currency: currentSubscription.currency as 'usd' | 'eur', cancelDate: currentSubscription.cancel_at ? new Date(currentSubscription.cancel_at * 1000) @@ -93,13 +89,3 @@ export const getSubscription = authenticatedProcedure }, } }) - -export const chatPriceIds = [priceIds.STARTER.chats.monthly] - .concat(priceIds.STARTER.chats.yearly) - .concat(priceIds.PRO.chats.monthly) - .concat(priceIds.PRO.chats.yearly) - -export const storagePriceIds = [priceIds.STARTER.storage.monthly] - .concat(priceIds.STARTER.storage.yearly) - .concat(priceIds.PRO.storage.monthly) - .concat(priceIds.PRO.storage.yearly) diff --git a/apps/builder/src/features/billing/api/getUsage.ts b/apps/builder/src/features/billing/api/getUsage.ts index d62bf370f6..438e67f8d4 100644 --- a/apps/builder/src/features/billing/api/getUsage.ts +++ b/apps/builder/src/features/billing/api/getUsage.ts @@ -1,14 +1,16 @@ -import prisma from '@/lib/prisma' +import prisma from '@typebot.io/lib/prisma' import { authenticatedProcedure } from '@/helpers/server/trpc' import { TRPCError } from '@trpc/server' import { z } from 'zod' import { isReadWorkspaceFobidden } from '@/features/workspace/helpers/isReadWorkspaceFobidden' +import { env } from '@typebot.io/env' +import Stripe from 'stripe' export const getUsage = authenticatedProcedure .meta({ openapi: { method: 'GET', - path: '/billing/usage', + path: '/v1/billing/usage', protect: true, summary: 'Get current plan usage', tags: ['Billing'], @@ -19,15 +21,15 @@ export const getUsage = authenticatedProcedure workspaceId: z.string(), }) ) - .output( - z.object({ totalChatsUsed: z.number(), totalStorageUsed: z.number() }) - ) + .output(z.object({ totalChatsUsed: z.number(), resetsAt: z.date() })) .query(async ({ input: { workspaceId }, ctx: { user } }) => { const workspace = await prisma.workspace.findFirst({ where: { id: workspaceId, }, select: { + stripeId: true, + plan: true, members: { select: { userId: true, @@ -44,31 +46,63 @@ export const getUsage = authenticatedProcedure message: 'Workspace not found', }) - const now = new Date() - const firstDayOfMonth = new Date(now.getFullYear(), now.getMonth(), 1) + if ( + !env.STRIPE_SECRET_KEY || + !workspace.stripeId || + (workspace.plan !== 'STARTER' && workspace.plan !== 'PRO') + ) { + const now = new Date() + const firstDayOfMonth = new Date(now.getFullYear(), now.getMonth(), 1) + + const totalChatsUsed = await prisma.result.count({ + where: { + typebotId: { in: workspace.typebots.map((typebot) => typebot.id) }, + hasStarted: true, + createdAt: { + gte: firstDayOfMonth, + }, + }, + }) + + const firstDayOfNextMonth = new Date( + firstDayOfMonth.getFullYear(), + firstDayOfMonth.getMonth() + 1, + 1 + ) + return { totalChatsUsed, resetsAt: firstDayOfNextMonth } + } + + const stripe = new Stripe(env.STRIPE_SECRET_KEY, { + apiVersion: '2022-11-15', + }) + + const subscriptions = await stripe.subscriptions.list({ + customer: workspace.stripeId, + }) + + const currentSubscription = subscriptions.data + .filter((sub) => ['past_due', 'active'].includes(sub.status)) + .sort((a, b) => a.created - b.created) + .shift() + + if (!currentSubscription) + throw new TRPCError({ + code: 'INTERNAL_SERVER_ERROR', + message: `No subscription found on workspace: ${workspaceId}`, + }) + const totalChatsUsed = await prisma.result.count({ where: { typebotId: { in: workspace.typebots.map((typebot) => typebot.id) }, hasStarted: true, createdAt: { - gte: firstDayOfMonth, - }, - }, - }) - const { - _sum: { storageUsed: totalStorageUsed }, - } = await prisma.answer.aggregate({ - where: { - storageUsed: { gt: 0 }, - result: { - typebotId: { in: workspace.typebots.map((typebot) => typebot.id) }, + gte: new Date(currentSubscription.current_period_start * 1000), }, }, - _sum: { storageUsed: true }, }) return { totalChatsUsed, - totalStorageUsed: totalStorageUsed ?? 0, + resetsAt: new Date(currentSubscription.current_period_end * 1000), } }) diff --git a/apps/builder/src/features/billing/api/listInvoices.ts b/apps/builder/src/features/billing/api/listInvoices.ts index 8e9ac082bd..d520b7d730 100644 --- a/apps/builder/src/features/billing/api/listInvoices.ts +++ b/apps/builder/src/features/billing/api/listInvoices.ts @@ -1,4 +1,4 @@ -import prisma from '@/lib/prisma' +import prisma from '@typebot.io/lib/prisma' import { authenticatedProcedure } from '@/helpers/server/trpc' import { TRPCError } from '@trpc/server' import Stripe from 'stripe' @@ -12,7 +12,7 @@ export const listInvoices = authenticatedProcedure .meta({ openapi: { method: 'GET', - path: '/billing/invoices', + path: '/v1/billing/invoices', protect: true, summary: 'List invoices', tags: ['Billing'], @@ -64,12 +64,12 @@ export const listInvoices = authenticatedProcedure .filter( (invoice) => isDefined(invoice.invoice_pdf) && isDefined(invoice.id) ) - .map((i) => ({ - id: i.number as string, - url: i.invoice_pdf as string, - amount: i.subtotal, - currency: i.currency, - date: i.status_transitions.paid_at, + .map((invoice) => ({ + id: invoice.number as string, + url: invoice.invoice_pdf as string, + amount: invoice.subtotal, + currency: invoice.currency, + date: invoice.status_transitions.paid_at, })), } }) diff --git a/apps/builder/src/features/billing/api/updateSubscription.ts b/apps/builder/src/features/billing/api/updateSubscription.ts index 3f8dc575a8..7070357e70 100644 --- a/apps/builder/src/features/billing/api/updateSubscription.ts +++ b/apps/builder/src/features/billing/api/updateSubscription.ts @@ -1,25 +1,20 @@ import { sendTelemetryEvents } from '@typebot.io/lib/telemetry/sendTelemetryEvent' -import prisma from '@/lib/prisma' +import prisma from '@typebot.io/lib/prisma' import { authenticatedProcedure } from '@/helpers/server/trpc' import { TRPCError } from '@trpc/server' import { Plan } from '@typebot.io/prisma' import { workspaceSchema } from '@typebot.io/schemas' import Stripe from 'stripe' -import { isDefined } from '@typebot.io/lib' import { z } from 'zod' -import { getChatsLimit, getStorageLimit } from '@typebot.io/lib/pricing' -import { chatPriceIds, storagePriceIds } from './getSubscription' import { createCheckoutSessionUrl } from './createCheckoutSession' import { isAdminWriteWorkspaceForbidden } from '@/features/workspace/helpers/isAdminWriteWorkspaceForbidden' -import { getUsage } from '@typebot.io/lib/api/getUsage' import { env } from '@typebot.io/env' -import { priceIds } from '@typebot.io/lib/api/pricing' export const updateSubscription = authenticatedProcedure .meta({ openapi: { method: 'PATCH', - path: '/billing/subscription', + path: '/v1/billing/subscription', protect: true, summary: 'Update subscription', tags: ['Billing'], @@ -30,10 +25,7 @@ export const updateSubscription = authenticatedProcedure returnUrl: z.string(), workspaceId: z.string(), plan: z.enum([Plan.STARTER, Plan.PRO]), - additionalChats: z.number(), - additionalStorage: z.number(), currency: z.enum(['usd', 'eur']), - isYearly: z.boolean(), }) ) .output( @@ -44,15 +36,7 @@ export const updateSubscription = authenticatedProcedure ) .mutation( async ({ - input: { - workspaceId, - plan, - additionalChats, - additionalStorage, - currency, - isYearly, - returnUrl, - }, + input: { workspaceId, plan, currency, returnUrl }, ctx: { user }, }) => { if (!env.STRIPE_SECRET_KEY) @@ -83,6 +67,7 @@ export const updateSubscription = authenticatedProcedure code: 'NOT_FOUND', message: 'Workspace not found', }) + const stripe = new Stripe(env.STRIPE_SECRET_KEY, { apiVersion: '2022-11-15', }) @@ -93,51 +78,54 @@ export const updateSubscription = authenticatedProcedure }) const subscription = data[0] as Stripe.Subscription | undefined const currentPlanItemId = subscription?.items.data.find((item) => - [env.STRIPE_STARTER_PRODUCT_ID, env.STRIPE_PRO_PRODUCT_ID].includes( - item.price.product.toString() + [env.STRIPE_STARTER_PRICE_ID, env.STRIPE_PRO_PRICE_ID].includes( + item.price.id ) )?.id - const currentAdditionalChatsItemId = subscription?.items.data.find( - (item) => chatPriceIds.includes(item.price.id) - )?.id - const currentAdditionalStorageItemId = subscription?.items.data.find( - (item) => storagePriceIds.includes(item.price.id) + const currentUsageItemId = subscription?.items.data.find( + (item) => + item.price.id === env.STRIPE_STARTER_CHATS_PRICE_ID || + item.price.id === env.STRIPE_PRO_CHATS_PRICE_ID )?.id - const frequency = isYearly ? 'yearly' : 'monthly' const items = [ { id: currentPlanItemId, - price: priceIds[plan].base[frequency], + price: + plan === Plan.STARTER + ? env.STRIPE_STARTER_PRICE_ID + : env.STRIPE_PRO_PRICE_ID, quantity: 1, }, - additionalChats === 0 && !currentAdditionalChatsItemId - ? undefined - : { - id: currentAdditionalChatsItemId, - price: priceIds[plan].chats[frequency], - quantity: getChatsLimit({ - plan, - additionalChatsIndex: additionalChats, - customChatsLimit: null, - }), - deleted: subscription ? additionalChats === 0 : undefined, - }, - additionalStorage === 0 && !currentAdditionalStorageItemId - ? undefined - : { - id: currentAdditionalStorageItemId, - price: priceIds[plan].storage[frequency], - quantity: getStorageLimit({ - plan, - additionalStorageIndex: additionalStorage, - customStorageLimit: null, - }), - deleted: subscription ? additionalStorage === 0 : undefined, - }, - ].filter(isDefined) + { + id: currentUsageItemId, + price: + plan === Plan.STARTER + ? env.STRIPE_STARTER_CHATS_PRICE_ID + : env.STRIPE_PRO_CHATS_PRICE_ID, + }, + ] if (subscription) { + if (plan === 'STARTER') { + const totalChatsUsed = await prisma.result.count({ + where: { + typebot: { workspaceId }, + hasStarted: true, + createdAt: { + gte: new Date(subscription.current_period_start * 1000), + }, + }, + }) + if (totalChatsUsed >= 4000) { + throw new TRPCError({ + code: 'BAD_REQUEST', + message: + "You have collected more than 4000 chats during this billing cycle. You can't downgrade to the Starter.", + }) + } + } + await stripe.subscriptions.update(subscription.id, { items, proration_behavior: 'always_invoice', @@ -150,33 +138,16 @@ export const updateSubscription = authenticatedProcedure currency, plan, returnUrl, - additionalChats, - additionalStorage, - isYearly, }) return { checkoutUrl } } - let isQuarantined = workspace.isQuarantined - - if (isQuarantined) { - const newChatsLimit = getChatsLimit({ - plan, - additionalChatsIndex: additionalChats, - customChatsLimit: null, - }) - const { totalChatsUsed } = await getUsage(prisma)(workspaceId) - if (totalChatsUsed < newChatsLimit) isQuarantined = false - } - const updatedWorkspace = await prisma.workspace.update({ where: { id: workspaceId }, data: { plan, - additionalChatsIndex: additionalChats, - additionalStorageIndex: additionalStorage, - isQuarantined, + isQuarantined: false, }, }) @@ -187,8 +158,6 @@ export const updateSubscription = authenticatedProcedure userId: user.id, data: { plan, - additionalChatsIndex: additionalChats, - additionalStorageIndex: additionalStorage, }, }, ]) diff --git a/apps/builder/src/features/billing/billing.spec.ts b/apps/builder/src/features/billing/billing.spec.ts index 107ef01f97..a703f3f531 100644 --- a/apps/builder/src/features/billing/billing.spec.ts +++ b/apps/builder/src/features/billing/billing.spec.ts @@ -51,7 +51,6 @@ test('should display valid usage', async ({ page }) => { await page.click('text=Settings & Members') await page.click('text=Billing & Usage') await expect(page.locator('text="/ 10,000"')).toBeVisible() - await expect(page.locator('text="/ 10 GB"')).toBeVisible() await page.getByText('Members', { exact: true }).click() await expect( page.getByRole('heading', { name: 'Members (1/5)' }) @@ -63,7 +62,6 @@ test('should display valid usage', async ({ page }) => { await page.click('text=Settings & Members') await page.click('text=Billing & Usage') await expect(page.locator('text="/ 100,000"')).toBeVisible() - await expect(page.locator('text="/ 50 GB"')).toBeVisible() await expect(page.getByText('Upgrade to Starter')).toBeHidden() await expect(page.getByText('Upgrade to Pro')).toBeHidden() await expect(page.getByText('Need custom limits?')).toBeHidden() @@ -78,7 +76,6 @@ test('should display valid usage', async ({ page }) => { await page.click('text=Settings & Members') await page.click('text=Billing & Usage') await expect(page.locator('text="/ 200"')).toBeVisible() - await expect(page.locator('text="Storage"')).toBeHidden() await page.getByText('Members', { exact: true }).click() await expect( page.getByRole('heading', { name: 'Members (1/1)' }) @@ -88,38 +85,27 @@ test('should display valid usage', async ({ page }) => { await injectFakeResults({ count: 10, typebotId: usageTypebotId, - fakeStorage: 1100 * 1024 * 1024, }) await page.click('text=Free workspace') await page.click('text="Usage Workspace"') await page.click('text=Settings & Members') await page.click('text=Billing & Usage') await expect(page.locator('text="/ 2,000"')).toBeVisible() - await expect(page.locator('text="/ 2 GB"')).toBeVisible() await expect(page.locator('text="10" >> nth=0')).toBeVisible() await expect(page.locator('[role="progressbar"] >> nth=0')).toHaveAttribute( 'aria-valuenow', '1' ) - await expect(page.locator('text="1.07 GB"')).toBeVisible() - await expect(page.locator('[role="progressbar"] >> nth=1')).toHaveAttribute( - 'aria-valuenow', - '54' - ) await injectFakeResults({ typebotId: usageTypebotId, count: 1090, - fakeStorage: 1200 * 1024 * 1024, }) await page.click('text="Settings"') await page.click('text="Billing & Usage"') await expect(page.locator('text="/ 2,000"')).toBeVisible() await expect(page.locator('text="1,100"')).toBeVisible() - await expect(page.locator('text="/ 2 GB"')).toBeVisible() - await expect(page.locator('text="2.25 GB"')).toBeVisible() await expect(page.locator('[aria-valuenow="55"]')).toBeVisible() - await expect(page.locator('[aria-valuenow="112"]')).toBeVisible() }) test('plan changes should work', async ({ page }) => { @@ -130,29 +116,25 @@ test('plan changes should work', async ({ page }) => { await page.click('text=Plan Change Workspace') await page.click('text=Settings & Members') await page.click('text=Billing & Usage') - await page.click('button >> text="2,000"') - await page.click('button >> text="3,500"') - await page.click('button >> text="2"') - await page.click('button >> text="4"') - await page.locator('label span').first().click() - await expect(page.locator('text="$73"')).toBeVisible() + await expect(page.locator('text="$39"')).toBeVisible() await page.click('button >> text=Upgrade >> nth=0') await page.getByLabel('Company name').fill('Company LLC') await page.getByRole('button', { name: 'Go to checkout' }).click() await page.waitForNavigation() expect(page.url()).toContain('https://checkout.stripe.com') - await expect(page.locator('text=$73.00 >> nth=0')).toBeVisible() - await expect(page.locator('text=$30.00 >> nth=0')).toBeVisible() - await expect(page.locator('text=$4.00 >> nth=0')).toBeVisible() + await expect(page.locator('text=$39 >> nth=0')).toBeVisible() const stripeId = await addSubscriptionToWorkspace( planChangeWorkspaceId, [ { - price: env.STRIPE_STARTER_MONTHLY_PRICE_ID, + price: env.STRIPE_STARTER_PRICE_ID, quantity: 1, }, + { + price: env.STRIPE_STARTER_CHATS_PRICE_ID, + }, ], - { plan: Plan.STARTER, additionalChatsIndex: 0, additionalStorageIndex: 0 } + { plan: Plan.STARTER } ) // Update plan with additional quotas @@ -160,34 +142,10 @@ test('plan changes should work', async ({ page }) => { await page.click('text=Settings & Members') await page.click('text=Billing & Usage') await expect(page.locator('text="/ 2,000"')).toBeVisible() - await expect(page.locator('text="/ 2 GB"')).toBeVisible() await expect(page.getByText('/ 2,000')).toBeVisible() - await expect(page.getByText('/ 2 GB')).toBeVisible() - await page.click('button >> text="2,000"') - await page.click('button >> text="3,500"') - await page.click('button >> text="2"') - await page.click('button >> text="4"') - await expect(page.locator('text="$73"')).toBeVisible() - await page.click('button >> text=Update') - await expect( - page.locator( - 'text="Workspace STARTER plan successfully updated ๐ŸŽ‰" >> nth=0' - ) - ).toBeVisible() - await page.click('text="Members"') - await page.click('text="Billing & Usage"') - await expect(page.locator('text="$73"')).toBeVisible() - await expect(page.locator('text="/ 3,500"')).toBeVisible() - await expect(page.locator('text="/ 4 GB"')).toBeVisible() - await expect(page.getByRole('button', { name: '3,500' })).toBeVisible() - await expect(page.getByRole('button', { name: '4' })).toBeVisible() // Upgrade to PRO - await page.click('button >> text="10,000"') - await page.click('button >> text="25,000"') - await page.click('button >> text="10"') - await page.click('button >> text="15"') - await expect(page.locator('text="$247"')).toBeVisible() + await expect(page.locator('text="$89"')).toBeVisible() await page.click('button >> text=Upgrade') await expect( page.locator('text="Workspace PRO plan successfully updated ๐ŸŽ‰" >> nth=0') @@ -198,11 +156,12 @@ test('plan changes should work', async ({ page }) => { page.waitForNavigation(), page.click('text="Billing portal"'), ]) - await expect(page.getByText('$247.00 per month')).toBeVisible({ + await expect(page.getByText('$39.00')).toBeVisible({ + timeout: 10000, + }) + await expect(page.getByText('$50.00')).toBeVisible({ timeout: 10000, }) - await expect(page.getByText('(ร—25000)')).toBeVisible() - await expect(page.getByText('(ร—15)')).toBeVisible() await expect(page.locator('text="Add payment method"')).toBeVisible() await cancelSubscription(stripeId) @@ -229,9 +188,8 @@ test('should display invoices', async ({ page }) => { await page.click('text=Billing & Usage') await expect(page.locator('text="Invoices"')).toBeVisible() await expect(page.locator('tr')).toHaveCount(4) - await expect(page.locator('text="$39.00"')).toBeVisible() - await expect(page.locator('text="$34.00"')).toBeVisible() - await expect(page.locator('text="$174.00"')).toBeVisible() + await expect(page.getByText('$39.00')).toBeVisible() + await expect(page.getByText('$50.00')).toBeVisible() }) test('custom plans should work', async ({ page }) => { diff --git a/apps/builder/src/features/billing/components/BillingPortalButton.tsx b/apps/builder/src/features/billing/components/BillingPortalButton.tsx index 929743cc87..747dc4e922 100644 --- a/apps/builder/src/features/billing/components/BillingPortalButton.tsx +++ b/apps/builder/src/features/billing/components/BillingPortalButton.tsx @@ -1,6 +1,6 @@ import { useToast } from '@/hooks/useToast' import { trpc } from '@/lib/trpc' -import { useScopedI18n } from '@/locales' +import { useTranslate } from '@tolgee/react' import { Button, ButtonProps, Link } from '@chakra-ui/react' type Props = { @@ -8,7 +8,7 @@ type Props = { } & Pick export const BillingPortalButton = ({ workspaceId, colorScheme }: Props) => { - const scopedT = useScopedI18n('billing') + const { t } = useTranslate() const { showToast } = useToast() const { data } = trpc.billing.getBillingPortalUrl.useQuery( { @@ -29,7 +29,7 @@ export const BillingPortalButton = ({ workspaceId, colorScheme }: Props) => { isLoading={!data} colorScheme={colorScheme} > - {scopedT('billingPortalButton.label')} + {t('billing.billingPortalButton.label')} ) } diff --git a/apps/builder/src/features/billing/components/ChangePlanForm.tsx b/apps/builder/src/features/billing/components/ChangePlanForm.tsx index 5f271b4716..30c9b786f6 100644 --- a/apps/builder/src/features/billing/components/ChangePlanForm.tsx +++ b/apps/builder/src/features/billing/components/ChangePlanForm.tsx @@ -1,9 +1,8 @@ -import { Stack, HStack, Text, Switch, Tag } from '@chakra-ui/react' +import { Stack, HStack, Text } from '@chakra-ui/react' import { Plan } from '@typebot.io/prisma' import { TextLink } from '@/components/TextLink' import { useToast } from '@/hooks/useToast' import { trpc } from '@/lib/trpc' -import { guessIfUserIsEuropean } from '@typebot.io/lib/pricing' import { Workspace } from '@typebot.io/schemas' import { PreCheckoutModal, PreCheckoutModalProps } from './PreCheckoutModal' import { useState } from 'react' @@ -11,35 +10,28 @@ import { ParentModalProvider } from '@/features/graph/providers/ParentModalProvi import { useUser } from '@/features/account/hooks/useUser' import { StarterPlanPricingCard } from './StarterPlanPricingCard' import { ProPlanPricingCard } from './ProPlanPricingCard' -import { useScopedI18n } from '@/locales' +import { useTranslate } from '@tolgee/react' import { StripeClimateLogo } from './StripeClimateLogo' +import { guessIfUserIsEuropean } from '@typebot.io/lib/billing/guessIfUserIsEuropean' type Props = { workspace: Workspace + excludedPlans?: ('STARTER' | 'PRO')[] } -export const ChangePlanForm = ({ workspace }: Props) => { - const scopedT = useScopedI18n('billing') +export const ChangePlanForm = ({ workspace, excludedPlans }: Props) => { + const { t } = useTranslate() const { user } = useUser() const { showToast } = useToast() const [preCheckoutPlan, setPreCheckoutPlan] = useState() - const [isYearly, setIsYearly] = useState(true) const trpcContext = trpc.useContext() - const { data, refetch } = trpc.billing.getSubscription.useQuery( - { - workspaceId: workspace.id, - }, - { - onSuccess: ({ subscription }) => { - if (isYearly === false) return - setIsYearly(subscription?.isYearly ?? true) - }, - } - ) + const { data, refetch } = trpc.billing.getSubscription.useQuery({ + workspaceId: workspace.id, + }) const { mutate: updateSubscription, isLoading: isUpdatingSubscription } = trpc.billing.updateSubscription.useMutation({ @@ -57,38 +49,22 @@ export const ChangePlanForm = ({ workspace }: Props) => { trpcContext.workspace.getWorkspace.invalidate() showToast({ status: 'success', - description: scopedT('updateSuccessToast.description', { + description: t('billing.updateSuccessToast.description', { plan: workspace?.plan, }), }) }, }) - const handlePayClick = async ({ - plan, - selectedChatsLimitIndex, - selectedStorageLimitIndex, - }: { - plan: 'STARTER' | 'PRO' - selectedChatsLimitIndex: number - selectedStorageLimitIndex: number - }) => { - if ( - !user || - selectedChatsLimitIndex === undefined || - selectedStorageLimitIndex === undefined - ) - return + const handlePayClick = async (plan: 'STARTER' | 'PRO') => { + if (!user) return const newSubscription = { plan, workspaceId: workspace.id, - additionalChats: selectedChatsLimitIndex, - additionalStorage: selectedStorageLimitIndex, currency: data?.subscription?.currency ?? (guessIfUserIsEuropean() ? 'eur' : 'usd'), - isYearly, } as const if (workspace.stripeId) { updateSubscription({ @@ -111,9 +87,9 @@ export const ChangePlanForm = ({ workspace }: Props) => { - {scopedT('contribution.preLink')}{' '} + {t('billing.contribution.preLink')}{' '} - {scopedT('contribution.link')} + {t('billing.contribution.link')} @@ -129,47 +105,32 @@ export const ChangePlanForm = ({ workspace }: Props) => { )} {data && ( - - Monthly - setIsYearly(!isYearly)} - /> - - Yearly - 16% off - - - - handlePayClick({ ...props, plan: Plan.STARTER }) - } - isYearly={isYearly} - isLoading={isUpdatingSubscription} - currency={data.subscription?.currency} - /> + {excludedPlans?.includes('STARTER') ? null : ( + handlePayClick(Plan.STARTER)} + isLoading={isUpdatingSubscription} + currency={data.subscription?.currency} + /> + )} - - handlePayClick({ ...props, plan: Plan.PRO }) - } - isYearly={isYearly} - isLoading={isUpdatingSubscription} - currency={data.subscription?.currency} - /> + {excludedPlans?.includes('PRO') ? null : ( + handlePayClick(Plan.PRO)} + isLoading={isUpdatingSubscription} + currency={data.subscription?.currency} + /> + )} )} - {scopedT('customLimit.preLink')}{' '} + {t('billing.customLimit.preLink')}{' '} - {scopedT('customLimit.link')} + {t('billing.customLimit.link')} diff --git a/apps/builder/src/features/billing/components/ChangePlanModal.tsx b/apps/builder/src/features/billing/components/ChangePlanModal.tsx index 70a36d9c73..5bd8bb5598 100644 --- a/apps/builder/src/features/billing/components/ChangePlanModal.tsx +++ b/apps/builder/src/features/billing/components/ChangePlanModal.tsx @@ -1,6 +1,6 @@ import { AlertInfo } from '@/components/AlertInfo' import { useWorkspace } from '@/features/workspace/WorkspaceProvider' -import { useI18n } from '@/locales' +import { useTranslate } from '@tolgee/react' import { Modal, ModalBody, @@ -13,9 +13,10 @@ import { } from '@chakra-ui/react' import { ChangePlanForm } from './ChangePlanForm' -type ChangePlanModalProps = { +export type ChangePlanModalProps = { type?: string isOpen: boolean + excludedPlans?: ('STARTER' | 'PRO')[] onClose: () => void } @@ -23,11 +24,16 @@ export const ChangePlanModal = ({ onClose, isOpen, type, + excludedPlans, }: ChangePlanModalProps) => { - const t = useI18n() + const { t } = useTranslate() const { workspace } = useWorkspace() return ( - + @@ -36,7 +42,12 @@ export const ChangePlanModal = ({ {t('billing.upgradeLimitLabel', { type: type })} )} - {workspace && } + {workspace && ( + + )} diff --git a/apps/builder/src/features/billing/components/ChatsProTiersModal.tsx b/apps/builder/src/features/billing/components/ChatsProTiersModal.tsx new file mode 100644 index 0000000000..211678720b --- /dev/null +++ b/apps/builder/src/features/billing/components/ChatsProTiersModal.tsx @@ -0,0 +1,90 @@ +import { + Modal, + ModalOverlay, + ModalContent, + ModalHeader, + ModalCloseButton, + ModalBody, + Stack, + ModalFooter, + Heading, + Table, + TableContainer, + Tbody, + Td, + Th, + Thead, + Tr, +} from '@chakra-ui/react' +import { useTranslate } from '@tolgee/react' +import { proChatTiers } from '@typebot.io/lib/billing/constants' +import { formatPrice } from '@typebot.io/lib/billing/formatPrice' + +type Props = { + isOpen: boolean + onClose: () => void +} + +export const ChatsProTiersModal = ({ isOpen, onClose }: Props) => { + const { t } = useTranslate() + + return ( + + + + + {t('billing.tiersModal.heading')} + + + + +
{scopedT('table.nameHeader')}{scopedT('table.createdHeader')}{t('account.apiTokens.table.nameHeader')}{t('account.apiTokens.table.createdHeader')}
+ + + + + + + + + {proChatTiers.map((tier, index) => { + const pricePerMonth = + (tier.flat_amount ?? + proChatTiers.at(-2)?.flat_amount ?? + 0) / 100 + return ( + + + + + + ) + })} + +
Max chatsPrice per monthPrice per 1k chats
+ {tier.up_to === 'inf' + ? '2,000,000+' + : tier.up_to.toLocaleString()} + + {index === 0 ? 'included' : formatPrice(pricePerMonth)} + + {index === proChatTiers.length - 1 + ? formatPrice(4.42, { maxFractionDigits: 2 }) + : index === 0 + ? 'included' + : formatPrice( + (((pricePerMonth * 100) / + ((tier.up_to as number) - + (proChatTiers.at(0)?.up_to as number))) * + 1000) / + 100, + { maxFractionDigits: 2 } + )} +
+ + + + + + ) +} diff --git a/apps/builder/src/features/billing/components/CurrentSubscriptionSummary.tsx b/apps/builder/src/features/billing/components/CurrentSubscriptionSummary.tsx index 0cffa30cb1..13dedd0de0 100644 --- a/apps/builder/src/features/billing/components/CurrentSubscriptionSummary.tsx +++ b/apps/builder/src/features/billing/components/CurrentSubscriptionSummary.tsx @@ -12,14 +12,14 @@ import { PlanTag } from './PlanTag' import { BillingPortalButton } from './BillingPortalButton' import { trpc } from '@/lib/trpc' import { Workspace } from '@typebot.io/schemas' -import { useScopedI18n } from '@/locales' +import { useTranslate } from '@tolgee/react' type Props = { workspace: Pick } export const CurrentSubscriptionSummary = ({ workspace }: Props) => { - const scopedT = useScopedI18n('billing.currentSubscription') + const { t } = useTranslate() const { data } = trpc.billing.getSubscription.useQuery({ workspaceId: workspace.id, @@ -31,13 +31,15 @@ export const CurrentSubscriptionSummary = ({ workspace }: Props) => { return ( - {scopedT('heading')} + + {t('billing.currentSubscription.heading')} + - {scopedT('subheading')} + {t('billing.currentSubscription.subheading')} {data?.subscription?.cancelDate && ( - ({scopedT('cancelDate')}{' '} + ({t('billing.currentSubscription.cancelDate')}{' '} {data.subscription.cancelDate.toDateString()}) )} @@ -45,7 +47,7 @@ export const CurrentSubscriptionSummary = ({ workspace }: Props) => { {data?.subscription?.status === 'past_due' && ( - {scopedT('pastDueAlert')} + {t('billing.currentSubscription.pastDueAlert')} )} diff --git a/apps/builder/src/features/billing/components/FeaturesList.tsx b/apps/builder/src/features/billing/components/FeaturesList.tsx index 991fc40d19..11e2015d71 100644 --- a/apps/builder/src/features/billing/components/FeaturesList.tsx +++ b/apps/builder/src/features/billing/components/FeaturesList.tsx @@ -12,8 +12,8 @@ type FeaturesListProps = { features: (string | JSX.Element)[] } & ListProps export const FeaturesList = ({ features, ...props }: FeaturesListProps) => ( {features.map((feat, idx) => ( - - + + {feat} ))} diff --git a/apps/builder/src/features/billing/components/InvoicesList.tsx b/apps/builder/src/features/billing/components/InvoicesList.tsx index 9f0d390015..9c1e003c15 100644 --- a/apps/builder/src/features/billing/components/InvoicesList.tsx +++ b/apps/builder/src/features/billing/components/InvoicesList.tsx @@ -18,14 +18,14 @@ import Link from 'next/link' import React from 'react' import { trpc } from '@/lib/trpc' import { useToast } from '@/hooks/useToast' -import { useScopedI18n } from '@/locales' +import { useTranslate } from '@tolgee/react' type Props = { workspaceId: string } export const InvoicesList = ({ workspaceId }: Props) => { - const scopedT = useScopedI18n('billing.invoices') + const { t } = useTranslate() const { showToast } = useToast() const { data, status } = trpc.billing.listInvoices.useQuery( { @@ -40,9 +40,9 @@ export const InvoicesList = ({ workspaceId }: Props) => { return ( - {scopedT('heading')} + {t('billing.invoices.heading')} {data?.invoices.length === 0 && status !== 'loading' ? ( - {scopedT('empty')} + {t('billing.invoices.empty')} ) : ( @@ -50,8 +50,8 @@ export const InvoicesList = ({ workspaceId }: Props) => { - - + + diff --git a/apps/builder/src/features/billing/components/PreCheckoutModal.tsx b/apps/builder/src/features/billing/components/PreCheckoutModal.tsx index 22323647db..3a032212c5 100644 --- a/apps/builder/src/features/billing/components/PreCheckoutModal.tsx +++ b/apps/builder/src/features/billing/components/PreCheckoutModal.tsx @@ -18,17 +18,14 @@ import { useRouter } from 'next/router' import React, { FormEvent, useState } from 'react' import { isDefined } from '@typebot.io/lib' import { taxIdTypes } from '../taxIdTypes' -import { useScopedI18n } from '@/locales' +import { useTranslate } from '@tolgee/react' export type PreCheckoutModalProps = { selectedSubscription: | { plan: 'STARTER' | 'PRO' workspaceId: string - additionalChats: number - additionalStorage: number currency: 'eur' | 'usd' - isYearly: boolean } | undefined existingCompany?: string @@ -50,7 +47,7 @@ export const PreCheckoutModal = ({ existingEmail, onClose, }: PreCheckoutModalProps) => { - const scopedT = useScopedI18n('billing.preCheckoutModal') + const { t } = useTranslate() const { ref } = useParentModal() const vatValueInputRef = React.useRef(null) const router = useRouter() @@ -134,7 +131,7 @@ export const PreCheckoutModal = ({ - {scopedT('taxId.label')} + {t('billing.preCheckoutModal.taxId.label')} {currencies.map((currency) => ( @@ -149,14 +149,16 @@ export const PaymentSettings = ({ options, onOptionsChange }: Props) => { @@ -167,30 +169,30 @@ export const PaymentSettings = ({ options, onOptionsChange }: Props) => { diff --git a/apps/builder/src/features/blocks/inputs/payment/payment.spec.ts b/apps/builder/src/features/blocks/inputs/payment/payment.spec.ts index 1639af91b7..df1242f602 100644 --- a/apps/builder/src/features/blocks/inputs/payment/payment.spec.ts +++ b/apps/builder/src/features/blocks/inputs/payment/payment.spec.ts @@ -1,10 +1,10 @@ import test, { expect } from '@playwright/test' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' -import { defaultPaymentInputOptions, InputBlockType } from '@typebot.io/schemas' import { createId } from '@paralleldrive/cuid2' import { stripePaymentForm } from '@/test/utils/selectorUtils' import { env } from '@typebot.io/env' +import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants' test.describe('Payment input block', () => { test('Can configure Stripe account', async ({ page }) => { @@ -14,7 +14,6 @@ test.describe('Payment input block', () => { id: typebotId, ...parseDefaultGroupWithBlock({ type: InputBlockType.PAYMENT, - options: defaultPaymentInputOptions, }), }, ]) @@ -44,7 +43,7 @@ test.describe('Payment input block', () => { await page.fill('[placeholder="john@gmail.com"]', 'test@typebot.io') await expect(page.locator('text="Phone number:"')).toBeVisible() - await page.click('text=Preview') + await page.click('text=Test') await stripePaymentForm(page) .locator(`[placeholder="1234 1234 1234 1234"]`) .fill('4000000000000002') diff --git a/apps/builder/src/features/blocks/inputs/phone/components/PhoneInputSettings.tsx b/apps/builder/src/features/blocks/inputs/phone/components/PhoneInputSettings.tsx index 2e1f66d431..a4b906c96f 100644 --- a/apps/builder/src/features/blocks/inputs/phone/components/PhoneInputSettings.tsx +++ b/apps/builder/src/features/blocks/inputs/phone/components/PhoneInputSettings.tsx @@ -1,20 +1,21 @@ import { TextInput } from '@/components/inputs' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' import { FormLabel, Stack } from '@chakra-ui/react' -import { PhoneNumberInputOptions, Variable } from '@typebot.io/schemas' +import { PhoneNumberInputBlock, Variable } from '@typebot.io/schemas' import React from 'react' import { CountryCodeSelect } from './CountryCodeSelect' +import { defaultPhoneInputOptions } from '@typebot.io/schemas/features/blocks/inputs/phone/constants' type Props = { - options: PhoneNumberInputOptions - onOptionsChange: (options: PhoneNumberInputOptions) => void + options: PhoneNumberInputBlock['options'] + onOptionsChange: (options: PhoneNumberInputBlock['options']) => void } export const PhoneInputSettings = ({ options, onOptionsChange }: Props) => { const handlePlaceholderChange = (placeholder: string) => - onOptionsChange({ ...options, labels: { ...options.labels, placeholder } }) + onOptionsChange({ ...options, labels: { ...options?.labels, placeholder } }) const handleButtonLabelChange = (button: string) => - onOptionsChange({ ...options, labels: { ...options.labels, button } }) + onOptionsChange({ ...options, labels: { ...options?.labels, button } }) const handleVariableChange = (variable?: Variable) => onOptionsChange({ ...options, variableId: variable?.id }) const handleRetryMessageChange = (retryMessageContent: string) => @@ -26,12 +27,17 @@ export const PhoneInputSettings = ({ options, onOptionsChange }: Props) => { @@ -40,12 +46,15 @@ export const PhoneInputSettings = ({ options, onOptionsChange }: Props) => { @@ -53,7 +62,7 @@ export const PhoneInputSettings = ({ options, onOptionsChange }: Props) => { Save answer in a variable: diff --git a/apps/builder/src/features/blocks/inputs/phone/components/PhoneNodeContent.tsx b/apps/builder/src/features/blocks/inputs/phone/components/PhoneNodeContent.tsx index f93f4cca61..178721e73f 100644 --- a/apps/builder/src/features/blocks/inputs/phone/components/PhoneNodeContent.tsx +++ b/apps/builder/src/features/blocks/inputs/phone/components/PhoneNodeContent.tsx @@ -1,16 +1,20 @@ import React from 'react' import { Text } from '@chakra-ui/react' -import { PhoneNumberInputOptions } from '@typebot.io/schemas' import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent' +import { PhoneNumberInputBlock } from '@typebot.io/schemas' +import { defaultPhoneInputOptions } from '@typebot.io/schemas/features/blocks/inputs/phone/constants' type Props = { - variableId?: string - placeholder: PhoneNumberInputOptions['labels']['placeholder'] + options: PhoneNumberInputBlock['options'] } -export const PhoneNodeContent = ({ variableId, placeholder }: Props) => +export const PhoneNodeContent = ({ + options: { variableId, labels } = {}, +}: Props) => variableId ? ( ) : ( - {placeholder} + + {labels?.placeholder ?? defaultPhoneInputOptions.labels.placeholder} + ) diff --git a/apps/builder/src/features/blocks/inputs/phone/phone.spec.ts b/apps/builder/src/features/blocks/inputs/phone/phone.spec.ts index 58e1cd6c89..02c2c32277 100644 --- a/apps/builder/src/features/blocks/inputs/phone/phone.spec.ts +++ b/apps/builder/src/features/blocks/inputs/phone/phone.spec.ts @@ -1,8 +1,9 @@ import test, { expect } from '@playwright/test' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' -import { defaultPhoneInputOptions, InputBlockType } from '@typebot.io/schemas' import { createId } from '@paralleldrive/cuid2' +import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants' +import { defaultPhoneInputOptions } from '@typebot.io/schemas/features/blocks/inputs/phone/constants' test.describe('Phone input block', () => { test('options should work', async ({ page }) => { @@ -12,14 +13,13 @@ test.describe('Phone input block', () => { id: typebotId, ...parseDefaultGroupWithBlock({ type: InputBlockType.PHONE, - options: defaultPhoneInputOptions, }), }, ]) await page.goto(`/typebots/${typebotId}/edit`) - await page.click('text=Preview') + await page.click('text=Test') await expect( page.locator( `input[placeholder="${defaultPhoneInputOptions.labels.placeholder}"]` diff --git a/apps/builder/src/features/blocks/inputs/pictureChoice/components/PictureChoiceItemNode.tsx b/apps/builder/src/features/blocks/inputs/pictureChoice/components/PictureChoiceItemNode.tsx index 8035536f8f..d6cba62e36 100644 --- a/apps/builder/src/features/blocks/inputs/pictureChoice/components/PictureChoiceItemNode.tsx +++ b/apps/builder/src/features/blocks/inputs/pictureChoice/components/PictureChoiceItemNode.tsx @@ -14,7 +14,7 @@ import { } from '@chakra-ui/react' import { ImageIcon, PlusIcon } from '@/components/icons' import { useTypebot } from '@/features/editor/providers/TypebotProvider' -import { ItemIndices, ItemType } from '@typebot.io/schemas' +import { ItemIndices } from '@typebot.io/schemas' import React, { useRef } from 'react' import { PictureChoiceItem } from '@typebot.io/schemas/features/blocks/inputs/pictureChoice' import { useGraph } from '@/features/graph/providers/GraphProvider' @@ -40,7 +40,7 @@ export const PictureChoiceItemNode = ({ const handlePlusClick = (e: React.MouseEvent) => { e.stopPropagation() const itemIndex = indices.itemIndex + 1 - createItem({ type: ItemType.PICTURE_CHOICE }, { ...indices, itemIndex }) + createItem({}, { ...indices, itemIndex }) } const handleMouseDown = (e: React.MouseEvent) => e.stopPropagation() diff --git a/apps/builder/src/features/blocks/inputs/pictureChoice/components/PictureChoiceItemSettings.tsx b/apps/builder/src/features/blocks/inputs/pictureChoice/components/PictureChoiceItemSettings.tsx index 50d82815d4..8edbbeee9a 100644 --- a/apps/builder/src/features/blocks/inputs/pictureChoice/components/PictureChoiceItemSettings.tsx +++ b/apps/builder/src/features/blocks/inputs/pictureChoice/components/PictureChoiceItemSettings.tsx @@ -13,7 +13,8 @@ import { import { ImageUploadContent } from '@/components/ImageUploadContent' import { SwitchWithRelatedSettings } from '@/components/SwitchWithRelatedSettings' import { ConditionForm } from '@/features/blocks/logic/condition/components/ConditionForm' -import { Condition, LogicalOperator } from '@typebot.io/schemas' +import { Condition } from '@typebot.io/schemas' +import { LogicalOperator } from '@typebot.io/schemas/features/blocks/logic/condition/constants' type Props = { workspaceId: string diff --git a/apps/builder/src/features/blocks/inputs/pictureChoice/components/PictureChoiceNode.tsx b/apps/builder/src/features/blocks/inputs/pictureChoice/components/PictureChoiceNode.tsx index 5392cea8d7..2713092eef 100644 --- a/apps/builder/src/features/blocks/inputs/pictureChoice/components/PictureChoiceNode.tsx +++ b/apps/builder/src/features/blocks/inputs/pictureChoice/components/PictureChoiceNode.tsx @@ -15,12 +15,12 @@ export const PictureChoiceNode = ({ block, indices }: Props) => { const { typebot } = useTypebot() const dynamicVariableName = typebot?.variables.find( (variable) => - variable.id === block.options.dynamicItems?.pictureSrcsVariableId + variable.id === block.options?.dynamicItems?.pictureSrcsVariableId )?.name return ( - {block.options.dynamicItems?.isEnabled && dynamicVariableName ? ( + {block.options?.dynamicItems?.isEnabled && dynamicVariableName ? ( Display @@ -31,7 +31,7 @@ export const PictureChoiceNode = ({ block, indices }: Props) => { ) : ( )} - {block.options.variableId ? ( + {block.options?.variableId ? ( { const updateIsMultiple = (isMultipleChoice: boolean) => - options && onOptionsChange({ ...options, isMultipleChoice }) + onOptionsChange({ ...options, isMultipleChoice }) const updateButtonLabel = (buttonLabel: string) => - options && onOptionsChange({ ...options, buttonLabel }) + onOptionsChange({ ...options, buttonLabel }) const updateSaveVariable = (variable?: Variable) => - options && onOptionsChange({ ...options, variableId: variable?.id }) + onOptionsChange({ ...options, variableId: variable?.id }) const updateSearchInputPlaceholder = (searchInputPlaceholder: string) => - options && onOptionsChange({ ...options, searchInputPlaceholder }) + onOptionsChange({ ...options, searchInputPlaceholder }) const updateIsSearchable = (isSearchable: boolean) => - options && onOptionsChange({ ...options, isSearchable }) + onOptionsChange({ ...options, isSearchable }) const updateIsDynamicItemsEnabled = (isEnabled: boolean) => - options && onOptionsChange({ ...options, dynamicItems: { - ...options.dynamicItems, + ...options?.dynamicItems, isEnabled, }, }) const updateDynamicItemsPictureSrcsVariable = (variable?: Variable) => - options && onOptionsChange({ ...options, dynamicItems: { - ...options.dynamicItems, + ...options?.dynamicItems, pictureSrcsVariableId: variable?.id, }, }) const updateDynamicItemsTitlesVariable = (variable?: Variable) => - options && onOptionsChange({ ...options, dynamicItems: { - ...options.dynamicItems, + ...options?.dynamicItems, titlesVariableId: variable?.id, }, }) const updateDynamicItemsDescriptionsVariable = (variable?: Variable) => - options && onOptionsChange({ ...options, dynamicItems: { - ...options.dynamicItems, + ...options?.dynamicItems, descriptionsVariableId: variable?.id, }, }) @@ -70,7 +64,9 @@ export const PictureChoiceSettings = ({ options, onOptionsChange }: Props) => { { diff --git a/apps/builder/src/features/blocks/inputs/pictureChoice/pictureChoice.spec.ts b/apps/builder/src/features/blocks/inputs/pictureChoice/pictureChoice.spec.ts index deab940033..73c112b9b6 100644 --- a/apps/builder/src/features/blocks/inputs/pictureChoice/pictureChoice.spec.ts +++ b/apps/builder/src/features/blocks/inputs/pictureChoice/pictureChoice.spec.ts @@ -1,9 +1,8 @@ import test, { expect } from '@playwright/test' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' -import { InputBlockType, ItemType } from '@typebot.io/schemas' import { createId } from '@paralleldrive/cuid2' -import { defaultPictureChoiceOptions } from '@typebot.io/schemas/features/blocks/inputs/pictureChoice' +import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants' const firstImageSrc = 'https://images.unsplash.com/flagged/photo-1575517111839-3a3843ee7f5d?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2940&q=80' @@ -25,10 +24,8 @@ test.describe.parallel('Picture choice input block', () => { items: [ { id: 'choice1', - type: ItemType.PICTURE_CHOICE, }, ], - options: { ...defaultPictureChoiceOptions }, }), }, ]) @@ -57,7 +54,7 @@ test.describe.parallel('Picture choice input block', () => { await page.getByPlaceholder('Paste the image link...').fill(thirdImageSrc) await page.getByLabel('Title:').fill('Third image') await page.getByLabel('Description:').fill('Third description') - await page.getByRole('button', { name: 'Preview' }).click() + await page.getByRole('button', { name: 'Test' }).click() await expect( page.getByRole('button', { name: 'First image First image First description', diff --git a/apps/builder/src/features/blocks/inputs/rating/components/RatingInputContent.tsx b/apps/builder/src/features/blocks/inputs/rating/components/RatingInputContent.tsx index af6276260b..5d50d77106 100644 --- a/apps/builder/src/features/blocks/inputs/rating/components/RatingInputContent.tsx +++ b/apps/builder/src/features/blocks/inputs/rating/components/RatingInputContent.tsx @@ -1,6 +1,7 @@ import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent' import { Text } from '@chakra-ui/react' import { RatingInputBlock } from '@typebot.io/schemas' +import { defaultRatingInputOptions } from '@typebot.io/schemas/features/blocks/inputs/rating/constants' type Props = { variableId?: string @@ -12,7 +13,7 @@ export const RatingInputContent = ({ variableId, block }: Props) => ) : ( - Rate from {block.options.buttonType === 'Icons' ? 1 : 0} to{' '} - {block.options.length} + Rate from {block.options?.buttonType === 'Icons' ? 1 : 0} to{' '} + {block.options?.length ?? defaultRatingInputOptions.length} ) diff --git a/apps/builder/src/features/blocks/inputs/rating/components/RatingInputSettings.tsx b/apps/builder/src/features/blocks/inputs/rating/components/RatingInputSettings.tsx index 0c9d9f8762..8e0c00d70e 100644 --- a/apps/builder/src/features/blocks/inputs/rating/components/RatingInputSettings.tsx +++ b/apps/builder/src/features/blocks/inputs/rating/components/RatingInputSettings.tsx @@ -1,14 +1,15 @@ import { FormLabel, Stack } from '@chakra-ui/react' import { DropdownList } from '@/components/DropdownList' -import { RatingInputOptions, Variable } from '@typebot.io/schemas' +import { RatingInputBlock, Variable } from '@typebot.io/schemas' import React from 'react' import { SwitchWithLabel } from '@/components/inputs/SwitchWithLabel' import { TextInput } from '@/components/inputs' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' +import { defaultRatingInputOptions } from '@typebot.io/schemas/features/blocks/inputs/rating/constants' type Props = { - options: RatingInputOptions - onOptionsChange: (options: RatingInputOptions) => void + options: RatingInputBlock['options'] + onOptionsChange: (options: RatingInputBlock['options']) => void } export const RatingInputSettings = ({ options, onOptionsChange }: Props) => { @@ -21,20 +22,20 @@ export const RatingInputSettings = ({ options, onOptionsChange }: Props) => { const handleCustomIconCheck = (isEnabled: boolean) => onOptionsChange({ ...options, - customIcon: { ...options.customIcon, isEnabled }, + customIcon: { ...options?.customIcon, isEnabled }, }) const handleIconSvgChange = (svg: string) => - onOptionsChange({ ...options, customIcon: { ...options.customIcon, svg } }) + onOptionsChange({ ...options, customIcon: { ...options?.customIcon, svg } }) const handleLeftLabelChange = (left: string) => - onOptionsChange({ ...options, labels: { ...options.labels, left } }) + onOptionsChange({ ...options, labels: { ...options?.labels, left } }) const handleRightLabelChange = (right: string) => - onOptionsChange({ ...options, labels: { ...options.labels, right } }) + onOptionsChange({ ...options, labels: { ...options?.labels, right } }) const handleButtonLabelChange = (button: string) => - onOptionsChange({ ...options, labels: { ...options.labels, button } }) + onOptionsChange({ ...options, labels: { ...options?.labels, button } }) const handleVariableChange = (variable?: Variable) => onOptionsChange({ ...options, variableId: variable?.id }) @@ -42,6 +43,11 @@ export const RatingInputSettings = ({ options, onOptionsChange }: Props) => { const handleOneClickSubmitChange = (isOneClickSubmitEnabled: boolean) => onOptionsChange({ ...options, isOneClickSubmitEnabled }) + const length = options?.length ?? defaultRatingInputOptions.length + const isOneClickSubmitEnabled = + options?.isOneClickSubmitEnabled ?? + defaultRatingInputOptions.isOneClickSubmitEnabled + return ( @@ -51,7 +57,7 @@ export const RatingInputSettings = ({ options, onOptionsChange }: Props) => { @@ -62,18 +68,23 @@ export const RatingInputSettings = ({ options, onOptionsChange }: Props) => { - {options.buttonType === 'Icons' && ( + {options?.buttonType === 'Icons' && ( )} - {options.buttonType === 'Icons' && options.customIcon.isEnabled && ( + {options?.buttonType === 'Icons' && options.customIcon?.isEnabled && ( { /> )} - {!options.isOneClickSubmitEnabled && ( + {!isOneClickSubmitEnabled && ( )} @@ -111,7 +124,7 @@ export const RatingInputSettings = ({ options, onOptionsChange }: Props) => { Save answer in a variable: diff --git a/apps/builder/src/features/blocks/inputs/rating/rating.spec.ts b/apps/builder/src/features/blocks/inputs/rating/rating.spec.ts index ae5e92f880..c4c5b36f43 100644 --- a/apps/builder/src/features/blocks/inputs/rating/rating.spec.ts +++ b/apps/builder/src/features/blocks/inputs/rating/rating.spec.ts @@ -1,8 +1,8 @@ import test, { expect } from '@playwright/test' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' -import { defaultRatingInputOptions, InputBlockType } from '@typebot.io/schemas' import { createId } from '@paralleldrive/cuid2' +import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants' const boxSvg = ` { id: typebotId, ...parseDefaultGroupWithBlock({ type: InputBlockType.RATING, - options: defaultRatingInputOptions, }), }, ]) await page.goto(`/typebots/${typebotId}/edit`) - await page.click('text=Preview') + await page.click('text=Test') await expect(page.locator(`text=Send`)).toBeHidden() await page.getByRole('button', { name: '8' }).click() await page.locator(`text=Send`).click() diff --git a/apps/builder/src/features/blocks/inputs/textInput/components/TextInputNodeContent.tsx b/apps/builder/src/features/blocks/inputs/textInput/components/TextInputNodeContent.tsx index 7a8d2c221d..20ad882243 100644 --- a/apps/builder/src/features/blocks/inputs/textInput/components/TextInputNodeContent.tsx +++ b/apps/builder/src/features/blocks/inputs/textInput/components/TextInputNodeContent.tsx @@ -1,29 +1,25 @@ import React from 'react' import { Text } from '@chakra-ui/react' -import { TextInputOptions } from '@typebot.io/schemas' import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent' +import { TextInputBlock } from '@typebot.io/schemas' +import { defaultTextInputOptions } from '@typebot.io/schemas/features/blocks/inputs/text/constants' type Props = { - placeholder: TextInputOptions['labels']['placeholder'] - isLong: TextInputOptions['isLong'] - variableId?: string + options: TextInputBlock['options'] } -export const TextInputNodeContent = ({ - placeholder, - isLong, - variableId, -}: Props) => { - if (variableId) +export const TextInputNodeContent = ({ options }: Props) => { + if (options?.variableId) return ( ) return ( - - {placeholder} + + {options?.labels?.placeholder ?? + defaultTextInputOptions.labels.placeholder} ) } diff --git a/apps/builder/src/features/blocks/inputs/textInput/components/TextInputSettings.tsx b/apps/builder/src/features/blocks/inputs/textInput/components/TextInputSettings.tsx index 87dd6d19b8..e0ee725718 100644 --- a/apps/builder/src/features/blocks/inputs/textInput/components/TextInputSettings.tsx +++ b/apps/builder/src/features/blocks/inputs/textInput/components/TextInputSettings.tsx @@ -2,19 +2,20 @@ import { TextInput } from '@/components/inputs' import { SwitchWithLabel } from '@/components/inputs/SwitchWithLabel' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' import { FormLabel, Stack } from '@chakra-ui/react' -import { TextInputOptions, Variable } from '@typebot.io/schemas' +import { TextInputBlock, Variable } from '@typebot.io/schemas' +import { defaultTextInputOptions } from '@typebot.io/schemas/features/blocks/inputs/text/constants' import React from 'react' type Props = { - options: TextInputOptions - onOptionsChange: (options: TextInputOptions) => void + options: TextInputBlock['options'] + onOptionsChange: (options: TextInputBlock['options']) => void } export const TextInputSettings = ({ options, onOptionsChange }: Props) => { const handlePlaceholderChange = (placeholder: string) => - onOptionsChange({ ...options, labels: { ...options.labels, placeholder } }) + onOptionsChange({ ...options, labels: { ...options?.labels, placeholder } }) const handleButtonLabelChange = (button: string) => - onOptionsChange({ ...options, labels: { ...options.labels, button } }) + onOptionsChange({ ...options, labels: { ...options?.labels, button } }) const handleLongChange = (isLong: boolean) => onOptionsChange({ ...options, isLong }) const handleVariableChange = (variable?: Variable) => @@ -24,17 +25,22 @@ export const TextInputSettings = ({ options, onOptionsChange }: Props) => { @@ -42,7 +48,7 @@ export const TextInputSettings = ({ options, onOptionsChange }: Props) => { Save answer in a variable: diff --git a/apps/builder/src/features/blocks/inputs/textInput/textInput.spec.ts b/apps/builder/src/features/blocks/inputs/textInput/textInput.spec.ts index 6df8553281..87adbb1242 100644 --- a/apps/builder/src/features/blocks/inputs/textInput/textInput.spec.ts +++ b/apps/builder/src/features/blocks/inputs/textInput/textInput.spec.ts @@ -1,8 +1,9 @@ import test, { expect } from '@playwright/test' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' -import { defaultTextInputOptions, InputBlockType } from '@typebot.io/schemas' import { createId } from '@paralleldrive/cuid2' +import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants' +import { defaultTextInputOptions } from '@typebot.io/schemas/features/blocks/inputs/text/constants' test.describe.parallel('Text input block', () => { test('options should work', async ({ page }) => { @@ -12,14 +13,13 @@ test.describe.parallel('Text input block', () => { id: typebotId, ...parseDefaultGroupWithBlock({ type: InputBlockType.TEXT, - options: defaultTextInputOptions, }), }, ]) await page.goto(`/typebots/${typebotId}/edit`) - await page.click('text=Preview') + await page.click('text=Test') await expect( page.locator( `input[placeholder="${defaultTextInputOptions.labels.placeholder}"]` diff --git a/apps/builder/src/features/blocks/inputs/url/components/UrlInputSettings.tsx b/apps/builder/src/features/blocks/inputs/url/components/UrlInputSettings.tsx index b11936f40e..858975c7c4 100644 --- a/apps/builder/src/features/blocks/inputs/url/components/UrlInputSettings.tsx +++ b/apps/builder/src/features/blocks/inputs/url/components/UrlInputSettings.tsx @@ -1,19 +1,20 @@ import { TextInput } from '@/components/inputs' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' import { FormLabel, Stack } from '@chakra-ui/react' -import { UrlInputOptions, Variable } from '@typebot.io/schemas' +import { UrlInputBlock, Variable } from '@typebot.io/schemas' +import { defaultUrlInputOptions } from '@typebot.io/schemas/features/blocks/inputs/url/constants' import React from 'react' type Props = { - options: UrlInputOptions - onOptionsChange: (options: UrlInputOptions) => void + options: UrlInputBlock['options'] + onOptionsChange: (options: UrlInputBlock['options']) => void } export const UrlInputSettings = ({ options, onOptionsChange }: Props) => { const handlePlaceholderChange = (placeholder: string) => - onOptionsChange({ ...options, labels: { ...options.labels, placeholder } }) + onOptionsChange({ ...options, labels: { ...options?.labels, placeholder } }) const handleButtonLabelChange = (button: string) => - onOptionsChange({ ...options, labels: { ...options.labels, button } }) + onOptionsChange({ ...options, labels: { ...options?.labels, button } }) const handleVariableChange = (variable?: Variable) => onOptionsChange({ ...options, variableId: variable?.id }) const handleRetryMessageChange = (retryMessageContent: string) => @@ -23,17 +24,25 @@ export const UrlInputSettings = ({ options, onOptionsChange }: Props) => { @@ -41,7 +50,7 @@ export const UrlInputSettings = ({ options, onOptionsChange }: Props) => { Save answer in a variable: diff --git a/apps/builder/src/features/blocks/inputs/url/components/UrlNodeContent.tsx b/apps/builder/src/features/blocks/inputs/url/components/UrlNodeContent.tsx index 123b2cc2cf..6ba49504a5 100644 --- a/apps/builder/src/features/blocks/inputs/url/components/UrlNodeContent.tsx +++ b/apps/builder/src/features/blocks/inputs/url/components/UrlNodeContent.tsx @@ -1,18 +1,19 @@ import React from 'react' import { Text } from '@chakra-ui/react' -import { UrlInputOptions } from '@typebot.io/schemas' import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent' +import { UrlInputBlock } from '@typebot.io/schemas' +import { defaultUrlInputOptions } from '@typebot.io/schemas/features/blocks/inputs/url/constants' type Props = { - variableId?: string - placeholder: UrlInputOptions['labels']['placeholder'] + options: UrlInputBlock['options'] } -export const UrlNodeContent = ({ placeholder, variableId }: Props) => - variableId ? ( - +export const UrlNodeContent = ({ options }: Props) => + options?.variableId ? ( + ) : ( - {placeholder} + {options?.labels?.placeholder ?? + defaultUrlInputOptions.labels.placeholder} ) diff --git a/apps/builder/src/features/blocks/inputs/url/url.spec.ts b/apps/builder/src/features/blocks/inputs/url/url.spec.ts index 0eff36ed07..ae407dae71 100644 --- a/apps/builder/src/features/blocks/inputs/url/url.spec.ts +++ b/apps/builder/src/features/blocks/inputs/url/url.spec.ts @@ -1,8 +1,9 @@ import test, { expect } from '@playwright/test' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' -import { defaultUrlInputOptions, InputBlockType } from '@typebot.io/schemas' import { createId } from '@paralleldrive/cuid2' +import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants' +import { defaultUrlInputOptions } from '@typebot.io/schemas/features/blocks/inputs/url/constants' test.describe('Url input block', () => { test('options should work', async ({ page }) => { @@ -12,14 +13,13 @@ test.describe('Url input block', () => { id: typebotId, ...parseDefaultGroupWithBlock({ type: InputBlockType.URL, - options: defaultUrlInputOptions, }), }, ]) await page.goto(`/typebots/${typebotId}/edit`) - await page.click('text=Preview') + await page.click('text=Test') await expect( page.locator( `input[placeholder="${defaultUrlInputOptions.labels.placeholder}"]` diff --git a/apps/builder/src/features/blocks/integrations/chatwoot/chatwoot.spec.ts b/apps/builder/src/features/blocks/integrations/chatwoot/chatwoot.spec.ts index 38f8e4198c..61b2aae021 100644 --- a/apps/builder/src/features/blocks/integrations/chatwoot/chatwoot.spec.ts +++ b/apps/builder/src/features/blocks/integrations/chatwoot/chatwoot.spec.ts @@ -2,10 +2,8 @@ import test, { expect } from '@playwright/test' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' import { createId } from '@paralleldrive/cuid2' -import { - defaultChatwootOptions, - IntegrationBlockType, -} from '@typebot.io/schemas' +import { IntegrationBlockType } from '@typebot.io/schemas/features/blocks/integrations/constants' +import { defaultChatwootOptions } from '@typebot.io/schemas/features/blocks/integrations/chatwoot/constants' const typebotId = createId() @@ -18,7 +16,6 @@ test.describe('Chatwoot block', () => { id: typebotId, ...parseDefaultGroupWithBlock({ type: IntegrationBlockType.CHATWOOT, - options: defaultChatwootOptions, }), }, ]) @@ -37,7 +34,7 @@ test.describe('Chatwoot block', () => { await page.getByLabel('Email').fill('john@email.com') await page.getByLabel('Avatar URL').fill('https://domain.com/avatar.png') await page.getByLabel('Phone number').fill('+33654347543') - await page.getByRole('button', { name: 'Preview', exact: true }).click() + await page.getByRole('button', { name: 'Test', exact: true }).click() await expect( page.getByText('Chatwoot block is not supported in preview').nth(0) ).toBeVisible() diff --git a/apps/builder/src/features/blocks/integrations/chatwoot/components/ChatwootNodeBody.tsx b/apps/builder/src/features/blocks/integrations/chatwoot/components/ChatwootNodeBody.tsx index c16839cb29..0fe299aac5 100644 --- a/apps/builder/src/features/blocks/integrations/chatwoot/components/ChatwootNodeBody.tsx +++ b/apps/builder/src/features/blocks/integrations/chatwoot/components/ChatwootNodeBody.tsx @@ -6,9 +6,9 @@ type Props = { } export const ChatwootNodeBody = ({ block }: Props) => - block.options.task === 'Close widget' ? ( + block.options?.task === 'Close widget' ? ( Close Toolzz Chat - ) : block.options.websiteToken.length === 0 ? ( + ) : block?.options?.websiteToken?.length === 0 ? ( Configure... ) : ( Open Toolzz Chat diff --git a/apps/builder/src/features/blocks/integrations/chatwoot/components/ChatwootSettings.tsx b/apps/builder/src/features/blocks/integrations/chatwoot/components/ChatwootSettings.tsx index ec857402b0..9c076ef07b 100644 --- a/apps/builder/src/features/blocks/integrations/chatwoot/components/ChatwootSettings.tsx +++ b/apps/builder/src/features/blocks/integrations/chatwoot/components/ChatwootSettings.tsx @@ -8,12 +8,16 @@ import { AccordionPanel, Stack, } from '@chakra-ui/react' -import { ChatwootOptions, chatwootTasks } from '@typebot.io/schemas' +import { ChatwootBlock } from '@typebot.io/schemas' +import { + chatwootTasks, + defaultChatwootOptions, +} from '@typebot.io/schemas/features/blocks/integrations/chatwoot/constants' import React from 'react' type Props = { - options: ChatwootOptions - onOptionsChange: (options: ChatwootOptions) => void + options: ChatwootBlock['options'] + onOptionsChange: (options: ChatwootBlock['options']) => void } export const ChatwootSettings = ({ options, onOptionsChange }: Props) => { @@ -21,20 +25,22 @@ export const ChatwootSettings = ({ options, onOptionsChange }: Props) => { onOptionsChange({ ...options, task }) } + const task = options?.task ?? defaultChatwootOptions.task + return ( - {!options.task || - (options.task === 'Show widget' && ( + {!task || + (task === 'Show widget' && ( <> { onOptionsChange({ ...options, baseUrl }) }} @@ -43,7 +49,7 @@ export const ChatwootSettings = ({ options, onOptionsChange }: Props) => { onOptionsChange({ ...options, websiteToken }) } @@ -58,51 +64,51 @@ export const ChatwootSettings = ({ options, onOptionsChange }: Props) => { { onOptionsChange({ ...options, - user: { ...options.user, id }, + user: { ...options?.user, id }, }) }} /> { onOptionsChange({ ...options, - user: { ...options.user, name }, + user: { ...options?.user, name }, }) }} /> { onOptionsChange({ ...options, - user: { ...options.user, email }, + user: { ...options?.user, email }, }) }} /> { onOptionsChange({ ...options, - user: { ...options.user, avatarUrl }, + user: { ...options?.user, avatarUrl }, }) }} /> { onOptionsChange({ ...options, - user: { ...options.user, phoneNumber }, + user: { ...options?.user, phoneNumber }, }) }} /> diff --git a/apps/builder/src/features/blocks/integrations/googleAnalytics/components/GoogleAnalyticsNodeBody.tsx b/apps/builder/src/features/blocks/integrations/googleAnalytics/components/GoogleAnalyticsNodeBody.tsx index c7ed435faf..a3d69f8eff 100644 --- a/apps/builder/src/features/blocks/integrations/googleAnalytics/components/GoogleAnalyticsNodeBody.tsx +++ b/apps/builder/src/features/blocks/integrations/googleAnalytics/components/GoogleAnalyticsNodeBody.tsx @@ -1,9 +1,9 @@ import React from 'react' import { Text } from '@chakra-ui/react' -import { GoogleAnalyticsOptions } from '@typebot.io/schemas' +import { GoogleAnalyticsBlock } from '@typebot.io/schemas' type Props = { - action: GoogleAnalyticsOptions['action'] + action: NonNullable['action'] } export const GoogleAnalyticsNodeBody = ({ action }: Props) => ( diff --git a/apps/builder/src/features/blocks/integrations/googleAnalytics/components/GoogleAnalyticsSettings.tsx b/apps/builder/src/features/blocks/integrations/googleAnalytics/components/GoogleAnalyticsSettings.tsx index 8799dcaa1b..62c65a0c81 100644 --- a/apps/builder/src/features/blocks/integrations/googleAnalytics/components/GoogleAnalyticsSettings.tsx +++ b/apps/builder/src/features/blocks/integrations/googleAnalytics/components/GoogleAnalyticsSettings.tsx @@ -8,12 +8,12 @@ import { Box, Stack, } from '@chakra-ui/react' -import { GoogleAnalyticsOptions } from '@typebot.io/schemas' +import { GoogleAnalyticsBlock } from '@typebot.io/schemas' import React from 'react' type Props = { - options?: GoogleAnalyticsOptions - onOptionsChange: (options: GoogleAnalyticsOptions) => void + options?: GoogleAnalyticsBlock['options'] + onOptionsChange: (options: GoogleAnalyticsBlock['options']) => void } export const GoogleAnalyticsSettings = ({ @@ -48,13 +48,13 @@ export const GoogleAnalyticsSettings = ({ @@ -71,13 +71,13 @@ export const GoogleAnalyticsSettings = ({ @@ -91,7 +91,7 @@ export const GoogleAnalyticsSettings = ({ diff --git a/apps/builder/src/features/blocks/integrations/googleAnalytics/googleAnalytics.spec.ts b/apps/builder/src/features/blocks/integrations/googleAnalytics/googleAnalytics.spec.ts index 0bbce4a238..7ab799b627 100644 --- a/apps/builder/src/features/blocks/integrations/googleAnalytics/googleAnalytics.spec.ts +++ b/apps/builder/src/features/blocks/integrations/googleAnalytics/googleAnalytics.spec.ts @@ -1,11 +1,8 @@ import test from '@playwright/test' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' -import { - defaultGoogleAnalyticsOptions, - IntegrationBlockType, -} from '@typebot.io/schemas' import { createId } from '@paralleldrive/cuid2' +import { IntegrationBlockType } from '@typebot.io/schemas/features/blocks/integrations/constants' test.describe('Google Analytics block', () => { test('its configuration should work', async ({ page }) => { @@ -15,7 +12,6 @@ test.describe('Google Analytics block', () => { id: typebotId, ...parseDefaultGroupWithBlock({ type: IntegrationBlockType.GOOGLE_ANALYTICS, - options: defaultGoogleAnalyticsOptions, }), }, ]) diff --git a/apps/builder/src/features/blocks/integrations/googleSheets/components/GoogleSheetsNodeContent.tsx b/apps/builder/src/features/blocks/integrations/googleSheets/components/GoogleSheetsNodeContent.tsx index b0d3006df4..78ca6bd942 100644 --- a/apps/builder/src/features/blocks/integrations/googleSheets/components/GoogleSheetsNodeContent.tsx +++ b/apps/builder/src/features/blocks/integrations/googleSheets/components/GoogleSheetsNodeContent.tsx @@ -1,13 +1,34 @@ import React from 'react' -import { Text } from '@chakra-ui/react' -import { GoogleSheetsAction } from '@typebot.io/schemas' +import { Stack, Text } from '@chakra-ui/react' +import { useTypebot } from '@/features/editor/providers/TypebotProvider' +import { SetVariableLabel } from '@/components/SetVariableLabel' +import { GoogleSheetsBlock } from '@typebot.io/schemas' +import { GoogleSheetsAction } from '@typebot.io/schemas/features/blocks/integrations/googleSheets/constants' type Props = { - action?: GoogleSheetsAction + options?: GoogleSheetsBlock['options'] } -export const GoogleSheetsNodeContent = ({ action }: Props) => ( - - {action ?? 'Configure...'} - -) +export const GoogleSheetsNodeContent = ({ options }: Props) => { + const { typebot } = useTypebot() + return ( + + + {options?.action ?? 'Configure...'} + + {typebot && + options?.action === GoogleSheetsAction.GET && + options?.cellsToExtract + ?.map((mapping) => mapping.variableId) + .map((variableId, idx) => + variableId ? ( + + ) : null + )} + + ) +} diff --git a/apps/builder/src/features/blocks/integrations/googleSheets/components/GoogleSheetsSettings.tsx b/apps/builder/src/features/blocks/integrations/googleSheets/components/GoogleSheetsSettings.tsx index cf69b3c1ce..7953b8ede4 100644 --- a/apps/builder/src/features/blocks/integrations/googleSheets/components/GoogleSheetsSettings.tsx +++ b/apps/builder/src/features/blocks/integrations/googleSheets/components/GoogleSheetsSettings.tsx @@ -12,16 +12,12 @@ import { DropdownList } from '@/components/DropdownList' import { useTypebot } from '@/features/editor/providers/TypebotProvider' import { Cell, - defaultGoogleSheetsGetOptions, - defaultGoogleSheetsInsertOptions, - defaultGoogleSheetsUpdateOptions, ExtractingCell, - GoogleSheetsAction, + GoogleSheetsBlock, GoogleSheetsGetOptions, + GoogleSheetsGetOptionsV6, GoogleSheetsInsertRowOptions, - GoogleSheetsOptions, - GoogleSheetsUpdateRowOptions, - totalRowsToExtractOptions, + GoogleSheetsUpdateRowOptionsV6, } from '@typebot.io/schemas' import React, { useMemo } from 'react' import { isDefined } from '@typebot.io/lib' @@ -33,14 +29,18 @@ import { GoogleSheetConnectModal } from './GoogleSheetsConnectModal' import { TableListItemProps, TableList } from '@/components/TableList' import { CredentialsDropdown } from '@/features/credentials/components/CredentialsDropdown' import { RowsFilterTableList } from './RowsFilterTableList' -import { createId } from '@paralleldrive/cuid2' import { useWorkspace } from '@/features/workspace/WorkspaceProvider' import { useSheets } from '../hooks/useSheets' import { Sheet } from '../types' +import { + GoogleSheetsAction, + defaultGoogleSheetsOptions, + totalRowsToExtractOptions, +} from '@typebot.io/schemas/features/blocks/integrations/googleSheets/constants' type Props = { - options: GoogleSheetsOptions - onOptionsChange: (options: GoogleSheetsOptions) => void + options: GoogleSheetsBlock['options'] + onOptionsChange: (options: GoogleSheetsBlock['options']) => void blockId: string } @@ -70,36 +70,13 @@ export const GoogleSheetsSettings = ({ const handleSheetIdChange = (sheetId: string | undefined) => onOptionsChange({ ...options, sheetId }) - const handleActionChange = (action: GoogleSheetsAction) => { - const baseOptions = { - credentialsId: options.credentialsId, - spreadsheetId: options.spreadsheetId, - sheetId: options.sheetId, - } - switch (action) { - case GoogleSheetsAction.GET: { - const newOptions: GoogleSheetsGetOptions = { - ...baseOptions, - ...defaultGoogleSheetsGetOptions(createId), - } - return onOptionsChange({ ...newOptions }) - } - case GoogleSheetsAction.INSERT_ROW: { - const newOptions: GoogleSheetsInsertRowOptions = { - ...baseOptions, - ...defaultGoogleSheetsInsertOptions(createId), - } - return onOptionsChange({ ...newOptions }) - } - case GoogleSheetsAction.UPDATE_ROW: { - const newOptions: GoogleSheetsUpdateRowOptions = { - ...baseOptions, - ...defaultGoogleSheetsUpdateOptions(createId), - } - return onOptionsChange({ ...newOptions }) - } - } - } + const handleActionChange = (action: GoogleSheetsAction) => + onOptionsChange({ + credentialsId: options?.credentialsId, + spreadsheetId: options?.spreadsheetId, + sheetId: options?.sheetId, + action, + }) const handleCreateNewClick = async () => { await save() @@ -148,7 +125,7 @@ export const GoogleSheetsSettings = ({ placeholder="Select an operation" /> )} - {options.action && ( + {options?.action && ( void + onOptionsChange: (options: GoogleSheetsBlock['options']) => void }) => { const handleInsertColumnsChange = (cellsToInsert: Cell[]) => - onOptionsChange({ ...options, cellsToInsert } as GoogleSheetsOptions) + onOptionsChange({ + ...options, + cellsToInsert, + } as GoogleSheetsBlock['options']) const handleUpsertColumnsChange = (cellsToUpsert: Cell[]) => - onOptionsChange({ ...options, cellsToUpsert } as GoogleSheetsOptions) - - const handleReferenceCellChange = (referenceCell: Cell) => - onOptionsChange({ ...options, referenceCell } as GoogleSheetsOptions) + onOptionsChange({ + ...options, + cellsToUpsert, + } as GoogleSheetsBlock['options']) const handleExtractingCellsChange = (cellsToExtract: ExtractingCell[]) => - onOptionsChange({ ...options, cellsToExtract } as GoogleSheetsOptions) + onOptionsChange({ + ...options, + cellsToExtract, + } as GoogleSheetsBlock['options']) const handleFilterChange = (filter: GoogleSheetsGetOptions['filter']) => - onOptionsChange({ ...options, filter } as GoogleSheetsOptions) + onOptionsChange({ ...options, filter } as GoogleSheetsBlock['options']) const updateTotalRowsToExtract = ( totalRowsToExtract: GoogleSheetsGetOptions['totalRowsToExtract'] ) => - onOptionsChange({ ...options, totalRowsToExtract } as GoogleSheetsOptions) + onOptionsChange({ + ...options, + totalRowsToExtract, + } as GoogleSheetsBlock['options']) const UpdatingCellItem = useMemo( () => @@ -222,42 +208,22 @@ const ActionOptions = ({ case GoogleSheetsAction.UPDATE_ROW: return ( - {options.referenceCell && ( - - - - Row to update - - - - - - - - - )} - {!options.referenceCell && ( - - - - Row(s) to update - - - + + + + Row(s) to update + + + - - - - - )} + + + + @@ -281,49 +247,32 @@ const ActionOptions = ({ return ( - {options.referenceCell && ( + <> - Rows to select + Select row(s) - - + + - )} - {!options.referenceCell && ( - <> - - - - Rows to filter - - - - - - - - - - - )} + @@ -339,6 +288,7 @@ const ActionOptions = ({ onItemsChange={handleExtractingCellsChange} Item={ExtractingCellItem} addLabel="Add a value" + hasDefaultItem /> diff --git a/apps/builder/src/features/blocks/integrations/googleSheets/components/RowsFilterComparisonItem.tsx b/apps/builder/src/features/blocks/integrations/googleSheets/components/RowsFilterComparisonItem.tsx index 55d3ca5931..5a43d6433b 100644 --- a/apps/builder/src/features/blocks/integrations/googleSheets/components/RowsFilterComparisonItem.tsx +++ b/apps/builder/src/features/blocks/integrations/googleSheets/components/RowsFilterComparisonItem.tsx @@ -2,7 +2,8 @@ import { DropdownList } from '@/components/DropdownList' import { TextInput } from '@/components/inputs' import { TableListItemProps } from '@/components/TableList' import { Stack } from '@chakra-ui/react' -import { ComparisonOperators, RowsFilterComparison } from '@typebot.io/schemas' +import { RowsFilterComparison } from '@typebot.io/schemas' +import { ComparisonOperators } from '@typebot.io/schemas/features/blocks/logic/condition/constants' import React from 'react' export const RowsFilterComparisonItem = ({ diff --git a/apps/builder/src/features/blocks/integrations/googleSheets/components/RowsFilterTableList.tsx b/apps/builder/src/features/blocks/integrations/googleSheets/components/RowsFilterTableList.tsx index e174abaccb..904b70fadb 100644 --- a/apps/builder/src/features/blocks/integrations/googleSheets/components/RowsFilterTableList.tsx +++ b/apps/builder/src/features/blocks/integrations/googleSheets/components/RowsFilterTableList.tsx @@ -3,11 +3,11 @@ import { TableList, TableListItemProps } from '@/components/TableList' import { Flex } from '@chakra-ui/react' import { GoogleSheetsGetOptions, - LogicalOperator, RowsFilterComparison, } from '@typebot.io/schemas' import React, { useCallback } from 'react' import { RowsFilterComparisonItem } from './RowsFilterComparisonItem' +import { LogicalOperator } from '@typebot.io/schemas/features/blocks/logic/condition/constants' type Props = { filter: GoogleSheetsGetOptions['filter'] diff --git a/apps/builder/src/features/blocks/integrations/googleSheets/googleSheets.spec.ts b/apps/builder/src/features/blocks/integrations/googleSheets/googleSheets.spec.ts index 9ec0e93088..93bd5f4c4b 100644 --- a/apps/builder/src/features/blocks/integrations/googleSheets/googleSheets.spec.ts +++ b/apps/builder/src/features/blocks/integrations/googleSheets/googleSheets.spec.ts @@ -31,7 +31,7 @@ test.describe.parallel('Google sheets integration', () => { 'Georges' ) - await page.click('text=Preview') + await page.click('text=Test') await page .locator('typebot-standard') .locator('input[placeholder="Type your email..."]') @@ -76,7 +76,7 @@ test.describe.parallel('Google sheets integration', () => { 'Last name' ) - await page.click('text=Preview') + await page.click('text=Test') await page .locator('typebot-standard') .locator('input[placeholder="Type your email..."]') @@ -103,7 +103,7 @@ test.describe.parallel('Google sheets integration', () => { await page.click('text=Select an operation') await page.click('text=Get data from sheet') - await page.getByRole('button', { name: 'Rows to filter' }).click() + await page.getByRole('button', { name: 'Select row(s)' }).click() await page.getByRole('button', { name: 'Add filter rule' }).click() await page.click('text=Select a column') await page.click('button >> text="Email"') @@ -132,7 +132,7 @@ test.describe.parallel('Google sheets integration', () => { await page.getByRole('menuitem', { name: 'Last name' }).click() await createNewVar(page, 'Last name') - await page.click('text=Preview') + await page.click('text=Test') await page .locator('typebot-standard') .locator('input[placeholder="Type your email..."]') @@ -142,8 +142,8 @@ test.describe.parallel('Google sheets integration', () => { .locator('input[placeholder="Type your email..."]') .press('Enter') await expect( - page.locator('typebot-standard').locator('text=Your name is:') - ).toHaveText(`Your name is: Georges2 Last name`) + page.locator('typebot-standard').locator('text=Georges2') + ).toBeVisible() }) }) diff --git a/apps/builder/src/features/blocks/integrations/makeCom/components/MakeComContent.tsx b/apps/builder/src/features/blocks/integrations/makeCom/components/MakeComContent.tsx index 59131d8828..f6f9289f62 100644 --- a/apps/builder/src/features/blocks/integrations/makeCom/components/MakeComContent.tsx +++ b/apps/builder/src/features/blocks/integrations/makeCom/components/MakeComContent.tsx @@ -7,7 +7,7 @@ type Props = { } export const MakeComContent = ({ block }: Props) => { - const webhook = block.options.webhook + const webhook = block.options?.webhook if (isNotDefined(webhook?.body)) return Configure... diff --git a/apps/builder/src/features/blocks/integrations/makeCom/components/MakeComSettings.tsx b/apps/builder/src/features/blocks/integrations/makeCom/components/MakeComSettings.tsx index 2f0393c811..001b5a58b1 100644 --- a/apps/builder/src/features/blocks/integrations/makeCom/components/MakeComSettings.tsx +++ b/apps/builder/src/features/blocks/integrations/makeCom/components/MakeComSettings.tsx @@ -1,12 +1,12 @@ import { Alert, AlertIcon, Button, Link, Stack, Text } from '@chakra-ui/react' import { ExternalLinkIcon } from '@/components/icons' -import { MakeComBlock, Webhook, WebhookOptions } from '@typebot.io/schemas' +import { MakeComBlock, Webhook } from '@typebot.io/schemas' import React from 'react' import { WebhookAdvancedConfigForm } from '../../webhook/components/WebhookAdvancedConfigForm' type Props = { block: MakeComBlock - onOptionsChange: (options: WebhookOptions) => void + onOptionsChange: (options: MakeComBlock['options']) => void } export const MakeComSettings = ({ @@ -14,14 +14,13 @@ export const MakeComSettings = ({ onOptionsChange, }: Props) => { const setLocalWebhook = async (newLocalWebhook: Webhook) => { - if (!options.webhook) return onOptionsChange({ ...options, webhook: newLocalWebhook, }) } - const url = options.webhook?.url + const url = options?.webhook?.url return ( @@ -43,15 +42,13 @@ export const MakeComSettings = ({ )} - {options.webhook && ( - - )} + ) } diff --git a/apps/builder/src/features/blocks/integrations/openai/api/listModels.ts b/apps/builder/src/features/blocks/integrations/openai/api/listModels.ts index 9a707d5250..792d28633d 100644 --- a/apps/builder/src/features/blocks/integrations/openai/api/listModels.ts +++ b/apps/builder/src/features/blocks/integrations/openai/api/listModels.ts @@ -1,15 +1,13 @@ -import prisma from '@/lib/prisma' +import prisma from '@typebot.io/lib/prisma' import { authenticatedProcedure } from '@/helpers/server/trpc' import { TRPCError } from '@trpc/server' import { z } from 'zod' import { isReadWorkspaceFobidden } from '@/features/workspace/helpers/isReadWorkspaceFobidden' -import { Configuration, OpenAIApi, ResponseTypes } from 'openai-edge' -import { decrypt } from '@typebot.io/lib/api' -import { - OpenAICredentials, - defaultBaseUrl, -} from '@typebot.io/schemas/features/blocks/integrations/openai' +import { decrypt } from '@typebot.io/lib/api/encryption/decrypt' +import { OpenAICredentials } from '@typebot.io/schemas/features/blocks/integrations/openai' import { isNotEmpty } from '@typebot.io/lib/utils' +import { OpenAI, ClientOptions } from 'openai' +import { defaultOpenAIOptions } from '@typebot.io/schemas/features/blocks/integrations/openai/constants' export const listModels = authenticatedProcedure .meta({ @@ -25,8 +23,9 @@ export const listModels = authenticatedProcedure z.object({ credentialsId: z.string(), workspaceId: z.string(), - baseUrl: z.string().default(defaultBaseUrl), + baseUrl: z.string(), apiVersion: z.string().optional(), + type: z.enum(['gpt', 'tts']), }) ) .output( @@ -36,7 +35,7 @@ export const listModels = authenticatedProcedure ) .query( async ({ - input: { credentialsId, workspaceId, baseUrl, apiVersion }, + input: { credentialsId, workspaceId, baseUrl, apiVersion, type }, ctx: { user }, }) => { const workspace = await prisma.workspace.findFirst({ @@ -79,41 +78,27 @@ export const listModels = authenticatedProcedure credentials.iv )) as OpenAICredentials['data'] - const config = new Configuration({ + const config = { apiKey: data.apiKey, - basePath: baseUrl, - baseOptions: { - headers: { - 'api-key': data.apiKey, - }, + baseURL: baseUrl ?? defaultOpenAIOptions.baseUrl, + defaultHeaders: { + 'api-key': data.apiKey, }, - defaultQueryParams: isNotEmpty(apiVersion) - ? new URLSearchParams({ + defaultQuery: isNotEmpty(apiVersion) + ? { 'api-version': apiVersion, - }) + } : undefined, - }) - - const openai = new OpenAIApi(config) + } satisfies ClientOptions - const response = await openai.listModels() + const openai = new OpenAI(config) - const modelsData = (await response.json()) as - | ResponseTypes['listModels'] - | { - error: unknown - } - - if ('error' in modelsData) - throw new TRPCError({ - code: 'INTERNAL_SERVER_ERROR', - message: 'Could not list models', - cause: modelsData.error, - }) + const models = await openai.models.list() return { models: - modelsData.data + models.data + .filter((model) => model.id.includes(type)) .sort((a, b) => b.created - a.created) .map((model) => model.id) ?? [], } diff --git a/apps/builder/src/features/blocks/integrations/openai/components/createChatCompletion/ModelsDropdown.tsx b/apps/builder/src/features/blocks/integrations/openai/components/ModelsDropdown.tsx similarity index 80% rename from apps/builder/src/features/blocks/integrations/openai/components/createChatCompletion/ModelsDropdown.tsx rename to apps/builder/src/features/blocks/integrations/openai/components/ModelsDropdown.tsx index c929f28926..95277f611a 100644 --- a/apps/builder/src/features/blocks/integrations/openai/components/createChatCompletion/ModelsDropdown.tsx +++ b/apps/builder/src/features/blocks/integrations/openai/components/ModelsDropdown.tsx @@ -2,12 +2,14 @@ import { Select } from '@/components/inputs/Select' import { useWorkspace } from '@/features/workspace/WorkspaceProvider' import { useToast } from '@/hooks/useToast' import { trpc } from '@/lib/trpc' +import { defaultOpenAIOptions } from '@typebot.io/schemas/features/blocks/integrations/openai/constants' type Props = { - baseUrl: string + baseUrl?: string apiVersion?: string credentialsId: string - defaultValue: string + defaultValue?: string + type: 'gpt' | 'tts' onChange: (model: string | undefined) => void } @@ -17,6 +19,7 @@ export const ModelsDropdown = ({ defaultValue, onChange, credentialsId, + type, }: Props) => { const { workspace } = useWorkspace() const { showToast } = useToast() @@ -24,9 +27,10 @@ export const ModelsDropdown = ({ const { data } = trpc.openAI.listModels.useQuery( { credentialsId, - baseUrl, + baseUrl: baseUrl ?? defaultOpenAIOptions.baseUrl, workspaceId: workspace?.id as string, apiVersion, + type, }, { enabled: !!workspace, diff --git a/apps/builder/src/features/blocks/integrations/openai/components/OpenAINodeBody.tsx b/apps/builder/src/features/blocks/integrations/openai/components/OpenAINodeBody.tsx index 380f47b65c..f66cd81ac7 100644 --- a/apps/builder/src/features/blocks/integrations/openai/components/OpenAINodeBody.tsx +++ b/apps/builder/src/features/blocks/integrations/openai/components/OpenAINodeBody.tsx @@ -1,30 +1,25 @@ import { SetVariableLabel } from '@/components/SetVariableLabel' import { useTypebot } from '@/features/editor/providers/TypebotProvider' import { Stack, Text } from '@chakra-ui/react' -import { - ChatCompletionOpenAIOptions, - CreateImageOpenAIOptions, - OpenAIBlock, -} from '@typebot.io/schemas/features/blocks/integrations/openai' +import { OpenAIBlock } from '@typebot.io/schemas/features/blocks/integrations/openai' type Props = { - task: OpenAIBlock['options']['task'] - responseMapping: - | ChatCompletionOpenAIOptions['responseMapping'] - | CreateImageOpenAIOptions['responseMapping'] + options: OpenAIBlock['options'] } -export const OpenAINodeBody = ({ task, responseMapping }: Props) => { +export const OpenAINodeBody = ({ options }: Props) => { const { typebot } = useTypebot() return ( - - {task ?? 'Configure...'} + + {options?.task ?? 'Configure...'} {typebot && - responseMapping - .map((mapping) => mapping.variableId) + options && + 'responseMapping' in options && + options.responseMapping + ?.map((mapping) => mapping.variableId) .map((variableId, idx) => variableId ? ( { /> ) : null )} + {typebot && + options && + 'saveUrlInVariableId' in options && + options.saveUrlInVariableId && ( + + )} ) } diff --git a/apps/builder/src/features/blocks/integrations/openai/components/OpenAISettings.tsx b/apps/builder/src/features/blocks/integrations/openai/components/OpenAISettings.tsx index 1c4b39473d..f1e28e37bf 100644 --- a/apps/builder/src/features/blocks/integrations/openai/components/OpenAISettings.tsx +++ b/apps/builder/src/features/blocks/integrations/openai/components/OpenAISettings.tsx @@ -13,17 +13,19 @@ import { CredentialsDropdown } from '@/features/credentials/components/Credentia import { ChatCompletionOpenAIOptions, CreateImageOpenAIOptions, - defaultBaseUrl, - defaultChatCompletionOptions, + CreateSpeechOpenAIOptions, OpenAIBlock, - openAITasks, } from '@typebot.io/schemas/features/blocks/integrations/openai' import { OpenAICredentialsModal } from './OpenAICredentialsModal' import { useWorkspace } from '@/features/workspace/WorkspaceProvider' import { DropdownList } from '@/components/DropdownList' import { OpenAIChatCompletionSettings } from './createChatCompletion/OpenAIChatCompletionSettings' -import { createId } from '@paralleldrive/cuid2' import { TextInput } from '@/components/inputs' +import { + defaultOpenAIOptions, + openAITasks, +} from '@typebot.io/schemas/features/blocks/integrations/openai/constants' +import { OpenAICreateSpeechSettings } from './audio/OpenAICreateSpeechSettings' type OpenAITask = (typeof openAITasks)[number] @@ -47,15 +49,10 @@ export const OpenAISettings = ({ } const updateTask = (task: OpenAITask) => { - switch (task) { - case 'Create chat completion': { - onOptionsChange({ - credentialsId: options?.credentialsId, - ...defaultChatCompletionOptions(createId), - }) - break - } - } + onOptionsChange({ + credentialsId: options?.credentialsId, + task, + } as OpenAIBlock['options']) } const updateBaseUrl = (baseUrl: string) => { @@ -72,6 +69,8 @@ export const OpenAISettings = ({ }) } + const baseUrl = options?.baseUrl ?? defaultOpenAIOptions.baseUrl + return ( {workspace && ( @@ -91,7 +90,7 @@ export const OpenAISettings = ({ /> )} - {options.credentialsId && ( + {options?.credentialsId && ( <> @@ -104,10 +103,10 @@ export const OpenAISettings = ({ - {options.baseUrl !== defaultBaseUrl && ( + {baseUrl !== defaultOpenAIOptions.baseUrl && ( void -}) => { +}): JSX.Element | null => { switch (options.task) { case 'Create chat completion': { return ( @@ -152,6 +154,14 @@ const OpenAITaskSettings = ({ /> ) } + case 'Create speech': { + return ( + + ) + } case 'Create image': { return null } diff --git a/apps/builder/src/features/blocks/integrations/openai/components/audio/OpenAICreateSpeechSettings.tsx b/apps/builder/src/features/blocks/integrations/openai/components/audio/OpenAICreateSpeechSettings.tsx new file mode 100644 index 0000000000..9a6efaad13 --- /dev/null +++ b/apps/builder/src/features/blocks/integrations/openai/components/audio/OpenAICreateSpeechSettings.tsx @@ -0,0 +1,98 @@ +import { CreateSpeechOpenAIOptions } from '@typebot.io/schemas/features/blocks/integrations/openai' +import { FormControl, FormLabel, Stack, Text } from '@chakra-ui/react' +import { TextLink } from '@/components/TextLink' +import { ModelsDropdown } from '../ModelsDropdown' +import { Textarea } from '@/components/inputs' +import { DropdownList } from '@/components/DropdownList' +import { openAIVoices } from '@typebot.io/schemas/features/blocks/integrations/openai/constants' +import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' +import { Variable } from '@typebot.io/schemas' + +const apiReferenceUrl = + 'https://platform.openai.com/docs/api-reference/audio/createSpeech' + +type Props = { + options: CreateSpeechOpenAIOptions + onOptionsChange: (options: CreateSpeechOpenAIOptions) => void +} + +export const OpenAICreateSpeechSettings = ({ + options, + onOptionsChange, +}: Props) => { + const updateModel = (model: string | undefined) => { + onOptionsChange({ + ...options, + model, + }) + } + + const updateInput = (input: string | undefined) => { + onOptionsChange({ + ...options, + input, + }) + } + + const updateVoice = (voice: (typeof openAIVoices)[number]) => { + onOptionsChange({ + ...options, + voice, + }) + } + + const updateSaveUrlInVariableId = ( + variable: Pick | undefined + ) => { + onOptionsChange({ + ...options, + saveUrlInVariableId: variable?.id, + }) + } + + return ( + + + Read the{' '} + + API reference + {' '} + to better understand the available options. + + {options.credentialsId && ( + <> + +
#{scopedT('paidAt')}{scopedT('subtotal')}{t('billing.invoices.paidAt')}{t('billing.invoices.subtotal')}