♻️ Re-organize workspace folders
This commit is contained in:
@@ -3,7 +3,7 @@ import prisma from '@/lib/prisma'
|
||||
import { canReadTypebots } from '@/utils/api/dbRules'
|
||||
import { authenticatedProcedure } from '@/utils/server/trpc'
|
||||
import { TRPCError } from '@trpc/server'
|
||||
import { Typebot, Webhook } from 'models'
|
||||
import { Typebot, Webhook } from '@typebot.io/schemas'
|
||||
import { z } from 'zod'
|
||||
import { parseResultExample } from '../utils'
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import prisma from '@/lib/prisma'
|
||||
import { canReadTypebots } from '@/utils/api/dbRules'
|
||||
import { authenticatedProcedure } from '@/utils/server/trpc'
|
||||
import { TRPCError } from '@trpc/server'
|
||||
import { Group, Typebot, Webhook, WebhookBlock } from 'models'
|
||||
import { byId, isWebhookBlock, parseGroupTitle } from 'utils'
|
||||
import { Group, Typebot, Webhook, WebhookBlock } from '@typebot.io/schemas'
|
||||
import { byId, isWebhookBlock, parseGroupTitle } from '@typebot.io/lib'
|
||||
import { z } from 'zod'
|
||||
|
||||
export const listWebhookBlocksProcedure = authenticatedProcedure
|
||||
|
||||
@@ -2,8 +2,8 @@ import prisma from '@/lib/prisma'
|
||||
import { canWriteTypebots } from '@/utils/api/dbRules'
|
||||
import { authenticatedProcedure } from '@/utils/server/trpc'
|
||||
import { TRPCError } from '@trpc/server'
|
||||
import { Typebot, Webhook, WebhookBlock } from 'models'
|
||||
import { byId, isWebhookBlock } from 'utils'
|
||||
import { Typebot, Webhook, WebhookBlock } from '@typebot.io/schemas'
|
||||
import { byId, isWebhookBlock } from '@typebot.io/lib'
|
||||
import { z } from 'zod'
|
||||
|
||||
export const subscribeWebhookProcedure = authenticatedProcedure
|
||||
|
||||
@@ -2,8 +2,8 @@ import prisma from '@/lib/prisma'
|
||||
import { canWriteTypebots } from '@/utils/api/dbRules'
|
||||
import { authenticatedProcedure } from '@/utils/server/trpc'
|
||||
import { TRPCError } from '@trpc/server'
|
||||
import { Typebot, Webhook, WebhookBlock } from 'models'
|
||||
import { byId, isWebhookBlock } from 'utils'
|
||||
import { Typebot, Webhook, WebhookBlock } from '@typebot.io/schemas'
|
||||
import { byId, isWebhookBlock } from '@typebot.io/lib'
|
||||
import { z } from 'zod'
|
||||
|
||||
export const unsubscribeWebhookProcedure = authenticatedProcedure
|
||||
|
||||
@@ -7,9 +7,9 @@ import {
|
||||
Block,
|
||||
Typebot,
|
||||
TypebotLinkBlock,
|
||||
} from 'models'
|
||||
import { isInputBlock, byId, isNotDefined } from 'utils'
|
||||
import { parseResultHeader } from 'utils/results'
|
||||
} from '@typebot.io/schemas'
|
||||
import { isInputBlock, byId, isNotDefined } from '@typebot.io/lib'
|
||||
import { parseResultHeader } from '@typebot.io/lib/results'
|
||||
|
||||
export const parseResultExample =
|
||||
(
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
ResponseVariableMapping,
|
||||
WebhookOptions,
|
||||
Webhook,
|
||||
} from 'models'
|
||||
} from '@typebot.io/schemas'
|
||||
import { useState, useMemo } from 'react'
|
||||
import { executeWebhook } from '../queries/executeWebhookQuery'
|
||||
import { convertVariablesForTestToVariables } from '../utils/convertVariablesForTestToVariables'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Stack, Text } from '@chakra-ui/react'
|
||||
import { useTypebot } from '@/features/editor'
|
||||
import { WebhookBlock } from 'models'
|
||||
import { byId } from 'utils'
|
||||
import { WebhookBlock } from '@typebot.io/schemas'
|
||||
import { byId } from '@typebot.io/lib'
|
||||
import { SetVariableLabel } from '@/components/SetVariableLabel'
|
||||
|
||||
type Props = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { TextInput } from '@/components/inputs'
|
||||
import { TableListItemProps } from '@/components/TableList'
|
||||
import { Stack } from '@chakra-ui/react'
|
||||
import { KeyValue } from 'models'
|
||||
import { KeyValue } from '@typebot.io/schemas'
|
||||
|
||||
export const QueryParamsInputs = (props: TableListItemProps<KeyValue>) => (
|
||||
<KeyValueInputs
|
||||
|
||||
@@ -2,7 +2,7 @@ import { AutocompleteInput } from '@/components/inputs/AutocompleteInput'
|
||||
import { TableListItemProps } from '@/components/TableList'
|
||||
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
|
||||
import { Stack, FormControl, FormLabel } from '@chakra-ui/react'
|
||||
import { Variable, ResponseVariableMapping } from 'models'
|
||||
import { Variable, ResponseVariableMapping } from '@typebot.io/schemas'
|
||||
|
||||
export const DataVariableInputs = ({
|
||||
item,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { TextInput } from '@/components/inputs'
|
||||
import { TableListItemProps } from '@/components/TableList'
|
||||
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
|
||||
import { Stack, FormControl, FormLabel } from '@chakra-ui/react'
|
||||
import { VariableForTest, Variable } from 'models'
|
||||
import { VariableForTest, Variable } from '@typebot.io/schemas'
|
||||
|
||||
export const VariableForTestInputs = ({
|
||||
item,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React, { useState } from 'react'
|
||||
import { Spinner, Stack } from '@chakra-ui/react'
|
||||
import { useTypebot } from '@/features/editor'
|
||||
import { WebhookOptions, Webhook, WebhookBlock } from 'models'
|
||||
import { byId } from 'utils'
|
||||
import { WebhookOptions, Webhook, WebhookBlock } from '@typebot.io/schemas'
|
||||
import { byId } from '@typebot.io/lib'
|
||||
import { TextInput } from '@/components/inputs'
|
||||
import { WebhookAdvancedConfigForm } from '../WebhookAdvancedConfigForm'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Webhook } from 'models'
|
||||
import { sendRequest } from 'utils'
|
||||
import { Webhook } from '@typebot.io/schemas'
|
||||
import { sendRequest } from '@typebot.io/lib'
|
||||
|
||||
type Props = {
|
||||
typebotId: string
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Webhook } from 'models'
|
||||
import { sendRequest } from 'utils'
|
||||
import { Webhook } from '@typebot.io/schemas'
|
||||
import { sendRequest } from '@typebot.io/lib'
|
||||
import { createWebhookQuery } from './createWebhookQuery'
|
||||
|
||||
type Props = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Variable, WebhookResponse } from 'models'
|
||||
import { getViewerUrl, sendRequest } from 'utils'
|
||||
import { Variable, WebhookResponse } from '@typebot.io/schemas'
|
||||
import { getViewerUrl, sendRequest } from '@typebot.io/lib'
|
||||
|
||||
export const executeWebhook = (
|
||||
typebotId: string,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Webhook } from 'models'
|
||||
import { sendRequest } from 'utils'
|
||||
import { Webhook } from '@typebot.io/schemas'
|
||||
import { sendRequest } from '@typebot.io/lib'
|
||||
|
||||
type Props = {
|
||||
typebotId: string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Variable, VariableForTest } from 'models'
|
||||
import { Variable, VariableForTest } from '@typebot.io/schemas'
|
||||
|
||||
export const convertVariablesForTestToVariables = (
|
||||
variablesForTest: VariableForTest[],
|
||||
|
||||
@@ -2,11 +2,11 @@ import test, { expect, Page } from '@playwright/test'
|
||||
import {
|
||||
createWebhook,
|
||||
importTypebotInDatabase,
|
||||
} from 'utils/playwright/databaseActions'
|
||||
import { HttpMethod } from 'models'
|
||||
} from '@typebot.io/lib/playwright/databaseActions'
|
||||
import { HttpMethod } from '@typebot.io/schemas'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { getTestAsset } from '@/test/utils/playwright'
|
||||
import { apiToken } from 'utils/playwright/databaseSetup'
|
||||
import { apiToken } from '@typebot.io/lib/playwright/databaseSetup'
|
||||
|
||||
test.describe('Builder', () => {
|
||||
test('easy configuration should work', async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user