♻️ Remove @typebot.io/schemas from @typebot.io/lib

This commit is contained in:
Baptiste Arnaud
2024-03-15 16:32:29 +01:00
parent b53242ce6a
commit 5073be2439
186 changed files with 809 additions and 581 deletions

View File

@@ -7,7 +7,7 @@ import {
deleteTypebots,
deleteWebhooks,
importTypebotInDatabase,
} from '@typebot.io/lib/playwright/databaseActions'
} from '@typebot.io/playwright/databaseActions'
import { HttpMethod } from '@typebot.io/schemas/features/blocks/integrations/webhook/constants'
import { StartChatInput, StartPreviewChatInput } from '@typebot.io/schemas'

View File

@@ -1,7 +1,7 @@
import test, { expect } from '@playwright/test'
import { createId } from '@paralleldrive/cuid2'
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
import { createTypebots } from '@typebot.io/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/playwright/databaseHelpers'
import { IntegrationBlockType } from '@typebot.io/schemas/features/blocks/integrations/constants'
const typebotId = createId()

View File

@@ -3,7 +3,7 @@ import { createId } from '@paralleldrive/cuid2'
import { parse } from 'papaparse'
import { readFileSync } from 'fs'
import { isDefined } from '@typebot.io/lib'
import { importTypebotInDatabase } from '@typebot.io/lib/playwright/databaseActions'
import { importTypebotInDatabase } from '@typebot.io/playwright/databaseActions'
import { getTestAsset } from '@/test/utils/playwright'
import { env } from '@typebot.io/env'

View File

@@ -0,0 +1,6 @@
import { test as setup } from '@playwright/test'
import { globalSetup } from '@typebot.io/playwright/globalSetup'
setup('setup db', async () => {
await globalSetup()
})

View File

@@ -1,7 +1,7 @@
import { getTestAsset } from '@/test/utils/playwright'
import test, { expect } from '@playwright/test'
import { createId } from '@paralleldrive/cuid2'
import { importTypebotInDatabase } from '@typebot.io/lib/playwright/databaseActions'
import { importTypebotInDatabase } from '@typebot.io/playwright/databaseActions'
import { env } from '@typebot.io/env'
test('Big groups should work as expected', async ({ page }) => {

View File

@@ -1,6 +1,6 @@
import test, { expect } from '@playwright/test'
import { createId } from '@paralleldrive/cuid2'
import { importTypebotInDatabase } from '@typebot.io/lib/playwright/databaseActions'
import { importTypebotInDatabase } from '@typebot.io/playwright/databaseActions'
import { SmtpCredentials } from '@typebot.io/schemas'
import { env } from '@typebot.io/env'
import { createSmtpCredentials } from './utils/databaseActions'

View File

@@ -3,8 +3,8 @@ import { createId } from '@paralleldrive/cuid2'
import {
createTypebots,
updateTypebot,
} from '@typebot.io/lib/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
} from '@typebot.io/playwright/databaseActions'
import { parseDefaultGroupWithBlock } from '@typebot.io/playwright/databaseHelpers'
import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants'
import { Settings } from '@typebot.io/schemas'
import { defaultTextInputOptions } from '@typebot.io/schemas/features/blocks/inputs/text/constants'

View File

@@ -1,7 +1,7 @@
import { getTestAsset } from '@/test/utils/playwright'
import test, { expect } from '@playwright/test'
import { env } from '@typebot.io/env'
import { importTypebotInDatabase } from '@typebot.io/lib/playwright/databaseActions'
import { importTypebotInDatabase } from '@typebot.io/playwright/databaseActions'
const typebotId = 'cl0ibhi7s0018n21aarlmg0cm'
const typebotWithMergeDisabledId = 'cl0ibhi7s0018n21aarlag0cm'

View File

@@ -1,7 +1,7 @@
import { PrismaClient } from '@typebot.io/prisma'
import { SmtpCredentials } from '@typebot.io/schemas'
import { encrypt } from '@typebot.io/lib/api/encryption/encrypt'
import { proWorkspaceId } from '@typebot.io/lib/playwright/databaseSetup'
import { proWorkspaceId } from '@typebot.io/playwright/databaseSetup'
const prisma = new PrismaClient()

View File

@@ -1,7 +1,7 @@
import { getTestAsset } from '@/test/utils/playwright'
import test, { expect } from '@playwright/test'
import { createId } from '@paralleldrive/cuid2'
import { importTypebotInDatabase } from '@typebot.io/lib/playwright/databaseActions'
import { importTypebotInDatabase } from '@typebot.io/playwright/databaseActions'
test('should correctly be injected', async ({ page }) => {
const typebotId = createId()

View File

@@ -3,7 +3,7 @@ import { createId } from '@paralleldrive/cuid2'
import {
createWebhook,
importTypebotInDatabase,
} from '@typebot.io/lib/playwright/databaseActions'
} from '@typebot.io/playwright/databaseActions'
import { getTestAsset } from '@/test/utils/playwright'
import { HttpMethod } from '@typebot.io/schemas/features/blocks/integrations/webhook/constants'