-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(webhook): ⚡️ Show linked typebots results in webhook sample
- Loading branch information
1 parent
937621e
commit 12f43cd
Showing
13 changed files
with
249 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { CollaborationType, Prisma, User } from 'db' | ||
|
||
const parseWhereFilter = ( | ||
typebotIds: string[] | string, | ||
user: User, | ||
type: 'read' | 'write' | ||
): Prisma.TypebotWhereInput => ({ | ||
OR: [ | ||
{ | ||
id: typeof typebotIds === 'string' ? typebotIds : { in: typebotIds }, | ||
ownerId: | ||
(type === 'read' && user.email === process.env.ADMIN_EMAIL) || | ||
process.env.NEXT_PUBLIC_E2E_TEST | ||
? undefined | ||
: user.id, | ||
}, | ||
{ | ||
id: typeof typebotIds === 'string' ? typebotIds : { in: typebotIds }, | ||
collaborators: { | ||
some: { | ||
userId: user.id, | ||
type: type === 'write' ? CollaborationType.WRITE : undefined, | ||
}, | ||
}, | ||
}, | ||
], | ||
}) | ||
|
||
export const canReadTypebot = (typebotId: string, user: User) => | ||
parseWhereFilter(typebotId, user, 'read') | ||
|
||
export const canWriteTypebot = (typebotId: string, user: User) => | ||
parseWhereFilter(typebotId, user, 'write') | ||
|
||
export const canReadTypebots = (typebotIds: string[], user: User) => | ||
parseWhereFilter(typebotIds, user, 'read') | ||
|
||
export const canWriteTypebots = (typebotIds: string[], user: User) => | ||
parseWhereFilter(typebotIds, user, 'write') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
12f43cd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
landing-page-v2 – ./apps/landing-page
www.typebot.io
landing-page-v2-typebot-io.vercel.app
typebot.io
www.get-typebot.com
landing-page-v2-git-main-typebot-io.vercel.app
get-typebot.com
12f43cd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
viewer-v2-alpha – ./apps/viewer
am.nigerias.io
an.nigerias.io
sakuranembro.it
clo.closeer.work
apr.nigerias.io
aso.nigerias.io
ar.nigerias.io
bot.upfunnel.art
faqs.nigerias.io
apo.nigerias.io
stan.vselise.com
zap.techadviser.in
chat.hayurihijab.com
bot.cotemeuplano.com
forms.webisharp.com
c23111azqw.nigerias.io
83242573.actualizar.xyz
bot.incusservices.com
gcase.barrettamario.it
type.opaulovieira.com.br
boyfriend-breakup.riku.ai
aibot.angrybranding.co.uk
personal-trainer.barrettamario.it
piazzatorre.barrettamario.it
type.talitasouzamarques.com.br
onboarding.libertydreamcare.ie
viewer-v2-alpha-typebot-io.vercel.app
viewer-v2-alpha-git-main-typebot-io.vercel.app
12f43cd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
viewer-v2 – ./apps/viewer
app.yvon.earth
bot.tvbeat.it
bots.bridge.ai
bergamo.store
yoda.riku.ai
bot.joof.it
bot.jesopizz.it
chat.hayuri.id
gollum.riku.ai
talk.gocare.io
bot.contakit.com
zap.fundviser.in
bot.danyservice.it
bot.rihabilita.it
bot.dsignagency.com
viewer.typebot.io
chatbot.matthesv.de
demo.wemakebots.xyz
fitness.riku.ai
88584434.therpm.club
bot.digitalpointer.id
92109660.therpm.club
bot.barrettamario.it
hello.advergreen.com
bot.coachayongzul.com
bot.eikju.photography
bot.outstandbrand.com
bot.robertohairlab.it
bot.ilmuseoaiborghi.it
criar.somaperuzzo.com
bot.pratikmandalia.com
form.bridesquadapp.com
michaeljackson.riku.ai
invite.bridesquadapp.com
bot.hotelplayarimini.it
88152257.actualizar.xyz
87656003.actualizar.xyz
arrivalx2.wpwakanda.com
link.venturasuceder.com
91375310.actualizar.xyz
bot.amicidisanfaustino.it
forms.hiabhaykulkarni.com
chat.thehomebuyersusa.com
bot.adventureconsulting.hu
typebot-viewer.vercel.app
casestudyemb.wpwakanda.com
chat.atlasoutfittersk9.com
herbalife.barrettamario.it
homepageonly.wpwakanda.com
liveconvert.kandalearn.com
mainmenu1one.wpwakanda.com
tarian.theiofoundation.org
liveconvert2.kandalearn.com
bot.pinpointinteractive.com
bot.polychromes-project.com
bot.seidinembroseanchetu.it
forms.escoladeautomacao.com.br
bot.studiotecnicoimmobiliaremerelli.it
viewer-v2-typebot-io.vercel.app
bot.seidibergamoseanchetu.it
viewer-v2-git-main-typebot-io.vercel.app
12f43cd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
builder-v2 – ./apps/builder
builder-v2-typebot-io.vercel.app
builder-v2-git-main-typebot-io.vercel.app
app.typebot.io