2023-03-15 08:35:16 +01:00
|
|
|
import { Result } from '@typebot.io/schemas'
|
|
|
|
|
import { sendRequest } from '@typebot.io/lib'
|
2022-11-15 10:28:03 +01:00
|
|
|
|
|
|
|
|
export const createResultQuery = async (typebotId: string) => {
|
|
|
|
|
return sendRequest<{ result: Result; hasReachedLimit: boolean }>({
|
|
|
|
|
url: `/api/typebots/${typebotId}/results`,
|
|
|
|
|
method: 'POST',
|
|
|
|
|
})
|
|
|
|
|
}
|