From d2366a8c746006f2f4cb25886a293ab370db1fdc Mon Sep 17 00:00:00 2001 From: alma Date: Sun, 20 Apr 2025 14:50:49 +0200 Subject: [PATCH] carnet api nc --- app/api/nextcloud/status/route.ts | 85 +- node_modules/.prisma/client/edge.js | 32 +- node_modules/.prisma/client/index-browser.js | 24 +- node_modules/.prisma/client/index.d.ts | 3230 +++++++++++++++++- node_modules/.prisma/client/index.js | 32 +- node_modules/.prisma/client/package.json | 2 +- node_modules/.prisma/client/schema.prisma | 42 +- node_modules/.prisma/client/wasm.js | 24 +- prisma/schema.prisma | 15 +- 9 files changed, 3439 insertions(+), 47 deletions(-) diff --git a/app/api/nextcloud/status/route.ts b/app/api/nextcloud/status/route.ts index ed01c0b0..15bb706e 100644 --- a/app/api/nextcloud/status/route.ts +++ b/app/api/nextcloud/status/route.ts @@ -3,6 +3,9 @@ import { getServerSession } from 'next-auth'; import { authOptions } from '@/app/api/auth/[...nextauth]/route'; import { DOMParser } from '@xmldom/xmldom'; import { Buffer } from 'buffer'; +import { PrismaClient } from '@prisma/client'; + +const prisma = new PrismaClient(); async function sleep(ms: number) { return new Promise(resolve => setTimeout(resolve, ms)); @@ -10,7 +13,7 @@ async function sleep(ms: number) { async function parseXMLResponse(response: Response): Promise { const text = await response.text(); - console.log('XML Response:', text); // Debug log + console.log('XML Response:', text); const parser = new DOMParser(); const xmlDoc = parser.parseFromString(text, 'text/xml'); @@ -41,9 +44,49 @@ async function parseXMLResponse(response: Response): Promise { return result; } -async function getWebDAVCredentials(nextcloudUrl: string, username: string, adminUsername: string, adminPassword: string) { +async function createFolder(nextcloudUrl: string, username: string, password: string, folderPath: string) { + const response = await fetch(`${nextcloudUrl}/remote.php/dav/files/${encodeURIComponent(username)}/${encodeURIComponent(folderPath)}`, { + method: 'MKCOL', + headers: { + 'Authorization': `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`, + }, + }); + + if (!response.ok && response.status !== 405) { // 405 means folder already exists + throw new Error(`Failed to create folder ${folderPath}: ${response.status} ${response.statusText}`); + } +} + +async function getWebDAVCredentials(nextcloudUrl: string, username: string, adminUsername: string, adminPassword: string, userId: string) { try { - // First, try to get the user's WebDAV password + // Check if credentials exist in database + let credentials = await prisma.webDAVCredentials.findUnique({ + where: { userId }, + }); + + if (credentials) { + // Verify existing credentials still work + const verifyResponse = await fetch(`${nextcloudUrl}/remote.php/dav/files/${encodeURIComponent(username)}/`, { + method: 'PROPFIND', + headers: { + 'Authorization': `Basic ${Buffer.from(`${username}:${credentials.password}`).toString('base64')}`, + 'Depth': '1', + 'Content-Type': 'application/xml', + }, + body: '', + }); + + if (verifyResponse.ok) { + return credentials.password; + } + + // If verification failed, delete the old credentials + await prisma.webDAVCredentials.delete({ + where: { userId }, + }); + } + + // Get user info from Nextcloud const userInfoResponse = await fetch(`${nextcloudUrl}/ocs/v1.php/cloud/users/${encodeURIComponent(username)}`, { headers: { 'Authorization': `Basic ${Buffer.from(`${adminUsername}:${adminPassword}`).toString('base64')}`, @@ -52,18 +95,14 @@ async function getWebDAVCredentials(nextcloudUrl: string, username: string, admi }); if (!userInfoResponse.ok) { - console.error('Failed to get user info:', await userInfoResponse.text()); throw new Error(`Failed to get user info: ${userInfoResponse.status} ${userInfoResponse.statusText}`); } - const userInfo = await parseXMLResponse(userInfoResponse); - console.log('User Info:', userInfo); - // Generate a new password const newPassword = Math.random().toString(36).slice(-12); console.log('Setting new password for user'); - // Set the user's password directly + // Set the user's password const setPasswordResponse = await fetch(`${nextcloudUrl}/ocs/v1.php/cloud/users/${encodeURIComponent(username)}`, { method: 'PUT', headers: { @@ -78,25 +117,22 @@ async function getWebDAVCredentials(nextcloudUrl: string, username: string, admi }); if (!setPasswordResponse.ok) { - console.error('Failed to set password:', await setPasswordResponse.text()); throw new Error(`Failed to set password: ${setPasswordResponse.status} ${setPasswordResponse.statusText}`); } - // Verify the password was set by trying to authenticate with PROPFIND - const verifyResponse = await fetch(`${nextcloudUrl}/remote.php/dav/files/${encodeURIComponent(username)}/`, { - method: 'PROPFIND', - headers: { - 'Authorization': `Basic ${Buffer.from(`${username}:${newPassword}`).toString('base64')}`, - 'Depth': '1', - 'Content-Type': 'application/xml', + // Store the new credentials + credentials = await prisma.webDAVCredentials.create({ + data: { + userId, + username, + password: newPassword, }, - body: '', }); - if (!verifyResponse.ok) { - console.error('Failed to verify password:', await verifyResponse.text()); - throw new Error('Password verification failed'); - } + // Create required folder structure + await createFolder(nextcloudUrl, username, newPassword, 'Private'); + await createFolder(nextcloudUrl, username, newPassword, 'Private/Diary'); + await createFolder(nextcloudUrl, username, newPassword, 'Private/Health'); return newPassword; } catch (error) { @@ -148,7 +184,8 @@ export async function GET() { nextcloudUrl, nextcloudUsername, adminUsername, - adminPassword + adminPassword, + session.user.id ); if (!webdavPassword) { @@ -156,7 +193,7 @@ export async function GET() { } // Get user's folders using WebDAV with Basic authentication - const webdavUrl = `${nextcloudUrl}/remote.php/dav/files/${encodeURIComponent(nextcloudUsername)}/`; + const webdavUrl = `${nextcloudUrl}/remote.php/dav/files/${encodeURIComponent(nextcloudUsername)}/Private/`; console.log('Requesting WebDAV URL:', webdavUrl); const foldersResponse = await fetch(webdavUrl, { @@ -202,7 +239,7 @@ export async function GET() { if (href) { // Extract folder name from href const folderName = decodeURIComponent(href.split('/').filter(Boolean).pop() || ''); - if (folderName && folderName !== nextcloudUsername) { + if (folderName && folderName !== 'Private') { folders.push(folderName); } } diff --git a/node_modules/.prisma/client/edge.js b/node_modules/.prisma/client/edge.js index 0bf73f92..902a6468 100644 --- a/node_modules/.prisma/client/edge.js +++ b/node_modules/.prisma/client/edge.js @@ -121,6 +121,26 @@ exports.Prisma.EventScalarFieldEnum = { updatedAt: 'updatedAt' }; +exports.Prisma.MailCredentialsScalarFieldEnum = { + id: 'id', + userId: 'userId', + email: 'email', + password: 'password', + host: 'host', + port: 'port', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.WebDAVCredentialsScalarFieldEnum = { + id: 'id', + userId: 'userId', + username: 'username', + password: 'password', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + exports.Prisma.SortOrder = { asc: 'asc', desc: 'desc' @@ -140,7 +160,9 @@ exports.Prisma.NullsOrder = { exports.Prisma.ModelName = { User: 'User', Calendar: 'Calendar', - Event: 'Event' + Event: 'Event', + MailCredentials: 'MailCredentials', + WebDAVCredentials: 'WebDAVCredentials' }; /** * Create the Client @@ -184,7 +206,7 @@ const config = { "db" ], "activeProvider": "postgresql", - "postinstall": true, + "postinstall": false, "inlineDatasources": { "db": { "url": { @@ -193,13 +215,13 @@ const config = { } } }, - "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client-js\"\n binaryTargets = [\"native\", \"linux-arm64-openssl-3.0.x\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel User {\n id String @id @default(uuid())\n email String @unique\n password String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n calendars Calendar[]\n events Event[]\n}\n\nmodel Calendar {\n id String @id @default(uuid())\n name String\n color String @default(\"#0082c9\")\n description String?\n userId String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n events Event[]\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([userId])\n}\n\nmodel Event {\n id String @id @default(uuid())\n title String\n description String?\n start DateTime\n end DateTime\n location String?\n isAllDay Boolean @default(false)\n calendar Calendar @relation(fields: [calendarId], references: [id], onDelete: Cascade)\n calendarId String\n userId String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([calendarId])\n @@index([userId])\n}\n", - "inlineSchemaHash": "2e4d283f1d28efa629562b00b7d570bd95068a2584d9ab15790c0baddf04012e", + "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client-js\"\n binaryTargets = [\"native\", \"linux-arm64-openssl-3.0.x\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel User {\n id String @id @default(uuid())\n email String @unique\n password String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n calendars Calendar[]\n events Event[]\n mailCredentials MailCredentials?\n webdavCredentials WebDAVCredentials?\n}\n\nmodel Calendar {\n id String @id @default(uuid())\n name String\n color String @default(\"#0082c9\")\n description String?\n userId String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n events Event[]\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([userId])\n}\n\nmodel Event {\n id String @id @default(uuid())\n title String\n description String?\n start DateTime\n end DateTime\n location String?\n isAllDay Boolean @default(false)\n calendar Calendar @relation(fields: [calendarId], references: [id], onDelete: Cascade)\n calendarId String\n userId String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([calendarId])\n @@index([userId])\n}\n\nmodel MailCredentials {\n id String @id @default(uuid())\n userId String @unique\n email String\n password String\n host String\n port Int\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([userId])\n}\n\nmodel WebDAVCredentials {\n id String @id @default(uuid())\n userId String @unique\n username String\n password String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([userId])\n}\n", + "inlineSchemaHash": "28d91694f43adc319aaa1fc0d358f7e34c0d869566388351a9ca1845f069afc8", "copyEngine": true } config.dirname = '/' -config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"calendars\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Calendar\",\"nativeType\":null,\"relationName\":\"CalendarToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"events\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Event\",\"nativeType\":null,\"relationName\":\"EventToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Calendar\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"#0082c9\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"events\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Event\",\"nativeType\":null,\"relationName\":\"CalendarToEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"CalendarToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Event\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"start\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"end\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"location\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isAllDay\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"calendar\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Calendar\",\"nativeType\":null,\"relationName\":\"CalendarToEvent\",\"relationFromFields\":[\"calendarId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"calendarId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"EventToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"calendars\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Calendar\",\"nativeType\":null,\"relationName\":\"CalendarToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"events\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Event\",\"nativeType\":null,\"relationName\":\"EventToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mailCredentials\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MailCredentials\",\"nativeType\":null,\"relationName\":\"MailCredentialsToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"webdavCredentials\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"WebDAVCredentials\",\"nativeType\":null,\"relationName\":\"UserToWebDAVCredentials\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Calendar\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"#0082c9\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"events\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Event\",\"nativeType\":null,\"relationName\":\"CalendarToEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"CalendarToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Event\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"start\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"end\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"location\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isAllDay\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"calendar\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Calendar\",\"nativeType\":null,\"relationName\":\"CalendarToEvent\",\"relationFromFields\":[\"calendarId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"calendarId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"EventToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MailCredentials\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"host\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"port\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MailCredentialsToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"WebDAVCredentials\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"username\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserToWebDAVCredentials\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") defineDmmfProperty(exports.Prisma, config.runtimeDataModel) config.engineWasm = undefined config.compilerWasm = undefined diff --git a/node_modules/.prisma/client/index-browser.js b/node_modules/.prisma/client/index-browser.js index f9392daf..54ed0e9e 100644 --- a/node_modules/.prisma/client/index-browser.js +++ b/node_modules/.prisma/client/index-browser.js @@ -149,6 +149,26 @@ exports.Prisma.EventScalarFieldEnum = { updatedAt: 'updatedAt' }; +exports.Prisma.MailCredentialsScalarFieldEnum = { + id: 'id', + userId: 'userId', + email: 'email', + password: 'password', + host: 'host', + port: 'port', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.WebDAVCredentialsScalarFieldEnum = { + id: 'id', + userId: 'userId', + username: 'username', + password: 'password', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + exports.Prisma.SortOrder = { asc: 'asc', desc: 'desc' @@ -168,7 +188,9 @@ exports.Prisma.NullsOrder = { exports.Prisma.ModelName = { User: 'User', Calendar: 'Calendar', - Event: 'Event' + Event: 'Event', + MailCredentials: 'MailCredentials', + WebDAVCredentials: 'WebDAVCredentials' }; /** diff --git a/node_modules/.prisma/client/index.d.ts b/node_modules/.prisma/client/index.d.ts index 91e08ffa..6fde1d86 100644 --- a/node_modules/.prisma/client/index.d.ts +++ b/node_modules/.prisma/client/index.d.ts @@ -28,6 +28,16 @@ export type Calendar = $Result.DefaultSelection * */ export type Event = $Result.DefaultSelection +/** + * Model MailCredentials + * + */ +export type MailCredentials = $Result.DefaultSelection +/** + * Model WebDAVCredentials + * + */ +export type WebDAVCredentials = $Result.DefaultSelection /** * ## Prisma Client ʲˢ @@ -183,6 +193,26 @@ export class PrismaClient< * ``` */ get event(): Prisma.EventDelegate; + + /** + * `prisma.mailCredentials`: Exposes CRUD operations for the **MailCredentials** model. + * Example usage: + * ```ts + * // Fetch zero or more MailCredentials + * const mailCredentials = await prisma.mailCredentials.findMany() + * ``` + */ + get mailCredentials(): Prisma.MailCredentialsDelegate; + + /** + * `prisma.webDAVCredentials`: Exposes CRUD operations for the **WebDAVCredentials** model. + * Example usage: + * ```ts + * // Fetch zero or more WebDAVCredentials + * const webDAVCredentials = await prisma.webDAVCredentials.findMany() + * ``` + */ + get webDAVCredentials(): Prisma.WebDAVCredentialsDelegate; } export namespace Prisma { @@ -625,7 +655,9 @@ export namespace Prisma { export const ModelName: { User: 'User', Calendar: 'Calendar', - Event: 'Event' + Event: 'Event', + MailCredentials: 'MailCredentials', + WebDAVCredentials: 'WebDAVCredentials' }; export type ModelName = (typeof ModelName)[keyof typeof ModelName] @@ -641,7 +673,7 @@ export namespace Prisma { export type TypeMap = { meta: { - modelProps: "user" | "calendar" | "event" + modelProps: "user" | "calendar" | "event" | "mailCredentials" | "webDAVCredentials" txIsolationLevel: Prisma.TransactionIsolationLevel } model: { @@ -867,6 +899,154 @@ export namespace Prisma { } } } + MailCredentials: { + payload: Prisma.$MailCredentialsPayload + fields: Prisma.MailCredentialsFieldRefs + operations: { + findUnique: { + args: Prisma.MailCredentialsFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.MailCredentialsFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.MailCredentialsFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.MailCredentialsFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.MailCredentialsFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.MailCredentialsCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.MailCredentialsCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.MailCredentialsCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.MailCredentialsDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.MailCredentialsUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.MailCredentialsDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.MailCredentialsUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.MailCredentialsUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.MailCredentialsUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.MailCredentialsAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.MailCredentialsGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.MailCredentialsCountArgs + result: $Utils.Optional | number + } + } + } + WebDAVCredentials: { + payload: Prisma.$WebDAVCredentialsPayload + fields: Prisma.WebDAVCredentialsFieldRefs + operations: { + findUnique: { + args: Prisma.WebDAVCredentialsFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.WebDAVCredentialsFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.WebDAVCredentialsFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.WebDAVCredentialsFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.WebDAVCredentialsFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.WebDAVCredentialsCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.WebDAVCredentialsCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.WebDAVCredentialsCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.WebDAVCredentialsDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.WebDAVCredentialsUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.WebDAVCredentialsDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.WebDAVCredentialsUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.WebDAVCredentialsUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.WebDAVCredentialsUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.WebDAVCredentialsAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.WebDAVCredentialsGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.WebDAVCredentialsCountArgs + result: $Utils.Optional | number + } + } + } } } & { other: { @@ -954,6 +1134,8 @@ export namespace Prisma { user?: UserOmit calendar?: CalendarOmit event?: EventOmit + mailCredentials?: MailCredentialsOmit + webDAVCredentials?: WebDAVCredentialsOmit } /* Types for Logging */ @@ -1284,6 +1466,8 @@ export namespace Prisma { updatedAt?: boolean calendars?: boolean | User$calendarsArgs events?: boolean | User$eventsArgs + mailCredentials?: boolean | User$mailCredentialsArgs + webdavCredentials?: boolean | User$webdavCredentialsArgs _count?: boolean | UserCountOutputTypeDefaultArgs }, ExtArgs["result"]["user"]> @@ -1315,6 +1499,8 @@ export namespace Prisma { export type UserInclude = { calendars?: boolean | User$calendarsArgs events?: boolean | User$eventsArgs + mailCredentials?: boolean | User$mailCredentialsArgs + webdavCredentials?: boolean | User$webdavCredentialsArgs _count?: boolean | UserCountOutputTypeDefaultArgs } export type UserIncludeCreateManyAndReturn = {} @@ -1325,6 +1511,8 @@ export namespace Prisma { objects: { calendars: Prisma.$CalendarPayload[] events: Prisma.$EventPayload[] + mailCredentials: Prisma.$MailCredentialsPayload | null + webdavCredentials: Prisma.$WebDAVCredentialsPayload | null } scalars: $Extensions.GetPayloadResult<{ id: string @@ -1728,6 +1916,8 @@ export namespace Prisma { readonly [Symbol.toStringTag]: "PrismaPromise" calendars = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", ClientOptions> | Null> events = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", ClientOptions> | Null> + mailCredentials = {}>(args?: Subset>): Prisma__MailCredentialsClient<$Result.GetResult, T, "findUniqueOrThrow", ClientOptions> | null, null, ExtArgs, ClientOptions> + webdavCredentials = {}>(args?: Subset>): Prisma__WebDAVCredentialsClient<$Result.GetResult, T, "findUniqueOrThrow", ClientOptions> | null, null, ExtArgs, ClientOptions> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -2197,6 +2387,44 @@ export namespace Prisma { distinct?: EventScalarFieldEnum | EventScalarFieldEnum[] } + /** + * User.mailCredentials + */ + export type User$mailCredentialsArgs = { + /** + * Select specific fields to fetch from the MailCredentials + */ + select?: MailCredentialsSelect | null + /** + * Omit specific fields from the MailCredentials + */ + omit?: MailCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MailCredentialsInclude | null + where?: MailCredentialsWhereInput + } + + /** + * User.webdavCredentials + */ + export type User$webdavCredentialsArgs = { + /** + * Select specific fields to fetch from the WebDAVCredentials + */ + select?: WebDAVCredentialsSelect | null + /** + * Omit specific fields from the WebDAVCredentials + */ + omit?: WebDAVCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WebDAVCredentialsInclude | null + where?: WebDAVCredentialsWhereInput + } + /** * User without action */ @@ -4474,6 +4702,2208 @@ export namespace Prisma { } + /** + * Model MailCredentials + */ + + export type AggregateMailCredentials = { + _count: MailCredentialsCountAggregateOutputType | null + _avg: MailCredentialsAvgAggregateOutputType | null + _sum: MailCredentialsSumAggregateOutputType | null + _min: MailCredentialsMinAggregateOutputType | null + _max: MailCredentialsMaxAggregateOutputType | null + } + + export type MailCredentialsAvgAggregateOutputType = { + port: number | null + } + + export type MailCredentialsSumAggregateOutputType = { + port: number | null + } + + export type MailCredentialsMinAggregateOutputType = { + id: string | null + userId: string | null + email: string | null + password: string | null + host: string | null + port: number | null + createdAt: Date | null + updatedAt: Date | null + } + + export type MailCredentialsMaxAggregateOutputType = { + id: string | null + userId: string | null + email: string | null + password: string | null + host: string | null + port: number | null + createdAt: Date | null + updatedAt: Date | null + } + + export type MailCredentialsCountAggregateOutputType = { + id: number + userId: number + email: number + password: number + host: number + port: number + createdAt: number + updatedAt: number + _all: number + } + + + export type MailCredentialsAvgAggregateInputType = { + port?: true + } + + export type MailCredentialsSumAggregateInputType = { + port?: true + } + + export type MailCredentialsMinAggregateInputType = { + id?: true + userId?: true + email?: true + password?: true + host?: true + port?: true + createdAt?: true + updatedAt?: true + } + + export type MailCredentialsMaxAggregateInputType = { + id?: true + userId?: true + email?: true + password?: true + host?: true + port?: true + createdAt?: true + updatedAt?: true + } + + export type MailCredentialsCountAggregateInputType = { + id?: true + userId?: true + email?: true + password?: true + host?: true + port?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type MailCredentialsAggregateArgs = { + /** + * Filter which MailCredentials to aggregate. + */ + where?: MailCredentialsWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MailCredentials to fetch. + */ + orderBy?: MailCredentialsOrderByWithRelationInput | MailCredentialsOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: MailCredentialsWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MailCredentials from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MailCredentials. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned MailCredentials + **/ + _count?: true | MailCredentialsCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: MailCredentialsAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: MailCredentialsSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: MailCredentialsMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: MailCredentialsMaxAggregateInputType + } + + export type GetMailCredentialsAggregateType = { + [P in keyof T & keyof AggregateMailCredentials]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type MailCredentialsGroupByArgs = { + where?: MailCredentialsWhereInput + orderBy?: MailCredentialsOrderByWithAggregationInput | MailCredentialsOrderByWithAggregationInput[] + by: MailCredentialsScalarFieldEnum[] | MailCredentialsScalarFieldEnum + having?: MailCredentialsScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: MailCredentialsCountAggregateInputType | true + _avg?: MailCredentialsAvgAggregateInputType + _sum?: MailCredentialsSumAggregateInputType + _min?: MailCredentialsMinAggregateInputType + _max?: MailCredentialsMaxAggregateInputType + } + + export type MailCredentialsGroupByOutputType = { + id: string + userId: string + email: string + password: string + host: string + port: number + createdAt: Date + updatedAt: Date + _count: MailCredentialsCountAggregateOutputType | null + _avg: MailCredentialsAvgAggregateOutputType | null + _sum: MailCredentialsSumAggregateOutputType | null + _min: MailCredentialsMinAggregateOutputType | null + _max: MailCredentialsMaxAggregateOutputType | null + } + + type GetMailCredentialsGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof MailCredentialsGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type MailCredentialsSelect = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + email?: boolean + password?: boolean + host?: boolean + port?: boolean + createdAt?: boolean + updatedAt?: boolean + user?: boolean | UserDefaultArgs + }, ExtArgs["result"]["mailCredentials"]> + + export type MailCredentialsSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + email?: boolean + password?: boolean + host?: boolean + port?: boolean + createdAt?: boolean + updatedAt?: boolean + user?: boolean | UserDefaultArgs + }, ExtArgs["result"]["mailCredentials"]> + + export type MailCredentialsSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + email?: boolean + password?: boolean + host?: boolean + port?: boolean + createdAt?: boolean + updatedAt?: boolean + user?: boolean | UserDefaultArgs + }, ExtArgs["result"]["mailCredentials"]> + + export type MailCredentialsSelectScalar = { + id?: boolean + userId?: boolean + email?: boolean + password?: boolean + host?: boolean + port?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + export type MailCredentialsOmit = $Extensions.GetOmit<"id" | "userId" | "email" | "password" | "host" | "port" | "createdAt" | "updatedAt", ExtArgs["result"]["mailCredentials"]> + export type MailCredentialsInclude = { + user?: boolean | UserDefaultArgs + } + export type MailCredentialsIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + } + export type MailCredentialsIncludeUpdateManyAndReturn = { + user?: boolean | UserDefaultArgs + } + + export type $MailCredentialsPayload = { + name: "MailCredentials" + objects: { + user: Prisma.$UserPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + userId: string + email: string + password: string + host: string + port: number + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["mailCredentials"]> + composites: {} + } + + type MailCredentialsGetPayload = $Result.GetResult + + type MailCredentialsCountArgs = + Omit & { + select?: MailCredentialsCountAggregateInputType | true + } + + export interface MailCredentialsDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['MailCredentials'], meta: { name: 'MailCredentials' } } + /** + * Find zero or one MailCredentials that matches the filter. + * @param {MailCredentialsFindUniqueArgs} args - Arguments to find a MailCredentials + * @example + * // Get one MailCredentials + * const mailCredentials = await prisma.mailCredentials.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__MailCredentialsClient<$Result.GetResult, T, "findUnique", ClientOptions> | null, null, ExtArgs, ClientOptions> + + /** + * Find one MailCredentials that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {MailCredentialsFindUniqueOrThrowArgs} args - Arguments to find a MailCredentials + * @example + * // Get one MailCredentials + * const mailCredentials = await prisma.mailCredentials.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__MailCredentialsClient<$Result.GetResult, T, "findUniqueOrThrow", ClientOptions>, never, ExtArgs, ClientOptions> + + /** + * Find the first MailCredentials that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MailCredentialsFindFirstArgs} args - Arguments to find a MailCredentials + * @example + * // Get one MailCredentials + * const mailCredentials = await prisma.mailCredentials.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__MailCredentialsClient<$Result.GetResult, T, "findFirst", ClientOptions> | null, null, ExtArgs, ClientOptions> + + /** + * Find the first MailCredentials that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MailCredentialsFindFirstOrThrowArgs} args - Arguments to find a MailCredentials + * @example + * // Get one MailCredentials + * const mailCredentials = await prisma.mailCredentials.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__MailCredentialsClient<$Result.GetResult, T, "findFirstOrThrow", ClientOptions>, never, ExtArgs, ClientOptions> + + /** + * Find zero or more MailCredentials that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MailCredentialsFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all MailCredentials + * const mailCredentials = await prisma.mailCredentials.findMany() + * + * // Get first 10 MailCredentials + * const mailCredentials = await prisma.mailCredentials.findMany({ take: 10 }) + * + * // Only select the `id` + * const mailCredentialsWithIdOnly = await prisma.mailCredentials.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", ClientOptions>> + + /** + * Create a MailCredentials. + * @param {MailCredentialsCreateArgs} args - Arguments to create a MailCredentials. + * @example + * // Create one MailCredentials + * const MailCredentials = await prisma.mailCredentials.create({ + * data: { + * // ... data to create a MailCredentials + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__MailCredentialsClient<$Result.GetResult, T, "create", ClientOptions>, never, ExtArgs, ClientOptions> + + /** + * Create many MailCredentials. + * @param {MailCredentialsCreateManyArgs} args - Arguments to create many MailCredentials. + * @example + * // Create many MailCredentials + * const mailCredentials = await prisma.mailCredentials.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many MailCredentials and returns the data saved in the database. + * @param {MailCredentialsCreateManyAndReturnArgs} args - Arguments to create many MailCredentials. + * @example + * // Create many MailCredentials + * const mailCredentials = await prisma.mailCredentials.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many MailCredentials and only return the `id` + * const mailCredentialsWithIdOnly = await prisma.mailCredentials.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", ClientOptions>> + + /** + * Delete a MailCredentials. + * @param {MailCredentialsDeleteArgs} args - Arguments to delete one MailCredentials. + * @example + * // Delete one MailCredentials + * const MailCredentials = await prisma.mailCredentials.delete({ + * where: { + * // ... filter to delete one MailCredentials + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__MailCredentialsClient<$Result.GetResult, T, "delete", ClientOptions>, never, ExtArgs, ClientOptions> + + /** + * Update one MailCredentials. + * @param {MailCredentialsUpdateArgs} args - Arguments to update one MailCredentials. + * @example + * // Update one MailCredentials + * const mailCredentials = await prisma.mailCredentials.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__MailCredentialsClient<$Result.GetResult, T, "update", ClientOptions>, never, ExtArgs, ClientOptions> + + /** + * Delete zero or more MailCredentials. + * @param {MailCredentialsDeleteManyArgs} args - Arguments to filter MailCredentials to delete. + * @example + * // Delete a few MailCredentials + * const { count } = await prisma.mailCredentials.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more MailCredentials. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MailCredentialsUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many MailCredentials + * const mailCredentials = await prisma.mailCredentials.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more MailCredentials and returns the data updated in the database. + * @param {MailCredentialsUpdateManyAndReturnArgs} args - Arguments to update many MailCredentials. + * @example + * // Update many MailCredentials + * const mailCredentials = await prisma.mailCredentials.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more MailCredentials and only return the `id` + * const mailCredentialsWithIdOnly = await prisma.mailCredentials.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", ClientOptions>> + + /** + * Create or update one MailCredentials. + * @param {MailCredentialsUpsertArgs} args - Arguments to update or create a MailCredentials. + * @example + * // Update or create a MailCredentials + * const mailCredentials = await prisma.mailCredentials.upsert({ + * create: { + * // ... data to create a MailCredentials + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the MailCredentials we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__MailCredentialsClient<$Result.GetResult, T, "upsert", ClientOptions>, never, ExtArgs, ClientOptions> + + + /** + * Count the number of MailCredentials. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MailCredentialsCountArgs} args - Arguments to filter MailCredentials to count. + * @example + * // Count the number of MailCredentials + * const count = await prisma.mailCredentials.count({ + * where: { + * // ... the filter for the MailCredentials we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a MailCredentials. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MailCredentialsAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by MailCredentials. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MailCredentialsGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends MailCredentialsGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: MailCredentialsGroupByArgs['orderBy'] } + : { orderBy?: MailCredentialsGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetMailCredentialsGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the MailCredentials model + */ + readonly fields: MailCredentialsFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for MailCredentials. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__MailCredentialsClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", ClientOptions> | Null, Null, ExtArgs, ClientOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the MailCredentials model + */ + interface MailCredentialsFieldRefs { + readonly id: FieldRef<"MailCredentials", 'String'> + readonly userId: FieldRef<"MailCredentials", 'String'> + readonly email: FieldRef<"MailCredentials", 'String'> + readonly password: FieldRef<"MailCredentials", 'String'> + readonly host: FieldRef<"MailCredentials", 'String'> + readonly port: FieldRef<"MailCredentials", 'Int'> + readonly createdAt: FieldRef<"MailCredentials", 'DateTime'> + readonly updatedAt: FieldRef<"MailCredentials", 'DateTime'> + } + + + // Custom InputTypes + /** + * MailCredentials findUnique + */ + export type MailCredentialsFindUniqueArgs = { + /** + * Select specific fields to fetch from the MailCredentials + */ + select?: MailCredentialsSelect | null + /** + * Omit specific fields from the MailCredentials + */ + omit?: MailCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MailCredentialsInclude | null + /** + * Filter, which MailCredentials to fetch. + */ + where: MailCredentialsWhereUniqueInput + } + + /** + * MailCredentials findUniqueOrThrow + */ + export type MailCredentialsFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the MailCredentials + */ + select?: MailCredentialsSelect | null + /** + * Omit specific fields from the MailCredentials + */ + omit?: MailCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MailCredentialsInclude | null + /** + * Filter, which MailCredentials to fetch. + */ + where: MailCredentialsWhereUniqueInput + } + + /** + * MailCredentials findFirst + */ + export type MailCredentialsFindFirstArgs = { + /** + * Select specific fields to fetch from the MailCredentials + */ + select?: MailCredentialsSelect | null + /** + * Omit specific fields from the MailCredentials + */ + omit?: MailCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MailCredentialsInclude | null + /** + * Filter, which MailCredentials to fetch. + */ + where?: MailCredentialsWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MailCredentials to fetch. + */ + orderBy?: MailCredentialsOrderByWithRelationInput | MailCredentialsOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for MailCredentials. + */ + cursor?: MailCredentialsWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MailCredentials from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MailCredentials. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of MailCredentials. + */ + distinct?: MailCredentialsScalarFieldEnum | MailCredentialsScalarFieldEnum[] + } + + /** + * MailCredentials findFirstOrThrow + */ + export type MailCredentialsFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the MailCredentials + */ + select?: MailCredentialsSelect | null + /** + * Omit specific fields from the MailCredentials + */ + omit?: MailCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MailCredentialsInclude | null + /** + * Filter, which MailCredentials to fetch. + */ + where?: MailCredentialsWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MailCredentials to fetch. + */ + orderBy?: MailCredentialsOrderByWithRelationInput | MailCredentialsOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for MailCredentials. + */ + cursor?: MailCredentialsWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MailCredentials from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MailCredentials. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of MailCredentials. + */ + distinct?: MailCredentialsScalarFieldEnum | MailCredentialsScalarFieldEnum[] + } + + /** + * MailCredentials findMany + */ + export type MailCredentialsFindManyArgs = { + /** + * Select specific fields to fetch from the MailCredentials + */ + select?: MailCredentialsSelect | null + /** + * Omit specific fields from the MailCredentials + */ + omit?: MailCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MailCredentialsInclude | null + /** + * Filter, which MailCredentials to fetch. + */ + where?: MailCredentialsWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MailCredentials to fetch. + */ + orderBy?: MailCredentialsOrderByWithRelationInput | MailCredentialsOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing MailCredentials. + */ + cursor?: MailCredentialsWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MailCredentials from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MailCredentials. + */ + skip?: number + distinct?: MailCredentialsScalarFieldEnum | MailCredentialsScalarFieldEnum[] + } + + /** + * MailCredentials create + */ + export type MailCredentialsCreateArgs = { + /** + * Select specific fields to fetch from the MailCredentials + */ + select?: MailCredentialsSelect | null + /** + * Omit specific fields from the MailCredentials + */ + omit?: MailCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MailCredentialsInclude | null + /** + * The data needed to create a MailCredentials. + */ + data: XOR + } + + /** + * MailCredentials createMany + */ + export type MailCredentialsCreateManyArgs = { + /** + * The data used to create many MailCredentials. + */ + data: MailCredentialsCreateManyInput | MailCredentialsCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * MailCredentials createManyAndReturn + */ + export type MailCredentialsCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the MailCredentials + */ + select?: MailCredentialsSelectCreateManyAndReturn | null + /** + * Omit specific fields from the MailCredentials + */ + omit?: MailCredentialsOmit | null + /** + * The data used to create many MailCredentials. + */ + data: MailCredentialsCreateManyInput | MailCredentialsCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: MailCredentialsIncludeCreateManyAndReturn | null + } + + /** + * MailCredentials update + */ + export type MailCredentialsUpdateArgs = { + /** + * Select specific fields to fetch from the MailCredentials + */ + select?: MailCredentialsSelect | null + /** + * Omit specific fields from the MailCredentials + */ + omit?: MailCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MailCredentialsInclude | null + /** + * The data needed to update a MailCredentials. + */ + data: XOR + /** + * Choose, which MailCredentials to update. + */ + where: MailCredentialsWhereUniqueInput + } + + /** + * MailCredentials updateMany + */ + export type MailCredentialsUpdateManyArgs = { + /** + * The data used to update MailCredentials. + */ + data: XOR + /** + * Filter which MailCredentials to update + */ + where?: MailCredentialsWhereInput + /** + * Limit how many MailCredentials to update. + */ + limit?: number + } + + /** + * MailCredentials updateManyAndReturn + */ + export type MailCredentialsUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the MailCredentials + */ + select?: MailCredentialsSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the MailCredentials + */ + omit?: MailCredentialsOmit | null + /** + * The data used to update MailCredentials. + */ + data: XOR + /** + * Filter which MailCredentials to update + */ + where?: MailCredentialsWhereInput + /** + * Limit how many MailCredentials to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: MailCredentialsIncludeUpdateManyAndReturn | null + } + + /** + * MailCredentials upsert + */ + export type MailCredentialsUpsertArgs = { + /** + * Select specific fields to fetch from the MailCredentials + */ + select?: MailCredentialsSelect | null + /** + * Omit specific fields from the MailCredentials + */ + omit?: MailCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MailCredentialsInclude | null + /** + * The filter to search for the MailCredentials to update in case it exists. + */ + where: MailCredentialsWhereUniqueInput + /** + * In case the MailCredentials found by the `where` argument doesn't exist, create a new MailCredentials with this data. + */ + create: XOR + /** + * In case the MailCredentials was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * MailCredentials delete + */ + export type MailCredentialsDeleteArgs = { + /** + * Select specific fields to fetch from the MailCredentials + */ + select?: MailCredentialsSelect | null + /** + * Omit specific fields from the MailCredentials + */ + omit?: MailCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MailCredentialsInclude | null + /** + * Filter which MailCredentials to delete. + */ + where: MailCredentialsWhereUniqueInput + } + + /** + * MailCredentials deleteMany + */ + export type MailCredentialsDeleteManyArgs = { + /** + * Filter which MailCredentials to delete + */ + where?: MailCredentialsWhereInput + /** + * Limit how many MailCredentials to delete. + */ + limit?: number + } + + /** + * MailCredentials without action + */ + export type MailCredentialsDefaultArgs = { + /** + * Select specific fields to fetch from the MailCredentials + */ + select?: MailCredentialsSelect | null + /** + * Omit specific fields from the MailCredentials + */ + omit?: MailCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MailCredentialsInclude | null + } + + + /** + * Model WebDAVCredentials + */ + + export type AggregateWebDAVCredentials = { + _count: WebDAVCredentialsCountAggregateOutputType | null + _min: WebDAVCredentialsMinAggregateOutputType | null + _max: WebDAVCredentialsMaxAggregateOutputType | null + } + + export type WebDAVCredentialsMinAggregateOutputType = { + id: string | null + userId: string | null + username: string | null + password: string | null + createdAt: Date | null + updatedAt: Date | null + } + + export type WebDAVCredentialsMaxAggregateOutputType = { + id: string | null + userId: string | null + username: string | null + password: string | null + createdAt: Date | null + updatedAt: Date | null + } + + export type WebDAVCredentialsCountAggregateOutputType = { + id: number + userId: number + username: number + password: number + createdAt: number + updatedAt: number + _all: number + } + + + export type WebDAVCredentialsMinAggregateInputType = { + id?: true + userId?: true + username?: true + password?: true + createdAt?: true + updatedAt?: true + } + + export type WebDAVCredentialsMaxAggregateInputType = { + id?: true + userId?: true + username?: true + password?: true + createdAt?: true + updatedAt?: true + } + + export type WebDAVCredentialsCountAggregateInputType = { + id?: true + userId?: true + username?: true + password?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type WebDAVCredentialsAggregateArgs = { + /** + * Filter which WebDAVCredentials to aggregate. + */ + where?: WebDAVCredentialsWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of WebDAVCredentials to fetch. + */ + orderBy?: WebDAVCredentialsOrderByWithRelationInput | WebDAVCredentialsOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: WebDAVCredentialsWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` WebDAVCredentials from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` WebDAVCredentials. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned WebDAVCredentials + **/ + _count?: true | WebDAVCredentialsCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: WebDAVCredentialsMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: WebDAVCredentialsMaxAggregateInputType + } + + export type GetWebDAVCredentialsAggregateType = { + [P in keyof T & keyof AggregateWebDAVCredentials]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type WebDAVCredentialsGroupByArgs = { + where?: WebDAVCredentialsWhereInput + orderBy?: WebDAVCredentialsOrderByWithAggregationInput | WebDAVCredentialsOrderByWithAggregationInput[] + by: WebDAVCredentialsScalarFieldEnum[] | WebDAVCredentialsScalarFieldEnum + having?: WebDAVCredentialsScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: WebDAVCredentialsCountAggregateInputType | true + _min?: WebDAVCredentialsMinAggregateInputType + _max?: WebDAVCredentialsMaxAggregateInputType + } + + export type WebDAVCredentialsGroupByOutputType = { + id: string + userId: string + username: string + password: string + createdAt: Date + updatedAt: Date + _count: WebDAVCredentialsCountAggregateOutputType | null + _min: WebDAVCredentialsMinAggregateOutputType | null + _max: WebDAVCredentialsMaxAggregateOutputType | null + } + + type GetWebDAVCredentialsGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof WebDAVCredentialsGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type WebDAVCredentialsSelect = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + username?: boolean + password?: boolean + createdAt?: boolean + updatedAt?: boolean + user?: boolean | UserDefaultArgs + }, ExtArgs["result"]["webDAVCredentials"]> + + export type WebDAVCredentialsSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + username?: boolean + password?: boolean + createdAt?: boolean + updatedAt?: boolean + user?: boolean | UserDefaultArgs + }, ExtArgs["result"]["webDAVCredentials"]> + + export type WebDAVCredentialsSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + username?: boolean + password?: boolean + createdAt?: boolean + updatedAt?: boolean + user?: boolean | UserDefaultArgs + }, ExtArgs["result"]["webDAVCredentials"]> + + export type WebDAVCredentialsSelectScalar = { + id?: boolean + userId?: boolean + username?: boolean + password?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + export type WebDAVCredentialsOmit = $Extensions.GetOmit<"id" | "userId" | "username" | "password" | "createdAt" | "updatedAt", ExtArgs["result"]["webDAVCredentials"]> + export type WebDAVCredentialsInclude = { + user?: boolean | UserDefaultArgs + } + export type WebDAVCredentialsIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + } + export type WebDAVCredentialsIncludeUpdateManyAndReturn = { + user?: boolean | UserDefaultArgs + } + + export type $WebDAVCredentialsPayload = { + name: "WebDAVCredentials" + objects: { + user: Prisma.$UserPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + userId: string + username: string + password: string + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["webDAVCredentials"]> + composites: {} + } + + type WebDAVCredentialsGetPayload = $Result.GetResult + + type WebDAVCredentialsCountArgs = + Omit & { + select?: WebDAVCredentialsCountAggregateInputType | true + } + + export interface WebDAVCredentialsDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['WebDAVCredentials'], meta: { name: 'WebDAVCredentials' } } + /** + * Find zero or one WebDAVCredentials that matches the filter. + * @param {WebDAVCredentialsFindUniqueArgs} args - Arguments to find a WebDAVCredentials + * @example + * // Get one WebDAVCredentials + * const webDAVCredentials = await prisma.webDAVCredentials.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__WebDAVCredentialsClient<$Result.GetResult, T, "findUnique", ClientOptions> | null, null, ExtArgs, ClientOptions> + + /** + * Find one WebDAVCredentials that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {WebDAVCredentialsFindUniqueOrThrowArgs} args - Arguments to find a WebDAVCredentials + * @example + * // Get one WebDAVCredentials + * const webDAVCredentials = await prisma.webDAVCredentials.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__WebDAVCredentialsClient<$Result.GetResult, T, "findUniqueOrThrow", ClientOptions>, never, ExtArgs, ClientOptions> + + /** + * Find the first WebDAVCredentials that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WebDAVCredentialsFindFirstArgs} args - Arguments to find a WebDAVCredentials + * @example + * // Get one WebDAVCredentials + * const webDAVCredentials = await prisma.webDAVCredentials.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__WebDAVCredentialsClient<$Result.GetResult, T, "findFirst", ClientOptions> | null, null, ExtArgs, ClientOptions> + + /** + * Find the first WebDAVCredentials that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WebDAVCredentialsFindFirstOrThrowArgs} args - Arguments to find a WebDAVCredentials + * @example + * // Get one WebDAVCredentials + * const webDAVCredentials = await prisma.webDAVCredentials.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__WebDAVCredentialsClient<$Result.GetResult, T, "findFirstOrThrow", ClientOptions>, never, ExtArgs, ClientOptions> + + /** + * Find zero or more WebDAVCredentials that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WebDAVCredentialsFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all WebDAVCredentials + * const webDAVCredentials = await prisma.webDAVCredentials.findMany() + * + * // Get first 10 WebDAVCredentials + * const webDAVCredentials = await prisma.webDAVCredentials.findMany({ take: 10 }) + * + * // Only select the `id` + * const webDAVCredentialsWithIdOnly = await prisma.webDAVCredentials.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", ClientOptions>> + + /** + * Create a WebDAVCredentials. + * @param {WebDAVCredentialsCreateArgs} args - Arguments to create a WebDAVCredentials. + * @example + * // Create one WebDAVCredentials + * const WebDAVCredentials = await prisma.webDAVCredentials.create({ + * data: { + * // ... data to create a WebDAVCredentials + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__WebDAVCredentialsClient<$Result.GetResult, T, "create", ClientOptions>, never, ExtArgs, ClientOptions> + + /** + * Create many WebDAVCredentials. + * @param {WebDAVCredentialsCreateManyArgs} args - Arguments to create many WebDAVCredentials. + * @example + * // Create many WebDAVCredentials + * const webDAVCredentials = await prisma.webDAVCredentials.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many WebDAVCredentials and returns the data saved in the database. + * @param {WebDAVCredentialsCreateManyAndReturnArgs} args - Arguments to create many WebDAVCredentials. + * @example + * // Create many WebDAVCredentials + * const webDAVCredentials = await prisma.webDAVCredentials.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many WebDAVCredentials and only return the `id` + * const webDAVCredentialsWithIdOnly = await prisma.webDAVCredentials.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", ClientOptions>> + + /** + * Delete a WebDAVCredentials. + * @param {WebDAVCredentialsDeleteArgs} args - Arguments to delete one WebDAVCredentials. + * @example + * // Delete one WebDAVCredentials + * const WebDAVCredentials = await prisma.webDAVCredentials.delete({ + * where: { + * // ... filter to delete one WebDAVCredentials + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__WebDAVCredentialsClient<$Result.GetResult, T, "delete", ClientOptions>, never, ExtArgs, ClientOptions> + + /** + * Update one WebDAVCredentials. + * @param {WebDAVCredentialsUpdateArgs} args - Arguments to update one WebDAVCredentials. + * @example + * // Update one WebDAVCredentials + * const webDAVCredentials = await prisma.webDAVCredentials.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__WebDAVCredentialsClient<$Result.GetResult, T, "update", ClientOptions>, never, ExtArgs, ClientOptions> + + /** + * Delete zero or more WebDAVCredentials. + * @param {WebDAVCredentialsDeleteManyArgs} args - Arguments to filter WebDAVCredentials to delete. + * @example + * // Delete a few WebDAVCredentials + * const { count } = await prisma.webDAVCredentials.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more WebDAVCredentials. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WebDAVCredentialsUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many WebDAVCredentials + * const webDAVCredentials = await prisma.webDAVCredentials.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more WebDAVCredentials and returns the data updated in the database. + * @param {WebDAVCredentialsUpdateManyAndReturnArgs} args - Arguments to update many WebDAVCredentials. + * @example + * // Update many WebDAVCredentials + * const webDAVCredentials = await prisma.webDAVCredentials.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more WebDAVCredentials and only return the `id` + * const webDAVCredentialsWithIdOnly = await prisma.webDAVCredentials.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", ClientOptions>> + + /** + * Create or update one WebDAVCredentials. + * @param {WebDAVCredentialsUpsertArgs} args - Arguments to update or create a WebDAVCredentials. + * @example + * // Update or create a WebDAVCredentials + * const webDAVCredentials = await prisma.webDAVCredentials.upsert({ + * create: { + * // ... data to create a WebDAVCredentials + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the WebDAVCredentials we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__WebDAVCredentialsClient<$Result.GetResult, T, "upsert", ClientOptions>, never, ExtArgs, ClientOptions> + + + /** + * Count the number of WebDAVCredentials. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WebDAVCredentialsCountArgs} args - Arguments to filter WebDAVCredentials to count. + * @example + * // Count the number of WebDAVCredentials + * const count = await prisma.webDAVCredentials.count({ + * where: { + * // ... the filter for the WebDAVCredentials we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a WebDAVCredentials. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WebDAVCredentialsAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by WebDAVCredentials. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WebDAVCredentialsGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends WebDAVCredentialsGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: WebDAVCredentialsGroupByArgs['orderBy'] } + : { orderBy?: WebDAVCredentialsGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetWebDAVCredentialsGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the WebDAVCredentials model + */ + readonly fields: WebDAVCredentialsFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for WebDAVCredentials. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__WebDAVCredentialsClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", ClientOptions> | Null, Null, ExtArgs, ClientOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the WebDAVCredentials model + */ + interface WebDAVCredentialsFieldRefs { + readonly id: FieldRef<"WebDAVCredentials", 'String'> + readonly userId: FieldRef<"WebDAVCredentials", 'String'> + readonly username: FieldRef<"WebDAVCredentials", 'String'> + readonly password: FieldRef<"WebDAVCredentials", 'String'> + readonly createdAt: FieldRef<"WebDAVCredentials", 'DateTime'> + readonly updatedAt: FieldRef<"WebDAVCredentials", 'DateTime'> + } + + + // Custom InputTypes + /** + * WebDAVCredentials findUnique + */ + export type WebDAVCredentialsFindUniqueArgs = { + /** + * Select specific fields to fetch from the WebDAVCredentials + */ + select?: WebDAVCredentialsSelect | null + /** + * Omit specific fields from the WebDAVCredentials + */ + omit?: WebDAVCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WebDAVCredentialsInclude | null + /** + * Filter, which WebDAVCredentials to fetch. + */ + where: WebDAVCredentialsWhereUniqueInput + } + + /** + * WebDAVCredentials findUniqueOrThrow + */ + export type WebDAVCredentialsFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the WebDAVCredentials + */ + select?: WebDAVCredentialsSelect | null + /** + * Omit specific fields from the WebDAVCredentials + */ + omit?: WebDAVCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WebDAVCredentialsInclude | null + /** + * Filter, which WebDAVCredentials to fetch. + */ + where: WebDAVCredentialsWhereUniqueInput + } + + /** + * WebDAVCredentials findFirst + */ + export type WebDAVCredentialsFindFirstArgs = { + /** + * Select specific fields to fetch from the WebDAVCredentials + */ + select?: WebDAVCredentialsSelect | null + /** + * Omit specific fields from the WebDAVCredentials + */ + omit?: WebDAVCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WebDAVCredentialsInclude | null + /** + * Filter, which WebDAVCredentials to fetch. + */ + where?: WebDAVCredentialsWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of WebDAVCredentials to fetch. + */ + orderBy?: WebDAVCredentialsOrderByWithRelationInput | WebDAVCredentialsOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for WebDAVCredentials. + */ + cursor?: WebDAVCredentialsWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` WebDAVCredentials from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` WebDAVCredentials. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of WebDAVCredentials. + */ + distinct?: WebDAVCredentialsScalarFieldEnum | WebDAVCredentialsScalarFieldEnum[] + } + + /** + * WebDAVCredentials findFirstOrThrow + */ + export type WebDAVCredentialsFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the WebDAVCredentials + */ + select?: WebDAVCredentialsSelect | null + /** + * Omit specific fields from the WebDAVCredentials + */ + omit?: WebDAVCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WebDAVCredentialsInclude | null + /** + * Filter, which WebDAVCredentials to fetch. + */ + where?: WebDAVCredentialsWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of WebDAVCredentials to fetch. + */ + orderBy?: WebDAVCredentialsOrderByWithRelationInput | WebDAVCredentialsOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for WebDAVCredentials. + */ + cursor?: WebDAVCredentialsWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` WebDAVCredentials from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` WebDAVCredentials. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of WebDAVCredentials. + */ + distinct?: WebDAVCredentialsScalarFieldEnum | WebDAVCredentialsScalarFieldEnum[] + } + + /** + * WebDAVCredentials findMany + */ + export type WebDAVCredentialsFindManyArgs = { + /** + * Select specific fields to fetch from the WebDAVCredentials + */ + select?: WebDAVCredentialsSelect | null + /** + * Omit specific fields from the WebDAVCredentials + */ + omit?: WebDAVCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WebDAVCredentialsInclude | null + /** + * Filter, which WebDAVCredentials to fetch. + */ + where?: WebDAVCredentialsWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of WebDAVCredentials to fetch. + */ + orderBy?: WebDAVCredentialsOrderByWithRelationInput | WebDAVCredentialsOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing WebDAVCredentials. + */ + cursor?: WebDAVCredentialsWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` WebDAVCredentials from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` WebDAVCredentials. + */ + skip?: number + distinct?: WebDAVCredentialsScalarFieldEnum | WebDAVCredentialsScalarFieldEnum[] + } + + /** + * WebDAVCredentials create + */ + export type WebDAVCredentialsCreateArgs = { + /** + * Select specific fields to fetch from the WebDAVCredentials + */ + select?: WebDAVCredentialsSelect | null + /** + * Omit specific fields from the WebDAVCredentials + */ + omit?: WebDAVCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WebDAVCredentialsInclude | null + /** + * The data needed to create a WebDAVCredentials. + */ + data: XOR + } + + /** + * WebDAVCredentials createMany + */ + export type WebDAVCredentialsCreateManyArgs = { + /** + * The data used to create many WebDAVCredentials. + */ + data: WebDAVCredentialsCreateManyInput | WebDAVCredentialsCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * WebDAVCredentials createManyAndReturn + */ + export type WebDAVCredentialsCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the WebDAVCredentials + */ + select?: WebDAVCredentialsSelectCreateManyAndReturn | null + /** + * Omit specific fields from the WebDAVCredentials + */ + omit?: WebDAVCredentialsOmit | null + /** + * The data used to create many WebDAVCredentials. + */ + data: WebDAVCredentialsCreateManyInput | WebDAVCredentialsCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: WebDAVCredentialsIncludeCreateManyAndReturn | null + } + + /** + * WebDAVCredentials update + */ + export type WebDAVCredentialsUpdateArgs = { + /** + * Select specific fields to fetch from the WebDAVCredentials + */ + select?: WebDAVCredentialsSelect | null + /** + * Omit specific fields from the WebDAVCredentials + */ + omit?: WebDAVCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WebDAVCredentialsInclude | null + /** + * The data needed to update a WebDAVCredentials. + */ + data: XOR + /** + * Choose, which WebDAVCredentials to update. + */ + where: WebDAVCredentialsWhereUniqueInput + } + + /** + * WebDAVCredentials updateMany + */ + export type WebDAVCredentialsUpdateManyArgs = { + /** + * The data used to update WebDAVCredentials. + */ + data: XOR + /** + * Filter which WebDAVCredentials to update + */ + where?: WebDAVCredentialsWhereInput + /** + * Limit how many WebDAVCredentials to update. + */ + limit?: number + } + + /** + * WebDAVCredentials updateManyAndReturn + */ + export type WebDAVCredentialsUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the WebDAVCredentials + */ + select?: WebDAVCredentialsSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the WebDAVCredentials + */ + omit?: WebDAVCredentialsOmit | null + /** + * The data used to update WebDAVCredentials. + */ + data: XOR + /** + * Filter which WebDAVCredentials to update + */ + where?: WebDAVCredentialsWhereInput + /** + * Limit how many WebDAVCredentials to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: WebDAVCredentialsIncludeUpdateManyAndReturn | null + } + + /** + * WebDAVCredentials upsert + */ + export type WebDAVCredentialsUpsertArgs = { + /** + * Select specific fields to fetch from the WebDAVCredentials + */ + select?: WebDAVCredentialsSelect | null + /** + * Omit specific fields from the WebDAVCredentials + */ + omit?: WebDAVCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WebDAVCredentialsInclude | null + /** + * The filter to search for the WebDAVCredentials to update in case it exists. + */ + where: WebDAVCredentialsWhereUniqueInput + /** + * In case the WebDAVCredentials found by the `where` argument doesn't exist, create a new WebDAVCredentials with this data. + */ + create: XOR + /** + * In case the WebDAVCredentials was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * WebDAVCredentials delete + */ + export type WebDAVCredentialsDeleteArgs = { + /** + * Select specific fields to fetch from the WebDAVCredentials + */ + select?: WebDAVCredentialsSelect | null + /** + * Omit specific fields from the WebDAVCredentials + */ + omit?: WebDAVCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WebDAVCredentialsInclude | null + /** + * Filter which WebDAVCredentials to delete. + */ + where: WebDAVCredentialsWhereUniqueInput + } + + /** + * WebDAVCredentials deleteMany + */ + export type WebDAVCredentialsDeleteManyArgs = { + /** + * Filter which WebDAVCredentials to delete + */ + where?: WebDAVCredentialsWhereInput + /** + * Limit how many WebDAVCredentials to delete. + */ + limit?: number + } + + /** + * WebDAVCredentials without action + */ + export type WebDAVCredentialsDefaultArgs = { + /** + * Select specific fields to fetch from the WebDAVCredentials + */ + select?: WebDAVCredentialsSelect | null + /** + * Omit specific fields from the WebDAVCredentials + */ + omit?: WebDAVCredentialsOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WebDAVCredentialsInclude | null + } + + /** * Enums */ @@ -4529,6 +6959,32 @@ export namespace Prisma { export type EventScalarFieldEnum = (typeof EventScalarFieldEnum)[keyof typeof EventScalarFieldEnum] + export const MailCredentialsScalarFieldEnum: { + id: 'id', + userId: 'userId', + email: 'email', + password: 'password', + host: 'host', + port: 'port', + createdAt: 'createdAt', + updatedAt: 'updatedAt' + }; + + export type MailCredentialsScalarFieldEnum = (typeof MailCredentialsScalarFieldEnum)[keyof typeof MailCredentialsScalarFieldEnum] + + + export const WebDAVCredentialsScalarFieldEnum: { + id: 'id', + userId: 'userId', + username: 'username', + password: 'password', + createdAt: 'createdAt', + updatedAt: 'updatedAt' + }; + + export type WebDAVCredentialsScalarFieldEnum = (typeof WebDAVCredentialsScalarFieldEnum)[keyof typeof WebDAVCredentialsScalarFieldEnum] + + export const SortOrder: { asc: 'asc', desc: 'desc' @@ -4605,6 +7061,20 @@ export namespace Prisma { */ export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'> + + + /** + * Reference to a field of type 'Float' + */ + export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> + + + + /** + * Reference to a field of type 'Float[]' + */ + export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'> + /** * Deep Input Types */ @@ -4621,6 +7091,8 @@ export namespace Prisma { updatedAt?: DateTimeFilter<"User"> | Date | string calendars?: CalendarListRelationFilter events?: EventListRelationFilter + mailCredentials?: XOR | null + webdavCredentials?: XOR | null } export type UserOrderByWithRelationInput = { @@ -4631,6 +7103,8 @@ export namespace Prisma { updatedAt?: SortOrder calendars?: CalendarOrderByRelationAggregateInput events?: EventOrderByRelationAggregateInput + mailCredentials?: MailCredentialsOrderByWithRelationInput + webdavCredentials?: WebDAVCredentialsOrderByWithRelationInput } export type UserWhereUniqueInput = Prisma.AtLeast<{ @@ -4644,6 +7118,8 @@ export namespace Prisma { updatedAt?: DateTimeFilter<"User"> | Date | string calendars?: CalendarListRelationFilter events?: EventListRelationFilter + mailCredentials?: XOR | null + webdavCredentials?: XOR | null }, "id" | "email"> export type UserOrderByWithAggregationInput = { @@ -4824,6 +7300,138 @@ export namespace Prisma { updatedAt?: DateTimeWithAggregatesFilter<"Event"> | Date | string } + export type MailCredentialsWhereInput = { + AND?: MailCredentialsWhereInput | MailCredentialsWhereInput[] + OR?: MailCredentialsWhereInput[] + NOT?: MailCredentialsWhereInput | MailCredentialsWhereInput[] + id?: StringFilter<"MailCredentials"> | string + userId?: StringFilter<"MailCredentials"> | string + email?: StringFilter<"MailCredentials"> | string + password?: StringFilter<"MailCredentials"> | string + host?: StringFilter<"MailCredentials"> | string + port?: IntFilter<"MailCredentials"> | number + createdAt?: DateTimeFilter<"MailCredentials"> | Date | string + updatedAt?: DateTimeFilter<"MailCredentials"> | Date | string + user?: XOR + } + + export type MailCredentialsOrderByWithRelationInput = { + id?: SortOrder + userId?: SortOrder + email?: SortOrder + password?: SortOrder + host?: SortOrder + port?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + user?: UserOrderByWithRelationInput + } + + export type MailCredentialsWhereUniqueInput = Prisma.AtLeast<{ + id?: string + userId?: string + AND?: MailCredentialsWhereInput | MailCredentialsWhereInput[] + OR?: MailCredentialsWhereInput[] + NOT?: MailCredentialsWhereInput | MailCredentialsWhereInput[] + email?: StringFilter<"MailCredentials"> | string + password?: StringFilter<"MailCredentials"> | string + host?: StringFilter<"MailCredentials"> | string + port?: IntFilter<"MailCredentials"> | number + createdAt?: DateTimeFilter<"MailCredentials"> | Date | string + updatedAt?: DateTimeFilter<"MailCredentials"> | Date | string + user?: XOR + }, "id" | "userId"> + + export type MailCredentialsOrderByWithAggregationInput = { + id?: SortOrder + userId?: SortOrder + email?: SortOrder + password?: SortOrder + host?: SortOrder + port?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + _count?: MailCredentialsCountOrderByAggregateInput + _avg?: MailCredentialsAvgOrderByAggregateInput + _max?: MailCredentialsMaxOrderByAggregateInput + _min?: MailCredentialsMinOrderByAggregateInput + _sum?: MailCredentialsSumOrderByAggregateInput + } + + export type MailCredentialsScalarWhereWithAggregatesInput = { + AND?: MailCredentialsScalarWhereWithAggregatesInput | MailCredentialsScalarWhereWithAggregatesInput[] + OR?: MailCredentialsScalarWhereWithAggregatesInput[] + NOT?: MailCredentialsScalarWhereWithAggregatesInput | MailCredentialsScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"MailCredentials"> | string + userId?: StringWithAggregatesFilter<"MailCredentials"> | string + email?: StringWithAggregatesFilter<"MailCredentials"> | string + password?: StringWithAggregatesFilter<"MailCredentials"> | string + host?: StringWithAggregatesFilter<"MailCredentials"> | string + port?: IntWithAggregatesFilter<"MailCredentials"> | number + createdAt?: DateTimeWithAggregatesFilter<"MailCredentials"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"MailCredentials"> | Date | string + } + + export type WebDAVCredentialsWhereInput = { + AND?: WebDAVCredentialsWhereInput | WebDAVCredentialsWhereInput[] + OR?: WebDAVCredentialsWhereInput[] + NOT?: WebDAVCredentialsWhereInput | WebDAVCredentialsWhereInput[] + id?: StringFilter<"WebDAVCredentials"> | string + userId?: StringFilter<"WebDAVCredentials"> | string + username?: StringFilter<"WebDAVCredentials"> | string + password?: StringFilter<"WebDAVCredentials"> | string + createdAt?: DateTimeFilter<"WebDAVCredentials"> | Date | string + updatedAt?: DateTimeFilter<"WebDAVCredentials"> | Date | string + user?: XOR + } + + export type WebDAVCredentialsOrderByWithRelationInput = { + id?: SortOrder + userId?: SortOrder + username?: SortOrder + password?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + user?: UserOrderByWithRelationInput + } + + export type WebDAVCredentialsWhereUniqueInput = Prisma.AtLeast<{ + id?: string + userId?: string + AND?: WebDAVCredentialsWhereInput | WebDAVCredentialsWhereInput[] + OR?: WebDAVCredentialsWhereInput[] + NOT?: WebDAVCredentialsWhereInput | WebDAVCredentialsWhereInput[] + username?: StringFilter<"WebDAVCredentials"> | string + password?: StringFilter<"WebDAVCredentials"> | string + createdAt?: DateTimeFilter<"WebDAVCredentials"> | Date | string + updatedAt?: DateTimeFilter<"WebDAVCredentials"> | Date | string + user?: XOR + }, "id" | "userId"> + + export type WebDAVCredentialsOrderByWithAggregationInput = { + id?: SortOrder + userId?: SortOrder + username?: SortOrder + password?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + _count?: WebDAVCredentialsCountOrderByAggregateInput + _max?: WebDAVCredentialsMaxOrderByAggregateInput + _min?: WebDAVCredentialsMinOrderByAggregateInput + } + + export type WebDAVCredentialsScalarWhereWithAggregatesInput = { + AND?: WebDAVCredentialsScalarWhereWithAggregatesInput | WebDAVCredentialsScalarWhereWithAggregatesInput[] + OR?: WebDAVCredentialsScalarWhereWithAggregatesInput[] + NOT?: WebDAVCredentialsScalarWhereWithAggregatesInput | WebDAVCredentialsScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"WebDAVCredentials"> | string + userId?: StringWithAggregatesFilter<"WebDAVCredentials"> | string + username?: StringWithAggregatesFilter<"WebDAVCredentials"> | string + password?: StringWithAggregatesFilter<"WebDAVCredentials"> | string + createdAt?: DateTimeWithAggregatesFilter<"WebDAVCredentials"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"WebDAVCredentials"> | Date | string + } + export type UserCreateInput = { id?: string email: string @@ -4832,6 +7440,8 @@ export namespace Prisma { updatedAt?: Date | string calendars?: CalendarCreateNestedManyWithoutUserInput events?: EventCreateNestedManyWithoutUserInput + mailCredentials?: MailCredentialsCreateNestedOneWithoutUserInput + webdavCredentials?: WebDAVCredentialsCreateNestedOneWithoutUserInput } export type UserUncheckedCreateInput = { @@ -4842,6 +7452,8 @@ export namespace Prisma { updatedAt?: Date | string calendars?: CalendarUncheckedCreateNestedManyWithoutUserInput events?: EventUncheckedCreateNestedManyWithoutUserInput + mailCredentials?: MailCredentialsUncheckedCreateNestedOneWithoutUserInput + webdavCredentials?: WebDAVCredentialsUncheckedCreateNestedOneWithoutUserInput } export type UserUpdateInput = { @@ -4852,6 +7464,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string calendars?: CalendarUpdateManyWithoutUserNestedInput events?: EventUpdateManyWithoutUserNestedInput + mailCredentials?: MailCredentialsUpdateOneWithoutUserNestedInput + webdavCredentials?: WebDAVCredentialsUpdateOneWithoutUserNestedInput } export type UserUncheckedUpdateInput = { @@ -4862,6 +7476,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string calendars?: CalendarUncheckedUpdateManyWithoutUserNestedInput events?: EventUncheckedUpdateManyWithoutUserNestedInput + mailCredentials?: MailCredentialsUncheckedUpdateOneWithoutUserNestedInput + webdavCredentials?: WebDAVCredentialsUncheckedUpdateOneWithoutUserNestedInput } export type UserCreateManyInput = { @@ -5057,6 +7673,144 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } + export type MailCredentialsCreateInput = { + id?: string + email: string + password: string + host: string + port: number + createdAt?: Date | string + updatedAt?: Date | string + user: UserCreateNestedOneWithoutMailCredentialsInput + } + + export type MailCredentialsUncheckedCreateInput = { + id?: string + userId: string + email: string + password: string + host: string + port: number + createdAt?: Date | string + updatedAt?: Date | string + } + + export type MailCredentialsUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + password?: StringFieldUpdateOperationsInput | string + host?: StringFieldUpdateOperationsInput | string + port?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutMailCredentialsNestedInput + } + + export type MailCredentialsUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + password?: StringFieldUpdateOperationsInput | string + host?: StringFieldUpdateOperationsInput | string + port?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MailCredentialsCreateManyInput = { + id?: string + userId: string + email: string + password: string + host: string + port: number + createdAt?: Date | string + updatedAt?: Date | string + } + + export type MailCredentialsUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + password?: StringFieldUpdateOperationsInput | string + host?: StringFieldUpdateOperationsInput | string + port?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MailCredentialsUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + password?: StringFieldUpdateOperationsInput | string + host?: StringFieldUpdateOperationsInput | string + port?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type WebDAVCredentialsCreateInput = { + id?: string + username: string + password: string + createdAt?: Date | string + updatedAt?: Date | string + user: UserCreateNestedOneWithoutWebdavCredentialsInput + } + + export type WebDAVCredentialsUncheckedCreateInput = { + id?: string + userId: string + username: string + password: string + createdAt?: Date | string + updatedAt?: Date | string + } + + export type WebDAVCredentialsUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + username?: StringFieldUpdateOperationsInput | string + password?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutWebdavCredentialsNestedInput + } + + export type WebDAVCredentialsUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + username?: StringFieldUpdateOperationsInput | string + password?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type WebDAVCredentialsCreateManyInput = { + id?: string + userId: string + username: string + password: string + createdAt?: Date | string + updatedAt?: Date | string + } + + export type WebDAVCredentialsUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + username?: StringFieldUpdateOperationsInput | string + password?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type WebDAVCredentialsUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + username?: StringFieldUpdateOperationsInput | string + password?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + export type StringFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> in?: string[] | ListStringFieldRefInput<$PrismaModel> @@ -5095,6 +7849,16 @@ export namespace Prisma { none?: EventWhereInput } + export type MailCredentialsNullableScalarRelationFilter = { + is?: MailCredentialsWhereInput | null + isNot?: MailCredentialsWhereInput | null + } + + export type WebDAVCredentialsNullableScalarRelationFilter = { + is?: WebDAVCredentialsWhereInput | null + isNot?: WebDAVCredentialsWhereInput | null + } + export type CalendarOrderByRelationAggregateInput = { _count?: SortOrder } @@ -5292,6 +8056,101 @@ export namespace Prisma { _max?: NestedBoolFilter<$PrismaModel> } + export type IntFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntFilter<$PrismaModel> | number + } + + export type MailCredentialsCountOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + email?: SortOrder + password?: SortOrder + host?: SortOrder + port?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type MailCredentialsAvgOrderByAggregateInput = { + port?: SortOrder + } + + export type MailCredentialsMaxOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + email?: SortOrder + password?: SortOrder + host?: SortOrder + port?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type MailCredentialsMinOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + email?: SortOrder + password?: SortOrder + host?: SortOrder + port?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type MailCredentialsSumOrderByAggregateInput = { + port?: SortOrder + } + + export type IntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedIntFilter<$PrismaModel> + _min?: NestedIntFilter<$PrismaModel> + _max?: NestedIntFilter<$PrismaModel> + } + + export type WebDAVCredentialsCountOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + username?: SortOrder + password?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type WebDAVCredentialsMaxOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + username?: SortOrder + password?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type WebDAVCredentialsMinOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + username?: SortOrder + password?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + export type CalendarCreateNestedManyWithoutUserInput = { create?: XOR | CalendarCreateWithoutUserInput[] | CalendarUncheckedCreateWithoutUserInput[] connectOrCreate?: CalendarCreateOrConnectWithoutUserInput | CalendarCreateOrConnectWithoutUserInput[] @@ -5306,6 +8165,18 @@ export namespace Prisma { connect?: EventWhereUniqueInput | EventWhereUniqueInput[] } + export type MailCredentialsCreateNestedOneWithoutUserInput = { + create?: XOR + connectOrCreate?: MailCredentialsCreateOrConnectWithoutUserInput + connect?: MailCredentialsWhereUniqueInput + } + + export type WebDAVCredentialsCreateNestedOneWithoutUserInput = { + create?: XOR + connectOrCreate?: WebDAVCredentialsCreateOrConnectWithoutUserInput + connect?: WebDAVCredentialsWhereUniqueInput + } + export type CalendarUncheckedCreateNestedManyWithoutUserInput = { create?: XOR | CalendarCreateWithoutUserInput[] | CalendarUncheckedCreateWithoutUserInput[] connectOrCreate?: CalendarCreateOrConnectWithoutUserInput | CalendarCreateOrConnectWithoutUserInput[] @@ -5320,6 +8191,18 @@ export namespace Prisma { connect?: EventWhereUniqueInput | EventWhereUniqueInput[] } + export type MailCredentialsUncheckedCreateNestedOneWithoutUserInput = { + create?: XOR + connectOrCreate?: MailCredentialsCreateOrConnectWithoutUserInput + connect?: MailCredentialsWhereUniqueInput + } + + export type WebDAVCredentialsUncheckedCreateNestedOneWithoutUserInput = { + create?: XOR + connectOrCreate?: WebDAVCredentialsCreateOrConnectWithoutUserInput + connect?: WebDAVCredentialsWhereUniqueInput + } + export type StringFieldUpdateOperationsInput = { set?: string } @@ -5356,6 +8239,26 @@ export namespace Prisma { deleteMany?: EventScalarWhereInput | EventScalarWhereInput[] } + export type MailCredentialsUpdateOneWithoutUserNestedInput = { + create?: XOR + connectOrCreate?: MailCredentialsCreateOrConnectWithoutUserInput + upsert?: MailCredentialsUpsertWithoutUserInput + disconnect?: MailCredentialsWhereInput | boolean + delete?: MailCredentialsWhereInput | boolean + connect?: MailCredentialsWhereUniqueInput + update?: XOR, MailCredentialsUncheckedUpdateWithoutUserInput> + } + + export type WebDAVCredentialsUpdateOneWithoutUserNestedInput = { + create?: XOR + connectOrCreate?: WebDAVCredentialsCreateOrConnectWithoutUserInput + upsert?: WebDAVCredentialsUpsertWithoutUserInput + disconnect?: WebDAVCredentialsWhereInput | boolean + delete?: WebDAVCredentialsWhereInput | boolean + connect?: WebDAVCredentialsWhereUniqueInput + update?: XOR, WebDAVCredentialsUncheckedUpdateWithoutUserInput> + } + export type CalendarUncheckedUpdateManyWithoutUserNestedInput = { create?: XOR | CalendarCreateWithoutUserInput[] | CalendarUncheckedCreateWithoutUserInput[] connectOrCreate?: CalendarCreateOrConnectWithoutUserInput | CalendarCreateOrConnectWithoutUserInput[] @@ -5384,6 +8287,26 @@ export namespace Prisma { deleteMany?: EventScalarWhereInput | EventScalarWhereInput[] } + export type MailCredentialsUncheckedUpdateOneWithoutUserNestedInput = { + create?: XOR + connectOrCreate?: MailCredentialsCreateOrConnectWithoutUserInput + upsert?: MailCredentialsUpsertWithoutUserInput + disconnect?: MailCredentialsWhereInput | boolean + delete?: MailCredentialsWhereInput | boolean + connect?: MailCredentialsWhereUniqueInput + update?: XOR, MailCredentialsUncheckedUpdateWithoutUserInput> + } + + export type WebDAVCredentialsUncheckedUpdateOneWithoutUserNestedInput = { + create?: XOR + connectOrCreate?: WebDAVCredentialsCreateOrConnectWithoutUserInput + upsert?: WebDAVCredentialsUpsertWithoutUserInput + disconnect?: WebDAVCredentialsWhereInput | boolean + delete?: WebDAVCredentialsWhereInput | boolean + connect?: WebDAVCredentialsWhereUniqueInput + update?: XOR, WebDAVCredentialsUncheckedUpdateWithoutUserInput> + } + export type EventCreateNestedManyWithoutCalendarInput = { create?: XOR | EventCreateWithoutCalendarInput[] | EventUncheckedCreateWithoutCalendarInput[] connectOrCreate?: EventCreateOrConnectWithoutCalendarInput | EventCreateOrConnectWithoutCalendarInput[] @@ -5476,6 +8399,42 @@ export namespace Prisma { update?: XOR, UserUncheckedUpdateWithoutEventsInput> } + export type UserCreateNestedOneWithoutMailCredentialsInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutMailCredentialsInput + connect?: UserWhereUniqueInput + } + + export type IntFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number + } + + export type UserUpdateOneRequiredWithoutMailCredentialsNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutMailCredentialsInput + upsert?: UserUpsertWithoutMailCredentialsInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutMailCredentialsInput> + } + + export type UserCreateNestedOneWithoutWebdavCredentialsInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutWebdavCredentialsInput + connect?: UserWhereUniqueInput + } + + export type UserUpdateOneRequiredWithoutWebdavCredentialsNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutWebdavCredentialsInput + upsert?: UserUpsertWithoutWebdavCredentialsInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutWebdavCredentialsInput> + } + export type NestedStringFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> in?: string[] | ListStringFieldRefInput<$PrismaModel> @@ -5598,6 +8557,33 @@ export namespace Prisma { _max?: NestedBoolFilter<$PrismaModel> } + export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedIntFilter<$PrismaModel> + _min?: NestedIntFilter<$PrismaModel> + _max?: NestedIntFilter<$PrismaModel> + } + + export type NestedFloatFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> + in?: number[] | ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatFilter<$PrismaModel> | number + } + export type CalendarCreateWithoutUserInput = { id?: string name: string @@ -5664,6 +8650,52 @@ export namespace Prisma { skipDuplicates?: boolean } + export type MailCredentialsCreateWithoutUserInput = { + id?: string + email: string + password: string + host: string + port: number + createdAt?: Date | string + updatedAt?: Date | string + } + + export type MailCredentialsUncheckedCreateWithoutUserInput = { + id?: string + email: string + password: string + host: string + port: number + createdAt?: Date | string + updatedAt?: Date | string + } + + export type MailCredentialsCreateOrConnectWithoutUserInput = { + where: MailCredentialsWhereUniqueInput + create: XOR + } + + export type WebDAVCredentialsCreateWithoutUserInput = { + id?: string + username: string + password: string + createdAt?: Date | string + updatedAt?: Date | string + } + + export type WebDAVCredentialsUncheckedCreateWithoutUserInput = { + id?: string + username: string + password: string + createdAt?: Date | string + updatedAt?: Date | string + } + + export type WebDAVCredentialsCreateOrConnectWithoutUserInput = { + where: WebDAVCredentialsWhereUniqueInput + create: XOR + } + export type CalendarUpsertWithWhereUniqueWithoutUserInput = { where: CalendarWhereUniqueInput update: XOR @@ -5726,6 +8758,64 @@ export namespace Prisma { updatedAt?: DateTimeFilter<"Event"> | Date | string } + export type MailCredentialsUpsertWithoutUserInput = { + update: XOR + create: XOR + where?: MailCredentialsWhereInput + } + + export type MailCredentialsUpdateToOneWithWhereWithoutUserInput = { + where?: MailCredentialsWhereInput + data: XOR + } + + export type MailCredentialsUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + password?: StringFieldUpdateOperationsInput | string + host?: StringFieldUpdateOperationsInput | string + port?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MailCredentialsUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + password?: StringFieldUpdateOperationsInput | string + host?: StringFieldUpdateOperationsInput | string + port?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type WebDAVCredentialsUpsertWithoutUserInput = { + update: XOR + create: XOR + where?: WebDAVCredentialsWhereInput + } + + export type WebDAVCredentialsUpdateToOneWithWhereWithoutUserInput = { + where?: WebDAVCredentialsWhereInput + data: XOR + } + + export type WebDAVCredentialsUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + username?: StringFieldUpdateOperationsInput | string + password?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type WebDAVCredentialsUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + username?: StringFieldUpdateOperationsInput | string + password?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + export type EventCreateWithoutCalendarInput = { id?: string title: string @@ -5769,6 +8859,8 @@ export namespace Prisma { createdAt?: Date | string updatedAt?: Date | string events?: EventCreateNestedManyWithoutUserInput + mailCredentials?: MailCredentialsCreateNestedOneWithoutUserInput + webdavCredentials?: WebDAVCredentialsCreateNestedOneWithoutUserInput } export type UserUncheckedCreateWithoutCalendarsInput = { @@ -5778,6 +8870,8 @@ export namespace Prisma { createdAt?: Date | string updatedAt?: Date | string events?: EventUncheckedCreateNestedManyWithoutUserInput + mailCredentials?: MailCredentialsUncheckedCreateNestedOneWithoutUserInput + webdavCredentials?: WebDAVCredentialsUncheckedCreateNestedOneWithoutUserInput } export type UserCreateOrConnectWithoutCalendarsInput = { @@ -5819,6 +8913,8 @@ export namespace Prisma { createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string events?: EventUpdateManyWithoutUserNestedInput + mailCredentials?: MailCredentialsUpdateOneWithoutUserNestedInput + webdavCredentials?: WebDAVCredentialsUpdateOneWithoutUserNestedInput } export type UserUncheckedUpdateWithoutCalendarsInput = { @@ -5828,6 +8924,8 @@ export namespace Prisma { createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string events?: EventUncheckedUpdateManyWithoutUserNestedInput + mailCredentials?: MailCredentialsUncheckedUpdateOneWithoutUserNestedInput + webdavCredentials?: WebDAVCredentialsUncheckedUpdateOneWithoutUserNestedInput } export type CalendarCreateWithoutEventsInput = { @@ -5862,6 +8960,8 @@ export namespace Prisma { createdAt?: Date | string updatedAt?: Date | string calendars?: CalendarCreateNestedManyWithoutUserInput + mailCredentials?: MailCredentialsCreateNestedOneWithoutUserInput + webdavCredentials?: WebDAVCredentialsCreateNestedOneWithoutUserInput } export type UserUncheckedCreateWithoutEventsInput = { @@ -5871,6 +8971,8 @@ export namespace Prisma { createdAt?: Date | string updatedAt?: Date | string calendars?: CalendarUncheckedCreateNestedManyWithoutUserInput + mailCredentials?: MailCredentialsUncheckedCreateNestedOneWithoutUserInput + webdavCredentials?: WebDAVCredentialsUncheckedCreateNestedOneWithoutUserInput } export type UserCreateOrConnectWithoutEventsInput = { @@ -5927,6 +9029,8 @@ export namespace Prisma { createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string calendars?: CalendarUpdateManyWithoutUserNestedInput + mailCredentials?: MailCredentialsUpdateOneWithoutUserNestedInput + webdavCredentials?: WebDAVCredentialsUpdateOneWithoutUserNestedInput } export type UserUncheckedUpdateWithoutEventsInput = { @@ -5936,6 +9040,128 @@ export namespace Prisma { createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string calendars?: CalendarUncheckedUpdateManyWithoutUserNestedInput + mailCredentials?: MailCredentialsUncheckedUpdateOneWithoutUserNestedInput + webdavCredentials?: WebDAVCredentialsUncheckedUpdateOneWithoutUserNestedInput + } + + export type UserCreateWithoutMailCredentialsInput = { + id?: string + email: string + password: string + createdAt?: Date | string + updatedAt?: Date | string + calendars?: CalendarCreateNestedManyWithoutUserInput + events?: EventCreateNestedManyWithoutUserInput + webdavCredentials?: WebDAVCredentialsCreateNestedOneWithoutUserInput + } + + export type UserUncheckedCreateWithoutMailCredentialsInput = { + id?: string + email: string + password: string + createdAt?: Date | string + updatedAt?: Date | string + calendars?: CalendarUncheckedCreateNestedManyWithoutUserInput + events?: EventUncheckedCreateNestedManyWithoutUserInput + webdavCredentials?: WebDAVCredentialsUncheckedCreateNestedOneWithoutUserInput + } + + export type UserCreateOrConnectWithoutMailCredentialsInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutMailCredentialsInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutMailCredentialsInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutMailCredentialsInput = { + id?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + password?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + calendars?: CalendarUpdateManyWithoutUserNestedInput + events?: EventUpdateManyWithoutUserNestedInput + webdavCredentials?: WebDAVCredentialsUpdateOneWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutMailCredentialsInput = { + id?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + password?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + calendars?: CalendarUncheckedUpdateManyWithoutUserNestedInput + events?: EventUncheckedUpdateManyWithoutUserNestedInput + webdavCredentials?: WebDAVCredentialsUncheckedUpdateOneWithoutUserNestedInput + } + + export type UserCreateWithoutWebdavCredentialsInput = { + id?: string + email: string + password: string + createdAt?: Date | string + updatedAt?: Date | string + calendars?: CalendarCreateNestedManyWithoutUserInput + events?: EventCreateNestedManyWithoutUserInput + mailCredentials?: MailCredentialsCreateNestedOneWithoutUserInput + } + + export type UserUncheckedCreateWithoutWebdavCredentialsInput = { + id?: string + email: string + password: string + createdAt?: Date | string + updatedAt?: Date | string + calendars?: CalendarUncheckedCreateNestedManyWithoutUserInput + events?: EventUncheckedCreateNestedManyWithoutUserInput + mailCredentials?: MailCredentialsUncheckedCreateNestedOneWithoutUserInput + } + + export type UserCreateOrConnectWithoutWebdavCredentialsInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutWebdavCredentialsInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutWebdavCredentialsInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutWebdavCredentialsInput = { + id?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + password?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + calendars?: CalendarUpdateManyWithoutUserNestedInput + events?: EventUpdateManyWithoutUserNestedInput + mailCredentials?: MailCredentialsUpdateOneWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutWebdavCredentialsInput = { + id?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + password?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + calendars?: CalendarUncheckedUpdateManyWithoutUserNestedInput + events?: EventUncheckedUpdateManyWithoutUserNestedInput + mailCredentials?: MailCredentialsUncheckedUpdateOneWithoutUserNestedInput } export type CalendarCreateManyUserInput = { diff --git a/node_modules/.prisma/client/index.js b/node_modules/.prisma/client/index.js index a637c553..a5e14b39 100644 --- a/node_modules/.prisma/client/index.js +++ b/node_modules/.prisma/client/index.js @@ -122,6 +122,26 @@ exports.Prisma.EventScalarFieldEnum = { updatedAt: 'updatedAt' }; +exports.Prisma.MailCredentialsScalarFieldEnum = { + id: 'id', + userId: 'userId', + email: 'email', + password: 'password', + host: 'host', + port: 'port', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.WebDAVCredentialsScalarFieldEnum = { + id: 'id', + userId: 'userId', + username: 'username', + password: 'password', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + exports.Prisma.SortOrder = { asc: 'asc', desc: 'desc' @@ -141,7 +161,9 @@ exports.Prisma.NullsOrder = { exports.Prisma.ModelName = { User: 'User', Calendar: 'Calendar', - Event: 'Event' + Event: 'Event', + MailCredentials: 'MailCredentials', + WebDAVCredentials: 'WebDAVCredentials' }; /** * Create the Client @@ -185,7 +207,7 @@ const config = { "db" ], "activeProvider": "postgresql", - "postinstall": true, + "postinstall": false, "inlineDatasources": { "db": { "url": { @@ -194,8 +216,8 @@ const config = { } } }, - "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client-js\"\n binaryTargets = [\"native\", \"linux-arm64-openssl-3.0.x\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel User {\n id String @id @default(uuid())\n email String @unique\n password String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n calendars Calendar[]\n events Event[]\n}\n\nmodel Calendar {\n id String @id @default(uuid())\n name String\n color String @default(\"#0082c9\")\n description String?\n userId String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n events Event[]\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([userId])\n}\n\nmodel Event {\n id String @id @default(uuid())\n title String\n description String?\n start DateTime\n end DateTime\n location String?\n isAllDay Boolean @default(false)\n calendar Calendar @relation(fields: [calendarId], references: [id], onDelete: Cascade)\n calendarId String\n userId String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([calendarId])\n @@index([userId])\n}\n", - "inlineSchemaHash": "2e4d283f1d28efa629562b00b7d570bd95068a2584d9ab15790c0baddf04012e", + "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client-js\"\n binaryTargets = [\"native\", \"linux-arm64-openssl-3.0.x\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel User {\n id String @id @default(uuid())\n email String @unique\n password String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n calendars Calendar[]\n events Event[]\n mailCredentials MailCredentials?\n webdavCredentials WebDAVCredentials?\n}\n\nmodel Calendar {\n id String @id @default(uuid())\n name String\n color String @default(\"#0082c9\")\n description String?\n userId String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n events Event[]\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([userId])\n}\n\nmodel Event {\n id String @id @default(uuid())\n title String\n description String?\n start DateTime\n end DateTime\n location String?\n isAllDay Boolean @default(false)\n calendar Calendar @relation(fields: [calendarId], references: [id], onDelete: Cascade)\n calendarId String\n userId String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([calendarId])\n @@index([userId])\n}\n\nmodel MailCredentials {\n id String @id @default(uuid())\n userId String @unique\n email String\n password String\n host String\n port Int\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([userId])\n}\n\nmodel WebDAVCredentials {\n id String @id @default(uuid())\n userId String @unique\n username String\n password String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([userId])\n}\n", + "inlineSchemaHash": "28d91694f43adc319aaa1fc0d358f7e34c0d869566388351a9ca1845f069afc8", "copyEngine": true } @@ -216,7 +238,7 @@ if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { config.isBundled = true } -config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"calendars\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Calendar\",\"nativeType\":null,\"relationName\":\"CalendarToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"events\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Event\",\"nativeType\":null,\"relationName\":\"EventToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Calendar\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"#0082c9\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"events\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Event\",\"nativeType\":null,\"relationName\":\"CalendarToEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"CalendarToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Event\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"start\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"end\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"location\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isAllDay\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"calendar\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Calendar\",\"nativeType\":null,\"relationName\":\"CalendarToEvent\",\"relationFromFields\":[\"calendarId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"calendarId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"EventToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"calendars\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Calendar\",\"nativeType\":null,\"relationName\":\"CalendarToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"events\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Event\",\"nativeType\":null,\"relationName\":\"EventToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mailCredentials\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MailCredentials\",\"nativeType\":null,\"relationName\":\"MailCredentialsToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"webdavCredentials\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"WebDAVCredentials\",\"nativeType\":null,\"relationName\":\"UserToWebDAVCredentials\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Calendar\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"#0082c9\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"events\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Event\",\"nativeType\":null,\"relationName\":\"CalendarToEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"CalendarToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Event\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"start\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"end\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"location\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isAllDay\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"calendar\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Calendar\",\"nativeType\":null,\"relationName\":\"CalendarToEvent\",\"relationFromFields\":[\"calendarId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"calendarId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"EventToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MailCredentials\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"host\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"port\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"MailCredentialsToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"WebDAVCredentials\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"uuid\",\"args\":[4]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"username\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"UserToWebDAVCredentials\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") defineDmmfProperty(exports.Prisma, config.runtimeDataModel) config.engineWasm = undefined config.compilerWasm = undefined diff --git a/node_modules/.prisma/client/package.json b/node_modules/.prisma/client/package.json index f45f4788..6309f24a 100644 --- a/node_modules/.prisma/client/package.json +++ b/node_modules/.prisma/client/package.json @@ -1,5 +1,5 @@ { - "name": "prisma-client-067e3ae165f3d7f955e13b8f5c95a2f095181e1bc0dd7f966e97f0ca575218a3", + "name": "prisma-client-c9759cc7a8e2c5f5df4ff9bd3c0aee5a8c3b48f326a42a0aac248c95b4c1be3c", "main": "index.js", "types": "index.d.ts", "browser": "index-browser.js", diff --git a/node_modules/.prisma/client/schema.prisma b/node_modules/.prisma/client/schema.prisma index 01d74fe8..8a4b1627 100644 --- a/node_modules/.prisma/client/schema.prisma +++ b/node_modules/.prisma/client/schema.prisma @@ -12,13 +12,15 @@ datasource db { } model User { - id String @id @default(uuid()) - email String @unique - password String - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - calendars Calendar[] - events Event[] + id String @id @default(uuid()) + email String @unique + password String + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + calendars Calendar[] + events Event[] + mailCredentials MailCredentials? + webdavCredentials WebDAVCredentials? } model Calendar { @@ -53,3 +55,29 @@ model Event { @@index([calendarId]) @@index([userId]) } + +model MailCredentials { + id String @id @default(uuid()) + userId String @unique + email String + password String + host String + port Int + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + user User @relation(fields: [userId], references: [id], onDelete: Cascade) + + @@index([userId]) +} + +model WebDAVCredentials { + id String @id @default(uuid()) + userId String @unique + username String + password String + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + user User @relation(fields: [userId], references: [id], onDelete: Cascade) + + @@index([userId]) +} diff --git a/node_modules/.prisma/client/wasm.js b/node_modules/.prisma/client/wasm.js index f9392daf..54ed0e9e 100644 --- a/node_modules/.prisma/client/wasm.js +++ b/node_modules/.prisma/client/wasm.js @@ -149,6 +149,26 @@ exports.Prisma.EventScalarFieldEnum = { updatedAt: 'updatedAt' }; +exports.Prisma.MailCredentialsScalarFieldEnum = { + id: 'id', + userId: 'userId', + email: 'email', + password: 'password', + host: 'host', + port: 'port', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.WebDAVCredentialsScalarFieldEnum = { + id: 'id', + userId: 'userId', + username: 'username', + password: 'password', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + exports.Prisma.SortOrder = { asc: 'asc', desc: 'desc' @@ -168,7 +188,9 @@ exports.Prisma.NullsOrder = { exports.Prisma.ModelName = { User: 'User', Calendar: 'Calendar', - Event: 'Event' + Event: 'Event', + MailCredentials: 'MailCredentials', + WebDAVCredentials: 'WebDAVCredentials' }; /** diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 73858801..aa344c5f 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -8,7 +8,7 @@ generator client { datasource db { provider = "postgresql" - url = env("DATABASE_URL") + url = env("NEWSDB_URL") } model User { @@ -20,6 +20,7 @@ model User { calendars Calendar[] events Event[] mailCredentials MailCredentials? + webdavCredentials WebDAVCredentials? } model Calendar { @@ -66,5 +67,17 @@ model MailCredentials { updatedAt DateTime @updatedAt user User @relation(fields: [userId], references: [id], onDelete: Cascade) + @@index([userId]) +} + +model WebDAVCredentials { + id String @id @default(uuid()) + userId String @unique + username String + password String + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + user User @relation(fields: [userId], references: [id], onDelete: Cascade) + @@index([userId]) } \ No newline at end of file