2
0

♻️ (webhook) Integrate webhook in typebot schema

Closes #313
This commit is contained in:
Baptiste Arnaud
2023-08-06 10:03:45 +02:00
parent 53e4bc2b75
commit fc25734689
66 changed files with 1501 additions and 876 deletions

View File

@@ -76,11 +76,40 @@ const nextConfig = {
}))
)
: []
).concat({
source: '/api/typebots/:typebotId/blocks/:blockId/storage/upload-url',
destination:
'/api/v1/typebots/:typebotId/blocks/:blockId/storage/upload-url',
}),
).concat([
{
source: '/api/typebots/:typebotId/blocks/:blockId/storage/upload-url',
destination:
'/api/v1/typebots/:typebotId/blocks/:blockId/storage/upload-url',
},
{
source:
'/api/typebots/:typebotId/blocks/:blockId/steps/:stepId/sampleResult',
destination: `${process.env.NEXTAUTH_URL}/api/v1/typebots/:typebotId/webhookBlocks/:blockId/getResultExample`,
},
{
source: '/api/typebots/:typebotId/blocks/:blockId/sampleResult',
destination: `${process.env.NEXTAUTH_URL}/api/v1/typebots/:typebotId/webhookBlocks/:blockId/getResultExample`,
},
{
source:
'/api/typebots/:typebotId/blocks/:blockId/steps/:stepId/unsubscribeWebhook',
destination: `${process.env.NEXTAUTH_URL}/api/v1/typebots/:typebotId/webhookBlocks/:blockId/unsubscribe`,
},
{
source: '/api/typebots/:typebotId/blocks/:blockId/unsubscribeWebhook',
destination: `${process.env.NEXTAUTH_URL}/api/v1/typebots/:typebotId/webhookBlocks/:blockId/unsubscribe`,
},
{
source:
'/api/typebots/:typebotId/blocks/:blockId/steps/:stepId/subscribeWebhook',
destination: `${process.env.NEXTAUTH_URL}/api/v1/typebots/:typebotId/webhookBlocks/:blockId/subscribe`,
},
{
source: '/api/typebots/:typebotId/blocks/:blockId/subscribeWebhook',
destination: `${process.env.NEXTAUTH_URL}/api/v1/typebots/:typebotId/webhookBlocks/:blockId/subscribe`,
},
]),
}
},
}