♻️ Re-organize workspace folders
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
Group,
|
||||
StartBlock,
|
||||
Typebot,
|
||||
} from 'models'
|
||||
} from '@typebot.io/schemas'
|
||||
|
||||
export type NewTypebotProps = Omit<
|
||||
Typebot,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { HardDriveIcon, SettingsIcon } from '@/components/icons'
|
||||
import { signOut } from 'next-auth/react'
|
||||
import { useUser } from '@/features/account'
|
||||
import { useWorkspace, WorkspaceDropdown } from '@/features/workspace'
|
||||
import { isNotDefined } from 'utils'
|
||||
import { isNotDefined } from '@typebot.io/lib'
|
||||
import Link from 'next/link'
|
||||
import { WorkspaceSettingsModal } from '@/features/workspace'
|
||||
import { EmojiOrImageIcon } from '@/components/EmojiOrImageIcon'
|
||||
|
||||
@@ -9,10 +9,10 @@ import { ParentModalProvider } from '@/features/graph'
|
||||
import { useWorkspace } from '@/features/workspace'
|
||||
import { useScopedI18n } from '@/locales'
|
||||
import { Stack, VStack, Spinner, Text } from '@chakra-ui/react'
|
||||
import { Plan } from 'db'
|
||||
import { Plan } from '@typebot.io/prisma'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useState, useEffect } from 'react'
|
||||
import { guessIfUserIsEuropean } from 'utils/pricing'
|
||||
import { guessIfUserIsEuropean } from '@typebot.io/lib/pricing'
|
||||
import { DashboardHeader } from './DashboardHeader'
|
||||
|
||||
export const DashboardPage = () => {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { chakra, useColorModeValue } from '@chakra-ui/react'
|
||||
import { Popup } from '@typebot.io/react'
|
||||
import { useUser } from '@/features/account'
|
||||
import { Typebot } from 'models'
|
||||
import { Typebot } from '@typebot.io/schemas'
|
||||
import React, { useEffect, useRef, useState } from 'react'
|
||||
import { sendRequest } from 'utils'
|
||||
import { sendRequest } from '@typebot.io/lib'
|
||||
import confetti from 'canvas-confetti'
|
||||
import { useToast } from '@/hooks/useToast'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
@@ -2,7 +2,7 @@ import { createFolders } from '@/test/utils/databaseActions'
|
||||
import { deleteButtonInConfirmDialog } from '@/test/utils/selectorUtils'
|
||||
import test, { expect } from '@playwright/test'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { createTypebots } from 'utils/playwright/databaseActions'
|
||||
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
|
||||
|
||||
test('folders navigation should work', async ({ page }) => {
|
||||
await page.goto('/typebots')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Typebot } from 'models'
|
||||
import { sendRequest } from 'utils'
|
||||
import { Typebot } from '@typebot.io/schemas'
|
||||
import { sendRequest } from '@typebot.io/lib'
|
||||
|
||||
export const createTypebotQuery = async ({
|
||||
folderId,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { sendRequest } from 'utils'
|
||||
import { sendRequest } from '@typebot.io/lib'
|
||||
|
||||
export const deleteTypebotQuery = async (id: string) =>
|
||||
sendRequest({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Typebot } from 'models'
|
||||
import { sendRequest } from 'utils'
|
||||
import { Typebot } from '@typebot.io/schemas'
|
||||
import { sendRequest } from '@typebot.io/lib'
|
||||
|
||||
export const getTypebotQuery = (typebotId: string) =>
|
||||
sendRequest<{ typebot: Typebot }>({
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
import { duplicateWebhookQuery } from '@/features/blocks/integrations/webhook'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { Plan, Prisma } from 'db'
|
||||
import { Plan, Prisma } from '@typebot.io/prisma'
|
||||
import {
|
||||
ChoiceInputBlock,
|
||||
ConditionBlock,
|
||||
LogicBlockType,
|
||||
Typebot,
|
||||
} from 'models'
|
||||
import { JumpBlock } from 'models/features/blocks/logic/jump'
|
||||
import { blockHasItems, isDefined, isWebhookBlock, sendRequest } from 'utils'
|
||||
} from '@typebot.io/schemas'
|
||||
import { JumpBlock } from '@typebot.io/schemas/features/blocks/logic/jump'
|
||||
import {
|
||||
blockHasItems,
|
||||
isDefined,
|
||||
isWebhookBlock,
|
||||
sendRequest,
|
||||
} from '@typebot.io/lib'
|
||||
|
||||
export const importTypebotQuery = async (typebot: Typebot, userPlan: Plan) => {
|
||||
const { typebot: newTypebot, webhookIdsMapping } = duplicateTypebot(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Typebot } from 'models'
|
||||
import { Typebot } from '@typebot.io/schemas'
|
||||
|
||||
export type TypebotInDashboard = Pick<Typebot, 'id' | 'name' | 'icon'> & {
|
||||
publishedTypebotId?: string
|
||||
|
||||
Reference in New Issue
Block a user