Skip to content

Commit

Permalink
fix: errors on build
Browse files Browse the repository at this point in the history
  • Loading branch information
kweripx committed Jan 15, 2024
1 parent eda7a5b commit 9bef27e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { StarterPlanPricingCard } from './StarterPlanPricingCard'
import { ProPlanPricingCard } from './ProPlanPricingCard'
import { useTranslate } from '@tolgee/react'
import { StripeClimateLogo } from './StripeClimateLogo'
import { guessIfUserIsEuropean } from '@typebot.io/lib/billing/guessIfUserIsEuropean'
import { WorkspaceInApp } from '@/features/workspace/WorkspaceProvider'

type Props = {
Expand Down Expand Up @@ -63,9 +62,6 @@ export const ChangePlanForm = ({ workspace, excludedPlans }: Props) => {
plan,
workspaceId: workspace.id,
currency: data?.subscription?.currency ?? 'brl',
currency:
data?.subscription?.currency ??
(guessIfUserIsEuropean() ? 'eur' : 'usd'),
} as const
if (workspace.stripeId) {
updateSubscription({
Expand Down
8 changes: 0 additions & 8 deletions apps/builder/src/pages/api/auth/[...nextauth].ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,6 @@ export const getAuthOptions = ({
Sentry.setUser(null)
},
},
events: {
signIn({ user }) {
Sentry.setUser({ id: user.id })
},
signOut() {
Sentry.setUser(null)
},
},
callbacks: {
session: async ({ session, user }) => {
const userFromDb = user as User
Expand Down
8 changes: 1 addition & 7 deletions apps/docs/deploy/web/whatsapp/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ WhatsApp integration is currently in beta. If you encounter any issue, please co

You can preview and test your bot by clicking on the Preview button in the editor and change the runtime to "WhatsApp".

<img src="/img/whatsapp/preview-dropdown.png" alt="WhatsApp preview dropdown" width="600px" />

## Limitations

WhatsApp environment have some limitations that you need to keep in mind when building the bot:
Expand All @@ -32,8 +30,6 @@ WhatsApp environment have some limitations that you need to keep in mind when bu

You can automatically assign contact name and phone number to a variable in your bot using a Set variable block with the dedicated system values:

<img src="/img/whatsapp/contact-var.png" alt="WhatsApp contact system variables" width="600px" />

## Deploy on your phone number

Head over to the Share tab of your bot and click on the WhatsApp button to get the integration instructions of your bot.
Expand All @@ -42,8 +38,6 @@ Head over to the Share tab of your bot and click on the WhatsApp button to get t

You can customize how your bot behaves on WhatsApp in the `Configure integration` section

<img src="/img/whatsapp/configure-integration.png" alt="WhatsApp configure integration" width="600px" />

**Session expiration timeout**: A number from 0 to 48 which is the number of hours after which the session will expire. If the user doesn't interact with the bot for more than the timeout, the session will expire and if user sends a new message, it will start a new chat. The default is 4 hours.

**Start bot condition**: A condition that will be evaluated when a user starts a conversation with your bot. If the condition is not met, the bot will not be triggered.
Expand All @@ -52,7 +46,7 @@ You can customize how your bot behaves on WhatsApp in the `Configure integration

### How many WhatsApp numbers can I use?

You can integrate as many numbers as you'd like. Keep in mind that Typebot does not provide those numbers. We work as a "Bring your own Meta application" and we give you clear instructions on [how to set up your Meta app](./whatsapp/create-meta-app).
You can integrate as many numbers as you'd like. Keep in mind that Typebot does not provide those numbers. We work as a "Bring your own Meta application" and we give you clear instructions on [how to set up your Meta app].

### Can I link multiple bots to the same WhatsApp number?

Expand Down
6 changes: 0 additions & 6 deletions apps/docs/editor/publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ Once you publish your bot, its public URL will work and you can send it to anyon

You can always modify your bot and the new changes won't be published as long as you don't hit the Publish button again.

<img
src="/img/publish.png"
width="400"
alt="Publish menu"
/>

- "Restore published version": drop your current changes and revert the bot to its published version.
- "Close typebot to new responses": close your typebot and your users will see the following message: "This bot is now closed."
- "Unpublish typebot": mark the typebot as unpublished and your users will see the following message: "The bot you're looking for doesn't exist"
14 changes: 8 additions & 6 deletions apps/docs/openapi/builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -4052,6 +4052,10 @@
"type": "string",
"nullable": true
},
"customChatsLimit": {
"type": "number",
"nullable": true
},
"customSeatsLimit": {
"type": "number",
"nullable": true
Expand All @@ -4075,6 +4079,7 @@
"icon",
"plan",
"stripeId",
"customChatsLimit",
"customSeatsLimit",
"isSuspended",
"isPastDue",
Expand Down Expand Up @@ -16840,8 +16845,7 @@
"currency": {
"type": "string",
"enum": [
"usd",
"eur"
"brl"
]
},
"plan": {
Expand Down Expand Up @@ -17135,8 +17139,7 @@
"currency": {
"type": "string",
"enum": [
"usd",
"eur"
"brl"
]
}
},
Expand Down Expand Up @@ -17573,8 +17576,7 @@
"currency": {
"type": "string",
"enum": [
"eur",
"usd"
"brl"
]
},
"cancelDate": {
Expand Down

0 comments on commit 9bef27e

Please sign in to comment.