2
0

📦 Upgrade packages

This commit is contained in:
Baptiste Arnaud
2022-11-02 19:45:46 +01:00
committed by GitHub
parent 48285479cc
commit 2c66c59dfc
64 changed files with 2518 additions and 3158 deletions

View File

@ -8,11 +8,11 @@
"devDependencies": {
"@playwright/test": "1.27.1",
"@types/nodemailer": "6.4.6",
"aws-sdk": "2.1233.0",
"aws-sdk": "2.1245.0",
"cuid": "2.1.8",
"db": "workspace:*",
"models": "workspace:*",
"next": "12.3.1",
"next": "13.0.1",
"nodemailer": "6.8.0",
"typescript": "4.8.4"
},

View File

@ -62,7 +62,7 @@ const createAnswers = ({
resultId: `${resultIdPrefix}-result${idx}`,
content: `content${idx}`,
blockId: 'block1',
groupId: 'block1',
groupId: 'group1',
storageUsed: fakeStorage ? Math.round(fakeStorage / count) : null,
})),
],
@ -95,6 +95,24 @@ export const deleteWorkspaces = async (workspaceIds: string[]) => {
})
}
export const deleteTypebots = async (typebotIds: string[]) => {
await prisma.typebot.deleteMany({
where: { id: { in: typebotIds } },
})
}
export const deleteCredentials = async (credentialIds: string[]) => {
await prisma.credentials.deleteMany({
where: { id: { in: credentialIds } },
})
}
export const deleteWebhooks = async (webhookIds: string[]) => {
await prisma.webhook.deleteMany({
where: { id: { in: webhookIds } },
})
}
export const createWorkspaces = async (workspaces: Partial<Workspace>[]) => {
const workspaceIds = workspaces.map((workspace) => workspace.id ?? cuid())
await prisma.workspace.createMany({