2
0

⬆️ Upgrade dependencies

This commit is contained in:
Baptiste Arnaud
2023-05-25 17:24:39 +02:00
parent 16f3ad3a19
commit 55bbf0e593
24 changed files with 2139 additions and 2692 deletions

View File

@ -14,45 +14,44 @@
},
"dependencies": {
"@chakra-ui/anatomy": "^2.1.1",
"@chakra-ui/react": "2.6.0",
"@chakra-ui/react": "2.6.1",
"@chakra-ui/theme-tools": "^2.0.16",
"@dnd-kit/core": "6.0.8",
"@dnd-kit/sortable": "7.0.2",
"@dnd-kit/utilities": "3.2.1",
"@emotion/react": "11.10.8",
"@emotion/styled": "11.10.8",
"@faire/mjml-react": "3.2.0",
"@giphy/js-fetch-api": "4.9.0",
"@emotion/react": "11.11.0",
"@emotion/styled": "11.11.0",
"@faire/mjml-react": "3.3.0",
"@giphy/js-fetch-api": "4.9.1",
"@giphy/js-types": "4.4.0",
"@giphy/react-components": "6.9.0",
"@googleapis/drive": "5.0.2",
"@lezer/css": "^1.1.1",
"@giphy/react-components": "6.9.3",
"@googleapis/drive": "5.1.0",
"@paralleldrive/cuid2": "2.2.0",
"@sentry/nextjs": "7.50.0",
"@stripe/stripe-js": "1.52.1",
"@tanstack/react-query": "^4.29.5",
"@tanstack/react-table": "8.9.0",
"@trpc/client": "10.23.0",
"@trpc/next": "10.23.0",
"@trpc/react-query": "10.23.0",
"@trpc/server": "10.23.0",
"@sentry/nextjs": "7.53.1",
"@stripe/stripe-js": "1.53.0",
"@tanstack/react-query": "^4.29.7",
"@tanstack/react-table": "8.9.1",
"@trpc/client": "10.27.3",
"@trpc/next": "10.27.3",
"@trpc/react-query": "10.27.3",
"@trpc/server": "10.27.3",
"@typebot.io/emails": "workspace:*",
"@typebot.io/js": "workspace:*",
"@typebot.io/next-international": "0.3.8",
"@typebot.io/react": "workspace:*",
"@udecode/plate-basic-marks": "21.0.0",
"@udecode/plate-common": "^21.0.0",
"@udecode/plate-core": "21.0.0",
"@udecode/plate-link": "21.0.0",
"@udecode/plate-serializer-html": "21.0.0",
"@udecode/plate-ui-link": "21.0.0",
"@udecode/plate-ui-toolbar": "21.0.0",
"@uiw/codemirror-extensions-langs": "^4.19.16",
"@uiw/codemirror-theme-github": "^4.19.16",
"@uiw/codemirror-theme-tokyo-night": "^4.19.16",
"@uiw/react-codemirror": "^4.19.16",
"@use-gesture/react": "^10.2.26",
"aws-sdk": "2.1369.0",
"@udecode/plate-basic-marks": "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.20.2",
"@uiw/codemirror-theme-github": "^4.20.2",
"@uiw/codemirror-theme-tokyo-night": "^4.20.2",
"@uiw/react-codemirror": "^4.20.2",
"@use-gesture/react": "^10.2.27",
"aws-sdk": "2.1384.0",
"browser-image-compression": "2.0.2",
"canvas-confetti": "1.6.0",
"codemirror": "6.0.1",
@ -64,59 +63,58 @@
"google-auth-library": "8.8.0",
"google-spreadsheet": "3.3.0",
"got": "12.6.0",
"htmlparser2": "8.0.2",
"immer": "10.0.1",
"immer": "10.0.2",
"js-video-url-parser": "0.5.1",
"jsonwebtoken": "9.0.0",
"micro": "10.0.1",
"micro-cors": "0.1.1",
"minio": "7.1.0",
"next": "13.3.4",
"minio": "7.1.1",
"next": "13.4.3",
"next-auth": "4.22.1",
"nextjs-cors": "^2.1.2",
"nodemailer": "6.9.1",
"nodemailer": "6.9.2",
"nprogress": "0.2.0",
"papaparse": "5.4.1",
"posthog-node": "3.1.1",
"prettier": "2.8.8",
"qs": "6.11.1",
"qs": "6.11.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"slate": "0.94.0",
"slate": "0.94.1",
"slate-history": "0.93.0",
"slate-hyperscript": "0.77.0",
"slate-react": "0.94.0",
"stripe": "12.3.0",
"slate-react": "0.94.2",
"stripe": "12.6.0",
"styled-components": "5.3.10",
"svg-round-corners": "0.4.1",
"swr": "2.1.5",
"tinycolor2": "1.6.0",
"trpc-openapi": "1.1.2",
"unsplash-js": "^7.0.15",
"trpc-openapi": "1.2.0",
"unsplash-js": "^7.0.18",
"use-debounce": "9.0.4"
},
"devDependencies": {
"@chakra-ui/styled-system": "2.9.0",
"@playwright/test": "1.33.0",
"@playwright/test": "1.34.3",
"@typebot.io/lib": "workspace:*",
"@typebot.io/prisma": "workspace:*",
"@typebot.io/schemas": "workspace:*",
"@typebot.io/tsconfig": "workspace:*",
"@types/canvas-confetti": "1.6.0",
"@types/google-spreadsheet": "3.3.1",
"@types/google-spreadsheet": "3.3.2",
"@types/jsonwebtoken": "9.0.2",
"@types/micro-cors": "0.1.3",
"@types/minio": "7.0.18",
"@types/node": "18.16.3",
"@types/nodemailer": "6.4.7",
"@types/minio": "7.1.0",
"@types/node": "20.2.3",
"@types/nodemailer": "6.4.8",
"@types/nprogress": "0.2.0",
"@types/papaparse": "5.3.7",
"@types/prettier": "2.7.2",
"@types/qs": "6.9.7",
"@types/react": "18.2.0",
"@types/react": "18.2.7",
"@types/tinycolor2": "1.4.3",
"dotenv": "16.0.3",
"eslint": "8.39.0",
"eslint": "8.41.0",
"eslint-config-custom": "workspace:*",
"superjson": "^1.12.3",
"typescript": "5.0.4",

View File

@ -20,7 +20,6 @@ import { useTypebot } from '../providers/TypebotProvider'
import { useUser } from '@/features/account/hooks/useUser'
import { useRouter } from 'next/router'
import React, { useEffect, useState } from 'react'
import { isNotDefined } from '@typebot.io/lib'
import { EditorSettingsModal } from './EditorSettingsModal'
import { parseDefaultPublicId } from '@/features/publish/helpers/parseDefaultPublicId'
@ -32,9 +31,8 @@ export const BoardMenuButton = (props: FlexProps) => {
const { isOpen, onOpen, onClose } = useDisclosure()
useEffect(() => {
if (isNotDefined(user?.graphNavigation) && isNotDefined(query.isFirstBot))
onOpen()
}, [onOpen, query.isFirstBot, user?.graphNavigation])
if (user && !user.graphNavigation && !query.isFirstBot) onOpen()
}, [onOpen, query.isFirstBot, user, user?.graphNavigation])
const downloadFlow = () => {
assert(typebot)

View File

@ -12,7 +12,7 @@
"paths": {
"/t/process": {
"post": {
"operationId": "query.processTelemetryEvent",
"operationId": "processTelemetryEvent",
"description": "Only used for the cloud version of Typebot. It's the way it processes telemetry events and inject it to thrid-party services.",
"requestBody": {
"required": true,
@ -388,7 +388,7 @@
},
"/linkedTypebots": {
"get": {
"operationId": "query.getLinkedTypebots",
"operationId": "getLinkedTypebots",
"summary": "Get linked typebots",
"tags": [
"Typebot"
@ -1234,6 +1234,30 @@
},
"phoneNumber": {
"type": "string"
},
"address": {
"type": "object",
"properties": {
"country": {
"type": "string"
},
"line1": {
"type": "string"
},
"line2": {
"type": "string"
},
"state": {
"type": "string"
},
"city": {
"type": "string"
},
"postalCode": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
@ -1768,6 +1792,34 @@
"isCode": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"Custom",
"Empty",
"User ID",
"Today",
"Yesterday",
"Tomorrow",
"Random ID",
"Map item with same index"
]
},
"mapListItemParams": {
"type": "object",
"properties": {
"baseItemVariableId": {
"type": "string"
},
"baseListVariableId": {
"type": "string"
},
"targetListVariableId": {
"type": "string"
}
},
"additionalProperties": false
},
"isExecutedOnClient": {
"type": "boolean"
}
@ -2193,7 +2245,8 @@
"required": [
"id"
],
"additionalProperties": false
"additionalProperties": false,
"description": "Deprecated. Use `filter` instead."
},
"filter": {
"type": "object",
@ -2268,6 +2321,15 @@
],
"additionalProperties": false
}
},
"totalRowsToExtract": {
"type": "string",
"enum": [
"All",
"First",
"Last",
"Random"
]
}
},
"required": [
@ -2312,7 +2374,8 @@
"required": [
"id"
],
"additionalProperties": false
"additionalProperties": false,
"description": "Deprecated. Use `filter` instead."
}
}
},
@ -2358,7 +2421,8 @@
"required": [
"id"
],
"additionalProperties": false
"additionalProperties": false,
"description": "Deprecated. Use `filter` instead."
}
},
"referenceCell": {
@ -2377,6 +2441,60 @@
"required": [
"id"
],
"additionalProperties": false,
"description": "Deprecated. Use `filter` instead."
},
"filter": {
"type": "object",
"properties": {
"comparisons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"column": {
"type": "string"
},
"comparisonOperator": {
"type": "string",
"enum": [
"Equal to",
"Not equal",
"Contains",
"Does not contain",
"Greater than",
"Less than",
"Is set",
"Is empty",
"Starts with",
"Ends with"
]
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"logicalOperator": {
"type": "string",
"enum": [
"OR",
"AND"
]
}
},
"required": [
"comparisons",
"logicalOperator"
],
"additionalProperties": false
}
},
@ -3162,7 +3280,7 @@
},
"/workspaces": {
"get": {
"operationId": "query.workspace.listWorkspaces",
"operationId": "workspace-listWorkspaces",
"summary": "List workspaces",
"tags": [
"Workspace"
@ -3233,7 +3351,7 @@
}
},
"post": {
"operationId": "mutation.workspace.createWorkspace",
"operationId": "workspace-createWorkspace",
"summary": "Create workspace",
"tags": [
"Workspace"
@ -3388,7 +3506,7 @@
},
"/workspaces/{workspaceId}": {
"get": {
"operationId": "query.workspace.getWorkspace",
"operationId": "workspace-getWorkspace",
"summary": "Get workspace",
"tags": [
"Workspace"
@ -3531,7 +3649,7 @@
}
},
"patch": {
"operationId": "mutation.workspace.updateWorkspace",
"operationId": "workspace-updateWorkspace",
"summary": "Update workspace",
"tags": [
"Workspace"
@ -3693,7 +3811,7 @@
}
},
"delete": {
"operationId": "mutation.workspace.deleteWorkspace",
"operationId": "workspace-deleteWorkspace",
"summary": "Delete workspace",
"tags": [
"Workspace"
@ -3741,7 +3859,7 @@
},
"/workspaces/{workspaceId}/members": {
"get": {
"operationId": "query.workspace.listMembersInWorkspace",
"operationId": "workspace-listMembersInWorkspace",
"summary": "List members in workspace",
"tags": [
"Workspace"
@ -3834,7 +3952,7 @@
},
"/typebots": {
"get": {
"operationId": "query.typebot.listTypebots",
"operationId": "typebot-listTypebots",
"summary": "List typebots",
"tags": [
"Typebot"
@ -3914,7 +4032,7 @@
},
"/typebots/{typebotId}/webhookBlocks": {
"get": {
"operationId": "query.webhook.listWebhookBlocks",
"operationId": "webhook-listWebhookBlocks",
"summary": "List webhook blocks",
"description": "Returns a list of all the webhook blocks that you can subscribe to.",
"tags": [
@ -3982,7 +4100,7 @@
},
"/typebots/{typebotId}/webhookBlocks/{blockId}/getResultExample": {
"get": {
"operationId": "query.webhook.getResultExample",
"operationId": "webhook-getResultExample",
"summary": "Get result example",
"description": "Returns \"fake\" result for webhook block to help you anticipate how the webhook will behave.",
"tags": [
@ -4037,8 +4155,7 @@
"required": [
"message",
"Submitted at"
],
"additionalProperties": false
]
},
{
"type": "object",
@ -4073,7 +4190,7 @@
},
"/typebots/{typebotId}/webhookBlocks/{blockId}/subscribe": {
"post": {
"operationId": "query.webhook.subscribeWebhook",
"operationId": "webhook-subscribeWebhook",
"summary": "Subscribe to webhook block",
"tags": [
"Webhook"
@ -4153,7 +4270,7 @@
},
"/typebots/{typebotId}/webhookBlocks/{blockId}/unsubscribe": {
"post": {
"operationId": "query.webhook.unsubscribeWebhook",
"operationId": "webhook-unsubscribeWebhook",
"summary": "Unsubscribe from webhook block",
"tags": [
"Webhook"
@ -4163,18 +4280,6 @@
"Authorization": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {},
"additionalProperties": false
}
}
}
},
"parameters": [
{
"name": "typebotId",
@ -4226,7 +4331,7 @@
},
"/typebots/{typebotId}/results": {
"get": {
"operationId": "query.results.getResults",
"operationId": "results-getResults",
"summary": "List results",
"tags": [
"Results"
@ -4406,7 +4511,7 @@
}
},
"delete": {
"operationId": "mutation.results.deleteResults",
"operationId": "results-deleteResults",
"summary": "Delete results",
"tags": [
"Results"
@ -4452,7 +4557,7 @@
},
"/typebots/{typebotId}/results/{resultId}/logs": {
"get": {
"operationId": "query.results.getResultLogs",
"operationId": "results-getResultLogs",
"summary": "List result logs",
"tags": [
"Results"
@ -4542,7 +4647,7 @@
},
"/billing/subscription/portal": {
"get": {
"operationId": "query.billing.getBillingPortalUrl",
"operationId": "billing-getBillingPortalUrl",
"summary": "Get Stripe billing portal URL",
"tags": [
"Billing"
@ -4590,7 +4695,7 @@
},
"/billing/invoices": {
"get": {
"operationId": "query.billing.listInvoices",
"operationId": "billing-listInvoices",
"summary": "List invoices",
"tags": [
"Billing"
@ -4667,7 +4772,7 @@
},
"/billing/subscription/checkout": {
"post": {
"operationId": "mutation.billing.createCheckoutSession",
"operationId": "billing-createCheckoutSession",
"summary": "Create checkout session to create a new subscription",
"tags": [
"Billing"
@ -4781,7 +4886,7 @@
},
"/billing/subscription": {
"patch": {
"operationId": "mutation.billing.updateSubscription",
"operationId": "billing-updateSubscription",
"summary": "Update subscription",
"tags": [
"Billing"
@ -4798,6 +4903,9 @@
"schema": {
"type": "object",
"properties": {
"returnUrl": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
@ -4826,6 +4934,7 @@
}
},
"required": [
"returnUrl",
"workspaceId",
"plan",
"additionalChats",
@ -4945,12 +5054,14 @@
"customSeatsLimit",
"isQuarantined"
],
"additionalProperties": false
"additionalProperties": false,
"nullable": true
},
"checkoutUrl": {
"type": "string",
"nullable": true
}
},
"required": [
"workspace"
],
"additionalProperties": false
}
}
@ -4962,7 +5073,7 @@
}
},
"get": {
"operationId": "query.billing.getSubscription",
"operationId": "billing-getSubscription",
"summary": "List invoices",
"tags": [
"Billing"
@ -5041,7 +5152,7 @@
},
"/billing/usage": {
"get": {
"operationId": "query.billing.getUsage",
"operationId": "billing-getUsage",
"summary": "Get current plan usage",
"tags": [
"Billing"
@ -5093,7 +5204,7 @@
},
"/billing/subscription/custom-checkout": {
"post": {
"operationId": "mutation.billing.createCustomCheckoutSession",
"operationId": "billing-createCustomCheckoutSession",
"summary": "Create custom checkout session to make a workspace pay for a custom plan",
"tags": [
"Billing"
@ -5159,7 +5270,7 @@
},
"/credentials": {
"post": {
"operationId": "mutation.credentials.createCredentials",
"operationId": "credentials-createCredentials",
"summary": "Create credentials",
"tags": [
"Credentials"
@ -5428,7 +5539,7 @@
}
},
"get": {
"operationId": "query.credentials.listCredentials",
"operationId": "credentials-listCredentials",
"summary": "List workspace credentials",
"tags": [
"Credentials"
@ -5533,7 +5644,7 @@
},
"/credentials/:credentialsId": {
"delete": {
"operationId": "mutation.credentials.deleteCredentials",
"operationId": "credentials-deleteCredentials",
"summary": "Delete credentials",
"tags": [
"Credentials"
@ -5589,7 +5700,7 @@
},
"/themeTemplates": {
"get": {
"operationId": "query.theme.listThemeTemplates",
"operationId": "theme-listThemeTemplates",
"summary": "List theme templates",
"tags": [
"Theme template"
@ -5818,7 +5929,7 @@
},
"/themeTemplates/{themeTemplateId}": {
"put": {
"operationId": "mutation.theme.saveThemeTemplate",
"operationId": "theme-saveThemeTemplate",
"summary": "Save theme template",
"tags": [
"Theme template"
@ -6244,7 +6355,7 @@
}
},
"delete": {
"operationId": "mutation.theme.deleteThemeTemplate",
"operationId": "theme-deleteThemeTemplate",
"summary": "Delete a theme template",
"tags": [
"Theme template"

View File

@ -12,7 +12,7 @@
"paths": {
"/sendMessage": {
"post": {
"operationId": "query.sendMessage",
"operationId": "sendMessage",
"summary": "Send a message",
"description": "To initiate a chat, do not provide a `sessionId` nor a `message`.\n\nContinue the conversation by providing the `sessionId` and the `message` that should answer the previous question.\n\nSet the `isPreview` option to `true` to chat with the non-published version of the typebot.",
"security": [
@ -847,6 +847,30 @@
},
"phoneNumber": {
"type": "string"
},
"address": {
"type": "object",
"properties": {
"country": {
"type": "string"
},
"line1": {
"type": "string"
},
"line2": {
"type": "string"
},
"state": {
"type": "string"
},
"city": {
"type": "string"
},
"postalCode": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
@ -1381,6 +1405,34 @@
"isCode": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"Custom",
"Empty",
"User ID",
"Today",
"Yesterday",
"Tomorrow",
"Random ID",
"Map item with same index"
]
},
"mapListItemParams": {
"type": "object",
"properties": {
"baseItemVariableId": {
"type": "string"
},
"baseListVariableId": {
"type": "string"
},
"targetListVariableId": {
"type": "string"
}
},
"additionalProperties": false
},
"isExecutedOnClient": {
"type": "boolean"
}
@ -1806,7 +1858,8 @@
"required": [
"id"
],
"additionalProperties": false
"additionalProperties": false,
"description": "Deprecated. Use `filter` instead."
},
"filter": {
"type": "object",
@ -1881,6 +1934,15 @@
],
"additionalProperties": false
}
},
"totalRowsToExtract": {
"type": "string",
"enum": [
"All",
"First",
"Last",
"Random"
]
}
},
"required": [
@ -1925,7 +1987,8 @@
"required": [
"id"
],
"additionalProperties": false
"additionalProperties": false,
"description": "Deprecated. Use `filter` instead."
}
}
},
@ -1971,7 +2034,8 @@
"required": [
"id"
],
"additionalProperties": false
"additionalProperties": false,
"description": "Deprecated. Use `filter` instead."
}
},
"referenceCell": {
@ -1990,6 +2054,60 @@
"required": [
"id"
],
"additionalProperties": false,
"description": "Deprecated. Use `filter` instead."
},
"filter": {
"type": "object",
"properties": {
"comparisons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"column": {
"type": "string"
},
"comparisonOperator": {
"type": "string",
"enum": [
"Equal to",
"Not equal",
"Contains",
"Does not contain",
"Greater than",
"Less than",
"Is set",
"Is empty",
"Starts with",
"Ends with"
]
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"logicalOperator": {
"type": "string",
"enum": [
"OR",
"AND"
]
}
},
"required": [
"comparisons",
"logicalOperator"
],
"additionalProperties": false
}
},
@ -2816,6 +2934,22 @@
},
"isNewResultOnRefreshEnabled": {
"type": "boolean"
},
"rememberUser": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"storage": {
"type": "string",
"enum": [
"session",
"local"
]
}
},
"additionalProperties": false
}
},
"required": [
@ -3072,6 +3206,9 @@
"type": "object",
"additionalProperties": {},
"description": "[More info about prefilled variables.](https://docs.typebot.io/editor/variables#prefilled-variables)"
},
"isStreamEnabled": {
"type": "boolean"
}
},
"required": [
@ -3107,8 +3244,7 @@
},
"required": [
"id"
],
"additionalProperties": false
]
},
{
"anyOf": [
@ -3798,6 +3934,30 @@
},
"phoneNumber": {
"type": "string"
},
"address": {
"type": "object",
"properties": {
"country": {
"type": "string"
},
"line1": {
"type": "string"
},
"line2": {
"type": "string"
},
"state": {
"type": "string"
},
"city": {
"type": "string"
},
"postalCode": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
@ -4133,8 +4293,7 @@
],
"additionalProperties": false
}
},
"additionalProperties": false
}
}
]
},
@ -4148,8 +4307,7 @@
"lastBubbleBlockId": {
"type": "string"
}
},
"additionalProperties": false
}
},
{
"anyOf": [
@ -4162,92 +4320,171 @@
{
"anyOf": [
{
"type": "object",
"properties": {
"scriptToExecute": {
"anyOf": [
{
"type": "object",
"properties": {
"content": {
"type": "string"
},
"args": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"anyOf": [
{
"scriptToExecute": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"args": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"anyOf": [
{
"anyOf": [
{
"type": "string"
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
{
"type": "number"
"type": "boolean"
}
]
},
{
"type": "boolean"
"type": "array",
"items": {
"type": "string",
"nullable": true
}
}
]
},
{
"type": "array",
"items": {
"type": "string",
"nullable": true
}
],
"nullable": true
}
},
"required": [
"id"
],
"nullable": true
"additionalProperties": false
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"content",
"args"
],
"additionalProperties": false
}
},
"required": [
"content",
"args"
"scriptToExecute"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"redirect": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"isNewTab": {
"type": "boolean"
}
},
"required": [
"isNewTab"
],
"additionalProperties": false
}
},
"required": [
"redirect"
],
"additionalProperties": false
}
},
"required": [
"scriptToExecute"
],
"additionalProperties": false
]
},
{
"type": "object",
"properties": {
"redirect": {
"chatwoot": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"isNewTab": {
"type": "boolean"
"scriptToExecute": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"args": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
{
"type": "boolean"
}
]
},
{
"type": "array",
"items": {
"type": "string",
"nullable": true
}
}
],
"nullable": true
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"content",
"args"
],
"additionalProperties": false
}
},
"required": [
"isNewTab"
"scriptToExecute"
],
"additionalProperties": false
}
},
"required": [
"redirect"
"chatwoot"
],
"additionalProperties": false
}
@ -4256,75 +4493,38 @@
{
"type": "object",
"properties": {
"chatwoot": {
"googleAnalytics": {
"type": "object",
"properties": {
"scriptToExecute": {
"type": "object",
"properties": {
"content": {
"type": "string"
"trackingId": {
"type": "string"
},
"category": {
"type": "string"
},
"action": {
"type": "string"
},
"label": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "number"
},
"args": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
{
"type": "boolean"
}
]
},
{
"type": "array",
"items": {
"type": "string",
"nullable": true
}
}
],
"nullable": true
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"content",
"args"
],
"additionalProperties": false
{}
]
},
"sendTo": {
"type": "string"
}
},
"required": [
"scriptToExecute"
],
"additionalProperties": false
}
},
"required": [
"chatwoot"
"googleAnalytics"
],
"additionalProperties": false
}
@ -4333,38 +4533,21 @@
{
"type": "object",
"properties": {
"googleAnalytics": {
"wait": {
"type": "object",
"properties": {
"trackingId": {
"type": "string"
},
"category": {
"type": "string"
},
"action": {
"type": "string"
},
"label": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "number"
},
{}
]
},
"sendTo": {
"type": "string"
"secondsToWaitFor": {
"type": "number"
}
},
"required": [
"secondsToWaitFor"
],
"additionalProperties": false
}
},
"required": [
"googleAnalytics"
"wait"
],
"additionalProperties": false
}
@ -4373,21 +4556,75 @@
{
"type": "object",
"properties": {
"wait": {
"setVariable": {
"type": "object",
"properties": {
"secondsToWaitFor": {
"type": "number"
"scriptToExecute": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"args": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
{
"type": "boolean"
}
]
},
{
"type": "array",
"items": {
"type": "string",
"nullable": true
}
}
],
"nullable": true
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"content",
"args"
],
"additionalProperties": false
}
},
"required": [
"secondsToWaitFor"
"scriptToExecute"
],
"additionalProperties": false
}
},
"required": [
"wait"
"setVariable"
],
"additionalProperties": false
}
@ -4396,75 +4633,38 @@
{
"type": "object",
"properties": {
"setVariable": {
"streamOpenAiChatCompletion": {
"type": "object",
"properties": {
"scriptToExecute": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"args": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
{
"type": "boolean"
}
]
},
{
"type": "array",
"items": {
"type": "string",
"nullable": true
}
}
],
"nullable": true
}
},
"required": [
"id"
],
"additionalProperties": false
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"role": {
"type": "string",
"enum": [
"system",
"user",
"assistant"
]
}
}
},
"required": [
"content",
"args"
],
"additionalProperties": false
},
"additionalProperties": false
}
}
},
"required": [
"scriptToExecute"
"messages"
],
"additionalProperties": false
}
},
"required": [
"setVariable"
"streamOpenAiChatCompletion"
],
"additionalProperties": false
}
@ -4666,6 +4866,22 @@
},
"isNewResultOnRefreshEnabled": {
"type": "boolean"
},
"rememberUser": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"storage": {
"type": "string",
"enum": [
"session",
"local"
]
}
},
"additionalProperties": false
}
},
"required": [
@ -4785,7 +5001,7 @@
},
"/typebots/{typebotId}/blocks/{blockId}/storage/upload-url": {
"get": {
"operationId": "query.getUploadUrl",
"operationId": "getUploadUrl",
"summary": "Get upload URL for a file",
"description": "Used for the web client to get the bucket upload file.",
"parameters": [

View File

@ -16,10 +16,10 @@
"api:generate": "tsx --tsconfig ../builder/tsconfig.json ../builder/src/helpers/server/generateOpenApi.ts && tsx --tsconfig ../viewer/openapi.tsconfig.json ../viewer/src/helpers/server/generateOpenApi.ts"
},
"dependencies": {
"@docusaurus/core": "2.4.0",
"@docusaurus/preset-classic": "2.4.0",
"@docusaurus/theme-common": "2.4.0",
"@docusaurus/theme-search-algolia": "2.4.0",
"@docusaurus/core": "2.4.1",
"@docusaurus/preset-classic": "2.4.1",
"@docusaurus/theme-common": "2.4.1",
"@docusaurus/theme-search-algolia": "2.4.1",
"@mdx-js/react": "1.6.22",
"@svgr/webpack": "6.5.1",
"@typebot.io/docusaurus-preset-openapi": "0.6.5",

View File

@ -11,18 +11,18 @@
},
"dependencies": {
"@chakra-ui/icon": "3.0.15",
"@chakra-ui/react": "2.6.0",
"@emotion/react": "11.10.8",
"@emotion/styled": "11.10.8",
"@vercel/analytics": "1.0.0",
"@chakra-ui/react": "2.6.1",
"@emotion/react": "11.11.0",
"@emotion/styled": "11.11.0",
"@vercel/analytics": "1.0.1",
"@typebot.io/react": "workspace:*",
"@typebot.io/js": "workspace:*",
"aos": "2.3.4",
"@typebot.io/prisma": "workspace:*",
"focus-visible": "5.2.0",
"framer-motion": "10.12.7",
"framer-motion": "10.3.0",
"@typebot.io/schemas": "workspace:*",
"next": "13.3.4",
"next": "13.4.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"@typebot.io/lib": "workspace:*"
@ -30,13 +30,13 @@
"devDependencies": {
"@babel/core": "7.21.8",
"@chakra-ui/styled-system": "2.9.0",
"@next/bundle-analyzer": "13.3.4",
"@next/bundle-analyzer": "13.4.3",
"@types/aos": "3.0.4",
"@types/node": "18.16.3",
"@types/react": "18.2.0",
"@types/node": "20.2.3",
"@types/react": "18.2.7",
"autoprefixer": "10.4.14",
"cross-env": "7.0.3",
"eslint": "8.39.0",
"eslint": "8.41.0",
"eslint-config-custom": "workspace:*",
"next-transpile-modules": "10.0.0",
"postcss": "8.4.23",

View File

@ -15,46 +15,46 @@
"dependencies": {
"@dqbd/tiktoken": "^1.0.7",
"@planetscale/database": "^1.7.0",
"@sentry/nextjs": "7.50.0",
"@trpc/server": "10.23.0",
"@sentry/nextjs": "7.53.1",
"@trpc/server": "10.27.3",
"@typebot.io/js": "workspace:*",
"@typebot.io/prisma": "workspace:*",
"@typebot.io/react": "workspace:*",
"aws-sdk": "2.1369.0",
"aws-sdk": "2.1384.0",
"bot-engine": "workspace:*",
"cors": "2.8.5",
"eventsource-parser": "^1.0.0",
"google-spreadsheet": "3.3.0",
"got": "12.6.0",
"libphonenumber-js": "1.10.28",
"next": "13.3.4",
"libphonenumber-js": "1.10.30",
"next": "13.4.3",
"nextjs-cors": "2.1.2",
"nodemailer": "6.9.1",
"nodemailer": "6.9.2",
"openai": "3.2.1",
"qs": "6.11.1",
"qs": "6.11.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"stripe": "12.3.0",
"trpc-openapi": "1.1.2"
"stripe": "12.6.0",
"trpc-openapi": "1.2.0"
},
"devDependencies": {
"@faire/mjml-react": "3.2.0",
"@faire/mjml-react": "3.3.0",
"@paralleldrive/cuid2": "2.2.0",
"@playwright/test": "1.33.0",
"@playwright/test": "1.34.3",
"@typebot.io/emails": "workspace:*",
"@typebot.io/lib": "workspace:*",
"@typebot.io/schemas": "workspace:*",
"@typebot.io/tsconfig": "workspace:*",
"@types/cors": "2.8.13",
"@types/google-spreadsheet": "3.3.1",
"@types/node": "18.16.3",
"@types/nodemailer": "6.4.7",
"@types/google-spreadsheet": "3.3.2",
"@types/node": "20.2.3",
"@types/nodemailer": "6.4.8",
"@types/papaparse": "5.3.7",
"@types/qs": "6.9.7",
"@types/react": "18.2.0",
"@types/react": "18.2.7",
"@types/sanitize-html": "2.9.0",
"dotenv": "16.0.3",
"eslint": "8.39.0",
"eslint": "8.41.0",
"eslint-config-custom": "workspace:*",
"google-auth-library": "8.8.0",
"node-fetch": "3.3.1",

View File

@ -40,9 +40,10 @@ const createStripePaymentIntent =
: stripeKeys.live.secretKey,
{ apiVersion: '2022-11-15' }
)
const amount =
const amount = Math.round(
Number(parseVariables(variables)(options.amount)) *
(isZeroDecimalCurrency(options.currency) ? 1 : 100)
(isZeroDecimalCurrency(options.currency) ? 1 : 100)
)
if (isNaN(amount))
throw new TRPCError({
code: 'BAD_REQUEST',

View File

@ -61,11 +61,6 @@ const evaluateSetVariableExpression =
const evaluating = parseVariables(variables, { fieldToParse: 'id' })(
str.includes('return ') ? str : `return ${str}`
)
console.log(
variables.map((v) => v.id),
...variables.map((v) => parseGuessedValueType(v.value)),
evaluating
)
try {
const func = Function(...variables.map((v) => v.id), evaluating)
return func(...variables.map((v) => parseGuessedValueType(v.value)))

View File

@ -22,7 +22,7 @@
"cross-env": "7.0.3",
"cz-emoji": "1.3.2-canary.2",
"husky": "^8.0.3",
"turbo": "1.9.3"
"turbo": "1.9.9"
},
"config": {
"commitizen": {

View File

@ -1,8 +0,0 @@
module.exports = {
root: true,
extends: ['custom'],
rules: {
'@next/next/no-img-element': 'off',
'@next/next/no-html-link-for-pages': 'off',
},
}

View File

@ -8,8 +8,7 @@
"types": "dist/index.d.ts",
"scripts": {
"build": "pnpm tsc --noEmit && tsup",
"dev": "tsup --watch",
"lint": "eslint --fix \"src/**/*.ts*\""
"dev": "tsup --watch"
},
"dependencies": {
"@stripe/react-stripe-js": "1.16.4",

View File

@ -1,5 +0,0 @@
module.exports = {
root: true,
extends: ['custom'],
ignorePatterns: ['/tests'],
}

View File

@ -7,7 +7,6 @@
"scripts": {
"dev": "tsup --watch",
"build": "tsup",
"lint": "eslint \"src/**/*.ts*\"",
"test": "pnpm jest"
},
"devDependencies": {

View File

@ -15,17 +15,17 @@
"author": "Baptiste Arnaud",
"license": "ISC",
"devDependencies": {
"@faire/mjml-react": "3.2.0",
"@types/node": "18.16.3",
"@types/nodemailer": "6.4.7",
"@types/react": "18.2.0",
"@faire/mjml-react": "3.3.0",
"@types/node": "20.2.3",
"@types/nodemailer": "6.4.8",
"@types/react": "18.2.7",
"concurrently": "8.0.1",
"http-server": "14.1.1",
"nodemailer": "6.9.1",
"nodemailer": "6.9.2",
"react": "18.2.0",
"tsx": "3.12.7",
"@typebot.io/lib": "workspace:*",
"eslint": "8.39.0",
"eslint": "8.41.0",
"eslint-config-custom": "workspace:*",
"@typebot.io/tsconfig": "workspace:*"
},

View File

@ -12,28 +12,28 @@
},
"license": "MIT",
"dependencies": {
"@stripe/stripe-js": "1.52.1",
"@udecode/plate-common": "^21.0.0",
"@stripe/stripe-js": "1.53.0",
"@udecode/plate-common": "^21.1.5",
"solid-element": "1.7.0",
"solid-js": "1.7.4"
"solid-js": "1.7.5"
},
"devDependencies": {
"@babel/preset-typescript": "7.21.5",
"@rollup/plugin-babel": "6.0.3",
"@rollup/plugin-node-resolve": "15.0.2",
"@rollup/plugin-terser": "0.4.1",
"@rollup/plugin-typescript": "11.1.0",
"@rollup/plugin-terser": "0.4.3",
"@rollup/plugin-typescript": "11.1.1",
"@typebot.io/lib": "workspace:*",
"@typebot.io/schemas": "workspace:*",
"@typebot.io/tsconfig": "workspace:*",
"autoprefixer": "10.4.14",
"babel-preset-solid": "1.7.4",
"eslint": "8.39.0",
"eslint": "8.41.0",
"eslint-config-custom": "workspace:*",
"eslint-plugin-solid": "0.12.1",
"postcss": "8.4.23",
"react": "18.2.0",
"rollup": "3.20.2",
"rollup": "3.23.0",
"rollup-plugin-postcss": "4.0.2",
"rollup-plugin-typescript-paths": "1.4.0",
"tailwindcss": "3.3.2",

View File

@ -23,20 +23,20 @@
"@babel/preset-typescript": "7.21.5",
"@rollup/plugin-babel": "6.0.3",
"@rollup/plugin-node-resolve": "15.0.2",
"@rollup/plugin-terser": "0.4.1",
"@rollup/plugin-typescript": "11.1.0",
"@rollup/plugin-terser": "0.4.3",
"@rollup/plugin-typescript": "11.1.1",
"@typebot.io/js": "workspace:*",
"@types/node": "18.16.3",
"@types/react": "18.2.0",
"@types/node": "20.2.3",
"@types/react": "18.2.7",
"@typebot.io/prisma": "workspace:*",
"eslint": "8.39.0",
"eslint": "8.41.0",
"eslint-config-custom": "workspace:*",
"@typebot.io/schemas": "workspace:*",
"react": "18.2.0",
"rollup": "3.20.2",
"rollup": "3.23.0",
"rollup-plugin-typescript-paths": "1.4.0",
"@typebot.io/tsconfig": "workspace:*",
"tslib": "2.5.0",
"tslib": "2.5.2",
"tsx": "3.12.7",
"typescript": "5.0.4",
"@typebot.io/lib": "workspace:*"

View File

@ -6,7 +6,7 @@
"author": "baptisteArno",
"license": "AGPL-3.0-or-later",
"devDependencies": {
"@prettier/plugin-php": "0.19.4",
"@prettier/plugin-php": "0.19.5",
"prettier": "2.8.8"
},
"scripts": {

View File

@ -3,13 +3,13 @@
"version": "0.0.1",
"main": "index.js",
"dependencies": {
"eslint": "8.39.0",
"eslint-config-next": "13.3.4",
"eslint": "8.41.0",
"eslint-config-next": "13.4.3",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-react": "7.32.2"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.57.0"
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7"
}
}

View File

@ -7,14 +7,14 @@
"types": "./index.ts",
"devDependencies": {
"@paralleldrive/cuid2": "2.2.0",
"@playwright/test": "1.33.0",
"@types/nodemailer": "6.4.7",
"aws-sdk": "2.1369.0",
"@playwright/test": "1.34.3",
"@types/nodemailer": "6.4.8",
"aws-sdk": "2.1384.0",
"@typebot.io/prisma": "workspace:*",
"dotenv": "16.0.3",
"@typebot.io/schemas": "workspace:*",
"next": "13.3.4",
"nodemailer": "6.9.1",
"next": "13.4.3",
"nodemailer": "6.9.2",
"@typebot.io/tsconfig": "workspace:*",
"typescript": "5.0.4"
},

View File

@ -14,12 +14,12 @@
"db:migrate": "pnpm migrate:deploy"
},
"dependencies": {
"@prisma/client": "4.13.0"
"@prisma/client": "4.14.1"
},
"devDependencies": {
"@types/node": "18.16.3",
"@types/node": "20.2.3",
"dotenv": "16.0.3",
"prisma": "4.13.0",
"prisma": "4.14.1",
"@typebot.io/tsconfig": "workspace:*",
"tsx": "3.12.7",
"typescript": "5.0.4"

View File

@ -6,7 +6,7 @@
"license": "AGPL-3.0-or-later",
"private": true,
"dependencies": {
"@udecode/plate-common": "^21.0.0",
"@udecode/plate-common": "^21.1.5",
"zod": "3.21.4"
},
"devDependencies": {

View File

@ -15,7 +15,7 @@
"telemetry:sendTotalResultsDigest": "tsx sendTotalResultsDigest.ts"
},
"devDependencies": {
"@types/node": "18.16.3",
"@types/node": "20.2.3",
"@types/prompts": "2.4.4",
"@typebot.io/prisma": "workspace:*",
"deep-object-diff": "1.1.9",
@ -23,7 +23,7 @@
"got": "12.6.0",
"@typebot.io/schemas": "workspace:*",
"prompts": "2.4.2",
"stripe": "12.3.0",
"stripe": "12.6.0",
"tsx": "3.12.7",
"typescript": "5.0.4",
"@typebot.io/lib": "workspace:*",

3729
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff