diff --git a/mcp-server/auth.js b/mcp-server/auth.js index cac72cd..a60003e 100644 --- a/mcp-server/auth.js +++ b/mcp-server/auth.js @@ -96,52 +96,39 @@ export async function validateApiKey(prisma, rawKey) { const keyHash = hashKey(rawKey); - // Check cache first const cached = getCachedKey(keyHash); if (cached) { return cached; } - // Optimized: Use startsWith to leverage index, then filter by hash - // This is much faster than loading all keys - const shortIdFromKey = rawKey.substring(7, 15); // Extract potential shortId from key - - const entries = await prisma.systemConfig.findMany({ - where: { - key: { startsWith: KEY_PREFIX }, - }, - take: 100, // Limit to prevent loading too many keys - }); + const shortId = rawKey.substring(7, 15); + const configKey = `${KEY_PREFIX}${shortId}`; - for (const entry of entries) { - try { - const info = JSON.parse(entry.value); - if (info.keyHash === keyHash && info.active) { - // Update lastUsedAt (fire and forget - don't wait) - info.lastUsedAt = new Date().toISOString(); - prisma.systemConfig.update({ - where: { key: entry.key }, - data: { value: JSON.stringify(info) }, - }).catch(() => {}); // Ignore errors + const entry = await prisma.systemConfig.findUnique({ where: { key: configKey } }); + if (!entry) return null; - const result = { - apiKeyId: info.shortId, - apiKeyName: info.name, - userId: info.userId, - userName: info.userName, - }; - - // Cache the result - setCachedKey(keyHash, result); - - return result; - } - } catch { - // Invalid JSON, skip - } + try { + const info = JSON.parse(entry.value); + if (info.keyHash !== keyHash || !info.active) return null; + + info.lastUsedAt = new Date().toISOString(); + prisma.systemConfig.update({ + where: { key: configKey }, + data: { value: JSON.stringify(info) }, + }).catch(() => {}); + + const result = { + apiKeyId: info.shortId, + apiKeyName: info.name, + userId: info.userId, + userName: info.userName, + }; + + setCachedKey(keyHash, result); + return result; + } catch { + return null; } - - return null; } /** diff --git a/mcp-server/index-sse.js b/mcp-server/index-sse.js index 6c281fb..d241f31 100644 --- a/mcp-server/index-sse.js +++ b/mcp-server/index-sse.js @@ -1,30 +1,27 @@ #!/usr/bin/env node /** - * Memento MCP Server - Streamable HTTP Transport (Optimized) + * Memento MCP Server - Streamable HTTP Transport (Fast) * - * Performance improvements: * - Prisma connection pooling - * - Request timeout handling - * - Response compression - * - Connection keep-alive - * - Request batching support + * - Compact JSON output + * - Bounded session cache + * - Proper keep-alive & timeouts + * - O(1) API key validation * - * Environment variables: - * PORT - Server port (default: 3001) - * DATABASE_URL - Prisma database URL (default: ../../memento-note/prisma/dev.db) - * USER_ID - Optional user ID to filter data - * APP_BASE_URL - Optional Next.js app URL for AI features (default: http://localhost:3000) - * MCP_REQUIRE_AUTH - Set to 'true' to require x-api-key or x-user-id header - * MCP_API_KEY - Static API key for authentication (when MCP_REQUIRE_AUTH=true) - * MCP_LOG_LEVEL - Log level: debug, info, warn, error (default: info) - * MCP_REQUEST_TIMEOUT - Request timeout in ms (default: 30000) + * Environment: + * PORT Server port (default: 3001) + * DATABASE_URL Prisma database URL + * USER_ID Optional user ID filter + * APP_BASE_URL Next.js app URL (default: http://localhost:3000) + * MCP_REQUIRE_AUTH Set 'true' to require authentication + * MCP_API_KEY Static fallback API key + * MCP_LOG_LEVEL debug, info, warn, error (default: info) + * MCP_REQUEST_TIMEOUT Timeout in ms (default: 30000) */ import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js'; import { PrismaClient } from '@prisma/client'; -import { fileURLToPath } from 'url'; -import { dirname, join } from 'path'; import { randomUUID } from 'crypto'; import express from 'express'; import cors from 'cors'; @@ -32,13 +29,12 @@ import { registerTools } from './tools.js'; import { validateApiKey, resolveUser } from './auth.js'; import { requestContext } from './request-context.js'; -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); - -// Configuration const PORT = process.env.PORT || 3001; const LOG_LEVEL = process.env.MCP_LOG_LEVEL || 'info'; const REQUEST_TIMEOUT = parseInt(process.env.MCP_REQUEST_TIMEOUT, 10) || 30000; +const MAX_SESSIONS = 500; +const SESSION_TTL = 3600000; + const logLevels = { debug: 0, info: 1, warn: 2, error: 3 }; const currentLogLevel = logLevels[LOG_LEVEL] ?? 1; @@ -48,51 +44,57 @@ function log(level, ...args) { } } -const app = express(); - -// Middleware -app.use(cors()); -app.use(express.json({ limit: '10mb' })); - -// Database - requires DATABASE_URL environment variable const databaseUrl = process.env.DATABASE_URL; if (!databaseUrl) { - console.error('ERROR: DATABASE_URL environment variable is required'); + console.error('ERROR: DATABASE_URL is required'); process.exit(1); } -// OPTIMIZED: Prisma client with connection pooling +const isPostgres = databaseUrl.startsWith('postgresql://') || databaseUrl.startsWith('postgres://'); + const prisma = new PrismaClient({ - datasources: { - db: { url: databaseUrl }, - }, + datasources: { db: { url: databaseUrl } }, + ...(isPostgres ? { datasources: { db: { url: `${databaseUrl}${databaseUrl.includes('?') ? '&' : '?'}connection_limit=10&pool_timeout=10` } } } : {}), log: LOG_LEVEL === 'debug' ? ['query', 'info', 'warn', 'error'] : ['warn', 'error'], }); const appBaseUrl = process.env.APP_BASE_URL || 'http://localhost:3000'; -// ── Auth Middleware ────────────────────────────────────────────────────────── +// ── Bounded Session Cache ─────────────────────────────────────────────────── -const userSessions = {}; -const SESSION_TIMEOUT = 3600000; // 1 hour +const sessions = new Map(); -// Cleanup old sessions periodically -setInterval(() => { +function cleanupSessions() { const now = Date.now(); let cleaned = 0; - for (const [key, session] of Object.entries(userSessions)) { - if (now - new Date(session.lastSeen).getTime() > SESSION_TIMEOUT) { - delete userSessions[key]; + for (const [key, s] of sessions) { + if (now - s._lastSeen > SESSION_TTL) { + sessions.delete(key); cleaned++; } } - if (cleaned > 0) { - log('debug', `Cleaned up ${cleaned} expired sessions`); + if (cleaned > 0) log('debug', `Cleaned ${cleaned} sessions`); +} + +function pruneIfFull() { + if (sessions.size < MAX_SESSIONS) return; + const entries = [...sessions.entries()].sort((a, b) => a[1]._lastSeen - b[1]._lastSeen); + for (let i = 0; i < Math.floor(MAX_SESSIONS / 4); i++) { + sessions.delete(entries[i][0]); } -}, 600000); // Every 10 minutes +} + +setInterval(cleanupSessions, 600000); + +// ── Express ───────────────────────────────────────────────────────────────── + +const app = express(); +app.use(cors()); +app.use(express.json({ limit: '10mb' })); + +// ── Auth Middleware ────────────────────────────────────────────────────────── app.use(async (req, res, next) => { - // Dev mode: no auth required if (process.env.MCP_REQUIRE_AUTH !== 'true') { req.userSession = { id: 'dev-user', name: 'Development User', isAuth: false }; return next(); @@ -102,189 +104,128 @@ app.use(async (req, res, next) => { const headerUserId = req.headers['x-user-id']; if (!apiKey && !headerUserId) { - return res.status(401).json({ - error: 'Authentication required', - message: 'Provide x-api-key header (recommended) or x-user-id header', - }); + return res.status(401).json({ error: 'Authentication required', message: 'Provide x-api-key or x-user-id header' }); } - // ── Method 1: API Key (recommended) ────────────────────────────── if (apiKey) { const keyUser = await validateApiKey(prisma, apiKey); if (keyUser) { - const sessionKey = `key:${keyUser.apiKeyId}`; - if (userSessions[sessionKey]) { - req.userSession = userSessions[sessionKey]; - req.userSession.lastSeen = new Date().toISOString(); - } else { - req.userSession = { - id: randomUUID(), - name: `${keyUser.userName} (${keyUser.apiKeyName})`, - userId: keyUser.userId, - userName: keyUser.userName, - apiKeyId: keyUser.apiKeyId, - connectedAt: new Date().toISOString(), - lastSeen: new Date().toISOString(), - requestCount: 0, - isAuth: true, - authMethod: 'api-key', - }; - userSessions[sessionKey] = req.userSession; - } + req.userSession = getOrCreateSession(`key:${keyUser.apiKeyId}`, { + name: `${keyUser.userName} (${keyUser.apiKeyName})`, + userId: keyUser.userId, + userName: keyUser.userName, + apiKeyId: keyUser.apiKeyId, + authMethod: 'api-key', + }); return next(); } - // Fallback: static env var key if (process.env.MCP_API_KEY && apiKey === process.env.MCP_API_KEY) { - const sessionKey = `static:${apiKey.substring(0, 8)}`; - if (userSessions[sessionKey]) { - req.userSession = userSessions[sessionKey]; - req.userSession.lastSeen = new Date().toISOString(); - } else { - req.userSession = { - id: randomUUID(), - name: 'Static API Key User', - userId: process.env.USER_ID || null, - connectedAt: new Date().toISOString(), - lastSeen: new Date().toISOString(), - requestCount: 0, - isAuth: true, - authMethod: 'static-key', - }; - userSessions[sessionKey] = req.userSession; - } + req.userSession = getOrCreateSession(`static:${apiKey.substring(0, 8)}`, { + name: 'Static API Key User', + userId: process.env.USER_ID || null, + authMethod: 'static-key', + }); return next(); } return res.status(401).json({ error: 'Invalid API key' }); } - // ── Method 2: User ID header (validate against DB) ────────────── if (headerUserId) { const user = await resolveUser(prisma, headerUserId); if (!user) { - return res.status(401).json({ error: 'User not found', message: `No user matching: ${headerUserId}` }); - } - - const sessionKey = `user:${user.id}`; - if (userSessions[sessionKey]) { - req.userSession = userSessions[sessionKey]; - req.userSession.lastSeen = new Date().toISOString(); - } else { - req.userSession = { - id: randomUUID(), - name: user.name, - userId: user.id, - userName: user.name, - userEmail: user.email, - userRole: user.role, - connectedAt: new Date().toISOString(), - lastSeen: new Date().toISOString(), - requestCount: 0, - isAuth: true, - authMethod: 'user-id', - }; - userSessions[sessionKey] = req.userSession; + return res.status(401).json({ error: 'User not found' }); } + req.userSession = getOrCreateSession(`user:${user.id}`, { + name: user.name, + userId: user.id, + userName: user.name, + userEmail: user.email, + userRole: user.role, + authMethod: 'user-id', + }); return next(); } return res.status(401).json({ error: 'Authentication failed' }); }); -// ── Request Logging ───────────────────────────────────────────────────────── +function getOrCreateSession(key, base) { + const existing = sessions.get(key); + if (existing) { + existing._lastSeen = Date.now(); + existing.requestCount = (existing.requestCount || 0) + 1; + return existing; + } + pruneIfFull(); + const s = { + id: randomUUID(), + ...base, + connectedAt: new Date().toISOString(), + requestCount: 1, + isAuth: true, + _lastSeen: Date.now(), + }; + sessions.set(key, s); + return s; +} + +// ── Logging ───────────────────────────────────────────────────────────────── app.use((req, res, next) => { const start = Date.now(); - - if (req.userSession) { - req.userSession.requestCount = (req.userSession.requestCount || 0) + 1; - } - res.on('finish', () => { - const duration = Date.now() - start; - const sessionId = req.userSession?.id?.substring(0, 8) || 'anon'; - log('debug', `[${sessionId}] ${req.method} ${req.path} - ${res.statusCode} (${duration}ms)`); + const ms = Date.now() - start; + const sid = req.userSession?.id?.substring(0, 8) || 'anon'; + log('debug', `[${sid}] ${req.method} ${req.path} ${res.statusCode} ${ms}ms`); }); - next(); }); -// ── Request Timeout Middleware ────────────────────────────────────────────── +// ── Timeout ───────────────────────────────────────────────────────────────── app.use((req, res, next) => { + req.setTimeout(REQUEST_TIMEOUT); res.setTimeout(REQUEST_TIMEOUT, () => { - log('warn', `Request timeout: ${req.method} ${req.path}`); - res.status(504).json({ error: 'Gateway Timeout', message: 'Request took too long' }); + if (!res.headersSent) { + res.status(504).json({ error: 'Gateway Timeout' }); + } }); next(); }); -// ── MCP Server Setup ──────────────────────────────────────────────────────── +// ── MCP Server ────────────────────────────────────────────────────────────── const server = new Server( - { - name: 'memento-mcp-server', - version: '3.1.0', - }, - { - capabilities: { tools: {} }, - }, + { name: 'memento-mcp-server', version: '3.2.0' }, + { capabilities: { tools: {} } }, ); registerTools(server, prisma); -// ── HTTP Endpoints ────────────────────────────────────────────────────────── +// ── Routes ────────────────────────────────────────────────────────────────── -const transports = {}; - -// Health check app.get('/', (req, res) => { res.json({ name: 'Memento MCP Server', - version: '3.1.0', + version: '3.2.0', status: 'running', endpoints: { mcp: '/mcp', health: '/', sessions: '/sessions' }, - auth: { - enabled: process.env.MCP_REQUIRE_AUTH === 'true', - method: 'x-api-key or x-user-id header', - }, - tools: { - notes: 11, - notebooks: 6, - labels: 4, - reminders: 1, - total: 22, - }, - performance: { - optimizations: [ - 'Connection pooling', - 'Batch operations', - 'API key caching', - 'Request timeout handling', - 'Parallel query execution', - ], - }, + auth: { enabled: process.env.MCP_REQUIRE_AUTH === 'true' }, + tools: 22, }); }); -// Session status app.get('/sessions', (req, res) => { - const sessions = Object.values(userSessions).map((s) => ({ - id: s.id, - name: s.name, - connectedAt: s.connectedAt, - lastSeen: s.lastSeen, - requestCount: s.requestCount || 0, + const list = [...sessions.values()].map(s => ({ + id: s.id, name: s.name, connectedAt: s.connectedAt, + requestCount: s.requestCount || 0, authMethod: s.authMethod, })); - res.json({ - activeUsers: sessions.length, - sessions, - uptime: process.uptime(), - }); + res.json({ activeUsers: list.length, sessions: list, uptime: process.uptime() }); }); -// MCP endpoint - Streamable HTTP +// MCP endpoint — Streamable HTTP app.all('/mcp', async (req, res) => { const sessionId = req.headers['mcp-session-id']; let transport; @@ -295,15 +236,15 @@ app.all('/mcp', async (req, res) => { transport = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), onsessioninitialized: (id) => { - log('debug', `Session initialized: ${id}`); + log('debug', `Session init: ${id}`); transports[id] = transport; }, }); transport.onclose = () => { const sid = transport.sessionId; - if (sid && transports[sid]) { - log('debug', `Session closed: ${sid}`); + if (sid) { + log('debug', `Session close: ${sid}`); delete transports[sid]; } }; @@ -311,79 +252,45 @@ app.all('/mcp', async (req, res) => { await server.connect(transport); } - // Pass authenticated userId to tool handlers via AsyncLocalStorage const ctx = { userId: req.userSession?.userId || null }; await requestContext.run(ctx, async () => { await transport.handleRequest(req, res, req.body); }); }); -// Legacy /sse redirect for backward compat -app.all('/sse', async (req, res) => { - // Redirect to /mcp - req.url = '/mcp'; - return app._router.handle(req, res, () => { - res.status(404).json({ error: 'Not found' }); - }); +// Legacy /sse → /mcp redirect +app.all('/sse', (req, res) => { + res.redirect(307, '/mcp'); }); -// ── Start Server ──────────────────────────────────────────────────────────── +const transports = {}; + +// ── Start ──────────────────────────────────────────────────────────────────── app.listen(PORT, '0.0.0.0', () => { console.log(` -╔═══════════════════════════════════════════════════════════════╗ -║ Memento MCP Server v3.1.0 (Streamable HTTP) - Optimized ║ -╚═══════════════════════════════════════════════════════════════╝ +╔═══════════════════════════════════════════════════════╗ +║ Memento MCP Server v3.2.0 (Streamable HTTP) ║ +╚═══════════════════════════════════════════════════════╝ -Server: http://localhost:${PORT} -MCP: http://localhost:${PORT}/mcp -Health: http://localhost:${PORT}/ -Sessions: http://localhost:${PORT}/sessions - -Database: ${databaseUrl} -App URL: ${appBaseUrl} -User filter: per-request (from auth) -Auth: ${process.env.MCP_REQUIRE_AUTH === 'true' ? 'ENABLED' : 'DISABLED (dev mode)'} -Timeout: ${REQUEST_TIMEOUT}ms - -Performance Optimizations: - ✅ Connection pooling - ✅ Batch operations - ✅ API key caching (60s TTL) - ✅ Parallel query execution - ✅ Request timeout handling - ✅ Session cleanup - -Tools (22 total): - Notes (11): - create_note, get_notes, get_note, update_note, delete_note, - search_notes, move_note, toggle_pin, toggle_archive, - export_notes, import_notes - - Notebooks (6): - create_notebook, get_notebooks, get_notebook, update_notebook, - delete_notebook, reorder_notebooks - - Labels (4): - create_label, get_labels, update_label, delete_label - - Reminders (1): - get_due_reminders - -N8N config: SSE endpoint http://YOUR_IP:${PORT}/mcp -Headers: x-api-key or x-user-id + Server: http://localhost:${PORT} + MCP: http://localhost:${PORT}/mcp + Auth: ${process.env.MCP_REQUIRE_AUTH === 'true' ? 'ENABLED' : 'DISABLED (dev)'} + Timeout: ${REQUEST_TIMEOUT}ms + Database: ${isPostgres ? 'PostgreSQL' : 'SQLite'} + Tools: 22 `); }); -// Graceful shutdown -process.on('SIGINT', async () => { - log('info', '\nShutting down MCP server...'); - await prisma.$disconnect(); - process.exit(0); -}); +// ── Shutdown ───────────────────────────────────────────────────────────────── -process.on('SIGTERM', async () => { - log('info', '\nShutting down MCP server...'); +async function shutdown() { + log('info', 'Shutting down...'); await prisma.$disconnect(); process.exit(0); -}); +} + +process.on('SIGINT', shutdown); +process.on('SIGTERM', shutdown); +process.on('uncaughtException', (err) => log('error', 'Uncaught:', err.message)); +process.on('unhandledRejection', (reason) => log('error', 'Unhandled rejection:', reason)); diff --git a/mcp-server/index.js b/mcp-server/index.js index cab37b5..f970648 100644 --- a/mcp-server/index.js +++ b/mcp-server/index.js @@ -1,31 +1,19 @@ #!/usr/bin/env node /** - * Memento MCP Server - Stdio Transport (Optimized) + * Memento MCP Server - Stdio Transport * - * Performance improvements: - * - Prisma connection pooling - * - Prepared statements caching - * - Optimized JSON serialization - * - Lazy user resolution - * - * Environment variables: - * DATABASE_URL - Prisma database URL (default: ../../memento-note/prisma/dev.db) - * USER_ID - Optional user ID to filter data - * APP_BASE_URL - Optional Next.js app URL for AI features (default: http://localhost:3000) - * MCP_LOG_LEVEL - Log level: debug, info, warn, error (default: info) + * Environment: + * DATABASE_URL Prisma database URL + * USER_ID Optional user ID filter + * APP_BASE_URL Next.js app URL (default: http://localhost:3000) + * MCP_LOG_LEVEL debug, info, warn, error (default: info) */ import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import { PrismaClient } from '@prisma/client'; -import { fileURLToPath } from 'url'; -import { dirname, join } from 'path'; import { registerTools } from './tools.js'; -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); - -// Configuration const LOG_LEVEL = process.env.MCP_LOG_LEVEL || 'info'; const logLevels = { debug: 0, info: 1, warn: 2, error: 3 }; const currentLogLevel = logLevels[LOG_LEVEL] ?? 1; @@ -36,44 +24,24 @@ function log(level, ...args) { } } -// Database - requires DATABASE_URL environment variable const databaseUrl = process.env.DATABASE_URL; if (!databaseUrl) { - console.error('ERROR: DATABASE_URL environment variable is required'); + console.error('ERROR: DATABASE_URL is required'); process.exit(1); } -// OPTIMIZED: Prisma client with connection pooling and prepared statements +const isPostgres = databaseUrl.startsWith('postgresql://') || databaseUrl.startsWith('postgres://'); + const prisma = new PrismaClient({ datasources: { - db: { url: databaseUrl }, + db: { url: isPostgres ? `${databaseUrl}${databaseUrl.includes('?') ? '&' : '?'}connection_limit=10&pool_timeout=10` : databaseUrl }, }, - // SQLite optimizations log: LOG_LEVEL === 'debug' ? ['query', 'info', 'warn', 'error'] : ['warn', 'error'], }); -// Connection health check -let isConnected = false; -async function checkConnection() { - try { - await prisma.$queryRaw`SELECT 1`; - isConnected = true; - return true; - } catch (error) { - isConnected = false; - log('error', 'Database connection failed:', error.message); - return false; - } -} - const server = new Server( - { - name: 'memento-mcp-server', - version: '3.1.0', - }, - { - capabilities: { tools: {} }, - }, + { name: 'memento-mcp-server', version: '3.2.0' }, + { capabilities: { tools: {} } }, ); const appBaseUrl = process.env.APP_BASE_URL || 'http://localhost:3000'; @@ -84,21 +52,19 @@ registerTools(server, prisma, { }); async function main() { - // Verify database connection on startup - const connected = await checkConnection(); - if (!connected) { - console.error('FATAL: Could not connect to database'); + try { + await prisma.$queryRaw`SELECT 1`; + } catch (error) { + console.error('FATAL: Database connection failed:', error.message); process.exit(1); } const transport = new StdioServerTransport(); await server.connect(transport); - - log('info', `Memento MCP Server v3.1.0 (stdio) - Optimized`); - log('info', `Database: ${databaseUrl}`); - log('info', `App URL: ${appBaseUrl}`); - log('info', `User filter: ${process.env.USER_ID || 'none (all data)'}`); - log('debug', 'Performance optimizations enabled: connection pooling, batch operations, caching'); + + log('info', `Memento MCP Server v3.2.0 (stdio)`); + log('info', `Database: ${isPostgres ? 'PostgreSQL' : 'SQLite'}`); + log('info', `User filter: ${process.env.USER_ID || 'none'}`); } main().catch((error) => { @@ -106,24 +72,13 @@ main().catch((error) => { process.exit(1); }); -// Graceful shutdown -process.on('SIGINT', async () => { - log('info', 'Shutting down gracefully...'); +async function shutdown() { + log('info', 'Shutting down...'); await prisma.$disconnect(); process.exit(0); -}); +} -process.on('SIGTERM', async () => { - log('info', 'Shutting down gracefully...'); - await prisma.$disconnect(); - process.exit(0); -}); - -// Handle uncaught errors -process.on('uncaughtException', (error) => { - log('error', 'Uncaught exception:', error.message); -}); - -process.on('unhandledRejection', (reason) => { - log('error', 'Unhandled rejection:', reason); -}); +process.on('SIGINT', shutdown); +process.on('SIGTERM', shutdown); +process.on('uncaughtException', (err) => log('error', 'Uncaught:', err.message)); +process.on('unhandledRejection', (reason) => log('error', 'Unhandled:', reason)); diff --git a/mcp-server/node_modules/.package-lock.json b/mcp-server/node_modules/.package-lock.json index 8de7e69..1c3a6c2 100644 --- a/mcp-server/node_modules/.package-lock.json +++ b/mcp-server/node_modules/.package-lock.json @@ -848,20 +848,6 @@ "node": ">= 0.6" } }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", diff --git a/mcp-server/node_modules/.prisma/client/edge.js b/mcp-server/node_modules/.prisma/client/edge.js index a804e3a..13cc06d 100644 --- a/mcp-server/node_modules/.prisma/client/edge.js +++ b/mcp-server/node_modules/.prisma/client/edge.js @@ -84,40 +84,26 @@ Prisma.NullTypes = { * Enums */ exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', Serializable: 'Serializable' }); -exports.Prisma.NoteScalarFieldEnum = { +exports.Prisma.UserScalarFieldEnum = { id: 'id', - title: 'title', - content: 'content', - color: 'color', - isPinned: 'isPinned', - isArchived: 'isArchived', - type: 'type', - checkItems: 'checkItems', - labels: 'labels', - images: 'images', - links: 'links', - reminder: 'reminder', - isReminderDone: 'isReminderDone', - reminderRecurrence: 'reminderRecurrence', - reminderLocation: 'reminderLocation', - isMarkdown: 'isMarkdown', - size: 'size', - embedding: 'embedding', - sharedWith: 'sharedWith', - userId: 'userId', - order: 'order', - notebookId: 'notebookId', + name: 'name', + email: 'email', + emailVerified: 'emailVerified', + password: 'password', + role: 'role', + image: 'image', + theme: 'theme', + cardSizeMode: 'cardSizeMode', + resetToken: 'resetToken', + resetTokenExpiry: 'resetTokenExpiry', createdAt: 'createdAt', - updatedAt: 'updatedAt', - autoGenerated: 'autoGenerated', - aiProvider: 'aiProvider', - aiConfidence: 'aiConfidence', - language: 'language', - languageConfidence: 'languageConfidence', - lastAiAnalysis: 'lastAiAnalysis' + updatedAt: 'updatedAt' }; exports.Prisma.NotebookScalarFieldEnum = { @@ -141,17 +127,57 @@ exports.Prisma.LabelScalarFieldEnum = { updatedAt: 'updatedAt' }; -exports.Prisma.UserScalarFieldEnum = { +exports.Prisma.NoteScalarFieldEnum = { id: 'id', - name: 'name', - email: 'email', - emailVerified: 'emailVerified', - password: 'password', - role: 'role', - image: 'image', - theme: 'theme', - resetToken: 'resetToken', - resetTokenExpiry: 'resetTokenExpiry', + title: 'title', + content: 'content', + color: 'color', + isPinned: 'isPinned', + isArchived: 'isArchived', + trashedAt: 'trashedAt', + type: 'type', + dismissedFromRecent: 'dismissedFromRecent', + checkItems: 'checkItems', + labels: 'labels', + images: 'images', + links: 'links', + reminder: 'reminder', + isReminderDone: 'isReminderDone', + reminderRecurrence: 'reminderRecurrence', + reminderLocation: 'reminderLocation', + isMarkdown: 'isMarkdown', + size: 'size', + sharedWith: 'sharedWith', + userId: 'userId', + order: 'order', + notebookId: 'notebookId', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + contentUpdatedAt: 'contentUpdatedAt', + autoGenerated: 'autoGenerated', + aiProvider: 'aiProvider', + aiConfidence: 'aiConfidence', + language: 'language', + languageConfidence: 'languageConfidence', + lastAiAnalysis: 'lastAiAnalysis' +}; + +exports.Prisma.NoteEmbeddingScalarFieldEnum = { + id: 'id', + noteId: 'noteId', + embedding: 'embedding', + createdAt: 'createdAt' +}; + +exports.Prisma.NoteShareScalarFieldEnum = { + id: 'id', + noteId: 'noteId', + userId: 'userId', + sharedBy: 'sharedBy', + status: 'status', + permission: 'permission', + notifiedAt: 'notifiedAt', + respondedAt: 'respondedAt', createdAt: 'createdAt', updatedAt: 'updatedAt' }; @@ -186,19 +212,6 @@ exports.Prisma.VerificationTokenScalarFieldEnum = { expires: 'expires' }; -exports.Prisma.NoteShareScalarFieldEnum = { - id: 'id', - noteId: 'noteId', - userId: 'userId', - sharedBy: 'sharedBy', - status: 'status', - permission: 'permission', - notifiedAt: 'notifiedAt', - respondedAt: 'respondedAt', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - exports.Prisma.SystemConfigScalarFieldEnum = { key: 'key', value: 'value' @@ -241,6 +254,7 @@ exports.Prisma.UserAISettingsScalarFieldEnum = { fontSize: 'fontSize', demoMode: 'demoMode', showRecentNotes: 'showRecentNotes', + notesViewMode: 'notesViewMode', emailNotifications: 'emailNotifications', desktopNotifications: 'desktopNotifications', anonymousAnalytics: 'anonymousAnalytics' @@ -251,6 +265,11 @@ exports.Prisma.SortOrder = { desc: 'desc' }; +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + exports.Prisma.NullsOrder = { first: 'first', last: 'last' @@ -258,14 +277,15 @@ exports.Prisma.NullsOrder = { exports.Prisma.ModelName = { - Note: 'Note', + User: 'User', Notebook: 'Notebook', Label: 'Label', - User: 'User', + Note: 'Note', + NoteEmbedding: 'NoteEmbedding', + NoteShare: 'NoteShare', Account: 'Account', Session: 'Session', VerificationToken: 'VerificationToken', - NoteShare: 'NoteShare', SystemConfig: 'SystemConfig', AiFeedback: 'AiFeedback', MemoryEchoInsight: 'MemoryEchoInsight', @@ -282,7 +302,7 @@ const config = { "value": "prisma-client-js" }, "output": { - "value": "/Users/sepehr/dev/Momento/mcp-server/node_modules/.prisma/client", + "value": "/home/devparsa/dev/Momento/mcp-server/node_modules/.prisma/client", "fromEnvVar": null }, "config": { @@ -291,12 +311,16 @@ const config = { "binaryTargets": [ { "fromEnvVar": null, - "value": "darwin-arm64", + "value": "linux-musl-openssl-3.0.x" + }, + { + "fromEnvVar": null, + "value": "debian-openssl-3.0.x", "native": true } ], "previewFeatures": [], - "sourceFilePath": "/Users/sepehr/dev/Momento/mcp-server/prisma/schema.prisma", + "sourceFilePath": "/home/devparsa/dev/Momento/mcp-server/prisma/schema.prisma", "isCustomOutput": true }, "relativeEnvPaths": { @@ -308,28 +332,30 @@ const config = { "datasourceNames": [ "db" ], - "activeProvider": "sqlite", - "postinstall": false, + "activeProvider": "postgresql", + "postinstall": true, "inlineDatasources": { "db": { "url": { - "fromEnvVar": null, - "value": "file:../../memento-note/prisma/dev.db" + "fromEnvVar": "DATABASE_URL", + "value": null } } }, - "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../node_modules/.prisma/client\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n url = \"file:../../memento-note/prisma/dev.db\"\n}\n\nmodel Note {\n id String @id @default(cuid())\n title String?\n content String\n color String @default(\"default\")\n isPinned Boolean @default(false)\n isArchived Boolean @default(false)\n type String @default(\"text\")\n checkItems String?\n labels String?\n images String?\n links String?\n reminder DateTime?\n isReminderDone Boolean @default(false)\n reminderRecurrence String?\n reminderLocation String?\n isMarkdown Boolean @default(false)\n size String @default(\"small\")\n embedding String?\n sharedWith String?\n userId String?\n order Int @default(0)\n notebookId String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n autoGenerated Boolean?\n aiProvider String?\n aiConfidence Int?\n language String?\n languageConfidence Float?\n lastAiAnalysis DateTime?\n}\n\nmodel Notebook {\n id String @id @default(cuid())\n name String\n icon String?\n color String?\n order Int\n userId String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Label {\n id String @id @default(cuid())\n name String\n color String @default(\"gray\")\n notebookId String?\n userId String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String @unique\n emailVerified DateTime?\n password String?\n role String @default(\"USER\")\n image String?\n theme String @default(\"light\")\n resetToken String? @unique\n resetTokenExpiry DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Account {\n userId String\n type String\n provider String\n providerAccountId String\n refresh_token String?\n access_token String?\n expires_at Int?\n token_type String?\n scope String?\n id_token String?\n session_state String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@id([provider, providerAccountId])\n}\n\nmodel Session {\n sessionToken String @unique\n userId String\n expires DateTime\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel VerificationToken {\n identifier String\n token String\n expires DateTime\n\n @@id([identifier, token])\n}\n\nmodel NoteShare {\n id String @id @default(cuid())\n noteId String\n userId String\n sharedBy String\n status String @default(\"pending\")\n permission String @default(\"view\")\n notifiedAt DateTime?\n respondedAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([noteId, userId])\n}\n\nmodel SystemConfig {\n key String @id\n value String\n}\n\nmodel AiFeedback {\n id String @id @default(cuid())\n noteId String\n userId String?\n feedbackType String\n feature String\n originalContent String\n correctedContent String?\n metadata String?\n createdAt DateTime @default(now())\n}\n\nmodel MemoryEchoInsight {\n id String @id @default(cuid())\n userId String?\n note1Id String\n note2Id String\n similarityScore Float\n insight String\n insightDate DateTime @default(now())\n viewed Boolean @default(false)\n feedback String?\n dismissed Boolean @default(false)\n\n @@unique([userId, insightDate])\n}\n\nmodel UserAISettings {\n userId String @id\n titleSuggestions Boolean @default(true)\n semanticSearch Boolean @default(true)\n paragraphRefactor Boolean @default(true)\n memoryEcho Boolean @default(true)\n memoryEchoFrequency String @default(\"daily\")\n aiProvider String @default(\"auto\")\n preferredLanguage String @default(\"auto\")\n fontSize String @default(\"medium\")\n demoMode Boolean @default(false)\n showRecentNotes Boolean @default(false)\n emailNotifications Boolean @default(false)\n desktopNotifications Boolean @default(false)\n anonymousAnalytics Boolean @default(false)\n}\n", - "inlineSchemaHash": "6ce10c6c9fc6897f9259cc0a3de8b8d6f20d740bb72c180eca62e4dbc01158ab", + "inlineSchema": "// ============================================================================\n// MCP Server Schema — exact copy from memento-note (source of truth)\n// Only includes models used by MCP tools.\n// Do NOT modify independently — always sync with memento-note/prisma/schema.prisma\n// ============================================================================\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"../node_modules/.prisma/client\"\n binaryTargets = [\"linux-musl-openssl-3.0.x\", \"native\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n// ── Core models (used by MCP tools) ─────────────────────────────────────────\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String @unique\n emailVerified DateTime?\n password String?\n role String @default(\"USER\")\n image String?\n theme String @default(\"light\")\n cardSizeMode String @default(\"variable\")\n resetToken String? @unique\n resetTokenExpiry DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n accounts Account[]\n aiFeedback AiFeedback[]\n labels Label[]\n memoryEchoInsights MemoryEchoInsight[]\n notes Note[]\n sentShares NoteShare[] @relation(\"SentShares\")\n receivedShares NoteShare[] @relation(\"ReceivedShares\")\n notebooks Notebook[]\n sessions Session[]\n aiSettings UserAISettings?\n}\n\nmodel Notebook {\n id String @id @default(cuid())\n name String\n icon String?\n color String?\n order Int\n userId String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n labels Label[]\n notes Note[]\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([userId, order])\n @@index([userId])\n}\n\nmodel Label {\n id String @id @default(cuid())\n name String\n color String @default(\"gray\")\n notebookId String?\n userId String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n user User? @relation(fields: [userId], references: [id], onDelete: Cascade)\n notebook Notebook? @relation(fields: [notebookId], references: [id], onDelete: Cascade)\n notes Note[] @relation(\"LabelToNote\")\n\n @@unique([notebookId, name])\n @@index([notebookId])\n @@index([userId])\n}\n\nmodel Note {\n id String @id @default(cuid())\n title String?\n content String\n color String @default(\"default\")\n isPinned Boolean @default(false)\n isArchived Boolean @default(false)\n trashedAt DateTime?\n type String @default(\"text\")\n dismissedFromRecent Boolean @default(false)\n checkItems String?\n labels String?\n images String?\n links String?\n reminder DateTime?\n isReminderDone Boolean @default(false)\n reminderRecurrence String?\n reminderLocation String?\n isMarkdown Boolean @default(false)\n size String @default(\"small\")\n sharedWith String?\n userId String?\n order Int @default(0)\n notebookId String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n contentUpdatedAt DateTime @default(now())\n autoGenerated Boolean?\n aiProvider String?\n aiConfidence Int?\n language String?\n languageConfidence Float?\n lastAiAnalysis DateTime?\n aiFeedback AiFeedback[]\n memoryEchoAsNote2 MemoryEchoInsight[] @relation(\"EchoNote2\")\n memoryEchoAsNote1 MemoryEchoInsight[] @relation(\"EchoNote1\")\n notebook Notebook? @relation(fields: [notebookId], references: [id])\n user User? @relation(fields: [userId], references: [id], onDelete: Cascade)\n shares NoteShare[]\n labelRelations Label[] @relation(\"LabelToNote\")\n noteEmbedding NoteEmbedding?\n\n @@index([isPinned])\n @@index([isArchived])\n @@index([trashedAt])\n @@index([order])\n @@index([reminder])\n @@index([userId])\n @@index([userId, notebookId])\n}\n\nmodel NoteEmbedding {\n id String @id @default(cuid())\n noteId String @unique\n embedding String\n createdAt DateTime @default(now())\n note Note @relation(fields: [noteId], references: [id], onDelete: Cascade)\n\n @@index([noteId])\n}\n\nmodel NoteShare {\n id String @id @default(cuid())\n noteId String\n userId String\n sharedBy String\n status String @default(\"pending\")\n permission String @default(\"view\")\n notifiedAt DateTime?\n respondedAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n sharer User @relation(\"SentShares\", fields: [sharedBy], references: [id], onDelete: Cascade)\n user User @relation(\"ReceivedShares\", fields: [userId], references: [id], onDelete: Cascade)\n note Note @relation(fields: [noteId], references: [id], onDelete: Cascade)\n\n @@unique([noteId, userId])\n @@index([userId])\n @@index([status])\n @@index([sharedBy])\n}\n\n// ── Supporting models (used for auth, AI features, config) ──────────────────\n\nmodel Account {\n userId String\n type String\n provider String\n providerAccountId String\n refresh_token String?\n access_token String?\n expires_at Int?\n token_type String?\n scope String?\n id_token String?\n session_state String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@id([provider, providerAccountId])\n}\n\nmodel Session {\n sessionToken String @unique\n userId String\n expires DateTime\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n}\n\nmodel VerificationToken {\n identifier String\n token String\n expires DateTime\n\n @@id([identifier, token])\n}\n\nmodel SystemConfig {\n key String @id\n value String\n}\n\nmodel AiFeedback {\n id String @id @default(cuid())\n noteId String\n userId String?\n feedbackType String\n feature String\n originalContent String\n correctedContent String?\n metadata String?\n createdAt DateTime @default(now())\n user User? @relation(fields: [userId], references: [id], onDelete: Cascade)\n note Note @relation(fields: [noteId], references: [id], onDelete: Cascade)\n\n @@index([noteId])\n @@index([userId])\n @@index([feature])\n}\n\nmodel MemoryEchoInsight {\n id String @id @default(cuid())\n userId String?\n note1Id String\n note2Id String\n similarityScore Float\n insight String\n insightDate DateTime @default(now())\n viewed Boolean @default(false)\n feedback String?\n dismissed Boolean @default(false)\n user User? @relation(fields: [userId], references: [id], onDelete: Cascade)\n note2 Note @relation(\"EchoNote2\", fields: [note2Id], references: [id], onDelete: Cascade)\n note1 Note @relation(\"EchoNote1\", fields: [note1Id], references: [id], onDelete: Cascade)\n\n @@unique([userId, insightDate])\n @@index([userId, insightDate])\n @@index([userId, dismissed])\n}\n\nmodel UserAISettings {\n userId String @id\n titleSuggestions Boolean @default(true)\n semanticSearch Boolean @default(true)\n paragraphRefactor Boolean @default(true)\n memoryEcho Boolean @default(true)\n memoryEchoFrequency String @default(\"daily\")\n aiProvider String @default(\"auto\")\n preferredLanguage String @default(\"auto\")\n fontSize String @default(\"medium\")\n demoMode Boolean @default(false)\n showRecentNotes Boolean @default(true)\n notesViewMode String @default(\"masonry\")\n emailNotifications Boolean @default(false)\n desktopNotifications Boolean @default(false)\n anonymousAnalytics Boolean @default(false)\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([memoryEcho])\n @@index([aiProvider])\n @@index([memoryEchoFrequency])\n @@index([preferredLanguage])\n}\n", + "inlineSchemaHash": "9a602250e87548646a4ad9a989e42dceb241423b3abb7af86833cf0d47729938", "copyEngine": true } config.dirname = '/' -config.runtimeDataModel = JSON.parse("{\"models\":{\"Note\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"content\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"default\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isPinned\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isArchived\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"text\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"checkItems\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labels\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"images\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"links\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminder\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isReminderDone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminderRecurrence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminderLocation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isMarkdown\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"size\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"small\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"embedding\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sharedWith\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebookId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"autoGenerated\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiProvider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiConfidence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"language\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"languageConfidence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastAiAnalysis\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notebook\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"icon\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Label\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"gray\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebookId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"User\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"emailVerified\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"USER\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"image\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"theme\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"light\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resetToken\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resetTokenExpiry\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Account\":{\"dbName\":null,\"fields\":[{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"provider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"providerAccountId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"refresh_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"access_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"token_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scope\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"id_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"session_state\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":{\"name\":null,\"fields\":[\"provider\",\"providerAccountId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Session\":{\"dbName\":null,\"fields\":[{\"name\":\"sessionToken\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"VerificationToken\":{\"dbName\":null,\"fields\":[{\"name\":\"identifier\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"identifier\",\"token\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"NoteShare\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sharedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"pending\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"permission\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"view\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifiedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"respondedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[[\"noteId\",\"userId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"noteId\",\"userId\"]}],\"isGenerated\":false},\"SystemConfig\":{\"dbName\":null,\"fields\":[{\"name\":\"key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AiFeedback\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feedbackType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feature\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"originalContent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"correctedContent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"metadata\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MemoryEchoInsight\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note1Id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note2Id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"similarityScore\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"insight\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"insightDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"viewed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feedback\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dismissed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"userId\",\"insightDate\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"userId\",\"insightDate\"]}],\"isGenerated\":false},\"UserAISettings\":{\"dbName\":null,\"fields\":[{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"titleSuggestions\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"semanticSearch\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"paragraphRefactor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEcho\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoFrequency\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"daily\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiProvider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"auto\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preferredLanguage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"auto\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fontSize\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"medium\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoMode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"showRecentNotes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"emailNotifications\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"desktopNotifications\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"anonymousAnalytics\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"emailVerified\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"USER\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"image\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"theme\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"light\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cardSizeMode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"variable\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resetToken\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resetTokenExpiry\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"accounts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Account\",\"relationName\":\"AccountToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiFeedback\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AiFeedback\",\"relationName\":\"AiFeedbackToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labels\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Label\",\"relationName\":\"LabelToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoInsights\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MemoryEchoInsight\",\"relationName\":\"MemoryEchoInsightToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"NoteToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentShares\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NoteShare\",\"relationName\":\"SentShares\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"receivedShares\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NoteShare\",\"relationName\":\"ReceivedShares\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebooks\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notebook\",\"relationName\":\"NotebookToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sessions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Session\",\"relationName\":\"SessionToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiSettings\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserAISettings\",\"relationName\":\"UserToUserAISettings\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notebook\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"icon\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"labels\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Label\",\"relationName\":\"LabelToNotebook\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"NoteToNotebook\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"NotebookToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Label\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"gray\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebookId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"LabelToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebook\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notebook\",\"relationName\":\"LabelToNotebook\",\"relationFromFields\":[\"notebookId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"LabelToNote\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"notebookId\",\"name\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"notebookId\",\"name\"]}],\"isGenerated\":false},\"Note\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"content\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"default\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isPinned\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isArchived\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"trashedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"text\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dismissedFromRecent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"checkItems\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labels\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"images\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"links\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminder\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isReminderDone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminderRecurrence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminderLocation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isMarkdown\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"size\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"small\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sharedWith\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebookId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"contentUpdatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"autoGenerated\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiProvider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiConfidence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"language\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"languageConfidence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastAiAnalysis\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiFeedback\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AiFeedback\",\"relationName\":\"AiFeedbackToNote\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoAsNote2\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MemoryEchoInsight\",\"relationName\":\"EchoNote2\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoAsNote1\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MemoryEchoInsight\",\"relationName\":\"EchoNote1\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebook\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notebook\",\"relationName\":\"NoteToNotebook\",\"relationFromFields\":[\"notebookId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"NoteToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"shares\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NoteShare\",\"relationName\":\"NoteToNoteShare\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labelRelations\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Label\",\"relationName\":\"LabelToNote\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noteEmbedding\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NoteEmbedding\",\"relationName\":\"NoteToNoteEmbedding\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"NoteEmbedding\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"embedding\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"NoteToNoteEmbedding\",\"relationFromFields\":[\"noteId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"NoteShare\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sharedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"pending\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"permission\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"view\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifiedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"respondedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"sharer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"SentShares\",\"relationFromFields\":[\"sharedBy\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"ReceivedShares\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"NoteToNoteShare\",\"relationFromFields\":[\"noteId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"noteId\",\"userId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"noteId\",\"userId\"]}],\"isGenerated\":false},\"Account\":{\"dbName\":null,\"fields\":[{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"provider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"providerAccountId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"refresh_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"access_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"token_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scope\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"id_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"session_state\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"AccountToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"provider\",\"providerAccountId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Session\":{\"dbName\":null,\"fields\":[{\"name\":\"sessionToken\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"SessionToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"VerificationToken\":{\"dbName\":null,\"fields\":[{\"name\":\"identifier\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"identifier\",\"token\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SystemConfig\":{\"dbName\":null,\"fields\":[{\"name\":\"key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AiFeedback\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feedbackType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feature\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"originalContent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"correctedContent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"metadata\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"AiFeedbackToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"AiFeedbackToNote\",\"relationFromFields\":[\"noteId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MemoryEchoInsight\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note1Id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note2Id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"similarityScore\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"insight\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"insightDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"viewed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feedback\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dismissed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"MemoryEchoInsightToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note2\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"EchoNote2\",\"relationFromFields\":[\"note2Id\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note1\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"EchoNote1\",\"relationFromFields\":[\"note1Id\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"userId\",\"insightDate\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"userId\",\"insightDate\"]}],\"isGenerated\":false},\"UserAISettings\":{\"dbName\":null,\"fields\":[{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"titleSuggestions\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"semanticSearch\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"paragraphRefactor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEcho\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoFrequency\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"daily\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiProvider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"auto\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preferredLanguage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"auto\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fontSize\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"medium\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoMode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"showRecentNotes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notesViewMode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"masonry\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"emailNotifications\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"desktopNotifications\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"anonymousAnalytics\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"UserToUserAISettings\",\"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.injectableEdgeEnv = () => ({ - parsed: {} + parsed: { + DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.DATABASE_URL || undefined + } }) if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) { diff --git a/mcp-server/node_modules/.prisma/client/index-browser.js b/mcp-server/node_modules/.prisma/client/index-browser.js index b2f36bf..84773ba 100644 --- a/mcp-server/node_modules/.prisma/client/index-browser.js +++ b/mcp-server/node_modules/.prisma/client/index-browser.js @@ -116,40 +116,26 @@ Prisma.NullTypes = { */ exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', Serializable: 'Serializable' }); -exports.Prisma.NoteScalarFieldEnum = { +exports.Prisma.UserScalarFieldEnum = { id: 'id', - title: 'title', - content: 'content', - color: 'color', - isPinned: 'isPinned', - isArchived: 'isArchived', - type: 'type', - checkItems: 'checkItems', - labels: 'labels', - images: 'images', - links: 'links', - reminder: 'reminder', - isReminderDone: 'isReminderDone', - reminderRecurrence: 'reminderRecurrence', - reminderLocation: 'reminderLocation', - isMarkdown: 'isMarkdown', - size: 'size', - embedding: 'embedding', - sharedWith: 'sharedWith', - userId: 'userId', - order: 'order', - notebookId: 'notebookId', + name: 'name', + email: 'email', + emailVerified: 'emailVerified', + password: 'password', + role: 'role', + image: 'image', + theme: 'theme', + cardSizeMode: 'cardSizeMode', + resetToken: 'resetToken', + resetTokenExpiry: 'resetTokenExpiry', createdAt: 'createdAt', - updatedAt: 'updatedAt', - autoGenerated: 'autoGenerated', - aiProvider: 'aiProvider', - aiConfidence: 'aiConfidence', - language: 'language', - languageConfidence: 'languageConfidence', - lastAiAnalysis: 'lastAiAnalysis' + updatedAt: 'updatedAt' }; exports.Prisma.NotebookScalarFieldEnum = { @@ -173,17 +159,57 @@ exports.Prisma.LabelScalarFieldEnum = { updatedAt: 'updatedAt' }; -exports.Prisma.UserScalarFieldEnum = { +exports.Prisma.NoteScalarFieldEnum = { id: 'id', - name: 'name', - email: 'email', - emailVerified: 'emailVerified', - password: 'password', - role: 'role', - image: 'image', - theme: 'theme', - resetToken: 'resetToken', - resetTokenExpiry: 'resetTokenExpiry', + title: 'title', + content: 'content', + color: 'color', + isPinned: 'isPinned', + isArchived: 'isArchived', + trashedAt: 'trashedAt', + type: 'type', + dismissedFromRecent: 'dismissedFromRecent', + checkItems: 'checkItems', + labels: 'labels', + images: 'images', + links: 'links', + reminder: 'reminder', + isReminderDone: 'isReminderDone', + reminderRecurrence: 'reminderRecurrence', + reminderLocation: 'reminderLocation', + isMarkdown: 'isMarkdown', + size: 'size', + sharedWith: 'sharedWith', + userId: 'userId', + order: 'order', + notebookId: 'notebookId', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + contentUpdatedAt: 'contentUpdatedAt', + autoGenerated: 'autoGenerated', + aiProvider: 'aiProvider', + aiConfidence: 'aiConfidence', + language: 'language', + languageConfidence: 'languageConfidence', + lastAiAnalysis: 'lastAiAnalysis' +}; + +exports.Prisma.NoteEmbeddingScalarFieldEnum = { + id: 'id', + noteId: 'noteId', + embedding: 'embedding', + createdAt: 'createdAt' +}; + +exports.Prisma.NoteShareScalarFieldEnum = { + id: 'id', + noteId: 'noteId', + userId: 'userId', + sharedBy: 'sharedBy', + status: 'status', + permission: 'permission', + notifiedAt: 'notifiedAt', + respondedAt: 'respondedAt', createdAt: 'createdAt', updatedAt: 'updatedAt' }; @@ -218,19 +244,6 @@ exports.Prisma.VerificationTokenScalarFieldEnum = { expires: 'expires' }; -exports.Prisma.NoteShareScalarFieldEnum = { - id: 'id', - noteId: 'noteId', - userId: 'userId', - sharedBy: 'sharedBy', - status: 'status', - permission: 'permission', - notifiedAt: 'notifiedAt', - respondedAt: 'respondedAt', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - exports.Prisma.SystemConfigScalarFieldEnum = { key: 'key', value: 'value' @@ -273,6 +286,7 @@ exports.Prisma.UserAISettingsScalarFieldEnum = { fontSize: 'fontSize', demoMode: 'demoMode', showRecentNotes: 'showRecentNotes', + notesViewMode: 'notesViewMode', emailNotifications: 'emailNotifications', desktopNotifications: 'desktopNotifications', anonymousAnalytics: 'anonymousAnalytics' @@ -283,6 +297,11 @@ exports.Prisma.SortOrder = { desc: 'desc' }; +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + exports.Prisma.NullsOrder = { first: 'first', last: 'last' @@ -290,14 +309,15 @@ exports.Prisma.NullsOrder = { exports.Prisma.ModelName = { - Note: 'Note', + User: 'User', Notebook: 'Notebook', Label: 'Label', - User: 'User', + Note: 'Note', + NoteEmbedding: 'NoteEmbedding', + NoteShare: 'NoteShare', Account: 'Account', Session: 'Session', VerificationToken: 'VerificationToken', - NoteShare: 'NoteShare', SystemConfig: 'SystemConfig', AiFeedback: 'AiFeedback', MemoryEchoInsight: 'MemoryEchoInsight', diff --git a/mcp-server/node_modules/.prisma/client/index.d.ts b/mcp-server/node_modules/.prisma/client/index.d.ts index c26225a..1f0aafa 100644 --- a/mcp-server/node_modules/.prisma/client/index.d.ts +++ b/mcp-server/node_modules/.prisma/client/index.d.ts @@ -14,10 +14,10 @@ export type PrismaPromise = $Public.PrismaPromise /** - * Model Note + * Model User * */ -export type Note = $Result.DefaultSelection +export type User = $Result.DefaultSelection /** * Model Notebook * @@ -29,10 +29,20 @@ export type Notebook = $Result.DefaultSelection */ export type Label = $Result.DefaultSelection /** - * Model User + * Model Note * */ -export type User = $Result.DefaultSelection +export type Note = $Result.DefaultSelection +/** + * Model NoteEmbedding + * + */ +export type NoteEmbedding = $Result.DefaultSelection +/** + * Model NoteShare + * + */ +export type NoteShare = $Result.DefaultSelection /** * Model Account * @@ -48,11 +58,6 @@ export type Session = $Result.DefaultSelection * */ export type VerificationToken = $Result.DefaultSelection -/** - * Model NoteShare - * - */ -export type NoteShare = $Result.DefaultSelection /** * Model SystemConfig * @@ -81,8 +86,8 @@ export type UserAISettings = $Result.DefaultSelection /** - * `prisma.note`: Exposes CRUD operations for the **Note** model. + * `prisma.user`: Exposes CRUD operations for the **User** model. * Example usage: * ```ts - * // Fetch zero or more Notes - * const notes = await prisma.note.findMany() + * // Fetch zero or more Users + * const users = await prisma.user.findMany() * ``` */ - get note(): Prisma.NoteDelegate; + get user(): Prisma.UserDelegate; /** * `prisma.notebook`: Exposes CRUD operations for the **Notebook** model. @@ -228,14 +233,34 @@ export class PrismaClient< get label(): Prisma.LabelDelegate; /** - * `prisma.user`: Exposes CRUD operations for the **User** model. + * `prisma.note`: Exposes CRUD operations for the **Note** model. * Example usage: * ```ts - * // Fetch zero or more Users - * const users = await prisma.user.findMany() + * // Fetch zero or more Notes + * const notes = await prisma.note.findMany() * ``` */ - get user(): Prisma.UserDelegate; + get note(): Prisma.NoteDelegate; + + /** + * `prisma.noteEmbedding`: Exposes CRUD operations for the **NoteEmbedding** model. + * Example usage: + * ```ts + * // Fetch zero or more NoteEmbeddings + * const noteEmbeddings = await prisma.noteEmbedding.findMany() + * ``` + */ + get noteEmbedding(): Prisma.NoteEmbeddingDelegate; + + /** + * `prisma.noteShare`: Exposes CRUD operations for the **NoteShare** model. + * Example usage: + * ```ts + * // Fetch zero or more NoteShares + * const noteShares = await prisma.noteShare.findMany() + * ``` + */ + get noteShare(): Prisma.NoteShareDelegate; /** * `prisma.account`: Exposes CRUD operations for the **Account** model. @@ -267,16 +292,6 @@ export class PrismaClient< */ get verificationToken(): Prisma.VerificationTokenDelegate; - /** - * `prisma.noteShare`: Exposes CRUD operations for the **NoteShare** model. - * Example usage: - * ```ts - * // Fetch zero or more NoteShares - * const noteShares = await prisma.noteShare.findMany() - * ``` - */ - get noteShare(): Prisma.NoteShareDelegate; - /** * `prisma.systemConfig`: Exposes CRUD operations for the **SystemConfig** model. * Example usage: @@ -757,14 +772,15 @@ export namespace Prisma { export const ModelName: { - Note: 'Note', + User: 'User', Notebook: 'Notebook', Label: 'Label', - User: 'User', + Note: 'Note', + NoteEmbedding: 'NoteEmbedding', + NoteShare: 'NoteShare', Account: 'Account', Session: 'Session', VerificationToken: 'VerificationToken', - NoteShare: 'NoteShare', SystemConfig: 'SystemConfig', AiFeedback: 'AiFeedback', MemoryEchoInsight: 'MemoryEchoInsight', @@ -784,77 +800,77 @@ export namespace Prisma { export type TypeMap = { meta: { - modelProps: "note" | "notebook" | "label" | "user" | "account" | "session" | "verificationToken" | "noteShare" | "systemConfig" | "aiFeedback" | "memoryEchoInsight" | "userAISettings" + modelProps: "user" | "notebook" | "label" | "note" | "noteEmbedding" | "noteShare" | "account" | "session" | "verificationToken" | "systemConfig" | "aiFeedback" | "memoryEchoInsight" | "userAISettings" txIsolationLevel: Prisma.TransactionIsolationLevel } model: { - Note: { - payload: Prisma.$NotePayload - fields: Prisma.NoteFieldRefs + User: { + payload: Prisma.$UserPayload + fields: Prisma.UserFieldRefs operations: { findUnique: { - args: Prisma.NoteFindUniqueArgs - result: $Utils.PayloadToResult | null + args: Prisma.UserFindUniqueArgs + result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.NoteFindUniqueOrThrowArgs - result: $Utils.PayloadToResult + args: Prisma.UserFindUniqueOrThrowArgs + result: $Utils.PayloadToResult } findFirst: { - args: Prisma.NoteFindFirstArgs - result: $Utils.PayloadToResult | null + args: Prisma.UserFindFirstArgs + result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.NoteFindFirstOrThrowArgs - result: $Utils.PayloadToResult + args: Prisma.UserFindFirstOrThrowArgs + result: $Utils.PayloadToResult } findMany: { - args: Prisma.NoteFindManyArgs - result: $Utils.PayloadToResult[] + args: Prisma.UserFindManyArgs + result: $Utils.PayloadToResult[] } create: { - args: Prisma.NoteCreateArgs - result: $Utils.PayloadToResult + args: Prisma.UserCreateArgs + result: $Utils.PayloadToResult } createMany: { - args: Prisma.NoteCreateManyArgs + args: Prisma.UserCreateManyArgs result: BatchPayload } createManyAndReturn: { - args: Prisma.NoteCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] + args: Prisma.UserCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] } delete: { - args: Prisma.NoteDeleteArgs - result: $Utils.PayloadToResult + args: Prisma.UserDeleteArgs + result: $Utils.PayloadToResult } update: { - args: Prisma.NoteUpdateArgs - result: $Utils.PayloadToResult + args: Prisma.UserUpdateArgs + result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.NoteDeleteManyArgs + args: Prisma.UserDeleteManyArgs result: BatchPayload } updateMany: { - args: Prisma.NoteUpdateManyArgs + args: Prisma.UserUpdateManyArgs result: BatchPayload } upsert: { - args: Prisma.NoteUpsertArgs - result: $Utils.PayloadToResult + args: Prisma.UserUpsertArgs + result: $Utils.PayloadToResult } aggregate: { - args: Prisma.NoteAggregateArgs - result: $Utils.Optional + args: Prisma.UserAggregateArgs + result: $Utils.Optional } groupBy: { - args: Prisma.NoteGroupByArgs - result: $Utils.Optional[] + args: Prisma.UserGroupByArgs + result: $Utils.Optional[] } count: { - args: Prisma.NoteCountArgs - result: $Utils.Optional | number + args: Prisma.UserCountArgs + result: $Utils.Optional | number } } } @@ -998,73 +1014,213 @@ export namespace Prisma { } } } - User: { - payload: Prisma.$UserPayload - fields: Prisma.UserFieldRefs + Note: { + payload: Prisma.$NotePayload + fields: Prisma.NoteFieldRefs operations: { findUnique: { - args: Prisma.UserFindUniqueArgs - result: $Utils.PayloadToResult | null + args: Prisma.NoteFindUniqueArgs + result: $Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.UserFindUniqueOrThrowArgs - result: $Utils.PayloadToResult + args: Prisma.NoteFindUniqueOrThrowArgs + result: $Utils.PayloadToResult } findFirst: { - args: Prisma.UserFindFirstArgs - result: $Utils.PayloadToResult | null + args: Prisma.NoteFindFirstArgs + result: $Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.UserFindFirstOrThrowArgs - result: $Utils.PayloadToResult + args: Prisma.NoteFindFirstOrThrowArgs + result: $Utils.PayloadToResult } findMany: { - args: Prisma.UserFindManyArgs - result: $Utils.PayloadToResult[] + args: Prisma.NoteFindManyArgs + result: $Utils.PayloadToResult[] } create: { - args: Prisma.UserCreateArgs - result: $Utils.PayloadToResult + args: Prisma.NoteCreateArgs + result: $Utils.PayloadToResult } createMany: { - args: Prisma.UserCreateManyArgs + args: Prisma.NoteCreateManyArgs result: BatchPayload } createManyAndReturn: { - args: Prisma.UserCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] + args: Prisma.NoteCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] } delete: { - args: Prisma.UserDeleteArgs - result: $Utils.PayloadToResult + args: Prisma.NoteDeleteArgs + result: $Utils.PayloadToResult } update: { - args: Prisma.UserUpdateArgs - result: $Utils.PayloadToResult + args: Prisma.NoteUpdateArgs + result: $Utils.PayloadToResult } deleteMany: { - args: Prisma.UserDeleteManyArgs + args: Prisma.NoteDeleteManyArgs result: BatchPayload } updateMany: { - args: Prisma.UserUpdateManyArgs + args: Prisma.NoteUpdateManyArgs result: BatchPayload } upsert: { - args: Prisma.UserUpsertArgs - result: $Utils.PayloadToResult + args: Prisma.NoteUpsertArgs + result: $Utils.PayloadToResult } aggregate: { - args: Prisma.UserAggregateArgs - result: $Utils.Optional + args: Prisma.NoteAggregateArgs + result: $Utils.Optional } groupBy: { - args: Prisma.UserGroupByArgs - result: $Utils.Optional[] + args: Prisma.NoteGroupByArgs + result: $Utils.Optional[] } count: { - args: Prisma.UserCountArgs - result: $Utils.Optional | number + args: Prisma.NoteCountArgs + result: $Utils.Optional | number + } + } + } + NoteEmbedding: { + payload: Prisma.$NoteEmbeddingPayload + fields: Prisma.NoteEmbeddingFieldRefs + operations: { + findUnique: { + args: Prisma.NoteEmbeddingFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.NoteEmbeddingFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.NoteEmbeddingFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.NoteEmbeddingFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.NoteEmbeddingFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.NoteEmbeddingCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.NoteEmbeddingCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.NoteEmbeddingCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.NoteEmbeddingDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.NoteEmbeddingUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.NoteEmbeddingDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.NoteEmbeddingUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.NoteEmbeddingUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.NoteEmbeddingAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.NoteEmbeddingGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.NoteEmbeddingCountArgs + result: $Utils.Optional | number + } + } + } + NoteShare: { + payload: Prisma.$NoteSharePayload + fields: Prisma.NoteShareFieldRefs + operations: { + findUnique: { + args: Prisma.NoteShareFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.NoteShareFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.NoteShareFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.NoteShareFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.NoteShareFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.NoteShareCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.NoteShareCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.NoteShareCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.NoteShareDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.NoteShareUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.NoteShareDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.NoteShareUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.NoteShareUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.NoteShareAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.NoteShareGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.NoteShareCountArgs + result: $Utils.Optional | number } } } @@ -1278,76 +1434,6 @@ export namespace Prisma { } } } - NoteShare: { - payload: Prisma.$NoteSharePayload - fields: Prisma.NoteShareFieldRefs - operations: { - findUnique: { - args: Prisma.NoteShareFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.NoteShareFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.NoteShareFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.NoteShareFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.NoteShareFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.NoteShareCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.NoteShareCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.NoteShareCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.NoteShareDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.NoteShareUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.NoteShareDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.NoteShareUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.NoteShareUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.NoteShareAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.NoteShareGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.NoteShareCountArgs - result: $Utils.Optional | number - } - } - } SystemConfig: { payload: Prisma.$SystemConfigPayload fields: Prisma.SystemConfigFieldRefs @@ -1784,650 +1870,697 @@ export namespace Prisma { */ + /** + * Count Type UserCountOutputType + */ + + export type UserCountOutputType = { + accounts: number + aiFeedback: number + labels: number + memoryEchoInsights: number + notes: number + sentShares: number + receivedShares: number + notebooks: number + sessions: number + } + + export type UserCountOutputTypeSelect = { + accounts?: boolean | UserCountOutputTypeCountAccountsArgs + aiFeedback?: boolean | UserCountOutputTypeCountAiFeedbackArgs + labels?: boolean | UserCountOutputTypeCountLabelsArgs + memoryEchoInsights?: boolean | UserCountOutputTypeCountMemoryEchoInsightsArgs + notes?: boolean | UserCountOutputTypeCountNotesArgs + sentShares?: boolean | UserCountOutputTypeCountSentSharesArgs + receivedShares?: boolean | UserCountOutputTypeCountReceivedSharesArgs + notebooks?: boolean | UserCountOutputTypeCountNotebooksArgs + sessions?: boolean | UserCountOutputTypeCountSessionsArgs + } + + // Custom InputTypes + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the UserCountOutputType + */ + select?: UserCountOutputTypeSelect | null + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountAccountsArgs = { + where?: AccountWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountAiFeedbackArgs = { + where?: AiFeedbackWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountLabelsArgs = { + where?: LabelWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountMemoryEchoInsightsArgs = { + where?: MemoryEchoInsightWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountNotesArgs = { + where?: NoteWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountSentSharesArgs = { + where?: NoteShareWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountReceivedSharesArgs = { + where?: NoteShareWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountNotebooksArgs = { + where?: NotebookWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountSessionsArgs = { + where?: SessionWhereInput + } + + + /** + * Count Type NotebookCountOutputType + */ + + export type NotebookCountOutputType = { + labels: number + notes: number + } + + export type NotebookCountOutputTypeSelect = { + labels?: boolean | NotebookCountOutputTypeCountLabelsArgs + notes?: boolean | NotebookCountOutputTypeCountNotesArgs + } + + // Custom InputTypes + /** + * NotebookCountOutputType without action + */ + export type NotebookCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the NotebookCountOutputType + */ + select?: NotebookCountOutputTypeSelect | null + } + + /** + * NotebookCountOutputType without action + */ + export type NotebookCountOutputTypeCountLabelsArgs = { + where?: LabelWhereInput + } + + /** + * NotebookCountOutputType without action + */ + export type NotebookCountOutputTypeCountNotesArgs = { + where?: NoteWhereInput + } + + + /** + * Count Type LabelCountOutputType + */ + + export type LabelCountOutputType = { + notes: number + } + + export type LabelCountOutputTypeSelect = { + notes?: boolean | LabelCountOutputTypeCountNotesArgs + } + + // Custom InputTypes + /** + * LabelCountOutputType without action + */ + export type LabelCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the LabelCountOutputType + */ + select?: LabelCountOutputTypeSelect | null + } + + /** + * LabelCountOutputType without action + */ + export type LabelCountOutputTypeCountNotesArgs = { + where?: NoteWhereInput + } + + + /** + * Count Type NoteCountOutputType + */ + + export type NoteCountOutputType = { + aiFeedback: number + memoryEchoAsNote2: number + memoryEchoAsNote1: number + shares: number + labelRelations: number + } + + export type NoteCountOutputTypeSelect = { + aiFeedback?: boolean | NoteCountOutputTypeCountAiFeedbackArgs + memoryEchoAsNote2?: boolean | NoteCountOutputTypeCountMemoryEchoAsNote2Args + memoryEchoAsNote1?: boolean | NoteCountOutputTypeCountMemoryEchoAsNote1Args + shares?: boolean | NoteCountOutputTypeCountSharesArgs + labelRelations?: boolean | NoteCountOutputTypeCountLabelRelationsArgs + } + + // Custom InputTypes + /** + * NoteCountOutputType without action + */ + export type NoteCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the NoteCountOutputType + */ + select?: NoteCountOutputTypeSelect | null + } + + /** + * NoteCountOutputType without action + */ + export type NoteCountOutputTypeCountAiFeedbackArgs = { + where?: AiFeedbackWhereInput + } + + /** + * NoteCountOutputType without action + */ + export type NoteCountOutputTypeCountMemoryEchoAsNote2Args = { + where?: MemoryEchoInsightWhereInput + } + + /** + * NoteCountOutputType without action + */ + export type NoteCountOutputTypeCountMemoryEchoAsNote1Args = { + where?: MemoryEchoInsightWhereInput + } + + /** + * NoteCountOutputType without action + */ + export type NoteCountOutputTypeCountSharesArgs = { + where?: NoteShareWhereInput + } + + /** + * NoteCountOutputType without action + */ + export type NoteCountOutputTypeCountLabelRelationsArgs = { + where?: LabelWhereInput + } + /** * Models */ /** - * Model Note + * Model User */ - export type AggregateNote = { - _count: NoteCountAggregateOutputType | null - _avg: NoteAvgAggregateOutputType | null - _sum: NoteSumAggregateOutputType | null - _min: NoteMinAggregateOutputType | null - _max: NoteMaxAggregateOutputType | null + export type AggregateUser = { + _count: UserCountAggregateOutputType | null + _min: UserMinAggregateOutputType | null + _max: UserMaxAggregateOutputType | null } - export type NoteAvgAggregateOutputType = { - order: number | null - aiConfidence: number | null - languageConfidence: number | null - } - - export type NoteSumAggregateOutputType = { - order: number | null - aiConfidence: number | null - languageConfidence: number | null - } - - export type NoteMinAggregateOutputType = { + export type UserMinAggregateOutputType = { id: string | null - title: string | null - content: string | null - color: string | null - isPinned: boolean | null - isArchived: boolean | null - type: string | null - checkItems: string | null - labels: string | null - images: string | null - links: string | null - reminder: Date | null - isReminderDone: boolean | null - reminderRecurrence: string | null - reminderLocation: string | null - isMarkdown: boolean | null - size: string | null - embedding: string | null - sharedWith: string | null - userId: string | null - order: number | null - notebookId: string | null + name: string | null + email: string | null + emailVerified: Date | null + password: string | null + role: string | null + image: string | null + theme: string | null + cardSizeMode: string | null + resetToken: string | null + resetTokenExpiry: Date | null createdAt: Date | null updatedAt: Date | null - autoGenerated: boolean | null - aiProvider: string | null - aiConfidence: number | null - language: string | null - languageConfidence: number | null - lastAiAnalysis: Date | null } - export type NoteMaxAggregateOutputType = { + export type UserMaxAggregateOutputType = { id: string | null - title: string | null - content: string | null - color: string | null - isPinned: boolean | null - isArchived: boolean | null - type: string | null - checkItems: string | null - labels: string | null - images: string | null - links: string | null - reminder: Date | null - isReminderDone: boolean | null - reminderRecurrence: string | null - reminderLocation: string | null - isMarkdown: boolean | null - size: string | null - embedding: string | null - sharedWith: string | null - userId: string | null - order: number | null - notebookId: string | null + name: string | null + email: string | null + emailVerified: Date | null + password: string | null + role: string | null + image: string | null + theme: string | null + cardSizeMode: string | null + resetToken: string | null + resetTokenExpiry: Date | null createdAt: Date | null updatedAt: Date | null - autoGenerated: boolean | null - aiProvider: string | null - aiConfidence: number | null - language: string | null - languageConfidence: number | null - lastAiAnalysis: Date | null } - export type NoteCountAggregateOutputType = { + export type UserCountAggregateOutputType = { id: number - title: number - content: number - color: number - isPinned: number - isArchived: number - type: number - checkItems: number - labels: number - images: number - links: number - reminder: number - isReminderDone: number - reminderRecurrence: number - reminderLocation: number - isMarkdown: number - size: number - embedding: number - sharedWith: number - userId: number - order: number - notebookId: number + name: number + email: number + emailVerified: number + password: number + role: number + image: number + theme: number + cardSizeMode: number + resetToken: number + resetTokenExpiry: number createdAt: number updatedAt: number - autoGenerated: number - aiProvider: number - aiConfidence: number - language: number - languageConfidence: number - lastAiAnalysis: number _all: number } - export type NoteAvgAggregateInputType = { - order?: true - aiConfidence?: true - languageConfidence?: true - } - - export type NoteSumAggregateInputType = { - order?: true - aiConfidence?: true - languageConfidence?: true - } - - export type NoteMinAggregateInputType = { + export type UserMinAggregateInputType = { id?: true - title?: true - content?: true - color?: true - isPinned?: true - isArchived?: true - type?: true - checkItems?: true - labels?: true - images?: true - links?: true - reminder?: true - isReminderDone?: true - reminderRecurrence?: true - reminderLocation?: true - isMarkdown?: true - size?: true - embedding?: true - sharedWith?: true - userId?: true - order?: true - notebookId?: true + name?: true + email?: true + emailVerified?: true + password?: true + role?: true + image?: true + theme?: true + cardSizeMode?: true + resetToken?: true + resetTokenExpiry?: true createdAt?: true updatedAt?: true - autoGenerated?: true - aiProvider?: true - aiConfidence?: true - language?: true - languageConfidence?: true - lastAiAnalysis?: true } - export type NoteMaxAggregateInputType = { + export type UserMaxAggregateInputType = { id?: true - title?: true - content?: true - color?: true - isPinned?: true - isArchived?: true - type?: true - checkItems?: true - labels?: true - images?: true - links?: true - reminder?: true - isReminderDone?: true - reminderRecurrence?: true - reminderLocation?: true - isMarkdown?: true - size?: true - embedding?: true - sharedWith?: true - userId?: true - order?: true - notebookId?: true + name?: true + email?: true + emailVerified?: true + password?: true + role?: true + image?: true + theme?: true + cardSizeMode?: true + resetToken?: true + resetTokenExpiry?: true createdAt?: true updatedAt?: true - autoGenerated?: true - aiProvider?: true - aiConfidence?: true - language?: true - languageConfidence?: true - lastAiAnalysis?: true } - export type NoteCountAggregateInputType = { + export type UserCountAggregateInputType = { id?: true - title?: true - content?: true - color?: true - isPinned?: true - isArchived?: true - type?: true - checkItems?: true - labels?: true - images?: true - links?: true - reminder?: true - isReminderDone?: true - reminderRecurrence?: true - reminderLocation?: true - isMarkdown?: true - size?: true - embedding?: true - sharedWith?: true - userId?: true - order?: true - notebookId?: true + name?: true + email?: true + emailVerified?: true + password?: true + role?: true + image?: true + theme?: true + cardSizeMode?: true + resetToken?: true + resetTokenExpiry?: true createdAt?: true updatedAt?: true - autoGenerated?: true - aiProvider?: true - aiConfidence?: true - language?: true - languageConfidence?: true - lastAiAnalysis?: true _all?: true } - export type NoteAggregateArgs = { + export type UserAggregateArgs = { /** - * Filter which Note to aggregate. + * Filter which User to aggregate. */ - where?: NoteWhereInput + where?: UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Notes to fetch. + * Determine the order of Users to fetch. */ - orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ - cursor?: NoteWhereUniqueInput + cursor?: UserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Notes from the position of the cursor. + * Take `±n` Users 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` Notes. + * Skip the first `n` Users. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * - * Count returned Notes + * Count returned Users **/ - _count?: true | NoteCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: NoteAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: NoteSumAggregateInputType + _count?: true | UserCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ - _min?: NoteMinAggregateInputType + _min?: UserMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ - _max?: NoteMaxAggregateInputType + _max?: UserMaxAggregateInputType } - export type GetNoteAggregateType = { - [P in keyof T & keyof AggregateNote]: P extends '_count' | 'count' + export type GetUserAggregateType = { + [P in keyof T & keyof AggregateUser]: P extends '_count' | 'count' ? T[P] extends true ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } - export type NoteGroupByArgs = { - where?: NoteWhereInput - orderBy?: NoteOrderByWithAggregationInput | NoteOrderByWithAggregationInput[] - by: NoteScalarFieldEnum[] | NoteScalarFieldEnum - having?: NoteScalarWhereWithAggregatesInput + export type UserGroupByArgs = { + where?: UserWhereInput + orderBy?: UserOrderByWithAggregationInput | UserOrderByWithAggregationInput[] + by: UserScalarFieldEnum[] | UserScalarFieldEnum + having?: UserScalarWhereWithAggregatesInput take?: number skip?: number - _count?: NoteCountAggregateInputType | true - _avg?: NoteAvgAggregateInputType - _sum?: NoteSumAggregateInputType - _min?: NoteMinAggregateInputType - _max?: NoteMaxAggregateInputType + _count?: UserCountAggregateInputType | true + _min?: UserMinAggregateInputType + _max?: UserMaxAggregateInputType } - export type NoteGroupByOutputType = { + export type UserGroupByOutputType = { id: string - title: string | null - content: string - color: string - isPinned: boolean - isArchived: boolean - type: string - checkItems: string | null - labels: string | null - images: string | null - links: string | null - reminder: Date | null - isReminderDone: boolean - reminderRecurrence: string | null - reminderLocation: string | null - isMarkdown: boolean - size: string - embedding: string | null - sharedWith: string | null - userId: string | null - order: number - notebookId: string | null + name: string | null + email: string + emailVerified: Date | null + password: string | null + role: string + image: string | null + theme: string + cardSizeMode: string + resetToken: string | null + resetTokenExpiry: Date | null createdAt: Date updatedAt: Date - autoGenerated: boolean | null - aiProvider: string | null - aiConfidence: number | null - language: string | null - languageConfidence: number | null - lastAiAnalysis: Date | null - _count: NoteCountAggregateOutputType | null - _avg: NoteAvgAggregateOutputType | null - _sum: NoteSumAggregateOutputType | null - _min: NoteMinAggregateOutputType | null - _max: NoteMaxAggregateOutputType | null + _count: UserCountAggregateOutputType | null + _min: UserMinAggregateOutputType | null + _max: UserMaxAggregateOutputType | null } - type GetNoteGroupByPayload = Prisma.PrismaPromise< + type GetUserGroupByPayload = Prisma.PrismaPromise< Array< - PickEnumerable & + PickEnumerable & { - [P in ((keyof T) & (keyof NoteGroupByOutputType))]: P extends '_count' + [P in ((keyof T) & (keyof UserGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } > > - export type NoteSelect = $Extensions.GetSelect<{ + export type UserSelect = $Extensions.GetSelect<{ id?: boolean - title?: boolean - content?: boolean - color?: boolean - isPinned?: boolean - isArchived?: boolean - type?: boolean - checkItems?: boolean - labels?: boolean - images?: boolean - links?: boolean - reminder?: boolean - isReminderDone?: boolean - reminderRecurrence?: boolean - reminderLocation?: boolean - isMarkdown?: boolean - size?: boolean - embedding?: boolean - sharedWith?: boolean - userId?: boolean - order?: boolean - notebookId?: boolean + name?: boolean + email?: boolean + emailVerified?: boolean + password?: boolean + role?: boolean + image?: boolean + theme?: boolean + cardSizeMode?: boolean + resetToken?: boolean + resetTokenExpiry?: boolean createdAt?: boolean updatedAt?: boolean - autoGenerated?: boolean - aiProvider?: boolean - aiConfidence?: boolean - language?: boolean - languageConfidence?: boolean - lastAiAnalysis?: boolean - }, ExtArgs["result"]["note"]> + accounts?: boolean | User$accountsArgs + aiFeedback?: boolean | User$aiFeedbackArgs + labels?: boolean | User$labelsArgs + memoryEchoInsights?: boolean | User$memoryEchoInsightsArgs + notes?: boolean | User$notesArgs + sentShares?: boolean | User$sentSharesArgs + receivedShares?: boolean | User$receivedSharesArgs + notebooks?: boolean | User$notebooksArgs + sessions?: boolean | User$sessionsArgs + aiSettings?: boolean | User$aiSettingsArgs + _count?: boolean | UserCountOutputTypeDefaultArgs + }, ExtArgs["result"]["user"]> - export type NoteSelectCreateManyAndReturn = $Extensions.GetSelect<{ + export type UserSelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean - title?: boolean - content?: boolean - color?: boolean - isPinned?: boolean - isArchived?: boolean - type?: boolean - checkItems?: boolean - labels?: boolean - images?: boolean - links?: boolean - reminder?: boolean - isReminderDone?: boolean - reminderRecurrence?: boolean - reminderLocation?: boolean - isMarkdown?: boolean - size?: boolean - embedding?: boolean - sharedWith?: boolean - userId?: boolean - order?: boolean - notebookId?: boolean + name?: boolean + email?: boolean + emailVerified?: boolean + password?: boolean + role?: boolean + image?: boolean + theme?: boolean + cardSizeMode?: boolean + resetToken?: boolean + resetTokenExpiry?: boolean createdAt?: boolean updatedAt?: boolean - autoGenerated?: boolean - aiProvider?: boolean - aiConfidence?: boolean - language?: boolean - languageConfidence?: boolean - lastAiAnalysis?: boolean - }, ExtArgs["result"]["note"]> + }, ExtArgs["result"]["user"]> - export type NoteSelectScalar = { + export type UserSelectScalar = { id?: boolean - title?: boolean - content?: boolean - color?: boolean - isPinned?: boolean - isArchived?: boolean - type?: boolean - checkItems?: boolean - labels?: boolean - images?: boolean - links?: boolean - reminder?: boolean - isReminderDone?: boolean - reminderRecurrence?: boolean - reminderLocation?: boolean - isMarkdown?: boolean - size?: boolean - embedding?: boolean - sharedWith?: boolean - userId?: boolean - order?: boolean - notebookId?: boolean + name?: boolean + email?: boolean + emailVerified?: boolean + password?: boolean + role?: boolean + image?: boolean + theme?: boolean + cardSizeMode?: boolean + resetToken?: boolean + resetTokenExpiry?: boolean createdAt?: boolean updatedAt?: boolean - autoGenerated?: boolean - aiProvider?: boolean - aiConfidence?: boolean - language?: boolean - languageConfidence?: boolean - lastAiAnalysis?: boolean } + export type UserInclude = { + accounts?: boolean | User$accountsArgs + aiFeedback?: boolean | User$aiFeedbackArgs + labels?: boolean | User$labelsArgs + memoryEchoInsights?: boolean | User$memoryEchoInsightsArgs + notes?: boolean | User$notesArgs + sentShares?: boolean | User$sentSharesArgs + receivedShares?: boolean | User$receivedSharesArgs + notebooks?: boolean | User$notebooksArgs + sessions?: boolean | User$sessionsArgs + aiSettings?: boolean | User$aiSettingsArgs + _count?: boolean | UserCountOutputTypeDefaultArgs + } + export type UserIncludeCreateManyAndReturn = {} - export type $NotePayload = { - name: "Note" - objects: {} + export type $UserPayload = { + name: "User" + objects: { + accounts: Prisma.$AccountPayload[] + aiFeedback: Prisma.$AiFeedbackPayload[] + labels: Prisma.$LabelPayload[] + memoryEchoInsights: Prisma.$MemoryEchoInsightPayload[] + notes: Prisma.$NotePayload[] + sentShares: Prisma.$NoteSharePayload[] + receivedShares: Prisma.$NoteSharePayload[] + notebooks: Prisma.$NotebookPayload[] + sessions: Prisma.$SessionPayload[] + aiSettings: Prisma.$UserAISettingsPayload | null + } scalars: $Extensions.GetPayloadResult<{ id: string - title: string | null - content: string - color: string - isPinned: boolean - isArchived: boolean - type: string - checkItems: string | null - labels: string | null - images: string | null - links: string | null - reminder: Date | null - isReminderDone: boolean - reminderRecurrence: string | null - reminderLocation: string | null - isMarkdown: boolean - size: string - embedding: string | null - sharedWith: string | null - userId: string | null - order: number - notebookId: string | null + name: string | null + email: string + emailVerified: Date | null + password: string | null + role: string + image: string | null + theme: string + cardSizeMode: string + resetToken: string | null + resetTokenExpiry: Date | null createdAt: Date updatedAt: Date - autoGenerated: boolean | null - aiProvider: string | null - aiConfidence: number | null - language: string | null - languageConfidence: number | null - lastAiAnalysis: Date | null - }, ExtArgs["result"]["note"]> + }, ExtArgs["result"]["user"]> composites: {} } - type NoteGetPayload = $Result.GetResult + type UserGetPayload = $Result.GetResult - type NoteCountArgs = - Omit & { - select?: NoteCountAggregateInputType | true + type UserCountArgs = + Omit & { + select?: UserCountAggregateInputType | true } - export interface NoteDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Note'], meta: { name: 'Note' } } + export interface UserDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['User'], meta: { name: 'User' } } /** - * Find zero or one Note that matches the filter. - * @param {NoteFindUniqueArgs} args - Arguments to find a Note + * Find zero or one User that matches the filter. + * @param {UserFindUniqueArgs} args - Arguments to find a User * @example - * // Get one Note - * const note = await prisma.note.findUnique({ + * // Get one User + * const user = await prisma.user.findUnique({ * where: { * // ... provide filter here * } * }) */ - findUnique(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + findUnique(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** - * Find one Note that matches the filter or throw an error with `error.code='P2025'` + * Find one User that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. - * @param {NoteFindUniqueOrThrowArgs} args - Arguments to find a Note + * @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User * @example - * // Get one Note - * const note = await prisma.note.findUniqueOrThrow({ + * // Get one User + * const user = await prisma.user.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ - findUniqueOrThrow(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + findUniqueOrThrow(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** - * Find the first Note that matches the filter. + * Find the first User 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 {NoteFindFirstArgs} args - Arguments to find a Note + * @param {UserFindFirstArgs} args - Arguments to find a User * @example - * // Get one Note - * const note = await prisma.note.findFirst({ + * // Get one User + * const user = await prisma.user.findFirst({ * where: { * // ... provide filter here * } * }) */ - findFirst(args?: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + findFirst(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** - * Find the first Note that matches the filter or + * Find the first User 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 {NoteFindFirstOrThrowArgs} args - Arguments to find a Note + * @param {UserFindFirstOrThrowArgs} args - Arguments to find a User * @example - * // Get one Note - * const note = await prisma.note.findFirstOrThrow({ + * // Get one User + * const user = await prisma.user.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ - findFirstOrThrow(args?: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + findFirstOrThrow(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** - * Find zero or more Notes that matches the filter. + * Find zero or more Users 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 {NoteFindManyArgs} args - Arguments to filter and select certain fields only. + * @param {UserFindManyArgs} args - Arguments to filter and select certain fields only. * @example - * // Get all Notes - * const notes = await prisma.note.findMany() + * // Get all Users + * const users = await prisma.user.findMany() * - * // Get first 10 Notes - * const notes = await prisma.note.findMany({ take: 10 }) + * // Get first 10 Users + * const users = await prisma.user.findMany({ take: 10 }) * * // Only select the `id` - * const noteWithIdOnly = await prisma.note.findMany({ select: { id: true } }) + * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) * */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** - * Create a Note. - * @param {NoteCreateArgs} args - Arguments to create a Note. + * Create a User. + * @param {UserCreateArgs} args - Arguments to create a User. * @example - * // Create one Note - * const Note = await prisma.note.create({ + * // Create one User + * const User = await prisma.user.create({ * data: { - * // ... data to create a Note + * // ... data to create a User * } * }) * */ - create(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "create">, never, ExtArgs> + create(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "create">, never, ExtArgs> /** - * Create many Notes. - * @param {NoteCreateManyArgs} args - Arguments to create many Notes. + * Create many Users. + * @param {UserCreateManyArgs} args - Arguments to create many Users. * @example - * // Create many Notes - * const note = await prisma.note.createMany({ + * // Create many Users + * const user = await prisma.user.createMany({ * data: [ * // ... provide data here * ] * }) * */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise + createMany(args?: SelectSubset>): Prisma.PrismaPromise /** - * Create many Notes and returns the data saved in the database. - * @param {NoteCreateManyAndReturnArgs} args - Arguments to create many Notes. + * Create many Users and returns the data saved in the database. + * @param {UserCreateManyAndReturnArgs} args - Arguments to create many Users. * @example - * // Create many Notes - * const note = await prisma.note.createManyAndReturn({ + * // Create many Users + * const user = await prisma.user.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * - * // Create many Notes and only return the `id` - * const noteWithIdOnly = await prisma.note.createManyAndReturn({ + * // Create many Users and only return the `id` + * const userWithIdOnly = await prisma.user.createManyAndReturn({ * select: { id: true }, * data: [ * // ... provide data here @@ -2437,28 +2570,28 @@ export namespace Prisma { * Read more here: https://pris.ly/d/null-undefined * */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> /** - * Delete a Note. - * @param {NoteDeleteArgs} args - Arguments to delete one Note. + * Delete a User. + * @param {UserDeleteArgs} args - Arguments to delete one User. * @example - * // Delete one Note - * const Note = await prisma.note.delete({ + * // Delete one User + * const User = await prisma.user.delete({ * where: { - * // ... filter to delete one Note + * // ... filter to delete one User * } * }) * */ - delete(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "delete">, never, ExtArgs> + delete(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** - * Update one Note. - * @param {NoteUpdateArgs} args - Arguments to update one Note. + * Update one User. + * @param {UserUpdateArgs} args - Arguments to update one User. * @example - * // Update one Note - * const note = await prisma.note.update({ + * // Update one User + * const user = await prisma.user.update({ * where: { * // ... provide filter here * }, @@ -2468,30 +2601,30 @@ export namespace Prisma { * }) * */ - update(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "update">, never, ExtArgs> + update(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "update">, never, ExtArgs> /** - * Delete zero or more Notes. - * @param {NoteDeleteManyArgs} args - Arguments to filter Notes to delete. + * Delete zero or more Users. + * @param {UserDeleteManyArgs} args - Arguments to filter Users to delete. * @example - * // Delete a few Notes - * const { count } = await prisma.note.deleteMany({ + * // Delete a few Users + * const { count } = await prisma.user.deleteMany({ * where: { * // ... provide filter here * } * }) * */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** - * Update zero or more Notes. + * Update zero or more Users. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {NoteUpdateManyArgs} args - Arguments to update one or more rows. + * @param {UserUpdateManyArgs} args - Arguments to update one or more rows. * @example - * // Update many Notes - * const note = await prisma.note.updateMany({ + * // Update many Users + * const user = await prisma.user.updateMany({ * where: { * // ... provide filter here * }, @@ -2501,56 +2634,56 @@ export namespace Prisma { * }) * */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** - * Create or update one Note. - * @param {NoteUpsertArgs} args - Arguments to update or create a Note. + * Create or update one User. + * @param {UserUpsertArgs} args - Arguments to update or create a User. * @example - * // Update or create a Note - * const note = await prisma.note.upsert({ + * // Update or create a User + * const user = await prisma.user.upsert({ * create: { - * // ... data to create a Note + * // ... data to create a User * }, * update: { * // ... in case it already exists, update * }, * where: { - * // ... the filter for the Note we want to update + * // ... the filter for the User we want to update * } * }) */ - upsert(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + upsert(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "upsert">, never, ExtArgs> /** - * Count the number of Notes. + * Count the number of Users. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {NoteCountArgs} args - Arguments to filter Notes to count. + * @param {UserCountArgs} args - Arguments to filter Users to count. * @example - * // Count the number of Notes - * const count = await prisma.note.count({ + * // Count the number of Users + * const count = await prisma.user.count({ * where: { - * // ... the filter for the Notes we want to count + * // ... the filter for the Users we want to count * } * }) **/ - count( - args?: Subset, + count( + args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number - : GetScalarType + : GetScalarType : number > /** - * Allows you to perform aggregations operations on a Note. + * Allows you to perform aggregations operations on a User. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {NoteAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @param {UserAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io @@ -2570,13 +2703,13 @@ export namespace Prisma { * take: 10, * }) **/ - aggregate(args: Subset): Prisma.PrismaPromise> + aggregate(args: Subset): Prisma.PrismaPromise> /** - * Group by Note. + * Group by User. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {NoteGroupByArgs} args - Group by arguments. + * @param {UserGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ @@ -2591,14 +2724,14 @@ export namespace Prisma { * **/ groupBy< - T extends NoteGroupByArgs, + T extends UserGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake - ? { orderBy: NoteGroupByArgs['orderBy'] } - : { orderBy?: NoteGroupByArgs['orderBy'] }, + ? { orderBy: UserGroupByArgs['orderBy'] } + : { orderBy?: UserGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, @@ -2647,21 +2780,31 @@ export namespace Prisma { ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetNoteGroupByPayload : Prisma.PrismaPromise + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetUserGroupByPayload : Prisma.PrismaPromise /** - * Fields of the Note model + * Fields of the User model */ - readonly fields: NoteFieldRefs; + readonly fields: UserFieldRefs; } /** - * The delegate class that acts as a "Promise-like" for Note. + * The delegate class that acts as a "Promise-like" for User. * 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__NoteClient extends Prisma.PrismaPromise { + export interface Prisma__UserClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" + accounts = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + aiFeedback = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + labels = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + memoryEchoInsights = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + notes = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + sentShares = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + receivedShares = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + notebooks = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + sessions = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + aiSettings = {}>(args?: Subset>): Prisma__UserAISettingsClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -2688,322 +2831,542 @@ export namespace Prisma { /** - * Fields of the Note model + * Fields of the User model */ - interface NoteFieldRefs { - readonly id: FieldRef<"Note", 'String'> - readonly title: FieldRef<"Note", 'String'> - readonly content: FieldRef<"Note", 'String'> - readonly color: FieldRef<"Note", 'String'> - readonly isPinned: FieldRef<"Note", 'Boolean'> - readonly isArchived: FieldRef<"Note", 'Boolean'> - readonly type: FieldRef<"Note", 'String'> - readonly checkItems: FieldRef<"Note", 'String'> - readonly labels: FieldRef<"Note", 'String'> - readonly images: FieldRef<"Note", 'String'> - readonly links: FieldRef<"Note", 'String'> - readonly reminder: FieldRef<"Note", 'DateTime'> - readonly isReminderDone: FieldRef<"Note", 'Boolean'> - readonly reminderRecurrence: FieldRef<"Note", 'String'> - readonly reminderLocation: FieldRef<"Note", 'String'> - readonly isMarkdown: FieldRef<"Note", 'Boolean'> - readonly size: FieldRef<"Note", 'String'> - readonly embedding: FieldRef<"Note", 'String'> - readonly sharedWith: FieldRef<"Note", 'String'> - readonly userId: FieldRef<"Note", 'String'> - readonly order: FieldRef<"Note", 'Int'> - readonly notebookId: FieldRef<"Note", 'String'> - readonly createdAt: FieldRef<"Note", 'DateTime'> - readonly updatedAt: FieldRef<"Note", 'DateTime'> - readonly autoGenerated: FieldRef<"Note", 'Boolean'> - readonly aiProvider: FieldRef<"Note", 'String'> - readonly aiConfidence: FieldRef<"Note", 'Int'> - readonly language: FieldRef<"Note", 'String'> - readonly languageConfidence: FieldRef<"Note", 'Float'> - readonly lastAiAnalysis: FieldRef<"Note", 'DateTime'> + interface UserFieldRefs { + readonly id: FieldRef<"User", 'String'> + readonly name: FieldRef<"User", 'String'> + readonly email: FieldRef<"User", 'String'> + readonly emailVerified: FieldRef<"User", 'DateTime'> + readonly password: FieldRef<"User", 'String'> + readonly role: FieldRef<"User", 'String'> + readonly image: FieldRef<"User", 'String'> + readonly theme: FieldRef<"User", 'String'> + readonly cardSizeMode: FieldRef<"User", 'String'> + readonly resetToken: FieldRef<"User", 'String'> + readonly resetTokenExpiry: FieldRef<"User", 'DateTime'> + readonly createdAt: FieldRef<"User", 'DateTime'> + readonly updatedAt: FieldRef<"User", 'DateTime'> } // Custom InputTypes /** - * Note findUnique + * User findUnique */ - export type NoteFindUniqueArgs = { + export type UserFindUniqueArgs = { /** - * Select specific fields to fetch from the Note + * Select specific fields to fetch from the User */ - select?: NoteSelect | null + select?: UserSelect | null /** - * Filter, which Note to fetch. + * Choose, which related nodes to fetch as well */ - where: NoteWhereUniqueInput + include?: UserInclude | null + /** + * Filter, which User to fetch. + */ + where: UserWhereUniqueInput } /** - * Note findUniqueOrThrow + * User findUniqueOrThrow */ - export type NoteFindUniqueOrThrowArgs = { + export type UserFindUniqueOrThrowArgs = { /** - * Select specific fields to fetch from the Note + * Select specific fields to fetch from the User */ - select?: NoteSelect | null + select?: UserSelect | null /** - * Filter, which Note to fetch. + * Choose, which related nodes to fetch as well */ - where: NoteWhereUniqueInput + include?: UserInclude | null + /** + * Filter, which User to fetch. + */ + where: UserWhereUniqueInput } /** - * Note findFirst + * User findFirst */ - export type NoteFindFirstArgs = { + export type UserFindFirstArgs = { /** - * Select specific fields to fetch from the Note + * Select specific fields to fetch from the User */ - select?: NoteSelect | null + select?: UserSelect | null /** - * Filter, which Note to fetch. + * Choose, which related nodes to fetch as well */ - where?: NoteWhereInput + include?: UserInclude | null + /** + * Filter, which User to fetch. + */ + where?: UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Notes to fetch. + * Determine the order of Users to fetch. */ - orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for searching for Notes. + * Sets the position for searching for Users. */ - cursor?: NoteWhereUniqueInput + cursor?: UserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Notes from the position of the cursor. + * Take `±n` Users 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` Notes. + * Skip the first `n` Users. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * - * Filter by unique combinations of Notes. + * Filter by unique combinations of Users. */ - distinct?: NoteScalarFieldEnum | NoteScalarFieldEnum[] + distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] } /** - * Note findFirstOrThrow + * User findFirstOrThrow */ - export type NoteFindFirstOrThrowArgs = { + export type UserFindFirstOrThrowArgs = { /** - * Select specific fields to fetch from the Note + * Select specific fields to fetch from the User */ - select?: NoteSelect | null + select?: UserSelect | null /** - * Filter, which Note to fetch. + * Choose, which related nodes to fetch as well */ - where?: NoteWhereInput + include?: UserInclude | null + /** + * Filter, which User to fetch. + */ + where?: UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Notes to fetch. + * Determine the order of Users to fetch. */ - orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for searching for Notes. + * Sets the position for searching for Users. */ - cursor?: NoteWhereUniqueInput + cursor?: UserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Notes from the position of the cursor. + * Take `±n` Users 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` Notes. + * Skip the first `n` Users. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * - * Filter by unique combinations of Notes. + * Filter by unique combinations of Users. */ - distinct?: NoteScalarFieldEnum | NoteScalarFieldEnum[] + distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] } /** - * Note findMany + * User findMany */ - export type NoteFindManyArgs = { + export type UserFindManyArgs = { /** - * Select specific fields to fetch from the Note + * Select specific fields to fetch from the User */ - select?: NoteSelect | null + select?: UserSelect | null /** - * Filter, which Notes to fetch. + * Choose, which related nodes to fetch as well */ - where?: NoteWhereInput + include?: UserInclude | null + /** + * Filter, which Users to fetch. + */ + where?: UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Notes to fetch. + * Determine the order of Users to fetch. */ - orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for listing Notes. + * Sets the position for listing Users. */ - cursor?: NoteWhereUniqueInput + cursor?: UserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Notes from the position of the cursor. + * Take `±n` Users 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` Notes. + * Skip the first `n` Users. */ skip?: number + distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] + } + + /** + * User create + */ + export type UserCreateArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * The data needed to create a User. + */ + data: XOR + } + + /** + * User createMany + */ + export type UserCreateManyArgs = { + /** + * The data used to create many Users. + */ + data: UserCreateManyInput | UserCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * User createManyAndReturn + */ + export type UserCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelectCreateManyAndReturn | null + /** + * The data used to create many Users. + */ + data: UserCreateManyInput | UserCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * User update + */ + export type UserUpdateArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * The data needed to update a User. + */ + data: XOR + /** + * Choose, which User to update. + */ + where: UserWhereUniqueInput + } + + /** + * User updateMany + */ + export type UserUpdateManyArgs = { + /** + * The data used to update Users. + */ + data: XOR + /** + * Filter which Users to update + */ + where?: UserWhereInput + } + + /** + * User upsert + */ + export type UserUpsertArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * The filter to search for the User to update in case it exists. + */ + where: UserWhereUniqueInput + /** + * In case the User found by the `where` argument doesn't exist, create a new User with this data. + */ + create: XOR + /** + * In case the User was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * User delete + */ + export type UserDeleteArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter which User to delete. + */ + where: UserWhereUniqueInput + } + + /** + * User deleteMany + */ + export type UserDeleteManyArgs = { + /** + * Filter which Users to delete + */ + where?: UserWhereInput + } + + /** + * User.accounts + */ + export type User$accountsArgs = { + /** + * Select specific fields to fetch from the Account + */ + select?: AccountSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AccountInclude | null + where?: AccountWhereInput + orderBy?: AccountOrderByWithRelationInput | AccountOrderByWithRelationInput[] + cursor?: AccountWhereUniqueInput + take?: number + skip?: number + distinct?: AccountScalarFieldEnum | AccountScalarFieldEnum[] + } + + /** + * User.aiFeedback + */ + export type User$aiFeedbackArgs = { + /** + * Select specific fields to fetch from the AiFeedback + */ + select?: AiFeedbackSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AiFeedbackInclude | null + where?: AiFeedbackWhereInput + orderBy?: AiFeedbackOrderByWithRelationInput | AiFeedbackOrderByWithRelationInput[] + cursor?: AiFeedbackWhereUniqueInput + take?: number + skip?: number + distinct?: AiFeedbackScalarFieldEnum | AiFeedbackScalarFieldEnum[] + } + + /** + * User.labels + */ + export type User$labelsArgs = { + /** + * Select specific fields to fetch from the Label + */ + select?: LabelSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LabelInclude | null + where?: LabelWhereInput + orderBy?: LabelOrderByWithRelationInput | LabelOrderByWithRelationInput[] + cursor?: LabelWhereUniqueInput + take?: number + skip?: number + distinct?: LabelScalarFieldEnum | LabelScalarFieldEnum[] + } + + /** + * User.memoryEchoInsights + */ + export type User$memoryEchoInsightsArgs = { + /** + * Select specific fields to fetch from the MemoryEchoInsight + */ + select?: MemoryEchoInsightSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemoryEchoInsightInclude | null + where?: MemoryEchoInsightWhereInput + orderBy?: MemoryEchoInsightOrderByWithRelationInput | MemoryEchoInsightOrderByWithRelationInput[] + cursor?: MemoryEchoInsightWhereUniqueInput + take?: number + skip?: number + distinct?: MemoryEchoInsightScalarFieldEnum | MemoryEchoInsightScalarFieldEnum[] + } + + /** + * User.notes + */ + export type User$notesArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: NoteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteInclude | null + where?: NoteWhereInput + orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] + cursor?: NoteWhereUniqueInput + take?: number + skip?: number distinct?: NoteScalarFieldEnum | NoteScalarFieldEnum[] } /** - * Note create + * User.sentShares */ - export type NoteCreateArgs = { + export type User$sentSharesArgs = { /** - * Select specific fields to fetch from the Note + * Select specific fields to fetch from the NoteShare */ - select?: NoteSelect | null + select?: NoteShareSelect | null /** - * The data needed to create a Note. + * Choose, which related nodes to fetch as well */ - data: XOR + include?: NoteShareInclude | null + where?: NoteShareWhereInput + orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] + cursor?: NoteShareWhereUniqueInput + take?: number + skip?: number + distinct?: NoteShareScalarFieldEnum | NoteShareScalarFieldEnum[] } /** - * Note createMany + * User.receivedShares */ - export type NoteCreateManyArgs = { + export type User$receivedSharesArgs = { /** - * The data used to create many Notes. + * Select specific fields to fetch from the NoteShare */ - data: NoteCreateManyInput | NoteCreateManyInput[] + select?: NoteShareSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteShareInclude | null + where?: NoteShareWhereInput + orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] + cursor?: NoteShareWhereUniqueInput + take?: number + skip?: number + distinct?: NoteShareScalarFieldEnum | NoteShareScalarFieldEnum[] } /** - * Note createManyAndReturn + * User.notebooks */ - export type NoteCreateManyAndReturnArgs = { + export type User$notebooksArgs = { /** - * Select specific fields to fetch from the Note + * Select specific fields to fetch from the Notebook */ - select?: NoteSelectCreateManyAndReturn | null + select?: NotebookSelect | null /** - * The data used to create many Notes. + * Choose, which related nodes to fetch as well */ - data: NoteCreateManyInput | NoteCreateManyInput[] + include?: NotebookInclude | null + where?: NotebookWhereInput + orderBy?: NotebookOrderByWithRelationInput | NotebookOrderByWithRelationInput[] + cursor?: NotebookWhereUniqueInput + take?: number + skip?: number + distinct?: NotebookScalarFieldEnum | NotebookScalarFieldEnum[] } /** - * Note update + * User.sessions */ - export type NoteUpdateArgs = { + export type User$sessionsArgs = { /** - * Select specific fields to fetch from the Note + * Select specific fields to fetch from the Session */ - select?: NoteSelect | null + select?: SessionSelect | null /** - * The data needed to update a Note. + * Choose, which related nodes to fetch as well */ - data: XOR - /** - * Choose, which Note to update. - */ - where: NoteWhereUniqueInput + include?: SessionInclude | null + where?: SessionWhereInput + orderBy?: SessionOrderByWithRelationInput | SessionOrderByWithRelationInput[] + cursor?: SessionWhereUniqueInput + take?: number + skip?: number + distinct?: SessionScalarFieldEnum | SessionScalarFieldEnum[] } /** - * Note updateMany + * User.aiSettings */ - export type NoteUpdateManyArgs = { + export type User$aiSettingsArgs = { /** - * The data used to update Notes. + * Select specific fields to fetch from the UserAISettings */ - data: XOR + select?: UserAISettingsSelect | null /** - * Filter which Notes to update + * Choose, which related nodes to fetch as well */ - where?: NoteWhereInput + include?: UserAISettingsInclude | null + where?: UserAISettingsWhereInput } /** - * Note upsert + * User without action */ - export type NoteUpsertArgs = { + export type UserDefaultArgs = { /** - * Select specific fields to fetch from the Note + * Select specific fields to fetch from the User */ - select?: NoteSelect | null + select?: UserSelect | null /** - * The filter to search for the Note to update in case it exists. + * Choose, which related nodes to fetch as well */ - where: NoteWhereUniqueInput - /** - * In case the Note found by the `where` argument doesn't exist, create a new Note with this data. - */ - create: XOR - /** - * In case the Note was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * Note delete - */ - export type NoteDeleteArgs = { - /** - * Select specific fields to fetch from the Note - */ - select?: NoteSelect | null - /** - * Filter which Note to delete. - */ - where: NoteWhereUniqueInput - } - - /** - * Note deleteMany - */ - export type NoteDeleteManyArgs = { - /** - * Filter which Notes to delete - */ - where?: NoteWhereInput - } - - /** - * Note without action - */ - export type NoteDefaultArgs = { - /** - * Select specific fields to fetch from the Note - */ - select?: NoteSelect | null + include?: UserInclude | null } @@ -3229,6 +3592,10 @@ export namespace Prisma { userId?: boolean createdAt?: boolean updatedAt?: boolean + labels?: boolean | Notebook$labelsArgs + notes?: boolean | Notebook$notesArgs + user?: boolean | UserDefaultArgs + _count?: boolean | NotebookCountOutputTypeDefaultArgs }, ExtArgs["result"]["notebook"]> export type NotebookSelectCreateManyAndReturn = $Extensions.GetSelect<{ @@ -3240,6 +3607,7 @@ export namespace Prisma { userId?: boolean createdAt?: boolean updatedAt?: boolean + user?: boolean | UserDefaultArgs }, ExtArgs["result"]["notebook"]> export type NotebookSelectScalar = { @@ -3253,10 +3621,23 @@ export namespace Prisma { updatedAt?: boolean } + export type NotebookInclude = { + labels?: boolean | Notebook$labelsArgs + notes?: boolean | Notebook$notesArgs + user?: boolean | UserDefaultArgs + _count?: boolean | NotebookCountOutputTypeDefaultArgs + } + export type NotebookIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + } export type $NotebookPayload = { name: "Notebook" - objects: {} + objects: { + labels: Prisma.$LabelPayload[] + notes: Prisma.$NotePayload[] + user: Prisma.$UserPayload + } scalars: $Extensions.GetPayloadResult<{ id: string name: string @@ -3630,6 +4011,9 @@ export namespace Prisma { */ export interface Prisma__NotebookClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" + labels = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + notes = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -3679,6 +4063,10 @@ export namespace Prisma { * Select specific fields to fetch from the Notebook */ select?: NotebookSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NotebookInclude | null /** * Filter, which Notebook to fetch. */ @@ -3693,6 +4081,10 @@ export namespace Prisma { * Select specific fields to fetch from the Notebook */ select?: NotebookSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NotebookInclude | null /** * Filter, which Notebook to fetch. */ @@ -3707,6 +4099,10 @@ export namespace Prisma { * Select specific fields to fetch from the Notebook */ select?: NotebookSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NotebookInclude | null /** * Filter, which Notebook to fetch. */ @@ -3751,6 +4147,10 @@ export namespace Prisma { * Select specific fields to fetch from the Notebook */ select?: NotebookSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NotebookInclude | null /** * Filter, which Notebook to fetch. */ @@ -3795,6 +4195,10 @@ export namespace Prisma { * Select specific fields to fetch from the Notebook */ select?: NotebookSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NotebookInclude | null /** * Filter, which Notebooks to fetch. */ @@ -3834,6 +4238,10 @@ export namespace Prisma { * Select specific fields to fetch from the Notebook */ select?: NotebookSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NotebookInclude | null /** * The data needed to create a Notebook. */ @@ -3848,6 +4256,7 @@ export namespace Prisma { * The data used to create many Notebooks. */ data: NotebookCreateManyInput | NotebookCreateManyInput[] + skipDuplicates?: boolean } /** @@ -3862,6 +4271,11 @@ export namespace Prisma { * The data used to create many Notebooks. */ data: NotebookCreateManyInput | NotebookCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: NotebookIncludeCreateManyAndReturn | null } /** @@ -3872,6 +4286,10 @@ export namespace Prisma { * Select specific fields to fetch from the Notebook */ select?: NotebookSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NotebookInclude | null /** * The data needed to update a Notebook. */ @@ -3904,6 +4322,10 @@ export namespace Prisma { * Select specific fields to fetch from the Notebook */ select?: NotebookSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NotebookInclude | null /** * The filter to search for the Notebook to update in case it exists. */ @@ -3926,6 +4348,10 @@ export namespace Prisma { * Select specific fields to fetch from the Notebook */ select?: NotebookSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NotebookInclude | null /** * Filter which Notebook to delete. */ @@ -3942,6 +4368,46 @@ export namespace Prisma { where?: NotebookWhereInput } + /** + * Notebook.labels + */ + export type Notebook$labelsArgs = { + /** + * Select specific fields to fetch from the Label + */ + select?: LabelSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LabelInclude | null + where?: LabelWhereInput + orderBy?: LabelOrderByWithRelationInput | LabelOrderByWithRelationInput[] + cursor?: LabelWhereUniqueInput + take?: number + skip?: number + distinct?: LabelScalarFieldEnum | LabelScalarFieldEnum[] + } + + /** + * Notebook.notes + */ + export type Notebook$notesArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: NoteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteInclude | null + where?: NoteWhereInput + orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] + cursor?: NoteWhereUniqueInput + take?: number + skip?: number + distinct?: NoteScalarFieldEnum | NoteScalarFieldEnum[] + } + /** * Notebook without action */ @@ -3950,6 +4416,10 @@ export namespace Prisma { * Select specific fields to fetch from the Notebook */ select?: NotebookSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NotebookInclude | null } @@ -4133,6 +4603,10 @@ export namespace Prisma { userId?: boolean createdAt?: boolean updatedAt?: boolean + user?: boolean | Label$userArgs + notebook?: boolean | Label$notebookArgs + notes?: boolean | Label$notesArgs + _count?: boolean | LabelCountOutputTypeDefaultArgs }, ExtArgs["result"]["label"]> export type LabelSelectCreateManyAndReturn = $Extensions.GetSelect<{ @@ -4143,6 +4617,8 @@ export namespace Prisma { userId?: boolean createdAt?: boolean updatedAt?: boolean + user?: boolean | Label$userArgs + notebook?: boolean | Label$notebookArgs }, ExtArgs["result"]["label"]> export type LabelSelectScalar = { @@ -4155,10 +4631,24 @@ export namespace Prisma { updatedAt?: boolean } + export type LabelInclude = { + user?: boolean | Label$userArgs + notebook?: boolean | Label$notebookArgs + notes?: boolean | Label$notesArgs + _count?: boolean | LabelCountOutputTypeDefaultArgs + } + export type LabelIncludeCreateManyAndReturn = { + user?: boolean | Label$userArgs + notebook?: boolean | Label$notebookArgs + } export type $LabelPayload = { name: "Label" - objects: {} + objects: { + user: Prisma.$UserPayload | null + notebook: Prisma.$NotebookPayload | null + notes: Prisma.$NotePayload[] + } scalars: $Extensions.GetPayloadResult<{ id: string name: string @@ -4531,6 +5021,9 @@ export namespace Prisma { */ export interface Prisma__LabelClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + notebook = {}>(args?: Subset>): Prisma__NotebookClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + notes = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -4579,6 +5072,10 @@ export namespace Prisma { * Select specific fields to fetch from the Label */ select?: LabelSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LabelInclude | null /** * Filter, which Label to fetch. */ @@ -4593,6 +5090,10 @@ export namespace Prisma { * Select specific fields to fetch from the Label */ select?: LabelSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LabelInclude | null /** * Filter, which Label to fetch. */ @@ -4607,6 +5108,10 @@ export namespace Prisma { * Select specific fields to fetch from the Label */ select?: LabelSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LabelInclude | null /** * Filter, which Label to fetch. */ @@ -4651,6 +5156,10 @@ export namespace Prisma { * Select specific fields to fetch from the Label */ select?: LabelSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LabelInclude | null /** * Filter, which Label to fetch. */ @@ -4695,6 +5204,10 @@ export namespace Prisma { * Select specific fields to fetch from the Label */ select?: LabelSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LabelInclude | null /** * Filter, which Labels to fetch. */ @@ -4734,6 +5247,10 @@ export namespace Prisma { * Select specific fields to fetch from the Label */ select?: LabelSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LabelInclude | null /** * The data needed to create a Label. */ @@ -4748,6 +5265,7 @@ export namespace Prisma { * The data used to create many Labels. */ data: LabelCreateManyInput | LabelCreateManyInput[] + skipDuplicates?: boolean } /** @@ -4762,6 +5280,11 @@ export namespace Prisma { * The data used to create many Labels. */ data: LabelCreateManyInput | LabelCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: LabelIncludeCreateManyAndReturn | null } /** @@ -4772,6 +5295,10 @@ export namespace Prisma { * Select specific fields to fetch from the Label */ select?: LabelSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LabelInclude | null /** * The data needed to update a Label. */ @@ -4804,6 +5331,10 @@ export namespace Prisma { * Select specific fields to fetch from the Label */ select?: LabelSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LabelInclude | null /** * The filter to search for the Label to update in case it exists. */ @@ -4826,6 +5357,10 @@ export namespace Prisma { * Select specific fields to fetch from the Label */ select?: LabelSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LabelInclude | null /** * Filter which Label to delete. */ @@ -4842,6 +5377,56 @@ export namespace Prisma { where?: LabelWhereInput } + /** + * Label.user + */ + export type Label$userArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + where?: UserWhereInput + } + + /** + * Label.notebook + */ + export type Label$notebookArgs = { + /** + * Select specific fields to fetch from the Notebook + */ + select?: NotebookSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NotebookInclude | null + where?: NotebookWhereInput + } + + /** + * Label.notes + */ + export type Label$notesArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: NoteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteInclude | null + where?: NoteWhereInput + orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] + cursor?: NoteWhereUniqueInput + take?: number + skip?: number + distinct?: NoteScalarFieldEnum | NoteScalarFieldEnum[] + } + /** * Label without action */ @@ -4850,408 +5435,709 @@ export namespace Prisma { * Select specific fields to fetch from the Label */ select?: LabelSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LabelInclude | null } /** - * Model User + * Model Note */ - export type AggregateUser = { - _count: UserCountAggregateOutputType | null - _min: UserMinAggregateOutputType | null - _max: UserMaxAggregateOutputType | null + export type AggregateNote = { + _count: NoteCountAggregateOutputType | null + _avg: NoteAvgAggregateOutputType | null + _sum: NoteSumAggregateOutputType | null + _min: NoteMinAggregateOutputType | null + _max: NoteMaxAggregateOutputType | null } - export type UserMinAggregateOutputType = { + export type NoteAvgAggregateOutputType = { + order: number | null + aiConfidence: number | null + languageConfidence: number | null + } + + export type NoteSumAggregateOutputType = { + order: number | null + aiConfidence: number | null + languageConfidence: number | null + } + + export type NoteMinAggregateOutputType = { id: string | null - name: string | null - email: string | null - emailVerified: Date | null - password: string | null - role: string | null - image: string | null - theme: string | null - resetToken: string | null - resetTokenExpiry: Date | null + title: string | null + content: string | null + color: string | null + isPinned: boolean | null + isArchived: boolean | null + trashedAt: Date | null + type: string | null + dismissedFromRecent: boolean | null + checkItems: string | null + labels: string | null + images: string | null + links: string | null + reminder: Date | null + isReminderDone: boolean | null + reminderRecurrence: string | null + reminderLocation: string | null + isMarkdown: boolean | null + size: string | null + sharedWith: string | null + userId: string | null + order: number | null + notebookId: string | null createdAt: Date | null updatedAt: Date | null + contentUpdatedAt: Date | null + autoGenerated: boolean | null + aiProvider: string | null + aiConfidence: number | null + language: string | null + languageConfidence: number | null + lastAiAnalysis: Date | null } - export type UserMaxAggregateOutputType = { + export type NoteMaxAggregateOutputType = { id: string | null - name: string | null - email: string | null - emailVerified: Date | null - password: string | null - role: string | null - image: string | null - theme: string | null - resetToken: string | null - resetTokenExpiry: Date | null + title: string | null + content: string | null + color: string | null + isPinned: boolean | null + isArchived: boolean | null + trashedAt: Date | null + type: string | null + dismissedFromRecent: boolean | null + checkItems: string | null + labels: string | null + images: string | null + links: string | null + reminder: Date | null + isReminderDone: boolean | null + reminderRecurrence: string | null + reminderLocation: string | null + isMarkdown: boolean | null + size: string | null + sharedWith: string | null + userId: string | null + order: number | null + notebookId: string | null createdAt: Date | null updatedAt: Date | null + contentUpdatedAt: Date | null + autoGenerated: boolean | null + aiProvider: string | null + aiConfidence: number | null + language: string | null + languageConfidence: number | null + lastAiAnalysis: Date | null } - export type UserCountAggregateOutputType = { + export type NoteCountAggregateOutputType = { id: number - name: number - email: number - emailVerified: number - password: number - role: number - image: number - theme: number - resetToken: number - resetTokenExpiry: number + title: number + content: number + color: number + isPinned: number + isArchived: number + trashedAt: number + type: number + dismissedFromRecent: number + checkItems: number + labels: number + images: number + links: number + reminder: number + isReminderDone: number + reminderRecurrence: number + reminderLocation: number + isMarkdown: number + size: number + sharedWith: number + userId: number + order: number + notebookId: number createdAt: number updatedAt: number + contentUpdatedAt: number + autoGenerated: number + aiProvider: number + aiConfidence: number + language: number + languageConfidence: number + lastAiAnalysis: number _all: number } - export type UserMinAggregateInputType = { - id?: true - name?: true - email?: true - emailVerified?: true - password?: true - role?: true - image?: true - theme?: true - resetToken?: true - resetTokenExpiry?: true - createdAt?: true - updatedAt?: true + export type NoteAvgAggregateInputType = { + order?: true + aiConfidence?: true + languageConfidence?: true } - export type UserMaxAggregateInputType = { - id?: true - name?: true - email?: true - emailVerified?: true - password?: true - role?: true - image?: true - theme?: true - resetToken?: true - resetTokenExpiry?: true - createdAt?: true - updatedAt?: true + export type NoteSumAggregateInputType = { + order?: true + aiConfidence?: true + languageConfidence?: true } - export type UserCountAggregateInputType = { + export type NoteMinAggregateInputType = { id?: true - name?: true - email?: true - emailVerified?: true - password?: true - role?: true - image?: true - theme?: true - resetToken?: true - resetTokenExpiry?: true + title?: true + content?: true + color?: true + isPinned?: true + isArchived?: true + trashedAt?: true + type?: true + dismissedFromRecent?: true + checkItems?: true + labels?: true + images?: true + links?: true + reminder?: true + isReminderDone?: true + reminderRecurrence?: true + reminderLocation?: true + isMarkdown?: true + size?: true + sharedWith?: true + userId?: true + order?: true + notebookId?: true createdAt?: true updatedAt?: true + contentUpdatedAt?: true + autoGenerated?: true + aiProvider?: true + aiConfidence?: true + language?: true + languageConfidence?: true + lastAiAnalysis?: true + } + + export type NoteMaxAggregateInputType = { + id?: true + title?: true + content?: true + color?: true + isPinned?: true + isArchived?: true + trashedAt?: true + type?: true + dismissedFromRecent?: true + checkItems?: true + labels?: true + images?: true + links?: true + reminder?: true + isReminderDone?: true + reminderRecurrence?: true + reminderLocation?: true + isMarkdown?: true + size?: true + sharedWith?: true + userId?: true + order?: true + notebookId?: true + createdAt?: true + updatedAt?: true + contentUpdatedAt?: true + autoGenerated?: true + aiProvider?: true + aiConfidence?: true + language?: true + languageConfidence?: true + lastAiAnalysis?: true + } + + export type NoteCountAggregateInputType = { + id?: true + title?: true + content?: true + color?: true + isPinned?: true + isArchived?: true + trashedAt?: true + type?: true + dismissedFromRecent?: true + checkItems?: true + labels?: true + images?: true + links?: true + reminder?: true + isReminderDone?: true + reminderRecurrence?: true + reminderLocation?: true + isMarkdown?: true + size?: true + sharedWith?: true + userId?: true + order?: true + notebookId?: true + createdAt?: true + updatedAt?: true + contentUpdatedAt?: true + autoGenerated?: true + aiProvider?: true + aiConfidence?: true + language?: true + languageConfidence?: true + lastAiAnalysis?: true _all?: true } - export type UserAggregateArgs = { + export type NoteAggregateArgs = { /** - * Filter which User to aggregate. + * Filter which Note to aggregate. */ - where?: UserWhereInput + where?: NoteWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Users to fetch. + * Determine the order of Notes to fetch. */ - orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] + orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ - cursor?: UserWhereUniqueInput + cursor?: NoteWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Users from the position of the cursor. + * Take `±n` Notes 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` Users. + * Skip the first `n` Notes. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * - * Count returned Users + * Count returned Notes **/ - _count?: true | UserCountAggregateInputType + _count?: true | NoteCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: NoteAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: NoteSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ - _min?: UserMinAggregateInputType + _min?: NoteMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ - _max?: UserMaxAggregateInputType + _max?: NoteMaxAggregateInputType } - export type GetUserAggregateType = { - [P in keyof T & keyof AggregateUser]: P extends '_count' | 'count' + export type GetNoteAggregateType = { + [P in keyof T & keyof AggregateNote]: P extends '_count' | 'count' ? T[P] extends true ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } - export type UserGroupByArgs = { - where?: UserWhereInput - orderBy?: UserOrderByWithAggregationInput | UserOrderByWithAggregationInput[] - by: UserScalarFieldEnum[] | UserScalarFieldEnum - having?: UserScalarWhereWithAggregatesInput + export type NoteGroupByArgs = { + where?: NoteWhereInput + orderBy?: NoteOrderByWithAggregationInput | NoteOrderByWithAggregationInput[] + by: NoteScalarFieldEnum[] | NoteScalarFieldEnum + having?: NoteScalarWhereWithAggregatesInput take?: number skip?: number - _count?: UserCountAggregateInputType | true - _min?: UserMinAggregateInputType - _max?: UserMaxAggregateInputType + _count?: NoteCountAggregateInputType | true + _avg?: NoteAvgAggregateInputType + _sum?: NoteSumAggregateInputType + _min?: NoteMinAggregateInputType + _max?: NoteMaxAggregateInputType } - export type UserGroupByOutputType = { + export type NoteGroupByOutputType = { id: string - name: string | null - email: string - emailVerified: Date | null - password: string | null - role: string - image: string | null - theme: string - resetToken: string | null - resetTokenExpiry: Date | null + title: string | null + content: string + color: string + isPinned: boolean + isArchived: boolean + trashedAt: Date | null + type: string + dismissedFromRecent: boolean + checkItems: string | null + labels: string | null + images: string | null + links: string | null + reminder: Date | null + isReminderDone: boolean + reminderRecurrence: string | null + reminderLocation: string | null + isMarkdown: boolean + size: string + sharedWith: string | null + userId: string | null + order: number + notebookId: string | null createdAt: Date updatedAt: Date - _count: UserCountAggregateOutputType | null - _min: UserMinAggregateOutputType | null - _max: UserMaxAggregateOutputType | null + contentUpdatedAt: Date + autoGenerated: boolean | null + aiProvider: string | null + aiConfidence: number | null + language: string | null + languageConfidence: number | null + lastAiAnalysis: Date | null + _count: NoteCountAggregateOutputType | null + _avg: NoteAvgAggregateOutputType | null + _sum: NoteSumAggregateOutputType | null + _min: NoteMinAggregateOutputType | null + _max: NoteMaxAggregateOutputType | null } - type GetUserGroupByPayload = Prisma.PrismaPromise< + type GetNoteGroupByPayload = Prisma.PrismaPromise< Array< - PickEnumerable & + PickEnumerable & { - [P in ((keyof T) & (keyof UserGroupByOutputType))]: P extends '_count' + [P in ((keyof T) & (keyof NoteGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } > > - export type UserSelect = $Extensions.GetSelect<{ + export type NoteSelect = $Extensions.GetSelect<{ id?: boolean - name?: boolean - email?: boolean - emailVerified?: boolean - password?: boolean - role?: boolean - image?: boolean - theme?: boolean - resetToken?: boolean - resetTokenExpiry?: boolean + title?: boolean + content?: boolean + color?: boolean + isPinned?: boolean + isArchived?: boolean + trashedAt?: boolean + type?: boolean + dismissedFromRecent?: boolean + checkItems?: boolean + labels?: boolean + images?: boolean + links?: boolean + reminder?: boolean + isReminderDone?: boolean + reminderRecurrence?: boolean + reminderLocation?: boolean + isMarkdown?: boolean + size?: boolean + sharedWith?: boolean + userId?: boolean + order?: boolean + notebookId?: boolean createdAt?: boolean updatedAt?: boolean - }, ExtArgs["result"]["user"]> + contentUpdatedAt?: boolean + autoGenerated?: boolean + aiProvider?: boolean + aiConfidence?: boolean + language?: boolean + languageConfidence?: boolean + lastAiAnalysis?: boolean + aiFeedback?: boolean | Note$aiFeedbackArgs + memoryEchoAsNote2?: boolean | Note$memoryEchoAsNote2Args + memoryEchoAsNote1?: boolean | Note$memoryEchoAsNote1Args + notebook?: boolean | Note$notebookArgs + user?: boolean | Note$userArgs + shares?: boolean | Note$sharesArgs + labelRelations?: boolean | Note$labelRelationsArgs + noteEmbedding?: boolean | Note$noteEmbeddingArgs + _count?: boolean | NoteCountOutputTypeDefaultArgs + }, ExtArgs["result"]["note"]> - export type UserSelectCreateManyAndReturn = $Extensions.GetSelect<{ + export type NoteSelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean - name?: boolean - email?: boolean - emailVerified?: boolean - password?: boolean - role?: boolean - image?: boolean - theme?: boolean - resetToken?: boolean - resetTokenExpiry?: boolean + title?: boolean + content?: boolean + color?: boolean + isPinned?: boolean + isArchived?: boolean + trashedAt?: boolean + type?: boolean + dismissedFromRecent?: boolean + checkItems?: boolean + labels?: boolean + images?: boolean + links?: boolean + reminder?: boolean + isReminderDone?: boolean + reminderRecurrence?: boolean + reminderLocation?: boolean + isMarkdown?: boolean + size?: boolean + sharedWith?: boolean + userId?: boolean + order?: boolean + notebookId?: boolean createdAt?: boolean updatedAt?: boolean - }, ExtArgs["result"]["user"]> + contentUpdatedAt?: boolean + autoGenerated?: boolean + aiProvider?: boolean + aiConfidence?: boolean + language?: boolean + languageConfidence?: boolean + lastAiAnalysis?: boolean + notebook?: boolean | Note$notebookArgs + user?: boolean | Note$userArgs + }, ExtArgs["result"]["note"]> - export type UserSelectScalar = { + export type NoteSelectScalar = { id?: boolean - name?: boolean - email?: boolean - emailVerified?: boolean - password?: boolean - role?: boolean - image?: boolean - theme?: boolean - resetToken?: boolean - resetTokenExpiry?: boolean + title?: boolean + content?: boolean + color?: boolean + isPinned?: boolean + isArchived?: boolean + trashedAt?: boolean + type?: boolean + dismissedFromRecent?: boolean + checkItems?: boolean + labels?: boolean + images?: boolean + links?: boolean + reminder?: boolean + isReminderDone?: boolean + reminderRecurrence?: boolean + reminderLocation?: boolean + isMarkdown?: boolean + size?: boolean + sharedWith?: boolean + userId?: boolean + order?: boolean + notebookId?: boolean createdAt?: boolean updatedAt?: boolean + contentUpdatedAt?: boolean + autoGenerated?: boolean + aiProvider?: boolean + aiConfidence?: boolean + language?: boolean + languageConfidence?: boolean + lastAiAnalysis?: boolean } + export type NoteInclude = { + aiFeedback?: boolean | Note$aiFeedbackArgs + memoryEchoAsNote2?: boolean | Note$memoryEchoAsNote2Args + memoryEchoAsNote1?: boolean | Note$memoryEchoAsNote1Args + notebook?: boolean | Note$notebookArgs + user?: boolean | Note$userArgs + shares?: boolean | Note$sharesArgs + labelRelations?: boolean | Note$labelRelationsArgs + noteEmbedding?: boolean | Note$noteEmbeddingArgs + _count?: boolean | NoteCountOutputTypeDefaultArgs + } + export type NoteIncludeCreateManyAndReturn = { + notebook?: boolean | Note$notebookArgs + user?: boolean | Note$userArgs + } - export type $UserPayload = { - name: "User" - objects: {} + export type $NotePayload = { + name: "Note" + objects: { + aiFeedback: Prisma.$AiFeedbackPayload[] + memoryEchoAsNote2: Prisma.$MemoryEchoInsightPayload[] + memoryEchoAsNote1: Prisma.$MemoryEchoInsightPayload[] + notebook: Prisma.$NotebookPayload | null + user: Prisma.$UserPayload | null + shares: Prisma.$NoteSharePayload[] + labelRelations: Prisma.$LabelPayload[] + noteEmbedding: Prisma.$NoteEmbeddingPayload | null + } scalars: $Extensions.GetPayloadResult<{ id: string - name: string | null - email: string - emailVerified: Date | null - password: string | null - role: string - image: string | null - theme: string - resetToken: string | null - resetTokenExpiry: Date | null + title: string | null + content: string + color: string + isPinned: boolean + isArchived: boolean + trashedAt: Date | null + type: string + dismissedFromRecent: boolean + checkItems: string | null + labels: string | null + images: string | null + links: string | null + reminder: Date | null + isReminderDone: boolean + reminderRecurrence: string | null + reminderLocation: string | null + isMarkdown: boolean + size: string + sharedWith: string | null + userId: string | null + order: number + notebookId: string | null createdAt: Date updatedAt: Date - }, ExtArgs["result"]["user"]> + contentUpdatedAt: Date + autoGenerated: boolean | null + aiProvider: string | null + aiConfidence: number | null + language: string | null + languageConfidence: number | null + lastAiAnalysis: Date | null + }, ExtArgs["result"]["note"]> composites: {} } - type UserGetPayload = $Result.GetResult + type NoteGetPayload = $Result.GetResult - type UserCountArgs = - Omit & { - select?: UserCountAggregateInputType | true + type NoteCountArgs = + Omit & { + select?: NoteCountAggregateInputType | true } - export interface UserDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['User'], meta: { name: 'User' } } + export interface NoteDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Note'], meta: { name: 'Note' } } /** - * Find zero or one User that matches the filter. - * @param {UserFindUniqueArgs} args - Arguments to find a User + * Find zero or one Note that matches the filter. + * @param {NoteFindUniqueArgs} args - Arguments to find a Note * @example - * // Get one User - * const user = await prisma.user.findUnique({ + * // Get one Note + * const note = await prisma.note.findUnique({ * where: { * // ... provide filter here * } * }) */ - findUnique(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + findUnique(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** - * Find one User that matches the filter or throw an error with `error.code='P2025'` + * Find one Note that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. - * @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User + * @param {NoteFindUniqueOrThrowArgs} args - Arguments to find a Note * @example - * // Get one User - * const user = await prisma.user.findUniqueOrThrow({ + * // Get one Note + * const note = await prisma.note.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ - findUniqueOrThrow(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + findUniqueOrThrow(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** - * Find the first User that matches the filter. + * Find the first Note 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 {UserFindFirstArgs} args - Arguments to find a User + * @param {NoteFindFirstArgs} args - Arguments to find a Note * @example - * // Get one User - * const user = await prisma.user.findFirst({ + * // Get one Note + * const note = await prisma.note.findFirst({ * where: { * // ... provide filter here * } * }) */ - findFirst(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + findFirst(args?: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** - * Find the first User that matches the filter or + * Find the first Note 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 {UserFindFirstOrThrowArgs} args - Arguments to find a User + * @param {NoteFindFirstOrThrowArgs} args - Arguments to find a Note * @example - * // Get one User - * const user = await prisma.user.findFirstOrThrow({ + * // Get one Note + * const note = await prisma.note.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ - findFirstOrThrow(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + findFirstOrThrow(args?: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** - * Find zero or more Users that matches the filter. + * Find zero or more Notes 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 {UserFindManyArgs} args - Arguments to filter and select certain fields only. + * @param {NoteFindManyArgs} args - Arguments to filter and select certain fields only. * @example - * // Get all Users - * const users = await prisma.user.findMany() + * // Get all Notes + * const notes = await prisma.note.findMany() * - * // Get first 10 Users - * const users = await prisma.user.findMany({ take: 10 }) + * // Get first 10 Notes + * const notes = await prisma.note.findMany({ take: 10 }) * * // Only select the `id` - * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) + * const noteWithIdOnly = await prisma.note.findMany({ select: { id: true } }) * */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** - * Create a User. - * @param {UserCreateArgs} args - Arguments to create a User. + * Create a Note. + * @param {NoteCreateArgs} args - Arguments to create a Note. * @example - * // Create one User - * const User = await prisma.user.create({ + * // Create one Note + * const Note = await prisma.note.create({ * data: { - * // ... data to create a User + * // ... data to create a Note * } * }) * */ - create(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "create">, never, ExtArgs> + create(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "create">, never, ExtArgs> /** - * Create many Users. - * @param {UserCreateManyArgs} args - Arguments to create many Users. + * Create many Notes. + * @param {NoteCreateManyArgs} args - Arguments to create many Notes. * @example - * // Create many Users - * const user = await prisma.user.createMany({ + * // Create many Notes + * const note = await prisma.note.createMany({ * data: [ * // ... provide data here * ] * }) * */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise + createMany(args?: SelectSubset>): Prisma.PrismaPromise /** - * Create many Users and returns the data saved in the database. - * @param {UserCreateManyAndReturnArgs} args - Arguments to create many Users. + * Create many Notes and returns the data saved in the database. + * @param {NoteCreateManyAndReturnArgs} args - Arguments to create many Notes. * @example - * // Create many Users - * const user = await prisma.user.createManyAndReturn({ + * // Create many Notes + * const note = await prisma.note.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * - * // Create many Users and only return the `id` - * const userWithIdOnly = await prisma.user.createManyAndReturn({ + * // Create many Notes and only return the `id` + * const noteWithIdOnly = await prisma.note.createManyAndReturn({ * select: { id: true }, * data: [ * // ... provide data here @@ -5261,28 +6147,28 @@ export namespace Prisma { * Read more here: https://pris.ly/d/null-undefined * */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> /** - * Delete a User. - * @param {UserDeleteArgs} args - Arguments to delete one User. + * Delete a Note. + * @param {NoteDeleteArgs} args - Arguments to delete one Note. * @example - * // Delete one User - * const User = await prisma.user.delete({ + * // Delete one Note + * const Note = await prisma.note.delete({ * where: { - * // ... filter to delete one User + * // ... filter to delete one Note * } * }) * */ - delete(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "delete">, never, ExtArgs> + delete(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** - * Update one User. - * @param {UserUpdateArgs} args - Arguments to update one User. + * Update one Note. + * @param {NoteUpdateArgs} args - Arguments to update one Note. * @example - * // Update one User - * const user = await prisma.user.update({ + * // Update one Note + * const note = await prisma.note.update({ * where: { * // ... provide filter here * }, @@ -5292,30 +6178,30 @@ export namespace Prisma { * }) * */ - update(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "update">, never, ExtArgs> + update(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "update">, never, ExtArgs> /** - * Delete zero or more Users. - * @param {UserDeleteManyArgs} args - Arguments to filter Users to delete. + * Delete zero or more Notes. + * @param {NoteDeleteManyArgs} args - Arguments to filter Notes to delete. * @example - * // Delete a few Users - * const { count } = await prisma.user.deleteMany({ + * // Delete a few Notes + * const { count } = await prisma.note.deleteMany({ * where: { * // ... provide filter here * } * }) * */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** - * Update zero or more Users. + * Update zero or more Notes. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {UserUpdateManyArgs} args - Arguments to update one or more rows. + * @param {NoteUpdateManyArgs} args - Arguments to update one or more rows. * @example - * // Update many Users - * const user = await prisma.user.updateMany({ + * // Update many Notes + * const note = await prisma.note.updateMany({ * where: { * // ... provide filter here * }, @@ -5325,56 +6211,56 @@ export namespace Prisma { * }) * */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise + updateMany(args: SelectSubset>): Prisma.PrismaPromise /** - * Create or update one User. - * @param {UserUpsertArgs} args - Arguments to update or create a User. + * Create or update one Note. + * @param {NoteUpsertArgs} args - Arguments to update or create a Note. * @example - * // Update or create a User - * const user = await prisma.user.upsert({ + * // Update or create a Note + * const note = await prisma.note.upsert({ * create: { - * // ... data to create a User + * // ... data to create a Note * }, * update: { * // ... in case it already exists, update * }, * where: { - * // ... the filter for the User we want to update + * // ... the filter for the Note we want to update * } * }) */ - upsert(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + upsert(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "upsert">, never, ExtArgs> /** - * Count the number of Users. + * Count the number of Notes. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {UserCountArgs} args - Arguments to filter Users to count. + * @param {NoteCountArgs} args - Arguments to filter Notes to count. * @example - * // Count the number of Users - * const count = await prisma.user.count({ + * // Count the number of Notes + * const count = await prisma.note.count({ * where: { - * // ... the filter for the Users we want to count + * // ... the filter for the Notes we want to count * } * }) **/ - count( - args?: Subset, + count( + args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number - : GetScalarType + : GetScalarType : number > /** - * Allows you to perform aggregations operations on a User. + * Allows you to perform aggregations operations on a Note. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {UserAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @param {NoteAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io @@ -5394,13 +6280,13 @@ export namespace Prisma { * take: 10, * }) **/ - aggregate(args: Subset): Prisma.PrismaPromise> + aggregate(args: Subset): Prisma.PrismaPromise> /** - * Group by User. + * Group by Note. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {UserGroupByArgs} args - Group by arguments. + * @param {NoteGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ @@ -5415,14 +6301,14 @@ export namespace Prisma { * **/ groupBy< - T extends UserGroupByArgs, + T extends NoteGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake - ? { orderBy: UserGroupByArgs['orderBy'] } - : { orderBy?: UserGroupByArgs['orderBy'] }, + ? { orderBy: NoteGroupByArgs['orderBy'] } + : { orderBy?: NoteGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, @@ -5471,21 +6357,29 @@ export namespace Prisma { ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetUserGroupByPayload : Prisma.PrismaPromise + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetNoteGroupByPayload : Prisma.PrismaPromise /** - * Fields of the User model + * Fields of the Note model */ - readonly fields: UserFieldRefs; + readonly fields: NoteFieldRefs; } /** - * The delegate class that acts as a "Promise-like" for User. + * The delegate class that acts as a "Promise-like" for Note. * 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__UserClient extends Prisma.PrismaPromise { + export interface Prisma__NoteClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" + aiFeedback = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + memoryEchoAsNote2 = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + memoryEchoAsNote1 = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + notebook = {}>(args?: Subset>): Prisma__NotebookClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + shares = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + labelRelations = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + noteEmbedding = {}>(args?: Subset>): Prisma__NoteEmbeddingClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -5512,304 +6406,2441 @@ export namespace Prisma { /** - * Fields of the User model + * Fields of the Note model */ - interface UserFieldRefs { - readonly id: FieldRef<"User", 'String'> - readonly name: FieldRef<"User", 'String'> - readonly email: FieldRef<"User", 'String'> - readonly emailVerified: FieldRef<"User", 'DateTime'> - readonly password: FieldRef<"User", 'String'> - readonly role: FieldRef<"User", 'String'> - readonly image: FieldRef<"User", 'String'> - readonly theme: FieldRef<"User", 'String'> - readonly resetToken: FieldRef<"User", 'String'> - readonly resetTokenExpiry: FieldRef<"User", 'DateTime'> - readonly createdAt: FieldRef<"User", 'DateTime'> - readonly updatedAt: FieldRef<"User", 'DateTime'> + interface NoteFieldRefs { + readonly id: FieldRef<"Note", 'String'> + readonly title: FieldRef<"Note", 'String'> + readonly content: FieldRef<"Note", 'String'> + readonly color: FieldRef<"Note", 'String'> + readonly isPinned: FieldRef<"Note", 'Boolean'> + readonly isArchived: FieldRef<"Note", 'Boolean'> + readonly trashedAt: FieldRef<"Note", 'DateTime'> + readonly type: FieldRef<"Note", 'String'> + readonly dismissedFromRecent: FieldRef<"Note", 'Boolean'> + readonly checkItems: FieldRef<"Note", 'String'> + readonly labels: FieldRef<"Note", 'String'> + readonly images: FieldRef<"Note", 'String'> + readonly links: FieldRef<"Note", 'String'> + readonly reminder: FieldRef<"Note", 'DateTime'> + readonly isReminderDone: FieldRef<"Note", 'Boolean'> + readonly reminderRecurrence: FieldRef<"Note", 'String'> + readonly reminderLocation: FieldRef<"Note", 'String'> + readonly isMarkdown: FieldRef<"Note", 'Boolean'> + readonly size: FieldRef<"Note", 'String'> + readonly sharedWith: FieldRef<"Note", 'String'> + readonly userId: FieldRef<"Note", 'String'> + readonly order: FieldRef<"Note", 'Int'> + readonly notebookId: FieldRef<"Note", 'String'> + readonly createdAt: FieldRef<"Note", 'DateTime'> + readonly updatedAt: FieldRef<"Note", 'DateTime'> + readonly contentUpdatedAt: FieldRef<"Note", 'DateTime'> + readonly autoGenerated: FieldRef<"Note", 'Boolean'> + readonly aiProvider: FieldRef<"Note", 'String'> + readonly aiConfidence: FieldRef<"Note", 'Int'> + readonly language: FieldRef<"Note", 'String'> + readonly languageConfidence: FieldRef<"Note", 'Float'> + readonly lastAiAnalysis: FieldRef<"Note", 'DateTime'> } // Custom InputTypes /** - * User findUnique + * Note findUnique */ - export type UserFindUniqueArgs = { + export type NoteFindUniqueArgs = { /** - * Select specific fields to fetch from the User + * Select specific fields to fetch from the Note */ - select?: UserSelect | null + select?: NoteSelect | null /** - * Filter, which User to fetch. + * Choose, which related nodes to fetch as well */ - where: UserWhereUniqueInput + include?: NoteInclude | null + /** + * Filter, which Note to fetch. + */ + where: NoteWhereUniqueInput } /** - * User findUniqueOrThrow + * Note findUniqueOrThrow */ - export type UserFindUniqueOrThrowArgs = { + export type NoteFindUniqueOrThrowArgs = { /** - * Select specific fields to fetch from the User + * Select specific fields to fetch from the Note */ - select?: UserSelect | null + select?: NoteSelect | null /** - * Filter, which User to fetch. + * Choose, which related nodes to fetch as well */ - where: UserWhereUniqueInput + include?: NoteInclude | null + /** + * Filter, which Note to fetch. + */ + where: NoteWhereUniqueInput } /** - * User findFirst + * Note findFirst */ - export type UserFindFirstArgs = { + export type NoteFindFirstArgs = { /** - * Select specific fields to fetch from the User + * Select specific fields to fetch from the Note */ - select?: UserSelect | null + select?: NoteSelect | null /** - * Filter, which User to fetch. + * Choose, which related nodes to fetch as well */ - where?: UserWhereInput + include?: NoteInclude | null + /** + * Filter, which Note to fetch. + */ + where?: NoteWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Users to fetch. + * Determine the order of Notes to fetch. */ - orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] + orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for searching for Users. + * Sets the position for searching for Notes. */ - cursor?: UserWhereUniqueInput + cursor?: NoteWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Users from the position of the cursor. + * Take `±n` Notes 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` Users. + * Skip the first `n` Notes. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * - * Filter by unique combinations of Users. + * Filter by unique combinations of Notes. */ - distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] + distinct?: NoteScalarFieldEnum | NoteScalarFieldEnum[] } /** - * User findFirstOrThrow + * Note findFirstOrThrow */ - export type UserFindFirstOrThrowArgs = { + export type NoteFindFirstOrThrowArgs = { /** - * Select specific fields to fetch from the User + * Select specific fields to fetch from the Note */ - select?: UserSelect | null + select?: NoteSelect | null /** - * Filter, which User to fetch. + * Choose, which related nodes to fetch as well */ - where?: UserWhereInput + include?: NoteInclude | null + /** + * Filter, which Note to fetch. + */ + where?: NoteWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Users to fetch. + * Determine the order of Notes to fetch. */ - orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] + orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for searching for Users. + * Sets the position for searching for Notes. */ - cursor?: UserWhereUniqueInput + cursor?: NoteWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Users from the position of the cursor. + * Take `±n` Notes 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` Users. + * Skip the first `n` Notes. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * - * Filter by unique combinations of Users. + * Filter by unique combinations of Notes. */ - distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] + distinct?: NoteScalarFieldEnum | NoteScalarFieldEnum[] } /** - * User findMany + * Note findMany */ - export type UserFindManyArgs = { + export type NoteFindManyArgs = { /** - * Select specific fields to fetch from the User + * Select specific fields to fetch from the Note */ - select?: UserSelect | null + select?: NoteSelect | null /** - * Filter, which Users to fetch. + * Choose, which related nodes to fetch as well */ - where?: UserWhereInput + include?: NoteInclude | null + /** + * Filter, which Notes to fetch. + */ + where?: NoteWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Users to fetch. + * Determine the order of Notes to fetch. */ - orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] + orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for listing Users. + * Sets the position for listing Notes. */ - cursor?: UserWhereUniqueInput + cursor?: NoteWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Users from the position of the cursor. + * Take `±n` Notes 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` Users. + * Skip the first `n` Notes. */ skip?: number - distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] + distinct?: NoteScalarFieldEnum | NoteScalarFieldEnum[] } /** - * User create + * Note create */ - export type UserCreateArgs = { + export type NoteCreateArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: NoteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteInclude | null + /** + * The data needed to create a Note. + */ + data: XOR + } + + /** + * Note createMany + */ + export type NoteCreateManyArgs = { + /** + * The data used to create many Notes. + */ + data: NoteCreateManyInput | NoteCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Note createManyAndReturn + */ + export type NoteCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: NoteSelectCreateManyAndReturn | null + /** + * The data used to create many Notes. + */ + data: NoteCreateManyInput | NoteCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteIncludeCreateManyAndReturn | null + } + + /** + * Note update + */ + export type NoteUpdateArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: NoteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteInclude | null + /** + * The data needed to update a Note. + */ + data: XOR + /** + * Choose, which Note to update. + */ + where: NoteWhereUniqueInput + } + + /** + * Note updateMany + */ + export type NoteUpdateManyArgs = { + /** + * The data used to update Notes. + */ + data: XOR + /** + * Filter which Notes to update + */ + where?: NoteWhereInput + } + + /** + * Note upsert + */ + export type NoteUpsertArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: NoteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteInclude | null + /** + * The filter to search for the Note to update in case it exists. + */ + where: NoteWhereUniqueInput + /** + * In case the Note found by the `where` argument doesn't exist, create a new Note with this data. + */ + create: XOR + /** + * In case the Note was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Note delete + */ + export type NoteDeleteArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: NoteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteInclude | null + /** + * Filter which Note to delete. + */ + where: NoteWhereUniqueInput + } + + /** + * Note deleteMany + */ + export type NoteDeleteManyArgs = { + /** + * Filter which Notes to delete + */ + where?: NoteWhereInput + } + + /** + * Note.aiFeedback + */ + export type Note$aiFeedbackArgs = { + /** + * Select specific fields to fetch from the AiFeedback + */ + select?: AiFeedbackSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AiFeedbackInclude | null + where?: AiFeedbackWhereInput + orderBy?: AiFeedbackOrderByWithRelationInput | AiFeedbackOrderByWithRelationInput[] + cursor?: AiFeedbackWhereUniqueInput + take?: number + skip?: number + distinct?: AiFeedbackScalarFieldEnum | AiFeedbackScalarFieldEnum[] + } + + /** + * Note.memoryEchoAsNote2 + */ + export type Note$memoryEchoAsNote2Args = { + /** + * Select specific fields to fetch from the MemoryEchoInsight + */ + select?: MemoryEchoInsightSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemoryEchoInsightInclude | null + where?: MemoryEchoInsightWhereInput + orderBy?: MemoryEchoInsightOrderByWithRelationInput | MemoryEchoInsightOrderByWithRelationInput[] + cursor?: MemoryEchoInsightWhereUniqueInput + take?: number + skip?: number + distinct?: MemoryEchoInsightScalarFieldEnum | MemoryEchoInsightScalarFieldEnum[] + } + + /** + * Note.memoryEchoAsNote1 + */ + export type Note$memoryEchoAsNote1Args = { + /** + * Select specific fields to fetch from the MemoryEchoInsight + */ + select?: MemoryEchoInsightSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemoryEchoInsightInclude | null + where?: MemoryEchoInsightWhereInput + orderBy?: MemoryEchoInsightOrderByWithRelationInput | MemoryEchoInsightOrderByWithRelationInput[] + cursor?: MemoryEchoInsightWhereUniqueInput + take?: number + skip?: number + distinct?: MemoryEchoInsightScalarFieldEnum | MemoryEchoInsightScalarFieldEnum[] + } + + /** + * Note.notebook + */ + export type Note$notebookArgs = { + /** + * Select specific fields to fetch from the Notebook + */ + select?: NotebookSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NotebookInclude | null + where?: NotebookWhereInput + } + + /** + * Note.user + */ + export type Note$userArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelect | null /** - * The data needed to create a User. - */ - data: XOR - } - - /** - * User createMany - */ - export type UserCreateManyArgs = { - /** - * The data used to create many Users. - */ - data: UserCreateManyInput | UserCreateManyInput[] - } - - /** - * User createManyAndReturn - */ - export type UserCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelectCreateManyAndReturn | null - /** - * The data used to create many Users. - */ - data: UserCreateManyInput | UserCreateManyInput[] - } - - /** - * User update - */ - export type UserUpdateArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * The data needed to update a User. - */ - data: XOR - /** - * Choose, which User to update. - */ - where: UserWhereUniqueInput - } - - /** - * User updateMany - */ - export type UserUpdateManyArgs = { - /** - * The data used to update Users. - */ - data: XOR - /** - * Filter which Users to update + * Choose, which related nodes to fetch as well */ + include?: UserInclude | null where?: UserWhereInput } /** - * User upsert + * Note.shares */ - export type UserUpsertArgs = { + export type Note$sharesArgs = { /** - * Select specific fields to fetch from the User + * Select specific fields to fetch from the NoteShare */ - select?: UserSelect | null + select?: NoteShareSelect | null /** - * The filter to search for the User to update in case it exists. + * Choose, which related nodes to fetch as well */ - where: UserWhereUniqueInput - /** - * In case the User found by the `where` argument doesn't exist, create a new User with this data. - */ - create: XOR - /** - * In case the User was found with the provided `where` argument, update it with this data. - */ - update: XOR + include?: NoteShareInclude | null + where?: NoteShareWhereInput + orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] + cursor?: NoteShareWhereUniqueInput + take?: number + skip?: number + distinct?: NoteShareScalarFieldEnum | NoteShareScalarFieldEnum[] } /** - * User delete + * Note.labelRelations */ - export type UserDeleteArgs = { + export type Note$labelRelationsArgs = { /** - * Select specific fields to fetch from the User + * Select specific fields to fetch from the Label */ - select?: UserSelect | null + select?: LabelSelect | null /** - * Filter which User to delete. + * Choose, which related nodes to fetch as well */ - where: UserWhereUniqueInput + include?: LabelInclude | null + where?: LabelWhereInput + orderBy?: LabelOrderByWithRelationInput | LabelOrderByWithRelationInput[] + cursor?: LabelWhereUniqueInput + take?: number + skip?: number + distinct?: LabelScalarFieldEnum | LabelScalarFieldEnum[] } /** - * User deleteMany + * Note.noteEmbedding */ - export type UserDeleteManyArgs = { + export type Note$noteEmbeddingArgs = { /** - * Filter which Users to delete + * Select specific fields to fetch from the NoteEmbedding */ - where?: UserWhereInput + select?: NoteEmbeddingSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteEmbeddingInclude | null + where?: NoteEmbeddingWhereInput } /** - * User without action + * Note without action */ - export type UserDefaultArgs = { + export type NoteDefaultArgs = { /** - * Select specific fields to fetch from the User + * Select specific fields to fetch from the Note */ - select?: UserSelect | null + select?: NoteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteInclude | null + } + + + /** + * Model NoteEmbedding + */ + + export type AggregateNoteEmbedding = { + _count: NoteEmbeddingCountAggregateOutputType | null + _min: NoteEmbeddingMinAggregateOutputType | null + _max: NoteEmbeddingMaxAggregateOutputType | null + } + + export type NoteEmbeddingMinAggregateOutputType = { + id: string | null + noteId: string | null + embedding: string | null + createdAt: Date | null + } + + export type NoteEmbeddingMaxAggregateOutputType = { + id: string | null + noteId: string | null + embedding: string | null + createdAt: Date | null + } + + export type NoteEmbeddingCountAggregateOutputType = { + id: number + noteId: number + embedding: number + createdAt: number + _all: number + } + + + export type NoteEmbeddingMinAggregateInputType = { + id?: true + noteId?: true + embedding?: true + createdAt?: true + } + + export type NoteEmbeddingMaxAggregateInputType = { + id?: true + noteId?: true + embedding?: true + createdAt?: true + } + + export type NoteEmbeddingCountAggregateInputType = { + id?: true + noteId?: true + embedding?: true + createdAt?: true + _all?: true + } + + export type NoteEmbeddingAggregateArgs = { + /** + * Filter which NoteEmbedding to aggregate. + */ + where?: NoteEmbeddingWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of NoteEmbeddings to fetch. + */ + orderBy?: NoteEmbeddingOrderByWithRelationInput | NoteEmbeddingOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: NoteEmbeddingWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` NoteEmbeddings 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` NoteEmbeddings. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned NoteEmbeddings + **/ + _count?: true | NoteEmbeddingCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: NoteEmbeddingMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: NoteEmbeddingMaxAggregateInputType + } + + export type GetNoteEmbeddingAggregateType = { + [P in keyof T & keyof AggregateNoteEmbedding]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type NoteEmbeddingGroupByArgs = { + where?: NoteEmbeddingWhereInput + orderBy?: NoteEmbeddingOrderByWithAggregationInput | NoteEmbeddingOrderByWithAggregationInput[] + by: NoteEmbeddingScalarFieldEnum[] | NoteEmbeddingScalarFieldEnum + having?: NoteEmbeddingScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: NoteEmbeddingCountAggregateInputType | true + _min?: NoteEmbeddingMinAggregateInputType + _max?: NoteEmbeddingMaxAggregateInputType + } + + export type NoteEmbeddingGroupByOutputType = { + id: string + noteId: string + embedding: string + createdAt: Date + _count: NoteEmbeddingCountAggregateOutputType | null + _min: NoteEmbeddingMinAggregateOutputType | null + _max: NoteEmbeddingMaxAggregateOutputType | null + } + + type GetNoteEmbeddingGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof NoteEmbeddingGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type NoteEmbeddingSelect = $Extensions.GetSelect<{ + id?: boolean + noteId?: boolean + embedding?: boolean + createdAt?: boolean + note?: boolean | NoteDefaultArgs + }, ExtArgs["result"]["noteEmbedding"]> + + export type NoteEmbeddingSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + noteId?: boolean + embedding?: boolean + createdAt?: boolean + note?: boolean | NoteDefaultArgs + }, ExtArgs["result"]["noteEmbedding"]> + + export type NoteEmbeddingSelectScalar = { + id?: boolean + noteId?: boolean + embedding?: boolean + createdAt?: boolean + } + + export type NoteEmbeddingInclude = { + note?: boolean | NoteDefaultArgs + } + export type NoteEmbeddingIncludeCreateManyAndReturn = { + note?: boolean | NoteDefaultArgs + } + + export type $NoteEmbeddingPayload = { + name: "NoteEmbedding" + objects: { + note: Prisma.$NotePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + noteId: string + embedding: string + createdAt: Date + }, ExtArgs["result"]["noteEmbedding"]> + composites: {} + } + + type NoteEmbeddingGetPayload = $Result.GetResult + + type NoteEmbeddingCountArgs = + Omit & { + select?: NoteEmbeddingCountAggregateInputType | true + } + + export interface NoteEmbeddingDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['NoteEmbedding'], meta: { name: 'NoteEmbedding' } } + /** + * Find zero or one NoteEmbedding that matches the filter. + * @param {NoteEmbeddingFindUniqueArgs} args - Arguments to find a NoteEmbedding + * @example + * // Get one NoteEmbedding + * const noteEmbedding = await prisma.noteEmbedding.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__NoteEmbeddingClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one NoteEmbedding that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {NoteEmbeddingFindUniqueOrThrowArgs} args - Arguments to find a NoteEmbedding + * @example + * // Get one NoteEmbedding + * const noteEmbedding = await prisma.noteEmbedding.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__NoteEmbeddingClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first NoteEmbedding 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 {NoteEmbeddingFindFirstArgs} args - Arguments to find a NoteEmbedding + * @example + * // Get one NoteEmbedding + * const noteEmbedding = await prisma.noteEmbedding.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__NoteEmbeddingClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first NoteEmbedding 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 {NoteEmbeddingFindFirstOrThrowArgs} args - Arguments to find a NoteEmbedding + * @example + * // Get one NoteEmbedding + * const noteEmbedding = await prisma.noteEmbedding.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__NoteEmbeddingClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more NoteEmbeddings 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 {NoteEmbeddingFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all NoteEmbeddings + * const noteEmbeddings = await prisma.noteEmbedding.findMany() + * + * // Get first 10 NoteEmbeddings + * const noteEmbeddings = await prisma.noteEmbedding.findMany({ take: 10 }) + * + * // Only select the `id` + * const noteEmbeddingWithIdOnly = await prisma.noteEmbedding.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a NoteEmbedding. + * @param {NoteEmbeddingCreateArgs} args - Arguments to create a NoteEmbedding. + * @example + * // Create one NoteEmbedding + * const NoteEmbedding = await prisma.noteEmbedding.create({ + * data: { + * // ... data to create a NoteEmbedding + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__NoteEmbeddingClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many NoteEmbeddings. + * @param {NoteEmbeddingCreateManyArgs} args - Arguments to create many NoteEmbeddings. + * @example + * // Create many NoteEmbeddings + * const noteEmbedding = await prisma.noteEmbedding.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many NoteEmbeddings and returns the data saved in the database. + * @param {NoteEmbeddingCreateManyAndReturnArgs} args - Arguments to create many NoteEmbeddings. + * @example + * // Create many NoteEmbeddings + * const noteEmbedding = await prisma.noteEmbedding.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many NoteEmbeddings and only return the `id` + * const noteEmbeddingWithIdOnly = await prisma.noteEmbedding.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">> + + /** + * Delete a NoteEmbedding. + * @param {NoteEmbeddingDeleteArgs} args - Arguments to delete one NoteEmbedding. + * @example + * // Delete one NoteEmbedding + * const NoteEmbedding = await prisma.noteEmbedding.delete({ + * where: { + * // ... filter to delete one NoteEmbedding + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__NoteEmbeddingClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one NoteEmbedding. + * @param {NoteEmbeddingUpdateArgs} args - Arguments to update one NoteEmbedding. + * @example + * // Update one NoteEmbedding + * const noteEmbedding = await prisma.noteEmbedding.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__NoteEmbeddingClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more NoteEmbeddings. + * @param {NoteEmbeddingDeleteManyArgs} args - Arguments to filter NoteEmbeddings to delete. + * @example + * // Delete a few NoteEmbeddings + * const { count } = await prisma.noteEmbedding.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more NoteEmbeddings. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {NoteEmbeddingUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many NoteEmbeddings + * const noteEmbedding = await prisma.noteEmbedding.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one NoteEmbedding. + * @param {NoteEmbeddingUpsertArgs} args - Arguments to update or create a NoteEmbedding. + * @example + * // Update or create a NoteEmbedding + * const noteEmbedding = await prisma.noteEmbedding.upsert({ + * create: { + * // ... data to create a NoteEmbedding + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the NoteEmbedding we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__NoteEmbeddingClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of NoteEmbeddings. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {NoteEmbeddingCountArgs} args - Arguments to filter NoteEmbeddings to count. + * @example + * // Count the number of NoteEmbeddings + * const count = await prisma.noteEmbedding.count({ + * where: { + * // ... the filter for the NoteEmbeddings 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 NoteEmbedding. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {NoteEmbeddingAggregateArgs} 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 NoteEmbedding. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {NoteEmbeddingGroupByArgs} 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 NoteEmbeddingGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: NoteEmbeddingGroupByArgs['orderBy'] } + : { orderBy?: NoteEmbeddingGroupByArgs['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 ? GetNoteEmbeddingGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the NoteEmbedding model + */ + readonly fields: NoteEmbeddingFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for NoteEmbedding. + * 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__NoteEmbeddingClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + note = {}>(args?: Subset>): Prisma__NoteClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + /** + * 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 NoteEmbedding model + */ + interface NoteEmbeddingFieldRefs { + readonly id: FieldRef<"NoteEmbedding", 'String'> + readonly noteId: FieldRef<"NoteEmbedding", 'String'> + readonly embedding: FieldRef<"NoteEmbedding", 'String'> + readonly createdAt: FieldRef<"NoteEmbedding", 'DateTime'> + } + + + // Custom InputTypes + /** + * NoteEmbedding findUnique + */ + export type NoteEmbeddingFindUniqueArgs = { + /** + * Select specific fields to fetch from the NoteEmbedding + */ + select?: NoteEmbeddingSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteEmbeddingInclude | null + /** + * Filter, which NoteEmbedding to fetch. + */ + where: NoteEmbeddingWhereUniqueInput + } + + /** + * NoteEmbedding findUniqueOrThrow + */ + export type NoteEmbeddingFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the NoteEmbedding + */ + select?: NoteEmbeddingSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteEmbeddingInclude | null + /** + * Filter, which NoteEmbedding to fetch. + */ + where: NoteEmbeddingWhereUniqueInput + } + + /** + * NoteEmbedding findFirst + */ + export type NoteEmbeddingFindFirstArgs = { + /** + * Select specific fields to fetch from the NoteEmbedding + */ + select?: NoteEmbeddingSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteEmbeddingInclude | null + /** + * Filter, which NoteEmbedding to fetch. + */ + where?: NoteEmbeddingWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of NoteEmbeddings to fetch. + */ + orderBy?: NoteEmbeddingOrderByWithRelationInput | NoteEmbeddingOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for NoteEmbeddings. + */ + cursor?: NoteEmbeddingWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` NoteEmbeddings 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` NoteEmbeddings. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of NoteEmbeddings. + */ + distinct?: NoteEmbeddingScalarFieldEnum | NoteEmbeddingScalarFieldEnum[] + } + + /** + * NoteEmbedding findFirstOrThrow + */ + export type NoteEmbeddingFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the NoteEmbedding + */ + select?: NoteEmbeddingSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteEmbeddingInclude | null + /** + * Filter, which NoteEmbedding to fetch. + */ + where?: NoteEmbeddingWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of NoteEmbeddings to fetch. + */ + orderBy?: NoteEmbeddingOrderByWithRelationInput | NoteEmbeddingOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for NoteEmbeddings. + */ + cursor?: NoteEmbeddingWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` NoteEmbeddings 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` NoteEmbeddings. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of NoteEmbeddings. + */ + distinct?: NoteEmbeddingScalarFieldEnum | NoteEmbeddingScalarFieldEnum[] + } + + /** + * NoteEmbedding findMany + */ + export type NoteEmbeddingFindManyArgs = { + /** + * Select specific fields to fetch from the NoteEmbedding + */ + select?: NoteEmbeddingSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteEmbeddingInclude | null + /** + * Filter, which NoteEmbeddings to fetch. + */ + where?: NoteEmbeddingWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of NoteEmbeddings to fetch. + */ + orderBy?: NoteEmbeddingOrderByWithRelationInput | NoteEmbeddingOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing NoteEmbeddings. + */ + cursor?: NoteEmbeddingWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` NoteEmbeddings 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` NoteEmbeddings. + */ + skip?: number + distinct?: NoteEmbeddingScalarFieldEnum | NoteEmbeddingScalarFieldEnum[] + } + + /** + * NoteEmbedding create + */ + export type NoteEmbeddingCreateArgs = { + /** + * Select specific fields to fetch from the NoteEmbedding + */ + select?: NoteEmbeddingSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteEmbeddingInclude | null + /** + * The data needed to create a NoteEmbedding. + */ + data: XOR + } + + /** + * NoteEmbedding createMany + */ + export type NoteEmbeddingCreateManyArgs = { + /** + * The data used to create many NoteEmbeddings. + */ + data: NoteEmbeddingCreateManyInput | NoteEmbeddingCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * NoteEmbedding createManyAndReturn + */ + export type NoteEmbeddingCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the NoteEmbedding + */ + select?: NoteEmbeddingSelectCreateManyAndReturn | null + /** + * The data used to create many NoteEmbeddings. + */ + data: NoteEmbeddingCreateManyInput | NoteEmbeddingCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteEmbeddingIncludeCreateManyAndReturn | null + } + + /** + * NoteEmbedding update + */ + export type NoteEmbeddingUpdateArgs = { + /** + * Select specific fields to fetch from the NoteEmbedding + */ + select?: NoteEmbeddingSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteEmbeddingInclude | null + /** + * The data needed to update a NoteEmbedding. + */ + data: XOR + /** + * Choose, which NoteEmbedding to update. + */ + where: NoteEmbeddingWhereUniqueInput + } + + /** + * NoteEmbedding updateMany + */ + export type NoteEmbeddingUpdateManyArgs = { + /** + * The data used to update NoteEmbeddings. + */ + data: XOR + /** + * Filter which NoteEmbeddings to update + */ + where?: NoteEmbeddingWhereInput + } + + /** + * NoteEmbedding upsert + */ + export type NoteEmbeddingUpsertArgs = { + /** + * Select specific fields to fetch from the NoteEmbedding + */ + select?: NoteEmbeddingSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteEmbeddingInclude | null + /** + * The filter to search for the NoteEmbedding to update in case it exists. + */ + where: NoteEmbeddingWhereUniqueInput + /** + * In case the NoteEmbedding found by the `where` argument doesn't exist, create a new NoteEmbedding with this data. + */ + create: XOR + /** + * In case the NoteEmbedding was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * NoteEmbedding delete + */ + export type NoteEmbeddingDeleteArgs = { + /** + * Select specific fields to fetch from the NoteEmbedding + */ + select?: NoteEmbeddingSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteEmbeddingInclude | null + /** + * Filter which NoteEmbedding to delete. + */ + where: NoteEmbeddingWhereUniqueInput + } + + /** + * NoteEmbedding deleteMany + */ + export type NoteEmbeddingDeleteManyArgs = { + /** + * Filter which NoteEmbeddings to delete + */ + where?: NoteEmbeddingWhereInput + } + + /** + * NoteEmbedding without action + */ + export type NoteEmbeddingDefaultArgs = { + /** + * Select specific fields to fetch from the NoteEmbedding + */ + select?: NoteEmbeddingSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteEmbeddingInclude | null + } + + + /** + * Model NoteShare + */ + + export type AggregateNoteShare = { + _count: NoteShareCountAggregateOutputType | null + _min: NoteShareMinAggregateOutputType | null + _max: NoteShareMaxAggregateOutputType | null + } + + export type NoteShareMinAggregateOutputType = { + id: string | null + noteId: string | null + userId: string | null + sharedBy: string | null + status: string | null + permission: string | null + notifiedAt: Date | null + respondedAt: Date | null + createdAt: Date | null + updatedAt: Date | null + } + + export type NoteShareMaxAggregateOutputType = { + id: string | null + noteId: string | null + userId: string | null + sharedBy: string | null + status: string | null + permission: string | null + notifiedAt: Date | null + respondedAt: Date | null + createdAt: Date | null + updatedAt: Date | null + } + + export type NoteShareCountAggregateOutputType = { + id: number + noteId: number + userId: number + sharedBy: number + status: number + permission: number + notifiedAt: number + respondedAt: number + createdAt: number + updatedAt: number + _all: number + } + + + export type NoteShareMinAggregateInputType = { + id?: true + noteId?: true + userId?: true + sharedBy?: true + status?: true + permission?: true + notifiedAt?: true + respondedAt?: true + createdAt?: true + updatedAt?: true + } + + export type NoteShareMaxAggregateInputType = { + id?: true + noteId?: true + userId?: true + sharedBy?: true + status?: true + permission?: true + notifiedAt?: true + respondedAt?: true + createdAt?: true + updatedAt?: true + } + + export type NoteShareCountAggregateInputType = { + id?: true + noteId?: true + userId?: true + sharedBy?: true + status?: true + permission?: true + notifiedAt?: true + respondedAt?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type NoteShareAggregateArgs = { + /** + * Filter which NoteShare to aggregate. + */ + where?: NoteShareWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of NoteShares to fetch. + */ + orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: NoteShareWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` NoteShares 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` NoteShares. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned NoteShares + **/ + _count?: true | NoteShareCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: NoteShareMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: NoteShareMaxAggregateInputType + } + + export type GetNoteShareAggregateType = { + [P in keyof T & keyof AggregateNoteShare]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type NoteShareGroupByArgs = { + where?: NoteShareWhereInput + orderBy?: NoteShareOrderByWithAggregationInput | NoteShareOrderByWithAggregationInput[] + by: NoteShareScalarFieldEnum[] | NoteShareScalarFieldEnum + having?: NoteShareScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: NoteShareCountAggregateInputType | true + _min?: NoteShareMinAggregateInputType + _max?: NoteShareMaxAggregateInputType + } + + export type NoteShareGroupByOutputType = { + id: string + noteId: string + userId: string + sharedBy: string + status: string + permission: string + notifiedAt: Date | null + respondedAt: Date | null + createdAt: Date + updatedAt: Date + _count: NoteShareCountAggregateOutputType | null + _min: NoteShareMinAggregateOutputType | null + _max: NoteShareMaxAggregateOutputType | null + } + + type GetNoteShareGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof NoteShareGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type NoteShareSelect = $Extensions.GetSelect<{ + id?: boolean + noteId?: boolean + userId?: boolean + sharedBy?: boolean + status?: boolean + permission?: boolean + notifiedAt?: boolean + respondedAt?: boolean + createdAt?: boolean + updatedAt?: boolean + sharer?: boolean | UserDefaultArgs + user?: boolean | UserDefaultArgs + note?: boolean | NoteDefaultArgs + }, ExtArgs["result"]["noteShare"]> + + export type NoteShareSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + noteId?: boolean + userId?: boolean + sharedBy?: boolean + status?: boolean + permission?: boolean + notifiedAt?: boolean + respondedAt?: boolean + createdAt?: boolean + updatedAt?: boolean + sharer?: boolean | UserDefaultArgs + user?: boolean | UserDefaultArgs + note?: boolean | NoteDefaultArgs + }, ExtArgs["result"]["noteShare"]> + + export type NoteShareSelectScalar = { + id?: boolean + noteId?: boolean + userId?: boolean + sharedBy?: boolean + status?: boolean + permission?: boolean + notifiedAt?: boolean + respondedAt?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + export type NoteShareInclude = { + sharer?: boolean | UserDefaultArgs + user?: boolean | UserDefaultArgs + note?: boolean | NoteDefaultArgs + } + export type NoteShareIncludeCreateManyAndReturn = { + sharer?: boolean | UserDefaultArgs + user?: boolean | UserDefaultArgs + note?: boolean | NoteDefaultArgs + } + + export type $NoteSharePayload = { + name: "NoteShare" + objects: { + sharer: Prisma.$UserPayload + user: Prisma.$UserPayload + note: Prisma.$NotePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + noteId: string + userId: string + sharedBy: string + status: string + permission: string + notifiedAt: Date | null + respondedAt: Date | null + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["noteShare"]> + composites: {} + } + + type NoteShareGetPayload = $Result.GetResult + + type NoteShareCountArgs = + Omit & { + select?: NoteShareCountAggregateInputType | true + } + + export interface NoteShareDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['NoteShare'], meta: { name: 'NoteShare' } } + /** + * Find zero or one NoteShare that matches the filter. + * @param {NoteShareFindUniqueArgs} args - Arguments to find a NoteShare + * @example + * // Get one NoteShare + * const noteShare = await prisma.noteShare.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one NoteShare that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {NoteShareFindUniqueOrThrowArgs} args - Arguments to find a NoteShare + * @example + * // Get one NoteShare + * const noteShare = await prisma.noteShare.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first NoteShare 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 {NoteShareFindFirstArgs} args - Arguments to find a NoteShare + * @example + * // Get one NoteShare + * const noteShare = await prisma.noteShare.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first NoteShare 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 {NoteShareFindFirstOrThrowArgs} args - Arguments to find a NoteShare + * @example + * // Get one NoteShare + * const noteShare = await prisma.noteShare.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more NoteShares 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 {NoteShareFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all NoteShares + * const noteShares = await prisma.noteShare.findMany() + * + * // Get first 10 NoteShares + * const noteShares = await prisma.noteShare.findMany({ take: 10 }) + * + * // Only select the `id` + * const noteShareWithIdOnly = await prisma.noteShare.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a NoteShare. + * @param {NoteShareCreateArgs} args - Arguments to create a NoteShare. + * @example + * // Create one NoteShare + * const NoteShare = await prisma.noteShare.create({ + * data: { + * // ... data to create a NoteShare + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many NoteShares. + * @param {NoteShareCreateManyArgs} args - Arguments to create many NoteShares. + * @example + * // Create many NoteShares + * const noteShare = await prisma.noteShare.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many NoteShares and returns the data saved in the database. + * @param {NoteShareCreateManyAndReturnArgs} args - Arguments to create many NoteShares. + * @example + * // Create many NoteShares + * const noteShare = await prisma.noteShare.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many NoteShares and only return the `id` + * const noteShareWithIdOnly = await prisma.noteShare.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">> + + /** + * Delete a NoteShare. + * @param {NoteShareDeleteArgs} args - Arguments to delete one NoteShare. + * @example + * // Delete one NoteShare + * const NoteShare = await prisma.noteShare.delete({ + * where: { + * // ... filter to delete one NoteShare + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one NoteShare. + * @param {NoteShareUpdateArgs} args - Arguments to update one NoteShare. + * @example + * // Update one NoteShare + * const noteShare = await prisma.noteShare.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more NoteShares. + * @param {NoteShareDeleteManyArgs} args - Arguments to filter NoteShares to delete. + * @example + * // Delete a few NoteShares + * const { count } = await prisma.noteShare.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more NoteShares. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {NoteShareUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many NoteShares + * const noteShare = await prisma.noteShare.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one NoteShare. + * @param {NoteShareUpsertArgs} args - Arguments to update or create a NoteShare. + * @example + * // Update or create a NoteShare + * const noteShare = await prisma.noteShare.upsert({ + * create: { + * // ... data to create a NoteShare + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the NoteShare we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of NoteShares. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {NoteShareCountArgs} args - Arguments to filter NoteShares to count. + * @example + * // Count the number of NoteShares + * const count = await prisma.noteShare.count({ + * where: { + * // ... the filter for the NoteShares 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 NoteShare. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {NoteShareAggregateArgs} 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 NoteShare. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {NoteShareGroupByArgs} 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 NoteShareGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: NoteShareGroupByArgs['orderBy'] } + : { orderBy?: NoteShareGroupByArgs['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 ? GetNoteShareGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the NoteShare model + */ + readonly fields: NoteShareFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for NoteShare. + * 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__NoteShareClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + sharer = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + note = {}>(args?: Subset>): Prisma__NoteClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + /** + * 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 NoteShare model + */ + interface NoteShareFieldRefs { + readonly id: FieldRef<"NoteShare", 'String'> + readonly noteId: FieldRef<"NoteShare", 'String'> + readonly userId: FieldRef<"NoteShare", 'String'> + readonly sharedBy: FieldRef<"NoteShare", 'String'> + readonly status: FieldRef<"NoteShare", 'String'> + readonly permission: FieldRef<"NoteShare", 'String'> + readonly notifiedAt: FieldRef<"NoteShare", 'DateTime'> + readonly respondedAt: FieldRef<"NoteShare", 'DateTime'> + readonly createdAt: FieldRef<"NoteShare", 'DateTime'> + readonly updatedAt: FieldRef<"NoteShare", 'DateTime'> + } + + + // Custom InputTypes + /** + * NoteShare findUnique + */ + export type NoteShareFindUniqueArgs = { + /** + * Select specific fields to fetch from the NoteShare + */ + select?: NoteShareSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteShareInclude | null + /** + * Filter, which NoteShare to fetch. + */ + where: NoteShareWhereUniqueInput + } + + /** + * NoteShare findUniqueOrThrow + */ + export type NoteShareFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the NoteShare + */ + select?: NoteShareSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteShareInclude | null + /** + * Filter, which NoteShare to fetch. + */ + where: NoteShareWhereUniqueInput + } + + /** + * NoteShare findFirst + */ + export type NoteShareFindFirstArgs = { + /** + * Select specific fields to fetch from the NoteShare + */ + select?: NoteShareSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteShareInclude | null + /** + * Filter, which NoteShare to fetch. + */ + where?: NoteShareWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of NoteShares to fetch. + */ + orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for NoteShares. + */ + cursor?: NoteShareWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` NoteShares 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` NoteShares. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of NoteShares. + */ + distinct?: NoteShareScalarFieldEnum | NoteShareScalarFieldEnum[] + } + + /** + * NoteShare findFirstOrThrow + */ + export type NoteShareFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the NoteShare + */ + select?: NoteShareSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteShareInclude | null + /** + * Filter, which NoteShare to fetch. + */ + where?: NoteShareWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of NoteShares to fetch. + */ + orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for NoteShares. + */ + cursor?: NoteShareWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` NoteShares 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` NoteShares. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of NoteShares. + */ + distinct?: NoteShareScalarFieldEnum | NoteShareScalarFieldEnum[] + } + + /** + * NoteShare findMany + */ + export type NoteShareFindManyArgs = { + /** + * Select specific fields to fetch from the NoteShare + */ + select?: NoteShareSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteShareInclude | null + /** + * Filter, which NoteShares to fetch. + */ + where?: NoteShareWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of NoteShares to fetch. + */ + orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing NoteShares. + */ + cursor?: NoteShareWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` NoteShares 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` NoteShares. + */ + skip?: number + distinct?: NoteShareScalarFieldEnum | NoteShareScalarFieldEnum[] + } + + /** + * NoteShare create + */ + export type NoteShareCreateArgs = { + /** + * Select specific fields to fetch from the NoteShare + */ + select?: NoteShareSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteShareInclude | null + /** + * The data needed to create a NoteShare. + */ + data: XOR + } + + /** + * NoteShare createMany + */ + export type NoteShareCreateManyArgs = { + /** + * The data used to create many NoteShares. + */ + data: NoteShareCreateManyInput | NoteShareCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * NoteShare createManyAndReturn + */ + export type NoteShareCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the NoteShare + */ + select?: NoteShareSelectCreateManyAndReturn | null + /** + * The data used to create many NoteShares. + */ + data: NoteShareCreateManyInput | NoteShareCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteShareIncludeCreateManyAndReturn | null + } + + /** + * NoteShare update + */ + export type NoteShareUpdateArgs = { + /** + * Select specific fields to fetch from the NoteShare + */ + select?: NoteShareSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteShareInclude | null + /** + * The data needed to update a NoteShare. + */ + data: XOR + /** + * Choose, which NoteShare to update. + */ + where: NoteShareWhereUniqueInput + } + + /** + * NoteShare updateMany + */ + export type NoteShareUpdateManyArgs = { + /** + * The data used to update NoteShares. + */ + data: XOR + /** + * Filter which NoteShares to update + */ + where?: NoteShareWhereInput + } + + /** + * NoteShare upsert + */ + export type NoteShareUpsertArgs = { + /** + * Select specific fields to fetch from the NoteShare + */ + select?: NoteShareSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteShareInclude | null + /** + * The filter to search for the NoteShare to update in case it exists. + */ + where: NoteShareWhereUniqueInput + /** + * In case the NoteShare found by the `where` argument doesn't exist, create a new NoteShare with this data. + */ + create: XOR + /** + * In case the NoteShare was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * NoteShare delete + */ + export type NoteShareDeleteArgs = { + /** + * Select specific fields to fetch from the NoteShare + */ + select?: NoteShareSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteShareInclude | null + /** + * Filter which NoteShare to delete. + */ + where: NoteShareWhereUniqueInput + } + + /** + * NoteShare deleteMany + */ + export type NoteShareDeleteManyArgs = { + /** + * Filter which NoteShares to delete + */ + where?: NoteShareWhereInput + } + + /** + * NoteShare without action + */ + export type NoteShareDefaultArgs = { + /** + * Select specific fields to fetch from the NoteShare + */ + select?: NoteShareSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: NoteShareInclude | null } @@ -6075,6 +9106,7 @@ export namespace Prisma { session_state?: boolean createdAt?: boolean updatedAt?: boolean + user?: boolean | UserDefaultArgs }, ExtArgs["result"]["account"]> export type AccountSelectCreateManyAndReturn = $Extensions.GetSelect<{ @@ -6091,6 +9123,7 @@ export namespace Prisma { session_state?: boolean createdAt?: boolean updatedAt?: boolean + user?: boolean | UserDefaultArgs }, ExtArgs["result"]["account"]> export type AccountSelectScalar = { @@ -6109,10 +9142,18 @@ export namespace Prisma { updatedAt?: boolean } + export type AccountInclude = { + user?: boolean | UserDefaultArgs + } + export type AccountIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + } export type $AccountPayload = { name: "Account" - objects: {} + objects: { + user: Prisma.$UserPayload + } scalars: $Extensions.GetPayloadResult<{ userId: string type: string @@ -6491,6 +9532,7 @@ export namespace Prisma { */ export interface Prisma__AccountClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -6545,6 +9587,10 @@ export namespace Prisma { * Select specific fields to fetch from the Account */ select?: AccountSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AccountInclude | null /** * Filter, which Account to fetch. */ @@ -6559,6 +9605,10 @@ export namespace Prisma { * Select specific fields to fetch from the Account */ select?: AccountSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AccountInclude | null /** * Filter, which Account to fetch. */ @@ -6573,6 +9623,10 @@ export namespace Prisma { * Select specific fields to fetch from the Account */ select?: AccountSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AccountInclude | null /** * Filter, which Account to fetch. */ @@ -6617,6 +9671,10 @@ export namespace Prisma { * Select specific fields to fetch from the Account */ select?: AccountSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AccountInclude | null /** * Filter, which Account to fetch. */ @@ -6661,6 +9719,10 @@ export namespace Prisma { * Select specific fields to fetch from the Account */ select?: AccountSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AccountInclude | null /** * Filter, which Accounts to fetch. */ @@ -6700,6 +9762,10 @@ export namespace Prisma { * Select specific fields to fetch from the Account */ select?: AccountSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AccountInclude | null /** * The data needed to create a Account. */ @@ -6714,6 +9780,7 @@ export namespace Prisma { * The data used to create many Accounts. */ data: AccountCreateManyInput | AccountCreateManyInput[] + skipDuplicates?: boolean } /** @@ -6728,6 +9795,11 @@ export namespace Prisma { * The data used to create many Accounts. */ data: AccountCreateManyInput | AccountCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: AccountIncludeCreateManyAndReturn | null } /** @@ -6738,6 +9810,10 @@ export namespace Prisma { * Select specific fields to fetch from the Account */ select?: AccountSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AccountInclude | null /** * The data needed to update a Account. */ @@ -6770,6 +9846,10 @@ export namespace Prisma { * Select specific fields to fetch from the Account */ select?: AccountSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AccountInclude | null /** * The filter to search for the Account to update in case it exists. */ @@ -6792,6 +9872,10 @@ export namespace Prisma { * Select specific fields to fetch from the Account */ select?: AccountSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AccountInclude | null /** * Filter which Account to delete. */ @@ -6816,6 +9900,10 @@ export namespace Prisma { * Select specific fields to fetch from the Account */ select?: AccountSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AccountInclude | null } @@ -6983,6 +10071,7 @@ export namespace Prisma { expires?: boolean createdAt?: boolean updatedAt?: boolean + user?: boolean | UserDefaultArgs }, ExtArgs["result"]["session"]> export type SessionSelectCreateManyAndReturn = $Extensions.GetSelect<{ @@ -6991,6 +10080,7 @@ export namespace Prisma { expires?: boolean createdAt?: boolean updatedAt?: boolean + user?: boolean | UserDefaultArgs }, ExtArgs["result"]["session"]> export type SessionSelectScalar = { @@ -7001,10 +10091,18 @@ export namespace Prisma { updatedAt?: boolean } + export type SessionInclude = { + user?: boolean | UserDefaultArgs + } + export type SessionIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + } export type $SessionPayload = { name: "Session" - objects: {} + objects: { + user: Prisma.$UserPayload + } scalars: $Extensions.GetPayloadResult<{ sessionToken: string userId: string @@ -7375,6 +10473,7 @@ export namespace Prisma { */ export interface Prisma__SessionClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -7421,6 +10520,10 @@ export namespace Prisma { * Select specific fields to fetch from the Session */ select?: SessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null /** * Filter, which Session to fetch. */ @@ -7435,6 +10538,10 @@ export namespace Prisma { * Select specific fields to fetch from the Session */ select?: SessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null /** * Filter, which Session to fetch. */ @@ -7449,6 +10556,10 @@ export namespace Prisma { * Select specific fields to fetch from the Session */ select?: SessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null /** * Filter, which Session to fetch. */ @@ -7493,6 +10604,10 @@ export namespace Prisma { * Select specific fields to fetch from the Session */ select?: SessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null /** * Filter, which Session to fetch. */ @@ -7537,6 +10652,10 @@ export namespace Prisma { * Select specific fields to fetch from the Session */ select?: SessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null /** * Filter, which Sessions to fetch. */ @@ -7576,6 +10695,10 @@ export namespace Prisma { * Select specific fields to fetch from the Session */ select?: SessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null /** * The data needed to create a Session. */ @@ -7590,6 +10713,7 @@ export namespace Prisma { * The data used to create many Sessions. */ data: SessionCreateManyInput | SessionCreateManyInput[] + skipDuplicates?: boolean } /** @@ -7604,6 +10728,11 @@ export namespace Prisma { * The data used to create many Sessions. */ data: SessionCreateManyInput | SessionCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionIncludeCreateManyAndReturn | null } /** @@ -7614,6 +10743,10 @@ export namespace Prisma { * Select specific fields to fetch from the Session */ select?: SessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null /** * The data needed to update a Session. */ @@ -7646,6 +10779,10 @@ export namespace Prisma { * Select specific fields to fetch from the Session */ select?: SessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null /** * The filter to search for the Session to update in case it exists. */ @@ -7668,6 +10805,10 @@ export namespace Prisma { * Select specific fields to fetch from the Session */ select?: SessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null /** * Filter which Session to delete. */ @@ -7692,6 +10833,10 @@ export namespace Prisma { * Select specific fields to fetch from the Session */ select?: SessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null } @@ -8442,6 +11587,7 @@ export namespace Prisma { * The data used to create many VerificationTokens. */ data: VerificationTokenCreateManyInput | VerificationTokenCreateManyInput[] + skipDuplicates?: boolean } /** @@ -8456,6 +11602,7 @@ export namespace Prisma { * The data used to create many VerificationTokens. */ data: VerificationTokenCreateManyInput | VerificationTokenCreateManyInput[] + skipDuplicates?: boolean } /** @@ -8547,942 +11694,6 @@ export namespace Prisma { } - /** - * Model NoteShare - */ - - export type AggregateNoteShare = { - _count: NoteShareCountAggregateOutputType | null - _min: NoteShareMinAggregateOutputType | null - _max: NoteShareMaxAggregateOutputType | null - } - - export type NoteShareMinAggregateOutputType = { - id: string | null - noteId: string | null - userId: string | null - sharedBy: string | null - status: string | null - permission: string | null - notifiedAt: Date | null - respondedAt: Date | null - createdAt: Date | null - updatedAt: Date | null - } - - export type NoteShareMaxAggregateOutputType = { - id: string | null - noteId: string | null - userId: string | null - sharedBy: string | null - status: string | null - permission: string | null - notifiedAt: Date | null - respondedAt: Date | null - createdAt: Date | null - updatedAt: Date | null - } - - export type NoteShareCountAggregateOutputType = { - id: number - noteId: number - userId: number - sharedBy: number - status: number - permission: number - notifiedAt: number - respondedAt: number - createdAt: number - updatedAt: number - _all: number - } - - - export type NoteShareMinAggregateInputType = { - id?: true - noteId?: true - userId?: true - sharedBy?: true - status?: true - permission?: true - notifiedAt?: true - respondedAt?: true - createdAt?: true - updatedAt?: true - } - - export type NoteShareMaxAggregateInputType = { - id?: true - noteId?: true - userId?: true - sharedBy?: true - status?: true - permission?: true - notifiedAt?: true - respondedAt?: true - createdAt?: true - updatedAt?: true - } - - export type NoteShareCountAggregateInputType = { - id?: true - noteId?: true - userId?: true - sharedBy?: true - status?: true - permission?: true - notifiedAt?: true - respondedAt?: true - createdAt?: true - updatedAt?: true - _all?: true - } - - export type NoteShareAggregateArgs = { - /** - * Filter which NoteShare to aggregate. - */ - where?: NoteShareWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of NoteShares to fetch. - */ - orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: NoteShareWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` NoteShares 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` NoteShares. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned NoteShares - **/ - _count?: true | NoteShareCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: NoteShareMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: NoteShareMaxAggregateInputType - } - - export type GetNoteShareAggregateType = { - [P in keyof T & keyof AggregateNoteShare]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type NoteShareGroupByArgs = { - where?: NoteShareWhereInput - orderBy?: NoteShareOrderByWithAggregationInput | NoteShareOrderByWithAggregationInput[] - by: NoteShareScalarFieldEnum[] | NoteShareScalarFieldEnum - having?: NoteShareScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: NoteShareCountAggregateInputType | true - _min?: NoteShareMinAggregateInputType - _max?: NoteShareMaxAggregateInputType - } - - export type NoteShareGroupByOutputType = { - id: string - noteId: string - userId: string - sharedBy: string - status: string - permission: string - notifiedAt: Date | null - respondedAt: Date | null - createdAt: Date - updatedAt: Date - _count: NoteShareCountAggregateOutputType | null - _min: NoteShareMinAggregateOutputType | null - _max: NoteShareMaxAggregateOutputType | null - } - - type GetNoteShareGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof NoteShareGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type NoteShareSelect = $Extensions.GetSelect<{ - id?: boolean - noteId?: boolean - userId?: boolean - sharedBy?: boolean - status?: boolean - permission?: boolean - notifiedAt?: boolean - respondedAt?: boolean - createdAt?: boolean - updatedAt?: boolean - }, ExtArgs["result"]["noteShare"]> - - export type NoteShareSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - noteId?: boolean - userId?: boolean - sharedBy?: boolean - status?: boolean - permission?: boolean - notifiedAt?: boolean - respondedAt?: boolean - createdAt?: boolean - updatedAt?: boolean - }, ExtArgs["result"]["noteShare"]> - - export type NoteShareSelectScalar = { - id?: boolean - noteId?: boolean - userId?: boolean - sharedBy?: boolean - status?: boolean - permission?: boolean - notifiedAt?: boolean - respondedAt?: boolean - createdAt?: boolean - updatedAt?: boolean - } - - - export type $NoteSharePayload = { - name: "NoteShare" - objects: {} - scalars: $Extensions.GetPayloadResult<{ - id: string - noteId: string - userId: string - sharedBy: string - status: string - permission: string - notifiedAt: Date | null - respondedAt: Date | null - createdAt: Date - updatedAt: Date - }, ExtArgs["result"]["noteShare"]> - composites: {} - } - - type NoteShareGetPayload = $Result.GetResult - - type NoteShareCountArgs = - Omit & { - select?: NoteShareCountAggregateInputType | true - } - - export interface NoteShareDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['NoteShare'], meta: { name: 'NoteShare' } } - /** - * Find zero or one NoteShare that matches the filter. - * @param {NoteShareFindUniqueArgs} args - Arguments to find a NoteShare - * @example - * // Get one NoteShare - * const noteShare = await prisma.noteShare.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> - - /** - * Find one NoteShare that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {NoteShareFindUniqueOrThrowArgs} args - Arguments to find a NoteShare - * @example - * // Get one NoteShare - * const noteShare = await prisma.noteShare.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> - - /** - * Find the first NoteShare 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 {NoteShareFindFirstArgs} args - Arguments to find a NoteShare - * @example - * // Get one NoteShare - * const noteShare = await prisma.noteShare.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> - - /** - * Find the first NoteShare 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 {NoteShareFindFirstOrThrowArgs} args - Arguments to find a NoteShare - * @example - * // Get one NoteShare - * const noteShare = await prisma.noteShare.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> - - /** - * Find zero or more NoteShares 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 {NoteShareFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all NoteShares - * const noteShares = await prisma.noteShare.findMany() - * - * // Get first 10 NoteShares - * const noteShares = await prisma.noteShare.findMany({ take: 10 }) - * - * // Only select the `id` - * const noteShareWithIdOnly = await prisma.noteShare.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> - - /** - * Create a NoteShare. - * @param {NoteShareCreateArgs} args - Arguments to create a NoteShare. - * @example - * // Create one NoteShare - * const NoteShare = await prisma.noteShare.create({ - * data: { - * // ... data to create a NoteShare - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "create">, never, ExtArgs> - - /** - * Create many NoteShares. - * @param {NoteShareCreateManyArgs} args - Arguments to create many NoteShares. - * @example - * // Create many NoteShares - * const noteShare = await prisma.noteShare.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many NoteShares and returns the data saved in the database. - * @param {NoteShareCreateManyAndReturnArgs} args - Arguments to create many NoteShares. - * @example - * // Create many NoteShares - * const noteShare = await prisma.noteShare.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many NoteShares and only return the `id` - * const noteShareWithIdOnly = await prisma.noteShare.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">> - - /** - * Delete a NoteShare. - * @param {NoteShareDeleteArgs} args - Arguments to delete one NoteShare. - * @example - * // Delete one NoteShare - * const NoteShare = await prisma.noteShare.delete({ - * where: { - * // ... filter to delete one NoteShare - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "delete">, never, ExtArgs> - - /** - * Update one NoteShare. - * @param {NoteShareUpdateArgs} args - Arguments to update one NoteShare. - * @example - * // Update one NoteShare - * const noteShare = await prisma.noteShare.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "update">, never, ExtArgs> - - /** - * Delete zero or more NoteShares. - * @param {NoteShareDeleteManyArgs} args - Arguments to filter NoteShares to delete. - * @example - * // Delete a few NoteShares - * const { count } = await prisma.noteShare.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more NoteShares. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteShareUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many NoteShares - * const noteShare = await prisma.noteShare.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one NoteShare. - * @param {NoteShareUpsertArgs} args - Arguments to update or create a NoteShare. - * @example - * // Update or create a NoteShare - * const noteShare = await prisma.noteShare.upsert({ - * create: { - * // ... data to create a NoteShare - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the NoteShare we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "upsert">, never, ExtArgs> - - - /** - * Count the number of NoteShares. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteShareCountArgs} args - Arguments to filter NoteShares to count. - * @example - * // Count the number of NoteShares - * const count = await prisma.noteShare.count({ - * where: { - * // ... the filter for the NoteShares 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 NoteShare. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteShareAggregateArgs} 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 NoteShare. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteShareGroupByArgs} 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 NoteShareGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: NoteShareGroupByArgs['orderBy'] } - : { orderBy?: NoteShareGroupByArgs['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 ? GetNoteShareGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the NoteShare model - */ - readonly fields: NoteShareFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for NoteShare. - * 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__NoteShareClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - /** - * 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 NoteShare model - */ - interface NoteShareFieldRefs { - readonly id: FieldRef<"NoteShare", 'String'> - readonly noteId: FieldRef<"NoteShare", 'String'> - readonly userId: FieldRef<"NoteShare", 'String'> - readonly sharedBy: FieldRef<"NoteShare", 'String'> - readonly status: FieldRef<"NoteShare", 'String'> - readonly permission: FieldRef<"NoteShare", 'String'> - readonly notifiedAt: FieldRef<"NoteShare", 'DateTime'> - readonly respondedAt: FieldRef<"NoteShare", 'DateTime'> - readonly createdAt: FieldRef<"NoteShare", 'DateTime'> - readonly updatedAt: FieldRef<"NoteShare", 'DateTime'> - } - - - // Custom InputTypes - /** - * NoteShare findUnique - */ - export type NoteShareFindUniqueArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Filter, which NoteShare to fetch. - */ - where: NoteShareWhereUniqueInput - } - - /** - * NoteShare findUniqueOrThrow - */ - export type NoteShareFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Filter, which NoteShare to fetch. - */ - where: NoteShareWhereUniqueInput - } - - /** - * NoteShare findFirst - */ - export type NoteShareFindFirstArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Filter, which NoteShare to fetch. - */ - where?: NoteShareWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of NoteShares to fetch. - */ - orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for NoteShares. - */ - cursor?: NoteShareWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` NoteShares 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` NoteShares. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of NoteShares. - */ - distinct?: NoteShareScalarFieldEnum | NoteShareScalarFieldEnum[] - } - - /** - * NoteShare findFirstOrThrow - */ - export type NoteShareFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Filter, which NoteShare to fetch. - */ - where?: NoteShareWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of NoteShares to fetch. - */ - orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for NoteShares. - */ - cursor?: NoteShareWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` NoteShares 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` NoteShares. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of NoteShares. - */ - distinct?: NoteShareScalarFieldEnum | NoteShareScalarFieldEnum[] - } - - /** - * NoteShare findMany - */ - export type NoteShareFindManyArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Filter, which NoteShares to fetch. - */ - where?: NoteShareWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of NoteShares to fetch. - */ - orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing NoteShares. - */ - cursor?: NoteShareWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` NoteShares 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` NoteShares. - */ - skip?: number - distinct?: NoteShareScalarFieldEnum | NoteShareScalarFieldEnum[] - } - - /** - * NoteShare create - */ - export type NoteShareCreateArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * The data needed to create a NoteShare. - */ - data: XOR - } - - /** - * NoteShare createMany - */ - export type NoteShareCreateManyArgs = { - /** - * The data used to create many NoteShares. - */ - data: NoteShareCreateManyInput | NoteShareCreateManyInput[] - } - - /** - * NoteShare createManyAndReturn - */ - export type NoteShareCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelectCreateManyAndReturn | null - /** - * The data used to create many NoteShares. - */ - data: NoteShareCreateManyInput | NoteShareCreateManyInput[] - } - - /** - * NoteShare update - */ - export type NoteShareUpdateArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * The data needed to update a NoteShare. - */ - data: XOR - /** - * Choose, which NoteShare to update. - */ - where: NoteShareWhereUniqueInput - } - - /** - * NoteShare updateMany - */ - export type NoteShareUpdateManyArgs = { - /** - * The data used to update NoteShares. - */ - data: XOR - /** - * Filter which NoteShares to update - */ - where?: NoteShareWhereInput - } - - /** - * NoteShare upsert - */ - export type NoteShareUpsertArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * The filter to search for the NoteShare to update in case it exists. - */ - where: NoteShareWhereUniqueInput - /** - * In case the NoteShare found by the `where` argument doesn't exist, create a new NoteShare with this data. - */ - create: XOR - /** - * In case the NoteShare was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * NoteShare delete - */ - export type NoteShareDeleteArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Filter which NoteShare to delete. - */ - where: NoteShareWhereUniqueInput - } - - /** - * NoteShare deleteMany - */ - export type NoteShareDeleteManyArgs = { - /** - * Filter which NoteShares to delete - */ - where?: NoteShareWhereInput - } - - /** - * NoteShare without action - */ - export type NoteShareDefaultArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - } - - /** * Model SystemConfig */ @@ -10218,6 +12429,7 @@ export namespace Prisma { * The data used to create many SystemConfigs. */ data: SystemConfigCreateManyInput | SystemConfigCreateManyInput[] + skipDuplicates?: boolean } /** @@ -10232,6 +12444,7 @@ export namespace Prisma { * The data used to create many SystemConfigs. */ data: SystemConfigCreateManyInput | SystemConfigCreateManyInput[] + skipDuplicates?: boolean } /** @@ -10519,6 +12732,8 @@ export namespace Prisma { correctedContent?: boolean metadata?: boolean createdAt?: boolean + user?: boolean | AiFeedback$userArgs + note?: boolean | NoteDefaultArgs }, ExtArgs["result"]["aiFeedback"]> export type AiFeedbackSelectCreateManyAndReturn = $Extensions.GetSelect<{ @@ -10531,6 +12746,8 @@ export namespace Prisma { correctedContent?: boolean metadata?: boolean createdAt?: boolean + user?: boolean | AiFeedback$userArgs + note?: boolean | NoteDefaultArgs }, ExtArgs["result"]["aiFeedback"]> export type AiFeedbackSelectScalar = { @@ -10545,10 +12762,21 @@ export namespace Prisma { createdAt?: boolean } + export type AiFeedbackInclude = { + user?: boolean | AiFeedback$userArgs + note?: boolean | NoteDefaultArgs + } + export type AiFeedbackIncludeCreateManyAndReturn = { + user?: boolean | AiFeedback$userArgs + note?: boolean | NoteDefaultArgs + } export type $AiFeedbackPayload = { name: "AiFeedback" - objects: {} + objects: { + user: Prisma.$UserPayload | null + note: Prisma.$NotePayload + } scalars: $Extensions.GetPayloadResult<{ id: string noteId: string @@ -10923,6 +13151,8 @@ export namespace Prisma { */ export interface Prisma__AiFeedbackClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + note = {}>(args?: Subset>): Prisma__NoteClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -10973,6 +13203,10 @@ export namespace Prisma { * Select specific fields to fetch from the AiFeedback */ select?: AiFeedbackSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AiFeedbackInclude | null /** * Filter, which AiFeedback to fetch. */ @@ -10987,6 +13221,10 @@ export namespace Prisma { * Select specific fields to fetch from the AiFeedback */ select?: AiFeedbackSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AiFeedbackInclude | null /** * Filter, which AiFeedback to fetch. */ @@ -11001,6 +13239,10 @@ export namespace Prisma { * Select specific fields to fetch from the AiFeedback */ select?: AiFeedbackSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AiFeedbackInclude | null /** * Filter, which AiFeedback to fetch. */ @@ -11045,6 +13287,10 @@ export namespace Prisma { * Select specific fields to fetch from the AiFeedback */ select?: AiFeedbackSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AiFeedbackInclude | null /** * Filter, which AiFeedback to fetch. */ @@ -11089,6 +13335,10 @@ export namespace Prisma { * Select specific fields to fetch from the AiFeedback */ select?: AiFeedbackSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AiFeedbackInclude | null /** * Filter, which AiFeedbacks to fetch. */ @@ -11128,6 +13378,10 @@ export namespace Prisma { * Select specific fields to fetch from the AiFeedback */ select?: AiFeedbackSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AiFeedbackInclude | null /** * The data needed to create a AiFeedback. */ @@ -11142,6 +13396,7 @@ export namespace Prisma { * The data used to create many AiFeedbacks. */ data: AiFeedbackCreateManyInput | AiFeedbackCreateManyInput[] + skipDuplicates?: boolean } /** @@ -11156,6 +13411,11 @@ export namespace Prisma { * The data used to create many AiFeedbacks. */ data: AiFeedbackCreateManyInput | AiFeedbackCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: AiFeedbackIncludeCreateManyAndReturn | null } /** @@ -11166,6 +13426,10 @@ export namespace Prisma { * Select specific fields to fetch from the AiFeedback */ select?: AiFeedbackSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AiFeedbackInclude | null /** * The data needed to update a AiFeedback. */ @@ -11198,6 +13462,10 @@ export namespace Prisma { * Select specific fields to fetch from the AiFeedback */ select?: AiFeedbackSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AiFeedbackInclude | null /** * The filter to search for the AiFeedback to update in case it exists. */ @@ -11220,6 +13488,10 @@ export namespace Prisma { * Select specific fields to fetch from the AiFeedback */ select?: AiFeedbackSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AiFeedbackInclude | null /** * Filter which AiFeedback to delete. */ @@ -11236,6 +13508,21 @@ export namespace Prisma { where?: AiFeedbackWhereInput } + /** + * AiFeedback.user + */ + export type AiFeedback$userArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + where?: UserWhereInput + } + /** * AiFeedback without action */ @@ -11244,6 +13531,10 @@ export namespace Prisma { * Select specific fields to fetch from the AiFeedback */ select?: AiFeedbackSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AiFeedbackInclude | null } @@ -11485,6 +13776,9 @@ export namespace Prisma { viewed?: boolean feedback?: boolean dismissed?: boolean + user?: boolean | MemoryEchoInsight$userArgs + note2?: boolean | NoteDefaultArgs + note1?: boolean | NoteDefaultArgs }, ExtArgs["result"]["memoryEchoInsight"]> export type MemoryEchoInsightSelectCreateManyAndReturn = $Extensions.GetSelect<{ @@ -11498,6 +13792,9 @@ export namespace Prisma { viewed?: boolean feedback?: boolean dismissed?: boolean + user?: boolean | MemoryEchoInsight$userArgs + note2?: boolean | NoteDefaultArgs + note1?: boolean | NoteDefaultArgs }, ExtArgs["result"]["memoryEchoInsight"]> export type MemoryEchoInsightSelectScalar = { @@ -11513,10 +13810,24 @@ export namespace Prisma { dismissed?: boolean } + export type MemoryEchoInsightInclude = { + user?: boolean | MemoryEchoInsight$userArgs + note2?: boolean | NoteDefaultArgs + note1?: boolean | NoteDefaultArgs + } + export type MemoryEchoInsightIncludeCreateManyAndReturn = { + user?: boolean | MemoryEchoInsight$userArgs + note2?: boolean | NoteDefaultArgs + note1?: boolean | NoteDefaultArgs + } export type $MemoryEchoInsightPayload = { name: "MemoryEchoInsight" - objects: {} + objects: { + user: Prisma.$UserPayload | null + note2: Prisma.$NotePayload + note1: Prisma.$NotePayload + } scalars: $Extensions.GetPayloadResult<{ id: string userId: string | null @@ -11892,6 +14203,9 @@ export namespace Prisma { */ export interface Prisma__MemoryEchoInsightClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + note2 = {}>(args?: Subset>): Prisma__NoteClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + note1 = {}>(args?: Subset>): Prisma__NoteClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -11943,6 +14257,10 @@ export namespace Prisma { * Select specific fields to fetch from the MemoryEchoInsight */ select?: MemoryEchoInsightSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemoryEchoInsightInclude | null /** * Filter, which MemoryEchoInsight to fetch. */ @@ -11957,6 +14275,10 @@ export namespace Prisma { * Select specific fields to fetch from the MemoryEchoInsight */ select?: MemoryEchoInsightSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemoryEchoInsightInclude | null /** * Filter, which MemoryEchoInsight to fetch. */ @@ -11971,6 +14293,10 @@ export namespace Prisma { * Select specific fields to fetch from the MemoryEchoInsight */ select?: MemoryEchoInsightSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemoryEchoInsightInclude | null /** * Filter, which MemoryEchoInsight to fetch. */ @@ -12015,6 +14341,10 @@ export namespace Prisma { * Select specific fields to fetch from the MemoryEchoInsight */ select?: MemoryEchoInsightSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemoryEchoInsightInclude | null /** * Filter, which MemoryEchoInsight to fetch. */ @@ -12059,6 +14389,10 @@ export namespace Prisma { * Select specific fields to fetch from the MemoryEchoInsight */ select?: MemoryEchoInsightSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemoryEchoInsightInclude | null /** * Filter, which MemoryEchoInsights to fetch. */ @@ -12098,6 +14432,10 @@ export namespace Prisma { * Select specific fields to fetch from the MemoryEchoInsight */ select?: MemoryEchoInsightSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemoryEchoInsightInclude | null /** * The data needed to create a MemoryEchoInsight. */ @@ -12112,6 +14450,7 @@ export namespace Prisma { * The data used to create many MemoryEchoInsights. */ data: MemoryEchoInsightCreateManyInput | MemoryEchoInsightCreateManyInput[] + skipDuplicates?: boolean } /** @@ -12126,6 +14465,11 @@ export namespace Prisma { * The data used to create many MemoryEchoInsights. */ data: MemoryEchoInsightCreateManyInput | MemoryEchoInsightCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: MemoryEchoInsightIncludeCreateManyAndReturn | null } /** @@ -12136,6 +14480,10 @@ export namespace Prisma { * Select specific fields to fetch from the MemoryEchoInsight */ select?: MemoryEchoInsightSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemoryEchoInsightInclude | null /** * The data needed to update a MemoryEchoInsight. */ @@ -12168,6 +14516,10 @@ export namespace Prisma { * Select specific fields to fetch from the MemoryEchoInsight */ select?: MemoryEchoInsightSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemoryEchoInsightInclude | null /** * The filter to search for the MemoryEchoInsight to update in case it exists. */ @@ -12190,6 +14542,10 @@ export namespace Prisma { * Select specific fields to fetch from the MemoryEchoInsight */ select?: MemoryEchoInsightSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemoryEchoInsightInclude | null /** * Filter which MemoryEchoInsight to delete. */ @@ -12206,6 +14562,21 @@ export namespace Prisma { where?: MemoryEchoInsightWhereInput } + /** + * MemoryEchoInsight.user + */ + export type MemoryEchoInsight$userArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + where?: UserWhereInput + } + /** * MemoryEchoInsight without action */ @@ -12214,6 +14585,10 @@ export namespace Prisma { * Select specific fields to fetch from the MemoryEchoInsight */ select?: MemoryEchoInsightSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MemoryEchoInsightInclude | null } @@ -12239,6 +14614,7 @@ export namespace Prisma { fontSize: string | null demoMode: boolean | null showRecentNotes: boolean | null + notesViewMode: string | null emailNotifications: boolean | null desktopNotifications: boolean | null anonymousAnalytics: boolean | null @@ -12256,6 +14632,7 @@ export namespace Prisma { fontSize: string | null demoMode: boolean | null showRecentNotes: boolean | null + notesViewMode: string | null emailNotifications: boolean | null desktopNotifications: boolean | null anonymousAnalytics: boolean | null @@ -12273,6 +14650,7 @@ export namespace Prisma { fontSize: number demoMode: number showRecentNotes: number + notesViewMode: number emailNotifications: number desktopNotifications: number anonymousAnalytics: number @@ -12292,6 +14670,7 @@ export namespace Prisma { fontSize?: true demoMode?: true showRecentNotes?: true + notesViewMode?: true emailNotifications?: true desktopNotifications?: true anonymousAnalytics?: true @@ -12309,6 +14688,7 @@ export namespace Prisma { fontSize?: true demoMode?: true showRecentNotes?: true + notesViewMode?: true emailNotifications?: true desktopNotifications?: true anonymousAnalytics?: true @@ -12326,6 +14706,7 @@ export namespace Prisma { fontSize?: true demoMode?: true showRecentNotes?: true + notesViewMode?: true emailNotifications?: true desktopNotifications?: true anonymousAnalytics?: true @@ -12416,6 +14797,7 @@ export namespace Prisma { fontSize: string demoMode: boolean showRecentNotes: boolean + notesViewMode: string emailNotifications: boolean desktopNotifications: boolean anonymousAnalytics: boolean @@ -12450,9 +14832,11 @@ export namespace Prisma { fontSize?: boolean demoMode?: boolean showRecentNotes?: boolean + notesViewMode?: boolean emailNotifications?: boolean desktopNotifications?: boolean anonymousAnalytics?: boolean + user?: boolean | UserDefaultArgs }, ExtArgs["result"]["userAISettings"]> export type UserAISettingsSelectCreateManyAndReturn = $Extensions.GetSelect<{ @@ -12467,9 +14851,11 @@ export namespace Prisma { fontSize?: boolean demoMode?: boolean showRecentNotes?: boolean + notesViewMode?: boolean emailNotifications?: boolean desktopNotifications?: boolean anonymousAnalytics?: boolean + user?: boolean | UserDefaultArgs }, ExtArgs["result"]["userAISettings"]> export type UserAISettingsSelectScalar = { @@ -12484,15 +14870,24 @@ export namespace Prisma { fontSize?: boolean demoMode?: boolean showRecentNotes?: boolean + notesViewMode?: boolean emailNotifications?: boolean desktopNotifications?: boolean anonymousAnalytics?: boolean } + export type UserAISettingsInclude = { + user?: boolean | UserDefaultArgs + } + export type UserAISettingsIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + } export type $UserAISettingsPayload = { name: "UserAISettings" - objects: {} + objects: { + user: Prisma.$UserPayload + } scalars: $Extensions.GetPayloadResult<{ userId: string titleSuggestions: boolean @@ -12505,6 +14900,7 @@ export namespace Prisma { fontSize: string demoMode: boolean showRecentNotes: boolean + notesViewMode: string emailNotifications: boolean desktopNotifications: boolean anonymousAnalytics: boolean @@ -12872,6 +15268,7 @@ export namespace Prisma { */ export interface Prisma__UserAISettingsClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -12912,6 +15309,7 @@ export namespace Prisma { readonly fontSize: FieldRef<"UserAISettings", 'String'> readonly demoMode: FieldRef<"UserAISettings", 'Boolean'> readonly showRecentNotes: FieldRef<"UserAISettings", 'Boolean'> + readonly notesViewMode: FieldRef<"UserAISettings", 'String'> readonly emailNotifications: FieldRef<"UserAISettings", 'Boolean'> readonly desktopNotifications: FieldRef<"UserAISettings", 'Boolean'> readonly anonymousAnalytics: FieldRef<"UserAISettings", 'Boolean'> @@ -12927,6 +15325,10 @@ export namespace Prisma { * Select specific fields to fetch from the UserAISettings */ select?: UserAISettingsSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserAISettingsInclude | null /** * Filter, which UserAISettings to fetch. */ @@ -12941,6 +15343,10 @@ export namespace Prisma { * Select specific fields to fetch from the UserAISettings */ select?: UserAISettingsSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserAISettingsInclude | null /** * Filter, which UserAISettings to fetch. */ @@ -12955,6 +15361,10 @@ export namespace Prisma { * Select specific fields to fetch from the UserAISettings */ select?: UserAISettingsSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserAISettingsInclude | null /** * Filter, which UserAISettings to fetch. */ @@ -12999,6 +15409,10 @@ export namespace Prisma { * Select specific fields to fetch from the UserAISettings */ select?: UserAISettingsSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserAISettingsInclude | null /** * Filter, which UserAISettings to fetch. */ @@ -13043,6 +15457,10 @@ export namespace Prisma { * Select specific fields to fetch from the UserAISettings */ select?: UserAISettingsSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserAISettingsInclude | null /** * Filter, which UserAISettings to fetch. */ @@ -13082,6 +15500,10 @@ export namespace Prisma { * Select specific fields to fetch from the UserAISettings */ select?: UserAISettingsSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserAISettingsInclude | null /** * The data needed to create a UserAISettings. */ @@ -13096,6 +15518,7 @@ export namespace Prisma { * The data used to create many UserAISettings. */ data: UserAISettingsCreateManyInput | UserAISettingsCreateManyInput[] + skipDuplicates?: boolean } /** @@ -13110,6 +15533,11 @@ export namespace Prisma { * The data used to create many UserAISettings. */ data: UserAISettingsCreateManyInput | UserAISettingsCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: UserAISettingsIncludeCreateManyAndReturn | null } /** @@ -13120,6 +15548,10 @@ export namespace Prisma { * Select specific fields to fetch from the UserAISettings */ select?: UserAISettingsSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserAISettingsInclude | null /** * The data needed to update a UserAISettings. */ @@ -13152,6 +15584,10 @@ export namespace Prisma { * Select specific fields to fetch from the UserAISettings */ select?: UserAISettingsSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserAISettingsInclude | null /** * The filter to search for the UserAISettings to update in case it exists. */ @@ -13174,6 +15610,10 @@ export namespace Prisma { * Select specific fields to fetch from the UserAISettings */ select?: UserAISettingsSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserAISettingsInclude | null /** * Filter which UserAISettings to delete. */ @@ -13198,6 +15638,10 @@ export namespace Prisma { * Select specific fields to fetch from the UserAISettings */ select?: UserAISettingsSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserAISettingsInclude | null } @@ -13206,46 +15650,32 @@ export namespace Prisma { */ export const TransactionIsolationLevel: { + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', Serializable: 'Serializable' }; export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] - export const NoteScalarFieldEnum: { + export const UserScalarFieldEnum: { id: 'id', - title: 'title', - content: 'content', - color: 'color', - isPinned: 'isPinned', - isArchived: 'isArchived', - type: 'type', - checkItems: 'checkItems', - labels: 'labels', - images: 'images', - links: 'links', - reminder: 'reminder', - isReminderDone: 'isReminderDone', - reminderRecurrence: 'reminderRecurrence', - reminderLocation: 'reminderLocation', - isMarkdown: 'isMarkdown', - size: 'size', - embedding: 'embedding', - sharedWith: 'sharedWith', - userId: 'userId', - order: 'order', - notebookId: 'notebookId', + name: 'name', + email: 'email', + emailVerified: 'emailVerified', + password: 'password', + role: 'role', + image: 'image', + theme: 'theme', + cardSizeMode: 'cardSizeMode', + resetToken: 'resetToken', + resetTokenExpiry: 'resetTokenExpiry', createdAt: 'createdAt', - updatedAt: 'updatedAt', - autoGenerated: 'autoGenerated', - aiProvider: 'aiProvider', - aiConfidence: 'aiConfidence', - language: 'language', - languageConfidence: 'languageConfidence', - lastAiAnalysis: 'lastAiAnalysis' + updatedAt: 'updatedAt' }; - export type NoteScalarFieldEnum = (typeof NoteScalarFieldEnum)[keyof typeof NoteScalarFieldEnum] + export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] export const NotebookScalarFieldEnum: { @@ -13275,22 +15705,68 @@ export namespace Prisma { export type LabelScalarFieldEnum = (typeof LabelScalarFieldEnum)[keyof typeof LabelScalarFieldEnum] - export const UserScalarFieldEnum: { + export const NoteScalarFieldEnum: { id: 'id', - name: 'name', - email: 'email', - emailVerified: 'emailVerified', - password: 'password', - role: 'role', - image: 'image', - theme: 'theme', - resetToken: 'resetToken', - resetTokenExpiry: 'resetTokenExpiry', + title: 'title', + content: 'content', + color: 'color', + isPinned: 'isPinned', + isArchived: 'isArchived', + trashedAt: 'trashedAt', + type: 'type', + dismissedFromRecent: 'dismissedFromRecent', + checkItems: 'checkItems', + labels: 'labels', + images: 'images', + links: 'links', + reminder: 'reminder', + isReminderDone: 'isReminderDone', + reminderRecurrence: 'reminderRecurrence', + reminderLocation: 'reminderLocation', + isMarkdown: 'isMarkdown', + size: 'size', + sharedWith: 'sharedWith', + userId: 'userId', + order: 'order', + notebookId: 'notebookId', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + contentUpdatedAt: 'contentUpdatedAt', + autoGenerated: 'autoGenerated', + aiProvider: 'aiProvider', + aiConfidence: 'aiConfidence', + language: 'language', + languageConfidence: 'languageConfidence', + lastAiAnalysis: 'lastAiAnalysis' + }; + + export type NoteScalarFieldEnum = (typeof NoteScalarFieldEnum)[keyof typeof NoteScalarFieldEnum] + + + export const NoteEmbeddingScalarFieldEnum: { + id: 'id', + noteId: 'noteId', + embedding: 'embedding', + createdAt: 'createdAt' + }; + + export type NoteEmbeddingScalarFieldEnum = (typeof NoteEmbeddingScalarFieldEnum)[keyof typeof NoteEmbeddingScalarFieldEnum] + + + export const NoteShareScalarFieldEnum: { + id: 'id', + noteId: 'noteId', + userId: 'userId', + sharedBy: 'sharedBy', + status: 'status', + permission: 'permission', + notifiedAt: 'notifiedAt', + respondedAt: 'respondedAt', createdAt: 'createdAt', updatedAt: 'updatedAt' }; - export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] + export type NoteShareScalarFieldEnum = (typeof NoteShareScalarFieldEnum)[keyof typeof NoteShareScalarFieldEnum] export const AccountScalarFieldEnum: { @@ -13332,22 +15808,6 @@ export namespace Prisma { export type VerificationTokenScalarFieldEnum = (typeof VerificationTokenScalarFieldEnum)[keyof typeof VerificationTokenScalarFieldEnum] - export const NoteShareScalarFieldEnum: { - id: 'id', - noteId: 'noteId', - userId: 'userId', - sharedBy: 'sharedBy', - status: 'status', - permission: 'permission', - notifiedAt: 'notifiedAt', - respondedAt: 'respondedAt', - createdAt: 'createdAt', - updatedAt: 'updatedAt' - }; - - export type NoteShareScalarFieldEnum = (typeof NoteShareScalarFieldEnum)[keyof typeof NoteShareScalarFieldEnum] - - export const SystemConfigScalarFieldEnum: { key: 'key', value: 'value' @@ -13399,6 +15859,7 @@ export namespace Prisma { fontSize: 'fontSize', demoMode: 'demoMode', showRecentNotes: 'showRecentNotes', + notesViewMode: 'notesViewMode', emailNotifications: 'emailNotifications', desktopNotifications: 'desktopNotifications', anonymousAnalytics: 'anonymousAnalytics' @@ -13415,6 +15876,14 @@ export namespace Prisma { export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + export const QueryMode: { + default: 'default', + insensitive: 'insensitive' + }; + + export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + + export const NullsOrder: { first: 'first', last: 'last' @@ -13436,9 +15905,9 @@ export namespace Prisma { /** - * Reference to a field of type 'Boolean' + * Reference to a field of type 'String[]' */ - export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> + export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'> @@ -13449,6 +15918,13 @@ export namespace Prisma { + /** + * Reference to a field of type 'DateTime[]' + */ + export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'> + + + /** * Reference to a field of type 'Int' */ @@ -13456,193 +15932,157 @@ export namespace Prisma { + /** + * Reference to a field of type 'Int[]' + */ + export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'> + + + + /** + * Reference to a field of type 'Boolean' + */ + export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> + + + /** * 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 */ - export type NoteWhereInput = { - AND?: NoteWhereInput | NoteWhereInput[] - OR?: NoteWhereInput[] - NOT?: NoteWhereInput | NoteWhereInput[] - id?: StringFilter<"Note"> | string - title?: StringNullableFilter<"Note"> | string | null - content?: StringFilter<"Note"> | string - color?: StringFilter<"Note"> | string - isPinned?: BoolFilter<"Note"> | boolean - isArchived?: BoolFilter<"Note"> | boolean - type?: StringFilter<"Note"> | string - checkItems?: StringNullableFilter<"Note"> | string | null - labels?: StringNullableFilter<"Note"> | string | null - images?: StringNullableFilter<"Note"> | string | null - links?: StringNullableFilter<"Note"> | string | null - reminder?: DateTimeNullableFilter<"Note"> | Date | string | null - isReminderDone?: BoolFilter<"Note"> | boolean - reminderRecurrence?: StringNullableFilter<"Note"> | string | null - reminderLocation?: StringNullableFilter<"Note"> | string | null - isMarkdown?: BoolFilter<"Note"> | boolean - size?: StringFilter<"Note"> | string - embedding?: StringNullableFilter<"Note"> | string | null - sharedWith?: StringNullableFilter<"Note"> | string | null - userId?: StringNullableFilter<"Note"> | string | null - order?: IntFilter<"Note"> | number - notebookId?: StringNullableFilter<"Note"> | string | null - createdAt?: DateTimeFilter<"Note"> | Date | string - updatedAt?: DateTimeFilter<"Note"> | Date | string - autoGenerated?: BoolNullableFilter<"Note"> | boolean | null - aiProvider?: StringNullableFilter<"Note"> | string | null - aiConfidence?: IntNullableFilter<"Note"> | number | null - language?: StringNullableFilter<"Note"> | string | null - languageConfidence?: FloatNullableFilter<"Note"> | number | null - lastAiAnalysis?: DateTimeNullableFilter<"Note"> | Date | string | null + export type UserWhereInput = { + AND?: UserWhereInput | UserWhereInput[] + OR?: UserWhereInput[] + NOT?: UserWhereInput | UserWhereInput[] + id?: StringFilter<"User"> | string + name?: StringNullableFilter<"User"> | string | null + email?: StringFilter<"User"> | string + emailVerified?: DateTimeNullableFilter<"User"> | Date | string | null + password?: StringNullableFilter<"User"> | string | null + role?: StringFilter<"User"> | string + image?: StringNullableFilter<"User"> | string | null + theme?: StringFilter<"User"> | string + cardSizeMode?: StringFilter<"User"> | string + resetToken?: StringNullableFilter<"User"> | string | null + resetTokenExpiry?: DateTimeNullableFilter<"User"> | Date | string | null + createdAt?: DateTimeFilter<"User"> | Date | string + updatedAt?: DateTimeFilter<"User"> | Date | string + accounts?: AccountListRelationFilter + aiFeedback?: AiFeedbackListRelationFilter + labels?: LabelListRelationFilter + memoryEchoInsights?: MemoryEchoInsightListRelationFilter + notes?: NoteListRelationFilter + sentShares?: NoteShareListRelationFilter + receivedShares?: NoteShareListRelationFilter + notebooks?: NotebookListRelationFilter + sessions?: SessionListRelationFilter + aiSettings?: XOR | null } - export type NoteOrderByWithRelationInput = { + export type UserOrderByWithRelationInput = { id?: SortOrder - title?: SortOrderInput | SortOrder - content?: SortOrder - color?: SortOrder - isPinned?: SortOrder - isArchived?: SortOrder - type?: SortOrder - checkItems?: SortOrderInput | SortOrder - labels?: SortOrderInput | SortOrder - images?: SortOrderInput | SortOrder - links?: SortOrderInput | SortOrder - reminder?: SortOrderInput | SortOrder - isReminderDone?: SortOrder - reminderRecurrence?: SortOrderInput | SortOrder - reminderLocation?: SortOrderInput | SortOrder - isMarkdown?: SortOrder - size?: SortOrder - embedding?: SortOrderInput | SortOrder - sharedWith?: SortOrderInput | SortOrder - userId?: SortOrderInput | SortOrder - order?: SortOrder - notebookId?: SortOrderInput | SortOrder + name?: SortOrderInput | SortOrder + email?: SortOrder + emailVerified?: SortOrderInput | SortOrder + password?: SortOrderInput | SortOrder + role?: SortOrder + image?: SortOrderInput | SortOrder + theme?: SortOrder + cardSizeMode?: SortOrder + resetToken?: SortOrderInput | SortOrder + resetTokenExpiry?: SortOrderInput | SortOrder createdAt?: SortOrder updatedAt?: SortOrder - autoGenerated?: SortOrderInput | SortOrder - aiProvider?: SortOrderInput | SortOrder - aiConfidence?: SortOrderInput | SortOrder - language?: SortOrderInput | SortOrder - languageConfidence?: SortOrderInput | SortOrder - lastAiAnalysis?: SortOrderInput | SortOrder + accounts?: AccountOrderByRelationAggregateInput + aiFeedback?: AiFeedbackOrderByRelationAggregateInput + labels?: LabelOrderByRelationAggregateInput + memoryEchoInsights?: MemoryEchoInsightOrderByRelationAggregateInput + notes?: NoteOrderByRelationAggregateInput + sentShares?: NoteShareOrderByRelationAggregateInput + receivedShares?: NoteShareOrderByRelationAggregateInput + notebooks?: NotebookOrderByRelationAggregateInput + sessions?: SessionOrderByRelationAggregateInput + aiSettings?: UserAISettingsOrderByWithRelationInput } - export type NoteWhereUniqueInput = Prisma.AtLeast<{ + export type UserWhereUniqueInput = Prisma.AtLeast<{ id?: string - AND?: NoteWhereInput | NoteWhereInput[] - OR?: NoteWhereInput[] - NOT?: NoteWhereInput | NoteWhereInput[] - title?: StringNullableFilter<"Note"> | string | null - content?: StringFilter<"Note"> | string - color?: StringFilter<"Note"> | string - isPinned?: BoolFilter<"Note"> | boolean - isArchived?: BoolFilter<"Note"> | boolean - type?: StringFilter<"Note"> | string - checkItems?: StringNullableFilter<"Note"> | string | null - labels?: StringNullableFilter<"Note"> | string | null - images?: StringNullableFilter<"Note"> | string | null - links?: StringNullableFilter<"Note"> | string | null - reminder?: DateTimeNullableFilter<"Note"> | Date | string | null - isReminderDone?: BoolFilter<"Note"> | boolean - reminderRecurrence?: StringNullableFilter<"Note"> | string | null - reminderLocation?: StringNullableFilter<"Note"> | string | null - isMarkdown?: BoolFilter<"Note"> | boolean - size?: StringFilter<"Note"> | string - embedding?: StringNullableFilter<"Note"> | string | null - sharedWith?: StringNullableFilter<"Note"> | string | null - userId?: StringNullableFilter<"Note"> | string | null - order?: IntFilter<"Note"> | number - notebookId?: StringNullableFilter<"Note"> | string | null - createdAt?: DateTimeFilter<"Note"> | Date | string - updatedAt?: DateTimeFilter<"Note"> | Date | string - autoGenerated?: BoolNullableFilter<"Note"> | boolean | null - aiProvider?: StringNullableFilter<"Note"> | string | null - aiConfidence?: IntNullableFilter<"Note"> | number | null - language?: StringNullableFilter<"Note"> | string | null - languageConfidence?: FloatNullableFilter<"Note"> | number | null - lastAiAnalysis?: DateTimeNullableFilter<"Note"> | Date | string | null - }, "id"> + email?: string + resetToken?: string + AND?: UserWhereInput | UserWhereInput[] + OR?: UserWhereInput[] + NOT?: UserWhereInput | UserWhereInput[] + name?: StringNullableFilter<"User"> | string | null + emailVerified?: DateTimeNullableFilter<"User"> | Date | string | null + password?: StringNullableFilter<"User"> | string | null + role?: StringFilter<"User"> | string + image?: StringNullableFilter<"User"> | string | null + theme?: StringFilter<"User"> | string + cardSizeMode?: StringFilter<"User"> | string + resetTokenExpiry?: DateTimeNullableFilter<"User"> | Date | string | null + createdAt?: DateTimeFilter<"User"> | Date | string + updatedAt?: DateTimeFilter<"User"> | Date | string + accounts?: AccountListRelationFilter + aiFeedback?: AiFeedbackListRelationFilter + labels?: LabelListRelationFilter + memoryEchoInsights?: MemoryEchoInsightListRelationFilter + notes?: NoteListRelationFilter + sentShares?: NoteShareListRelationFilter + receivedShares?: NoteShareListRelationFilter + notebooks?: NotebookListRelationFilter + sessions?: SessionListRelationFilter + aiSettings?: XOR | null + }, "id" | "email" | "resetToken"> - export type NoteOrderByWithAggregationInput = { + export type UserOrderByWithAggregationInput = { id?: SortOrder - title?: SortOrderInput | SortOrder - content?: SortOrder - color?: SortOrder - isPinned?: SortOrder - isArchived?: SortOrder - type?: SortOrder - checkItems?: SortOrderInput | SortOrder - labels?: SortOrderInput | SortOrder - images?: SortOrderInput | SortOrder - links?: SortOrderInput | SortOrder - reminder?: SortOrderInput | SortOrder - isReminderDone?: SortOrder - reminderRecurrence?: SortOrderInput | SortOrder - reminderLocation?: SortOrderInput | SortOrder - isMarkdown?: SortOrder - size?: SortOrder - embedding?: SortOrderInput | SortOrder - sharedWith?: SortOrderInput | SortOrder - userId?: SortOrderInput | SortOrder - order?: SortOrder - notebookId?: SortOrderInput | SortOrder + name?: SortOrderInput | SortOrder + email?: SortOrder + emailVerified?: SortOrderInput | SortOrder + password?: SortOrderInput | SortOrder + role?: SortOrder + image?: SortOrderInput | SortOrder + theme?: SortOrder + cardSizeMode?: SortOrder + resetToken?: SortOrderInput | SortOrder + resetTokenExpiry?: SortOrderInput | SortOrder createdAt?: SortOrder updatedAt?: SortOrder - autoGenerated?: SortOrderInput | SortOrder - aiProvider?: SortOrderInput | SortOrder - aiConfidence?: SortOrderInput | SortOrder - language?: SortOrderInput | SortOrder - languageConfidence?: SortOrderInput | SortOrder - lastAiAnalysis?: SortOrderInput | SortOrder - _count?: NoteCountOrderByAggregateInput - _avg?: NoteAvgOrderByAggregateInput - _max?: NoteMaxOrderByAggregateInput - _min?: NoteMinOrderByAggregateInput - _sum?: NoteSumOrderByAggregateInput + _count?: UserCountOrderByAggregateInput + _max?: UserMaxOrderByAggregateInput + _min?: UserMinOrderByAggregateInput } - export type NoteScalarWhereWithAggregatesInput = { - AND?: NoteScalarWhereWithAggregatesInput | NoteScalarWhereWithAggregatesInput[] - OR?: NoteScalarWhereWithAggregatesInput[] - NOT?: NoteScalarWhereWithAggregatesInput | NoteScalarWhereWithAggregatesInput[] - id?: StringWithAggregatesFilter<"Note"> | string - title?: StringNullableWithAggregatesFilter<"Note"> | string | null - content?: StringWithAggregatesFilter<"Note"> | string - color?: StringWithAggregatesFilter<"Note"> | string - isPinned?: BoolWithAggregatesFilter<"Note"> | boolean - isArchived?: BoolWithAggregatesFilter<"Note"> | boolean - type?: StringWithAggregatesFilter<"Note"> | string - checkItems?: StringNullableWithAggregatesFilter<"Note"> | string | null - labels?: StringNullableWithAggregatesFilter<"Note"> | string | null - images?: StringNullableWithAggregatesFilter<"Note"> | string | null - links?: StringNullableWithAggregatesFilter<"Note"> | string | null - reminder?: DateTimeNullableWithAggregatesFilter<"Note"> | Date | string | null - isReminderDone?: BoolWithAggregatesFilter<"Note"> | boolean - reminderRecurrence?: StringNullableWithAggregatesFilter<"Note"> | string | null - reminderLocation?: StringNullableWithAggregatesFilter<"Note"> | string | null - isMarkdown?: BoolWithAggregatesFilter<"Note"> | boolean - size?: StringWithAggregatesFilter<"Note"> | string - embedding?: StringNullableWithAggregatesFilter<"Note"> | string | null - sharedWith?: StringNullableWithAggregatesFilter<"Note"> | string | null - userId?: StringNullableWithAggregatesFilter<"Note"> | string | null - order?: IntWithAggregatesFilter<"Note"> | number - notebookId?: StringNullableWithAggregatesFilter<"Note"> | string | null - createdAt?: DateTimeWithAggregatesFilter<"Note"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"Note"> | Date | string - autoGenerated?: BoolNullableWithAggregatesFilter<"Note"> | boolean | null - aiProvider?: StringNullableWithAggregatesFilter<"Note"> | string | null - aiConfidence?: IntNullableWithAggregatesFilter<"Note"> | number | null - language?: StringNullableWithAggregatesFilter<"Note"> | string | null - languageConfidence?: FloatNullableWithAggregatesFilter<"Note"> | number | null - lastAiAnalysis?: DateTimeNullableWithAggregatesFilter<"Note"> | Date | string | null + export type UserScalarWhereWithAggregatesInput = { + AND?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[] + OR?: UserScalarWhereWithAggregatesInput[] + NOT?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"User"> | string + name?: StringNullableWithAggregatesFilter<"User"> | string | null + email?: StringWithAggregatesFilter<"User"> | string + emailVerified?: DateTimeNullableWithAggregatesFilter<"User"> | Date | string | null + password?: StringNullableWithAggregatesFilter<"User"> | string | null + role?: StringWithAggregatesFilter<"User"> | string + image?: StringNullableWithAggregatesFilter<"User"> | string | null + theme?: StringWithAggregatesFilter<"User"> | string + cardSizeMode?: StringWithAggregatesFilter<"User"> | string + resetToken?: StringNullableWithAggregatesFilter<"User"> | string | null + resetTokenExpiry?: DateTimeNullableWithAggregatesFilter<"User"> | Date | string | null + createdAt?: DateTimeWithAggregatesFilter<"User"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"User"> | Date | string } export type NotebookWhereInput = { @@ -13657,6 +16097,9 @@ export namespace Prisma { userId?: StringFilter<"Notebook"> | string createdAt?: DateTimeFilter<"Notebook"> | Date | string updatedAt?: DateTimeFilter<"Notebook"> | Date | string + labels?: LabelListRelationFilter + notes?: NoteListRelationFilter + user?: XOR } export type NotebookOrderByWithRelationInput = { @@ -13668,6 +16111,9 @@ export namespace Prisma { userId?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder + labels?: LabelOrderByRelationAggregateInput + notes?: NoteOrderByRelationAggregateInput + user?: UserOrderByWithRelationInput } export type NotebookWhereUniqueInput = Prisma.AtLeast<{ @@ -13682,6 +16128,9 @@ export namespace Prisma { userId?: StringFilter<"Notebook"> | string createdAt?: DateTimeFilter<"Notebook"> | Date | string updatedAt?: DateTimeFilter<"Notebook"> | Date | string + labels?: LabelListRelationFilter + notes?: NoteListRelationFilter + user?: XOR }, "id"> export type NotebookOrderByWithAggregationInput = { @@ -13725,6 +16174,9 @@ export namespace Prisma { userId?: StringNullableFilter<"Label"> | string | null createdAt?: DateTimeFilter<"Label"> | Date | string updatedAt?: DateTimeFilter<"Label"> | Date | string + user?: XOR | null + notebook?: XOR | null + notes?: NoteListRelationFilter } export type LabelOrderByWithRelationInput = { @@ -13735,10 +16187,14 @@ export namespace Prisma { userId?: SortOrderInput | SortOrder createdAt?: SortOrder updatedAt?: SortOrder + user?: UserOrderByWithRelationInput + notebook?: NotebookOrderByWithRelationInput + notes?: NoteOrderByRelationAggregateInput } export type LabelWhereUniqueInput = Prisma.AtLeast<{ id?: string + notebookId_name?: LabelNotebookIdNameCompoundUniqueInput AND?: LabelWhereInput | LabelWhereInput[] OR?: LabelWhereInput[] NOT?: LabelWhereInput | LabelWhereInput[] @@ -13748,7 +16204,10 @@ export namespace Prisma { userId?: StringNullableFilter<"Label"> | string | null createdAt?: DateTimeFilter<"Label"> | Date | string updatedAt?: DateTimeFilter<"Label"> | Date | string - }, "id"> + user?: XOR | null + notebook?: XOR | null + notes?: NoteListRelationFilter + }, "id" | "notebookId_name"> export type LabelOrderByWithAggregationInput = { id?: SortOrder @@ -13776,91 +16235,354 @@ export namespace Prisma { updatedAt?: DateTimeWithAggregatesFilter<"Label"> | Date | string } - export type UserWhereInput = { - AND?: UserWhereInput | UserWhereInput[] - OR?: UserWhereInput[] - NOT?: UserWhereInput | UserWhereInput[] - id?: StringFilter<"User"> | string - name?: StringNullableFilter<"User"> | string | null - email?: StringFilter<"User"> | string - emailVerified?: DateTimeNullableFilter<"User"> | Date | string | null - password?: StringNullableFilter<"User"> | string | null - role?: StringFilter<"User"> | string - image?: StringNullableFilter<"User"> | string | null - theme?: StringFilter<"User"> | string - resetToken?: StringNullableFilter<"User"> | string | null - resetTokenExpiry?: DateTimeNullableFilter<"User"> | Date | string | null - createdAt?: DateTimeFilter<"User"> | Date | string - updatedAt?: DateTimeFilter<"User"> | Date | string + export type NoteWhereInput = { + AND?: NoteWhereInput | NoteWhereInput[] + OR?: NoteWhereInput[] + NOT?: NoteWhereInput | NoteWhereInput[] + id?: StringFilter<"Note"> | string + title?: StringNullableFilter<"Note"> | string | null + content?: StringFilter<"Note"> | string + color?: StringFilter<"Note"> | string + isPinned?: BoolFilter<"Note"> | boolean + isArchived?: BoolFilter<"Note"> | boolean + trashedAt?: DateTimeNullableFilter<"Note"> | Date | string | null + type?: StringFilter<"Note"> | string + dismissedFromRecent?: BoolFilter<"Note"> | boolean + checkItems?: StringNullableFilter<"Note"> | string | null + labels?: StringNullableFilter<"Note"> | string | null + images?: StringNullableFilter<"Note"> | string | null + links?: StringNullableFilter<"Note"> | string | null + reminder?: DateTimeNullableFilter<"Note"> | Date | string | null + isReminderDone?: BoolFilter<"Note"> | boolean + reminderRecurrence?: StringNullableFilter<"Note"> | string | null + reminderLocation?: StringNullableFilter<"Note"> | string | null + isMarkdown?: BoolFilter<"Note"> | boolean + size?: StringFilter<"Note"> | string + sharedWith?: StringNullableFilter<"Note"> | string | null + userId?: StringNullableFilter<"Note"> | string | null + order?: IntFilter<"Note"> | number + notebookId?: StringNullableFilter<"Note"> | string | null + createdAt?: DateTimeFilter<"Note"> | Date | string + updatedAt?: DateTimeFilter<"Note"> | Date | string + contentUpdatedAt?: DateTimeFilter<"Note"> | Date | string + autoGenerated?: BoolNullableFilter<"Note"> | boolean | null + aiProvider?: StringNullableFilter<"Note"> | string | null + aiConfidence?: IntNullableFilter<"Note"> | number | null + language?: StringNullableFilter<"Note"> | string | null + languageConfidence?: FloatNullableFilter<"Note"> | number | null + lastAiAnalysis?: DateTimeNullableFilter<"Note"> | Date | string | null + aiFeedback?: AiFeedbackListRelationFilter + memoryEchoAsNote2?: MemoryEchoInsightListRelationFilter + memoryEchoAsNote1?: MemoryEchoInsightListRelationFilter + notebook?: XOR | null + user?: XOR | null + shares?: NoteShareListRelationFilter + labelRelations?: LabelListRelationFilter + noteEmbedding?: XOR | null } - export type UserOrderByWithRelationInput = { + export type NoteOrderByWithRelationInput = { id?: SortOrder - name?: SortOrderInput | SortOrder - email?: SortOrder - emailVerified?: SortOrderInput | SortOrder - password?: SortOrderInput | SortOrder - role?: SortOrder - image?: SortOrderInput | SortOrder - theme?: SortOrder - resetToken?: SortOrderInput | SortOrder - resetTokenExpiry?: SortOrderInput | SortOrder + title?: SortOrderInput | SortOrder + content?: SortOrder + color?: SortOrder + isPinned?: SortOrder + isArchived?: SortOrder + trashedAt?: SortOrderInput | SortOrder + type?: SortOrder + dismissedFromRecent?: SortOrder + checkItems?: SortOrderInput | SortOrder + labels?: SortOrderInput | SortOrder + images?: SortOrderInput | SortOrder + links?: SortOrderInput | SortOrder + reminder?: SortOrderInput | SortOrder + isReminderDone?: SortOrder + reminderRecurrence?: SortOrderInput | SortOrder + reminderLocation?: SortOrderInput | SortOrder + isMarkdown?: SortOrder + size?: SortOrder + sharedWith?: SortOrderInput | SortOrder + userId?: SortOrderInput | SortOrder + order?: SortOrder + notebookId?: SortOrderInput | SortOrder createdAt?: SortOrder updatedAt?: SortOrder + contentUpdatedAt?: SortOrder + autoGenerated?: SortOrderInput | SortOrder + aiProvider?: SortOrderInput | SortOrder + aiConfidence?: SortOrderInput | SortOrder + language?: SortOrderInput | SortOrder + languageConfidence?: SortOrderInput | SortOrder + lastAiAnalysis?: SortOrderInput | SortOrder + aiFeedback?: AiFeedbackOrderByRelationAggregateInput + memoryEchoAsNote2?: MemoryEchoInsightOrderByRelationAggregateInput + memoryEchoAsNote1?: MemoryEchoInsightOrderByRelationAggregateInput + notebook?: NotebookOrderByWithRelationInput + user?: UserOrderByWithRelationInput + shares?: NoteShareOrderByRelationAggregateInput + labelRelations?: LabelOrderByRelationAggregateInput + noteEmbedding?: NoteEmbeddingOrderByWithRelationInput } - export type UserWhereUniqueInput = Prisma.AtLeast<{ + export type NoteWhereUniqueInput = Prisma.AtLeast<{ id?: string - email?: string - resetToken?: string - AND?: UserWhereInput | UserWhereInput[] - OR?: UserWhereInput[] - NOT?: UserWhereInput | UserWhereInput[] - name?: StringNullableFilter<"User"> | string | null - emailVerified?: DateTimeNullableFilter<"User"> | Date | string | null - password?: StringNullableFilter<"User"> | string | null - role?: StringFilter<"User"> | string - image?: StringNullableFilter<"User"> | string | null - theme?: StringFilter<"User"> | string - resetTokenExpiry?: DateTimeNullableFilter<"User"> | Date | string | null - createdAt?: DateTimeFilter<"User"> | Date | string - updatedAt?: DateTimeFilter<"User"> | Date | string - }, "id" | "email" | "resetToken"> + AND?: NoteWhereInput | NoteWhereInput[] + OR?: NoteWhereInput[] + NOT?: NoteWhereInput | NoteWhereInput[] + title?: StringNullableFilter<"Note"> | string | null + content?: StringFilter<"Note"> | string + color?: StringFilter<"Note"> | string + isPinned?: BoolFilter<"Note"> | boolean + isArchived?: BoolFilter<"Note"> | boolean + trashedAt?: DateTimeNullableFilter<"Note"> | Date | string | null + type?: StringFilter<"Note"> | string + dismissedFromRecent?: BoolFilter<"Note"> | boolean + checkItems?: StringNullableFilter<"Note"> | string | null + labels?: StringNullableFilter<"Note"> | string | null + images?: StringNullableFilter<"Note"> | string | null + links?: StringNullableFilter<"Note"> | string | null + reminder?: DateTimeNullableFilter<"Note"> | Date | string | null + isReminderDone?: BoolFilter<"Note"> | boolean + reminderRecurrence?: StringNullableFilter<"Note"> | string | null + reminderLocation?: StringNullableFilter<"Note"> | string | null + isMarkdown?: BoolFilter<"Note"> | boolean + size?: StringFilter<"Note"> | string + sharedWith?: StringNullableFilter<"Note"> | string | null + userId?: StringNullableFilter<"Note"> | string | null + order?: IntFilter<"Note"> | number + notebookId?: StringNullableFilter<"Note"> | string | null + createdAt?: DateTimeFilter<"Note"> | Date | string + updatedAt?: DateTimeFilter<"Note"> | Date | string + contentUpdatedAt?: DateTimeFilter<"Note"> | Date | string + autoGenerated?: BoolNullableFilter<"Note"> | boolean | null + aiProvider?: StringNullableFilter<"Note"> | string | null + aiConfidence?: IntNullableFilter<"Note"> | number | null + language?: StringNullableFilter<"Note"> | string | null + languageConfidence?: FloatNullableFilter<"Note"> | number | null + lastAiAnalysis?: DateTimeNullableFilter<"Note"> | Date | string | null + aiFeedback?: AiFeedbackListRelationFilter + memoryEchoAsNote2?: MemoryEchoInsightListRelationFilter + memoryEchoAsNote1?: MemoryEchoInsightListRelationFilter + notebook?: XOR | null + user?: XOR | null + shares?: NoteShareListRelationFilter + labelRelations?: LabelListRelationFilter + noteEmbedding?: XOR | null + }, "id"> - export type UserOrderByWithAggregationInput = { + export type NoteOrderByWithAggregationInput = { id?: SortOrder - name?: SortOrderInput | SortOrder - email?: SortOrder - emailVerified?: SortOrderInput | SortOrder - password?: SortOrderInput | SortOrder - role?: SortOrder - image?: SortOrderInput | SortOrder - theme?: SortOrder - resetToken?: SortOrderInput | SortOrder - resetTokenExpiry?: SortOrderInput | SortOrder + title?: SortOrderInput | SortOrder + content?: SortOrder + color?: SortOrder + isPinned?: SortOrder + isArchived?: SortOrder + trashedAt?: SortOrderInput | SortOrder + type?: SortOrder + dismissedFromRecent?: SortOrder + checkItems?: SortOrderInput | SortOrder + labels?: SortOrderInput | SortOrder + images?: SortOrderInput | SortOrder + links?: SortOrderInput | SortOrder + reminder?: SortOrderInput | SortOrder + isReminderDone?: SortOrder + reminderRecurrence?: SortOrderInput | SortOrder + reminderLocation?: SortOrderInput | SortOrder + isMarkdown?: SortOrder + size?: SortOrder + sharedWith?: SortOrderInput | SortOrder + userId?: SortOrderInput | SortOrder + order?: SortOrder + notebookId?: SortOrderInput | SortOrder createdAt?: SortOrder updatedAt?: SortOrder - _count?: UserCountOrderByAggregateInput - _max?: UserMaxOrderByAggregateInput - _min?: UserMinOrderByAggregateInput + contentUpdatedAt?: SortOrder + autoGenerated?: SortOrderInput | SortOrder + aiProvider?: SortOrderInput | SortOrder + aiConfidence?: SortOrderInput | SortOrder + language?: SortOrderInput | SortOrder + languageConfidence?: SortOrderInput | SortOrder + lastAiAnalysis?: SortOrderInput | SortOrder + _count?: NoteCountOrderByAggregateInput + _avg?: NoteAvgOrderByAggregateInput + _max?: NoteMaxOrderByAggregateInput + _min?: NoteMinOrderByAggregateInput + _sum?: NoteSumOrderByAggregateInput } - export type UserScalarWhereWithAggregatesInput = { - AND?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[] - OR?: UserScalarWhereWithAggregatesInput[] - NOT?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[] - id?: StringWithAggregatesFilter<"User"> | string - name?: StringNullableWithAggregatesFilter<"User"> | string | null - email?: StringWithAggregatesFilter<"User"> | string - emailVerified?: DateTimeNullableWithAggregatesFilter<"User"> | Date | string | null - password?: StringNullableWithAggregatesFilter<"User"> | string | null - role?: StringWithAggregatesFilter<"User"> | string - image?: StringNullableWithAggregatesFilter<"User"> | string | null - theme?: StringWithAggregatesFilter<"User"> | string - resetToken?: StringNullableWithAggregatesFilter<"User"> | string | null - resetTokenExpiry?: DateTimeNullableWithAggregatesFilter<"User"> | Date | string | null - createdAt?: DateTimeWithAggregatesFilter<"User"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"User"> | Date | string + export type NoteScalarWhereWithAggregatesInput = { + AND?: NoteScalarWhereWithAggregatesInput | NoteScalarWhereWithAggregatesInput[] + OR?: NoteScalarWhereWithAggregatesInput[] + NOT?: NoteScalarWhereWithAggregatesInput | NoteScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Note"> | string + title?: StringNullableWithAggregatesFilter<"Note"> | string | null + content?: StringWithAggregatesFilter<"Note"> | string + color?: StringWithAggregatesFilter<"Note"> | string + isPinned?: BoolWithAggregatesFilter<"Note"> | boolean + isArchived?: BoolWithAggregatesFilter<"Note"> | boolean + trashedAt?: DateTimeNullableWithAggregatesFilter<"Note"> | Date | string | null + type?: StringWithAggregatesFilter<"Note"> | string + dismissedFromRecent?: BoolWithAggregatesFilter<"Note"> | boolean + checkItems?: StringNullableWithAggregatesFilter<"Note"> | string | null + labels?: StringNullableWithAggregatesFilter<"Note"> | string | null + images?: StringNullableWithAggregatesFilter<"Note"> | string | null + links?: StringNullableWithAggregatesFilter<"Note"> | string | null + reminder?: DateTimeNullableWithAggregatesFilter<"Note"> | Date | string | null + isReminderDone?: BoolWithAggregatesFilter<"Note"> | boolean + reminderRecurrence?: StringNullableWithAggregatesFilter<"Note"> | string | null + reminderLocation?: StringNullableWithAggregatesFilter<"Note"> | string | null + isMarkdown?: BoolWithAggregatesFilter<"Note"> | boolean + size?: StringWithAggregatesFilter<"Note"> | string + sharedWith?: StringNullableWithAggregatesFilter<"Note"> | string | null + userId?: StringNullableWithAggregatesFilter<"Note"> | string | null + order?: IntWithAggregatesFilter<"Note"> | number + notebookId?: StringNullableWithAggregatesFilter<"Note"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"Note"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"Note"> | Date | string + contentUpdatedAt?: DateTimeWithAggregatesFilter<"Note"> | Date | string + autoGenerated?: BoolNullableWithAggregatesFilter<"Note"> | boolean | null + aiProvider?: StringNullableWithAggregatesFilter<"Note"> | string | null + aiConfidence?: IntNullableWithAggregatesFilter<"Note"> | number | null + language?: StringNullableWithAggregatesFilter<"Note"> | string | null + languageConfidence?: FloatNullableWithAggregatesFilter<"Note"> | number | null + lastAiAnalysis?: DateTimeNullableWithAggregatesFilter<"Note"> | Date | string | null + } + + export type NoteEmbeddingWhereInput = { + AND?: NoteEmbeddingWhereInput | NoteEmbeddingWhereInput[] + OR?: NoteEmbeddingWhereInput[] + NOT?: NoteEmbeddingWhereInput | NoteEmbeddingWhereInput[] + id?: StringFilter<"NoteEmbedding"> | string + noteId?: StringFilter<"NoteEmbedding"> | string + embedding?: StringFilter<"NoteEmbedding"> | string + createdAt?: DateTimeFilter<"NoteEmbedding"> | Date | string + note?: XOR + } + + export type NoteEmbeddingOrderByWithRelationInput = { + id?: SortOrder + noteId?: SortOrder + embedding?: SortOrder + createdAt?: SortOrder + note?: NoteOrderByWithRelationInput + } + + export type NoteEmbeddingWhereUniqueInput = Prisma.AtLeast<{ + id?: string + noteId?: string + AND?: NoteEmbeddingWhereInput | NoteEmbeddingWhereInput[] + OR?: NoteEmbeddingWhereInput[] + NOT?: NoteEmbeddingWhereInput | NoteEmbeddingWhereInput[] + embedding?: StringFilter<"NoteEmbedding"> | string + createdAt?: DateTimeFilter<"NoteEmbedding"> | Date | string + note?: XOR + }, "id" | "noteId"> + + export type NoteEmbeddingOrderByWithAggregationInput = { + id?: SortOrder + noteId?: SortOrder + embedding?: SortOrder + createdAt?: SortOrder + _count?: NoteEmbeddingCountOrderByAggregateInput + _max?: NoteEmbeddingMaxOrderByAggregateInput + _min?: NoteEmbeddingMinOrderByAggregateInput + } + + export type NoteEmbeddingScalarWhereWithAggregatesInput = { + AND?: NoteEmbeddingScalarWhereWithAggregatesInput | NoteEmbeddingScalarWhereWithAggregatesInput[] + OR?: NoteEmbeddingScalarWhereWithAggregatesInput[] + NOT?: NoteEmbeddingScalarWhereWithAggregatesInput | NoteEmbeddingScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"NoteEmbedding"> | string + noteId?: StringWithAggregatesFilter<"NoteEmbedding"> | string + embedding?: StringWithAggregatesFilter<"NoteEmbedding"> | string + createdAt?: DateTimeWithAggregatesFilter<"NoteEmbedding"> | Date | string + } + + export type NoteShareWhereInput = { + AND?: NoteShareWhereInput | NoteShareWhereInput[] + OR?: NoteShareWhereInput[] + NOT?: NoteShareWhereInput | NoteShareWhereInput[] + id?: StringFilter<"NoteShare"> | string + noteId?: StringFilter<"NoteShare"> | string + userId?: StringFilter<"NoteShare"> | string + sharedBy?: StringFilter<"NoteShare"> | string + status?: StringFilter<"NoteShare"> | string + permission?: StringFilter<"NoteShare"> | string + notifiedAt?: DateTimeNullableFilter<"NoteShare"> | Date | string | null + respondedAt?: DateTimeNullableFilter<"NoteShare"> | Date | string | null + createdAt?: DateTimeFilter<"NoteShare"> | Date | string + updatedAt?: DateTimeFilter<"NoteShare"> | Date | string + sharer?: XOR + user?: XOR + note?: XOR + } + + export type NoteShareOrderByWithRelationInput = { + id?: SortOrder + noteId?: SortOrder + userId?: SortOrder + sharedBy?: SortOrder + status?: SortOrder + permission?: SortOrder + notifiedAt?: SortOrderInput | SortOrder + respondedAt?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + sharer?: UserOrderByWithRelationInput + user?: UserOrderByWithRelationInput + note?: NoteOrderByWithRelationInput + } + + export type NoteShareWhereUniqueInput = Prisma.AtLeast<{ + id?: string + noteId_userId?: NoteShareNoteIdUserIdCompoundUniqueInput + AND?: NoteShareWhereInput | NoteShareWhereInput[] + OR?: NoteShareWhereInput[] + NOT?: NoteShareWhereInput | NoteShareWhereInput[] + noteId?: StringFilter<"NoteShare"> | string + userId?: StringFilter<"NoteShare"> | string + sharedBy?: StringFilter<"NoteShare"> | string + status?: StringFilter<"NoteShare"> | string + permission?: StringFilter<"NoteShare"> | string + notifiedAt?: DateTimeNullableFilter<"NoteShare"> | Date | string | null + respondedAt?: DateTimeNullableFilter<"NoteShare"> | Date | string | null + createdAt?: DateTimeFilter<"NoteShare"> | Date | string + updatedAt?: DateTimeFilter<"NoteShare"> | Date | string + sharer?: XOR + user?: XOR + note?: XOR + }, "id" | "noteId_userId"> + + export type NoteShareOrderByWithAggregationInput = { + id?: SortOrder + noteId?: SortOrder + userId?: SortOrder + sharedBy?: SortOrder + status?: SortOrder + permission?: SortOrder + notifiedAt?: SortOrderInput | SortOrder + respondedAt?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + _count?: NoteShareCountOrderByAggregateInput + _max?: NoteShareMaxOrderByAggregateInput + _min?: NoteShareMinOrderByAggregateInput + } + + export type NoteShareScalarWhereWithAggregatesInput = { + AND?: NoteShareScalarWhereWithAggregatesInput | NoteShareScalarWhereWithAggregatesInput[] + OR?: NoteShareScalarWhereWithAggregatesInput[] + NOT?: NoteShareScalarWhereWithAggregatesInput | NoteShareScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"NoteShare"> | string + noteId?: StringWithAggregatesFilter<"NoteShare"> | string + userId?: StringWithAggregatesFilter<"NoteShare"> | string + sharedBy?: StringWithAggregatesFilter<"NoteShare"> | string + status?: StringWithAggregatesFilter<"NoteShare"> | string + permission?: StringWithAggregatesFilter<"NoteShare"> | string + notifiedAt?: DateTimeNullableWithAggregatesFilter<"NoteShare"> | Date | string | null + respondedAt?: DateTimeNullableWithAggregatesFilter<"NoteShare"> | Date | string | null + createdAt?: DateTimeWithAggregatesFilter<"NoteShare"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"NoteShare"> | Date | string } export type AccountWhereInput = { @@ -13880,6 +16602,7 @@ export namespace Prisma { session_state?: StringNullableFilter<"Account"> | string | null createdAt?: DateTimeFilter<"Account"> | Date | string updatedAt?: DateTimeFilter<"Account"> | Date | string + user?: XOR } export type AccountOrderByWithRelationInput = { @@ -13896,6 +16619,7 @@ export namespace Prisma { session_state?: SortOrderInput | SortOrder createdAt?: SortOrder updatedAt?: SortOrder + user?: UserOrderByWithRelationInput } export type AccountWhereUniqueInput = Prisma.AtLeast<{ @@ -13916,6 +16640,7 @@ export namespace Prisma { session_state?: StringNullableFilter<"Account"> | string | null createdAt?: DateTimeFilter<"Account"> | Date | string updatedAt?: DateTimeFilter<"Account"> | Date | string + user?: XOR }, "provider_providerAccountId"> export type AccountOrderByWithAggregationInput = { @@ -13967,6 +16692,7 @@ export namespace Prisma { expires?: DateTimeFilter<"Session"> | Date | string createdAt?: DateTimeFilter<"Session"> | Date | string updatedAt?: DateTimeFilter<"Session"> | Date | string + user?: XOR } export type SessionOrderByWithRelationInput = { @@ -13975,6 +16701,7 @@ export namespace Prisma { expires?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder + user?: UserOrderByWithRelationInput } export type SessionWhereUniqueInput = Prisma.AtLeast<{ @@ -13986,6 +16713,7 @@ export namespace Prisma { expires?: DateTimeFilter<"Session"> | Date | string createdAt?: DateTimeFilter<"Session"> | Date | string updatedAt?: DateTimeFilter<"Session"> | Date | string + user?: XOR }, "sessionToken"> export type SessionOrderByWithAggregationInput = { @@ -14053,84 +16781,6 @@ export namespace Prisma { expires?: DateTimeWithAggregatesFilter<"VerificationToken"> | Date | string } - export type NoteShareWhereInput = { - AND?: NoteShareWhereInput | NoteShareWhereInput[] - OR?: NoteShareWhereInput[] - NOT?: NoteShareWhereInput | NoteShareWhereInput[] - id?: StringFilter<"NoteShare"> | string - noteId?: StringFilter<"NoteShare"> | string - userId?: StringFilter<"NoteShare"> | string - sharedBy?: StringFilter<"NoteShare"> | string - status?: StringFilter<"NoteShare"> | string - permission?: StringFilter<"NoteShare"> | string - notifiedAt?: DateTimeNullableFilter<"NoteShare"> | Date | string | null - respondedAt?: DateTimeNullableFilter<"NoteShare"> | Date | string | null - createdAt?: DateTimeFilter<"NoteShare"> | Date | string - updatedAt?: DateTimeFilter<"NoteShare"> | Date | string - } - - export type NoteShareOrderByWithRelationInput = { - id?: SortOrder - noteId?: SortOrder - userId?: SortOrder - sharedBy?: SortOrder - status?: SortOrder - permission?: SortOrder - notifiedAt?: SortOrderInput | SortOrder - respondedAt?: SortOrderInput | SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type NoteShareWhereUniqueInput = Prisma.AtLeast<{ - id?: string - noteId_userId?: NoteShareNoteIdUserIdCompoundUniqueInput - AND?: NoteShareWhereInput | NoteShareWhereInput[] - OR?: NoteShareWhereInput[] - NOT?: NoteShareWhereInput | NoteShareWhereInput[] - noteId?: StringFilter<"NoteShare"> | string - userId?: StringFilter<"NoteShare"> | string - sharedBy?: StringFilter<"NoteShare"> | string - status?: StringFilter<"NoteShare"> | string - permission?: StringFilter<"NoteShare"> | string - notifiedAt?: DateTimeNullableFilter<"NoteShare"> | Date | string | null - respondedAt?: DateTimeNullableFilter<"NoteShare"> | Date | string | null - createdAt?: DateTimeFilter<"NoteShare"> | Date | string - updatedAt?: DateTimeFilter<"NoteShare"> | Date | string - }, "id" | "noteId_userId"> - - export type NoteShareOrderByWithAggregationInput = { - id?: SortOrder - noteId?: SortOrder - userId?: SortOrder - sharedBy?: SortOrder - status?: SortOrder - permission?: SortOrder - notifiedAt?: SortOrderInput | SortOrder - respondedAt?: SortOrderInput | SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - _count?: NoteShareCountOrderByAggregateInput - _max?: NoteShareMaxOrderByAggregateInput - _min?: NoteShareMinOrderByAggregateInput - } - - export type NoteShareScalarWhereWithAggregatesInput = { - AND?: NoteShareScalarWhereWithAggregatesInput | NoteShareScalarWhereWithAggregatesInput[] - OR?: NoteShareScalarWhereWithAggregatesInput[] - NOT?: NoteShareScalarWhereWithAggregatesInput | NoteShareScalarWhereWithAggregatesInput[] - id?: StringWithAggregatesFilter<"NoteShare"> | string - noteId?: StringWithAggregatesFilter<"NoteShare"> | string - userId?: StringWithAggregatesFilter<"NoteShare"> | string - sharedBy?: StringWithAggregatesFilter<"NoteShare"> | string - status?: StringWithAggregatesFilter<"NoteShare"> | string - permission?: StringWithAggregatesFilter<"NoteShare"> | string - notifiedAt?: DateTimeNullableWithAggregatesFilter<"NoteShare"> | Date | string | null - respondedAt?: DateTimeNullableWithAggregatesFilter<"NoteShare"> | Date | string | null - createdAt?: DateTimeWithAggregatesFilter<"NoteShare"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"NoteShare"> | Date | string - } - export type SystemConfigWhereInput = { AND?: SystemConfigWhereInput | SystemConfigWhereInput[] OR?: SystemConfigWhereInput[] @@ -14181,6 +16831,8 @@ export namespace Prisma { correctedContent?: StringNullableFilter<"AiFeedback"> | string | null metadata?: StringNullableFilter<"AiFeedback"> | string | null createdAt?: DateTimeFilter<"AiFeedback"> | Date | string + user?: XOR | null + note?: XOR } export type AiFeedbackOrderByWithRelationInput = { @@ -14193,6 +16845,8 @@ export namespace Prisma { correctedContent?: SortOrderInput | SortOrder metadata?: SortOrderInput | SortOrder createdAt?: SortOrder + user?: UserOrderByWithRelationInput + note?: NoteOrderByWithRelationInput } export type AiFeedbackWhereUniqueInput = Prisma.AtLeast<{ @@ -14208,6 +16862,8 @@ export namespace Prisma { correctedContent?: StringNullableFilter<"AiFeedback"> | string | null metadata?: StringNullableFilter<"AiFeedback"> | string | null createdAt?: DateTimeFilter<"AiFeedback"> | Date | string + user?: XOR | null + note?: XOR }, "id"> export type AiFeedbackOrderByWithAggregationInput = { @@ -14254,6 +16910,9 @@ export namespace Prisma { viewed?: BoolFilter<"MemoryEchoInsight"> | boolean feedback?: StringNullableFilter<"MemoryEchoInsight"> | string | null dismissed?: BoolFilter<"MemoryEchoInsight"> | boolean + user?: XOR | null + note2?: XOR + note1?: XOR } export type MemoryEchoInsightOrderByWithRelationInput = { @@ -14267,6 +16926,9 @@ export namespace Prisma { viewed?: SortOrder feedback?: SortOrderInput | SortOrder dismissed?: SortOrder + user?: UserOrderByWithRelationInput + note2?: NoteOrderByWithRelationInput + note1?: NoteOrderByWithRelationInput } export type MemoryEchoInsightWhereUniqueInput = Prisma.AtLeast<{ @@ -14284,6 +16946,9 @@ export namespace Prisma { viewed?: BoolFilter<"MemoryEchoInsight"> | boolean feedback?: StringNullableFilter<"MemoryEchoInsight"> | string | null dismissed?: BoolFilter<"MemoryEchoInsight"> | boolean + user?: XOR | null + note2?: XOR + note1?: XOR }, "id" | "userId_insightDate"> export type MemoryEchoInsightOrderByWithAggregationInput = { @@ -14335,9 +17000,11 @@ export namespace Prisma { fontSize?: StringFilter<"UserAISettings"> | string demoMode?: BoolFilter<"UserAISettings"> | boolean showRecentNotes?: BoolFilter<"UserAISettings"> | boolean + notesViewMode?: StringFilter<"UserAISettings"> | string emailNotifications?: BoolFilter<"UserAISettings"> | boolean desktopNotifications?: BoolFilter<"UserAISettings"> | boolean anonymousAnalytics?: BoolFilter<"UserAISettings"> | boolean + user?: XOR } export type UserAISettingsOrderByWithRelationInput = { @@ -14352,9 +17019,11 @@ export namespace Prisma { fontSize?: SortOrder demoMode?: SortOrder showRecentNotes?: SortOrder + notesViewMode?: SortOrder emailNotifications?: SortOrder desktopNotifications?: SortOrder anonymousAnalytics?: SortOrder + user?: UserOrderByWithRelationInput } export type UserAISettingsWhereUniqueInput = Prisma.AtLeast<{ @@ -14372,9 +17041,11 @@ export namespace Prisma { fontSize?: StringFilter<"UserAISettings"> | string demoMode?: BoolFilter<"UserAISettings"> | boolean showRecentNotes?: BoolFilter<"UserAISettings"> | boolean + notesViewMode?: StringFilter<"UserAISettings"> | string emailNotifications?: BoolFilter<"UserAISettings"> | boolean desktopNotifications?: BoolFilter<"UserAISettings"> | boolean anonymousAnalytics?: BoolFilter<"UserAISettings"> | boolean + user?: XOR }, "userId"> export type UserAISettingsOrderByWithAggregationInput = { @@ -14389,6 +17060,7 @@ export namespace Prisma { fontSize?: SortOrder demoMode?: SortOrder showRecentNotes?: SortOrder + notesViewMode?: SortOrder emailNotifications?: SortOrder desktopNotifications?: SortOrder anonymousAnalytics?: SortOrder @@ -14412,240 +17084,162 @@ export namespace Prisma { fontSize?: StringWithAggregatesFilter<"UserAISettings"> | string demoMode?: BoolWithAggregatesFilter<"UserAISettings"> | boolean showRecentNotes?: BoolWithAggregatesFilter<"UserAISettings"> | boolean + notesViewMode?: StringWithAggregatesFilter<"UserAISettings"> | string emailNotifications?: BoolWithAggregatesFilter<"UserAISettings"> | boolean desktopNotifications?: BoolWithAggregatesFilter<"UserAISettings"> | boolean anonymousAnalytics?: BoolWithAggregatesFilter<"UserAISettings"> | boolean } - export type NoteCreateInput = { + export type UserCreateInput = { id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - userId?: string | null - order?: number - notebookId?: string | null + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null createdAt?: Date | string updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null + accounts?: AccountCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput + labels?: LabelCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput + notes?: NoteCreateNestedManyWithoutUserInput + sentShares?: NoteShareCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareCreateNestedManyWithoutUserInput + notebooks?: NotebookCreateNestedManyWithoutUserInput + sessions?: SessionCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput } - export type NoteUncheckedCreateInput = { + export type UserUncheckedCreateInput = { id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - userId?: string | null - order?: number - notebookId?: string | null + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null createdAt?: Date | string updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null + accounts?: AccountUncheckedCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput + labels?: LabelUncheckedCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput + notes?: NoteUncheckedCreateNestedManyWithoutUserInput + sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput + notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput + sessions?: SessionUncheckedCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput } - export type NoteUpdateInput = { + export type UserUpdateInput = { id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - notebookId?: NullableStringFieldUpdateOperationsInput | string | null + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + accounts?: AccountUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput + labels?: LabelUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput + notes?: NoteUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUpdateManyWithoutUserNestedInput + notebooks?: NotebookUpdateManyWithoutUserNestedInput + sessions?: SessionUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput } - export type NoteUncheckedUpdateInput = { + export type UserUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - notebookId?: NullableStringFieldUpdateOperationsInput | string | null + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput + labels?: LabelUncheckedUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput + notes?: NoteUncheckedUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput + notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput + sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput } - export type NoteCreateManyInput = { + export type UserCreateManyInput = { id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - userId?: string | null - order?: number - notebookId?: string | null + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null createdAt?: Date | string updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null } - export type NoteUpdateManyMutationInput = { + export type UserUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - notebookId?: NullableStringFieldUpdateOperationsInput | string | null + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null } - export type NoteUncheckedUpdateManyInput = { + export type UserUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - notebookId?: NullableStringFieldUpdateOperationsInput | string | null + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null } export type NotebookCreateInput = { @@ -14654,9 +17248,11 @@ export namespace Prisma { icon?: string | null color?: string | null order: number - userId: string createdAt?: Date | string updatedAt?: Date | string + labels?: LabelCreateNestedManyWithoutNotebookInput + notes?: NoteCreateNestedManyWithoutNotebookInput + user: UserCreateNestedOneWithoutNotebooksInput } export type NotebookUncheckedCreateInput = { @@ -14668,6 +17264,8 @@ export namespace Prisma { userId: string createdAt?: Date | string updatedAt?: Date | string + labels?: LabelUncheckedCreateNestedManyWithoutNotebookInput + notes?: NoteUncheckedCreateNestedManyWithoutNotebookInput } export type NotebookUpdateInput = { @@ -14676,9 +17274,11 @@ export namespace Prisma { icon?: NullableStringFieldUpdateOperationsInput | string | null color?: NullableStringFieldUpdateOperationsInput | string | null order?: IntFieldUpdateOperationsInput | number - userId?: StringFieldUpdateOperationsInput | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + labels?: LabelUpdateManyWithoutNotebookNestedInput + notes?: NoteUpdateManyWithoutNotebookNestedInput + user?: UserUpdateOneRequiredWithoutNotebooksNestedInput } export type NotebookUncheckedUpdateInput = { @@ -14690,6 +17290,8 @@ export namespace Prisma { userId?: StringFieldUpdateOperationsInput | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + labels?: LabelUncheckedUpdateManyWithoutNotebookNestedInput + notes?: NoteUncheckedUpdateManyWithoutNotebookNestedInput } export type NotebookCreateManyInput = { @@ -14709,7 +17311,6 @@ export namespace Prisma { icon?: NullableStringFieldUpdateOperationsInput | string | null color?: NullableStringFieldUpdateOperationsInput | string | null order?: IntFieldUpdateOperationsInput | number - userId?: StringFieldUpdateOperationsInput | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } @@ -14729,10 +17330,11 @@ export namespace Prisma { id?: string name: string color?: string - notebookId?: string | null - userId?: string | null createdAt?: Date | string updatedAt?: Date | string + user?: UserCreateNestedOneWithoutLabelsInput + notebook?: NotebookCreateNestedOneWithoutLabelsInput + notes?: NoteCreateNestedManyWithoutLabelRelationsInput } export type LabelUncheckedCreateInput = { @@ -14743,16 +17345,18 @@ export namespace Prisma { userId?: string | null createdAt?: Date | string updatedAt?: Date | string + notes?: NoteUncheckedCreateNestedManyWithoutLabelRelationsInput } export type LabelUpdateInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string color?: StringFieldUpdateOperationsInput | string - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneWithoutLabelsNestedInput + notebook?: NotebookUpdateOneWithoutLabelsNestedInput + notes?: NoteUpdateManyWithoutLabelRelationsNestedInput } export type LabelUncheckedUpdateInput = { @@ -14763,6 +17367,7 @@ export namespace Prisma { userId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + notes?: NoteUncheckedUpdateManyWithoutLabelRelationsNestedInput } export type LabelCreateManyInput = { @@ -14779,8 +17384,6 @@ export namespace Prisma { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string color?: StringFieldUpdateOperationsInput | string - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } @@ -14795,113 +17398,410 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } - export type UserCreateInput = { + export type NoteCreateInput = { id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + order?: number + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + aiFeedback?: AiFeedbackCreateNestedManyWithoutNoteInput + memoryEchoAsNote2?: MemoryEchoInsightCreateNestedManyWithoutNote2Input + memoryEchoAsNote1?: MemoryEchoInsightCreateNestedManyWithoutNote1Input + notebook?: NotebookCreateNestedOneWithoutNotesInput + user?: UserCreateNestedOneWithoutNotesInput + shares?: NoteShareCreateNestedManyWithoutNoteInput + labelRelations?: LabelCreateNestedManyWithoutNotesInput + noteEmbedding?: NoteEmbeddingCreateNestedOneWithoutNoteInput + } + + export type NoteUncheckedCreateInput = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + userId?: string | null + order?: number + notebookId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutNoteInput + memoryEchoAsNote2?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote2Input + memoryEchoAsNote1?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote1Input + shares?: NoteShareUncheckedCreateNestedManyWithoutNoteInput + labelRelations?: LabelUncheckedCreateNestedManyWithoutNotesInput + noteEmbedding?: NoteEmbeddingUncheckedCreateNestedOneWithoutNoteInput + } + + export type NoteUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + aiFeedback?: AiFeedbackUpdateManyWithoutNoteNestedInput + memoryEchoAsNote2?: MemoryEchoInsightUpdateManyWithoutNote2NestedInput + memoryEchoAsNote1?: MemoryEchoInsightUpdateManyWithoutNote1NestedInput + notebook?: NotebookUpdateOneWithoutNotesNestedInput + user?: UserUpdateOneWithoutNotesNestedInput + shares?: NoteShareUpdateManyWithoutNoteNestedInput + labelRelations?: LabelUpdateManyWithoutNotesNestedInput + noteEmbedding?: NoteEmbeddingUpdateOneWithoutNoteNestedInput + } + + export type NoteUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + userId?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + notebookId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutNoteNestedInput + memoryEchoAsNote2?: MemoryEchoInsightUncheckedUpdateManyWithoutNote2NestedInput + memoryEchoAsNote1?: MemoryEchoInsightUncheckedUpdateManyWithoutNote1NestedInput + shares?: NoteShareUncheckedUpdateManyWithoutNoteNestedInput + labelRelations?: LabelUncheckedUpdateManyWithoutNotesNestedInput + noteEmbedding?: NoteEmbeddingUncheckedUpdateOneWithoutNoteNestedInput + } + + export type NoteCreateManyInput = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + userId?: string | null + order?: number + notebookId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + } + + export type NoteUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type NoteUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + userId?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + notebookId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type NoteEmbeddingCreateInput = { + id?: string + embedding: string + createdAt?: Date | string + note: NoteCreateNestedOneWithoutNoteEmbeddingInput + } + + export type NoteEmbeddingUncheckedCreateInput = { + id?: string + noteId: string + embedding: string + createdAt?: Date | string + } + + export type NoteEmbeddingUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + embedding?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + note?: NoteUpdateOneRequiredWithoutNoteEmbeddingNestedInput + } + + export type NoteEmbeddingUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + noteId?: StringFieldUpdateOperationsInput | string + embedding?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type NoteEmbeddingCreateManyInput = { + id?: string + noteId: string + embedding: string + createdAt?: Date | string + } + + export type NoteEmbeddingUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + embedding?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type NoteEmbeddingUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + noteId?: StringFieldUpdateOperationsInput | string + embedding?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type NoteShareCreateInput = { + id?: string + status?: string + permission?: string + notifiedAt?: Date | string | null + respondedAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + sharer: UserCreateNestedOneWithoutSentSharesInput + user: UserCreateNestedOneWithoutReceivedSharesInput + note: NoteCreateNestedOneWithoutSharesInput + } + + export type NoteShareUncheckedCreateInput = { + id?: string + noteId: string + userId: string + sharedBy: string + status?: string + permission?: string + notifiedAt?: Date | string | null + respondedAt?: Date | string | null createdAt?: Date | string updatedAt?: Date | string } - export type UserUncheckedCreateInput = { + export type NoteShareUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + status?: StringFieldUpdateOperationsInput | string + permission?: StringFieldUpdateOperationsInput | string + notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + sharer?: UserUpdateOneRequiredWithoutSentSharesNestedInput + user?: UserUpdateOneRequiredWithoutReceivedSharesNestedInput + note?: NoteUpdateOneRequiredWithoutSharesNestedInput + } + + export type NoteShareUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + noteId?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + sharedBy?: StringFieldUpdateOperationsInput | string + status?: StringFieldUpdateOperationsInput | string + permission?: StringFieldUpdateOperationsInput | string + notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type NoteShareCreateManyInput = { id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null + noteId: string + userId: string + sharedBy: string + status?: string + permission?: string + notifiedAt?: Date | string | null + respondedAt?: Date | string | null createdAt?: Date | string updatedAt?: Date | string } - export type UserUpdateInput = { + export type NoteShareUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + status?: StringFieldUpdateOperationsInput | string + permission?: StringFieldUpdateOperationsInput | string + notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } - export type UserUncheckedUpdateInput = { + export type NoteShareUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type UserCreateManyInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type UserUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type UserUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + noteId?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + sharedBy?: StringFieldUpdateOperationsInput | string + status?: StringFieldUpdateOperationsInput | string + permission?: StringFieldUpdateOperationsInput | string + notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type AccountCreateInput = { - userId: string type: string provider: string providerAccountId: string @@ -14914,6 +17814,7 @@ export namespace Prisma { session_state?: string | null createdAt?: Date | string updatedAt?: Date | string + user: UserCreateNestedOneWithoutAccountsInput } export type AccountUncheckedCreateInput = { @@ -14933,7 +17834,6 @@ export namespace Prisma { } export type AccountUpdateInput = { - userId?: StringFieldUpdateOperationsInput | string type?: StringFieldUpdateOperationsInput | string provider?: StringFieldUpdateOperationsInput | string providerAccountId?: StringFieldUpdateOperationsInput | string @@ -14946,6 +17846,7 @@ export namespace Prisma { session_state?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutAccountsNestedInput } export type AccountUncheckedUpdateInput = { @@ -14981,7 +17882,6 @@ export namespace Prisma { } export type AccountUpdateManyMutationInput = { - userId?: StringFieldUpdateOperationsInput | string type?: StringFieldUpdateOperationsInput | string provider?: StringFieldUpdateOperationsInput | string providerAccountId?: StringFieldUpdateOperationsInput | string @@ -15014,10 +17914,10 @@ export namespace Prisma { export type SessionCreateInput = { sessionToken: string - userId: string expires: Date | string createdAt?: Date | string updatedAt?: Date | string + user: UserCreateNestedOneWithoutSessionsInput } export type SessionUncheckedCreateInput = { @@ -15030,10 +17930,10 @@ export namespace Prisma { export type SessionUpdateInput = { sessionToken?: StringFieldUpdateOperationsInput | string - userId?: StringFieldUpdateOperationsInput | string expires?: DateTimeFieldUpdateOperationsInput | Date | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutSessionsNestedInput } export type SessionUncheckedUpdateInput = { @@ -15054,7 +17954,6 @@ export namespace Prisma { export type SessionUpdateManyMutationInput = { sessionToken?: StringFieldUpdateOperationsInput | string - userId?: StringFieldUpdateOperationsInput | string expires?: DateTimeFieldUpdateOperationsInput | Date | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string @@ -15110,97 +18009,6 @@ export namespace Prisma { expires?: DateTimeFieldUpdateOperationsInput | Date | string } - export type NoteShareCreateInput = { - id?: string - noteId: string - userId: string - sharedBy: string - status?: string - permission?: string - notifiedAt?: Date | string | null - respondedAt?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type NoteShareUncheckedCreateInput = { - id?: string - noteId: string - userId: string - sharedBy: string - status?: string - permission?: string - notifiedAt?: Date | string | null - respondedAt?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type NoteShareUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - noteId?: StringFieldUpdateOperationsInput | string - userId?: StringFieldUpdateOperationsInput | string - sharedBy?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - permission?: StringFieldUpdateOperationsInput | string - notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type NoteShareUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - noteId?: StringFieldUpdateOperationsInput | string - userId?: StringFieldUpdateOperationsInput | string - sharedBy?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - permission?: StringFieldUpdateOperationsInput | string - notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type NoteShareCreateManyInput = { - id?: string - noteId: string - userId: string - sharedBy: string - status?: string - permission?: string - notifiedAt?: Date | string | null - respondedAt?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type NoteShareUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - noteId?: StringFieldUpdateOperationsInput | string - userId?: StringFieldUpdateOperationsInput | string - sharedBy?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - permission?: StringFieldUpdateOperationsInput | string - notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type NoteShareUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - noteId?: StringFieldUpdateOperationsInput | string - userId?: StringFieldUpdateOperationsInput | string - sharedBy?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - permission?: StringFieldUpdateOperationsInput | string - notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - export type SystemConfigCreateInput = { key: string value: string @@ -15238,14 +18046,14 @@ export namespace Prisma { export type AiFeedbackCreateInput = { id?: string - noteId: string - userId?: string | null feedbackType: string feature: string originalContent: string correctedContent?: string | null metadata?: string | null createdAt?: Date | string + user?: UserCreateNestedOneWithoutAiFeedbackInput + note: NoteCreateNestedOneWithoutAiFeedbackInput } export type AiFeedbackUncheckedCreateInput = { @@ -15262,14 +18070,14 @@ export namespace Prisma { export type AiFeedbackUpdateInput = { id?: StringFieldUpdateOperationsInput | string - noteId?: StringFieldUpdateOperationsInput | string - userId?: NullableStringFieldUpdateOperationsInput | string | null feedbackType?: StringFieldUpdateOperationsInput | string feature?: StringFieldUpdateOperationsInput | string originalContent?: StringFieldUpdateOperationsInput | string correctedContent?: NullableStringFieldUpdateOperationsInput | string | null metadata?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneWithoutAiFeedbackNestedInput + note?: NoteUpdateOneRequiredWithoutAiFeedbackNestedInput } export type AiFeedbackUncheckedUpdateInput = { @@ -15298,8 +18106,6 @@ export namespace Prisma { export type AiFeedbackUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string - noteId?: StringFieldUpdateOperationsInput | string - userId?: NullableStringFieldUpdateOperationsInput | string | null feedbackType?: StringFieldUpdateOperationsInput | string feature?: StringFieldUpdateOperationsInput | string originalContent?: StringFieldUpdateOperationsInput | string @@ -15322,15 +18128,15 @@ export namespace Prisma { export type MemoryEchoInsightCreateInput = { id?: string - userId?: string | null - note1Id: string - note2Id: string similarityScore: number insight: string insightDate?: Date | string viewed?: boolean feedback?: string | null dismissed?: boolean + user?: UserCreateNestedOneWithoutMemoryEchoInsightsInput + note2: NoteCreateNestedOneWithoutMemoryEchoAsNote2Input + note1: NoteCreateNestedOneWithoutMemoryEchoAsNote1Input } export type MemoryEchoInsightUncheckedCreateInput = { @@ -15348,15 +18154,15 @@ export namespace Prisma { export type MemoryEchoInsightUpdateInput = { id?: StringFieldUpdateOperationsInput | string - userId?: NullableStringFieldUpdateOperationsInput | string | null - note1Id?: StringFieldUpdateOperationsInput | string - note2Id?: StringFieldUpdateOperationsInput | string similarityScore?: FloatFieldUpdateOperationsInput | number insight?: StringFieldUpdateOperationsInput | string insightDate?: DateTimeFieldUpdateOperationsInput | Date | string viewed?: BoolFieldUpdateOperationsInput | boolean feedback?: NullableStringFieldUpdateOperationsInput | string | null dismissed?: BoolFieldUpdateOperationsInput | boolean + user?: UserUpdateOneWithoutMemoryEchoInsightsNestedInput + note2?: NoteUpdateOneRequiredWithoutMemoryEchoAsNote2NestedInput + note1?: NoteUpdateOneRequiredWithoutMemoryEchoAsNote1NestedInput } export type MemoryEchoInsightUncheckedUpdateInput = { @@ -15387,9 +18193,6 @@ export namespace Prisma { export type MemoryEchoInsightUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string - userId?: NullableStringFieldUpdateOperationsInput | string | null - note1Id?: StringFieldUpdateOperationsInput | string - note2Id?: StringFieldUpdateOperationsInput | string similarityScore?: FloatFieldUpdateOperationsInput | number insight?: StringFieldUpdateOperationsInput | string insightDate?: DateTimeFieldUpdateOperationsInput | Date | string @@ -15412,7 +18215,6 @@ export namespace Prisma { } export type UserAISettingsCreateInput = { - userId: string titleSuggestions?: boolean semanticSearch?: boolean paragraphRefactor?: boolean @@ -15423,9 +18225,11 @@ export namespace Prisma { fontSize?: string demoMode?: boolean showRecentNotes?: boolean + notesViewMode?: string emailNotifications?: boolean desktopNotifications?: boolean anonymousAnalytics?: boolean + user: UserCreateNestedOneWithoutAiSettingsInput } export type UserAISettingsUncheckedCreateInput = { @@ -15440,13 +18244,13 @@ export namespace Prisma { fontSize?: string demoMode?: boolean showRecentNotes?: boolean + notesViewMode?: string emailNotifications?: boolean desktopNotifications?: boolean anonymousAnalytics?: boolean } export type UserAISettingsUpdateInput = { - userId?: StringFieldUpdateOperationsInput | string titleSuggestions?: BoolFieldUpdateOperationsInput | boolean semanticSearch?: BoolFieldUpdateOperationsInput | boolean paragraphRefactor?: BoolFieldUpdateOperationsInput | boolean @@ -15457,9 +18261,11 @@ export namespace Prisma { fontSize?: StringFieldUpdateOperationsInput | string demoMode?: BoolFieldUpdateOperationsInput | boolean showRecentNotes?: BoolFieldUpdateOperationsInput | boolean + notesViewMode?: StringFieldUpdateOperationsInput | string emailNotifications?: BoolFieldUpdateOperationsInput | boolean desktopNotifications?: BoolFieldUpdateOperationsInput | boolean anonymousAnalytics?: BoolFieldUpdateOperationsInput | boolean + user?: UserUpdateOneRequiredWithoutAiSettingsNestedInput } export type UserAISettingsUncheckedUpdateInput = { @@ -15474,6 +18280,7 @@ export namespace Prisma { fontSize?: StringFieldUpdateOperationsInput | string demoMode?: BoolFieldUpdateOperationsInput | boolean showRecentNotes?: BoolFieldUpdateOperationsInput | boolean + notesViewMode?: StringFieldUpdateOperationsInput | string emailNotifications?: BoolFieldUpdateOperationsInput | boolean desktopNotifications?: BoolFieldUpdateOperationsInput | boolean anonymousAnalytics?: BoolFieldUpdateOperationsInput | boolean @@ -15491,13 +18298,13 @@ export namespace Prisma { fontSize?: string demoMode?: boolean showRecentNotes?: boolean + notesViewMode?: string emailNotifications?: boolean desktopNotifications?: boolean anonymousAnalytics?: boolean } export type UserAISettingsUpdateManyMutationInput = { - userId?: StringFieldUpdateOperationsInput | string titleSuggestions?: BoolFieldUpdateOperationsInput | boolean semanticSearch?: BoolFieldUpdateOperationsInput | boolean paragraphRefactor?: BoolFieldUpdateOperationsInput | boolean @@ -15508,6 +18315,7 @@ export namespace Prisma { fontSize?: StringFieldUpdateOperationsInput | string demoMode?: BoolFieldUpdateOperationsInput | boolean showRecentNotes?: BoolFieldUpdateOperationsInput | boolean + notesViewMode?: StringFieldUpdateOperationsInput | string emailNotifications?: BoolFieldUpdateOperationsInput | boolean desktopNotifications?: BoolFieldUpdateOperationsInput | boolean anonymousAnalytics?: BoolFieldUpdateOperationsInput | boolean @@ -15525,6 +18333,7 @@ export namespace Prisma { fontSize?: StringFieldUpdateOperationsInput | string demoMode?: BoolFieldUpdateOperationsInput | boolean showRecentNotes?: BoolFieldUpdateOperationsInput | boolean + notesViewMode?: StringFieldUpdateOperationsInput | string emailNotifications?: BoolFieldUpdateOperationsInput | boolean desktopNotifications?: BoolFieldUpdateOperationsInput | boolean anonymousAnalytics?: BoolFieldUpdateOperationsInput | boolean @@ -15532,8 +18341,8 @@ export namespace Prisma { export type StringFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] - notIn?: string[] + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> @@ -15541,13 +18350,14 @@ export namespace Prisma { contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> + mode?: QueryMode not?: NestedStringFilter<$PrismaModel> | string } export type StringNullableFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> | null - in?: string[] | null - notIn?: string[] | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> @@ -15555,18 +18365,14 @@ export namespace Prisma { contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> + mode?: QueryMode not?: NestedStringNullableFilter<$PrismaModel> | string | null } - export type BoolFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> - not?: NestedBoolFilter<$PrismaModel> | boolean - } - export type DateTimeNullableFilter<$PrismaModel = never> = { equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | null - notIn?: Date[] | string[] | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> @@ -15574,21 +18380,10 @@ export namespace Prisma { not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null } - export type IntFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntFilter<$PrismaModel> | number - } - export type DateTimeFilter<$PrismaModel = never> = { equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] - notIn?: Date[] | string[] + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> @@ -15596,31 +18391,57 @@ export namespace Prisma { not?: NestedDateTimeFilter<$PrismaModel> | Date | string } - export type BoolNullableFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> | null - not?: NestedBoolNullableFilter<$PrismaModel> | boolean | null + export type AccountListRelationFilter = { + every?: AccountWhereInput + some?: AccountWhereInput + none?: AccountWhereInput } - export type IntNullableFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntNullableFilter<$PrismaModel> | number | null + export type AiFeedbackListRelationFilter = { + every?: AiFeedbackWhereInput + some?: AiFeedbackWhereInput + none?: AiFeedbackWhereInput } - export type FloatNullableFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatNullableFilter<$PrismaModel> | number | null + export type LabelListRelationFilter = { + every?: LabelWhereInput + some?: LabelWhereInput + none?: LabelWhereInput + } + + export type MemoryEchoInsightListRelationFilter = { + every?: MemoryEchoInsightWhereInput + some?: MemoryEchoInsightWhereInput + none?: MemoryEchoInsightWhereInput + } + + export type NoteListRelationFilter = { + every?: NoteWhereInput + some?: NoteWhereInput + none?: NoteWhereInput + } + + export type NoteShareListRelationFilter = { + every?: NoteShareWhereInput + some?: NoteShareWhereInput + none?: NoteShareWhereInput + } + + export type NotebookListRelationFilter = { + every?: NotebookWhereInput + some?: NotebookWhereInput + none?: NotebookWhereInput + } + + export type SessionListRelationFilter = { + every?: SessionWhereInput + some?: SessionWhereInput + none?: SessionWhereInput + } + + export type UserAISettingsNullableRelationFilter = { + is?: UserAISettingsWhereInput | null + isNot?: UserAISettingsWhereInput | null } export type SortOrderInput = { @@ -15628,121 +18449,90 @@ export namespace Prisma { nulls?: NullsOrder } - export type NoteCountOrderByAggregateInput = { + export type AccountOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type AiFeedbackOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type LabelOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type MemoryEchoInsightOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type NoteOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type NoteShareOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type NotebookOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type SessionOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type UserCountOrderByAggregateInput = { id?: SortOrder - title?: SortOrder - content?: SortOrder - color?: SortOrder - isPinned?: SortOrder - isArchived?: SortOrder - type?: SortOrder - checkItems?: SortOrder - labels?: SortOrder - images?: SortOrder - links?: SortOrder - reminder?: SortOrder - isReminderDone?: SortOrder - reminderRecurrence?: SortOrder - reminderLocation?: SortOrder - isMarkdown?: SortOrder - size?: SortOrder - embedding?: SortOrder - sharedWith?: SortOrder - userId?: SortOrder - order?: SortOrder - notebookId?: SortOrder + name?: SortOrder + email?: SortOrder + emailVerified?: SortOrder + password?: SortOrder + role?: SortOrder + image?: SortOrder + theme?: SortOrder + cardSizeMode?: SortOrder + resetToken?: SortOrder + resetTokenExpiry?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder - autoGenerated?: SortOrder - aiProvider?: SortOrder - aiConfidence?: SortOrder - language?: SortOrder - languageConfidence?: SortOrder - lastAiAnalysis?: SortOrder } - export type NoteAvgOrderByAggregateInput = { - order?: SortOrder - aiConfidence?: SortOrder - languageConfidence?: SortOrder - } - - export type NoteMaxOrderByAggregateInput = { + export type UserMaxOrderByAggregateInput = { id?: SortOrder - title?: SortOrder - content?: SortOrder - color?: SortOrder - isPinned?: SortOrder - isArchived?: SortOrder - type?: SortOrder - checkItems?: SortOrder - labels?: SortOrder - images?: SortOrder - links?: SortOrder - reminder?: SortOrder - isReminderDone?: SortOrder - reminderRecurrence?: SortOrder - reminderLocation?: SortOrder - isMarkdown?: SortOrder - size?: SortOrder - embedding?: SortOrder - sharedWith?: SortOrder - userId?: SortOrder - order?: SortOrder - notebookId?: SortOrder + name?: SortOrder + email?: SortOrder + emailVerified?: SortOrder + password?: SortOrder + role?: SortOrder + image?: SortOrder + theme?: SortOrder + cardSizeMode?: SortOrder + resetToken?: SortOrder + resetTokenExpiry?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder - autoGenerated?: SortOrder - aiProvider?: SortOrder - aiConfidence?: SortOrder - language?: SortOrder - languageConfidence?: SortOrder - lastAiAnalysis?: SortOrder } - export type NoteMinOrderByAggregateInput = { + export type UserMinOrderByAggregateInput = { id?: SortOrder - title?: SortOrder - content?: SortOrder - color?: SortOrder - isPinned?: SortOrder - isArchived?: SortOrder - type?: SortOrder - checkItems?: SortOrder - labels?: SortOrder - images?: SortOrder - links?: SortOrder - reminder?: SortOrder - isReminderDone?: SortOrder - reminderRecurrence?: SortOrder - reminderLocation?: SortOrder - isMarkdown?: SortOrder - size?: SortOrder - embedding?: SortOrder - sharedWith?: SortOrder - userId?: SortOrder - order?: SortOrder - notebookId?: SortOrder + name?: SortOrder + email?: SortOrder + emailVerified?: SortOrder + password?: SortOrder + role?: SortOrder + image?: SortOrder + theme?: SortOrder + cardSizeMode?: SortOrder + resetToken?: SortOrder + resetTokenExpiry?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder - autoGenerated?: SortOrder - aiProvider?: SortOrder - aiConfidence?: SortOrder - language?: SortOrder - languageConfidence?: SortOrder - lastAiAnalysis?: SortOrder - } - - export type NoteSumOrderByAggregateInput = { - order?: SortOrder - aiConfidence?: SortOrder - languageConfidence?: SortOrder } export type StringWithAggregatesFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] - notIn?: string[] + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> @@ -15750,6 +18540,7 @@ export namespace Prisma { contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> + mode?: QueryMode not?: NestedStringWithAggregatesFilter<$PrismaModel> | string _count?: NestedIntFilter<$PrismaModel> _min?: NestedStringFilter<$PrismaModel> @@ -15758,8 +18549,8 @@ export namespace Prisma { export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> | null - in?: string[] | null - notIn?: string[] | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> @@ -15767,24 +18558,17 @@ export namespace Prisma { contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> + mode?: QueryMode not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null _count?: NestedIntNullableFilter<$PrismaModel> _min?: NestedStringNullableFilter<$PrismaModel> _max?: NestedStringNullableFilter<$PrismaModel> } - export type BoolWithAggregatesFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> - not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedBoolFilter<$PrismaModel> - _max?: NestedBoolFilter<$PrismaModel> - } - export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | null - notIn?: Date[] | string[] | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> @@ -15795,26 +18579,10 @@ export namespace Prisma { _max?: NestedDateTimeNullableFilter<$PrismaModel> } - export type IntWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] - 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 DateTimeWithAggregatesFilter<$PrismaModel = never> = { equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] - notIn?: Date[] | string[] + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> @@ -15825,44 +18593,20 @@ export namespace Prisma { _max?: NestedDateTimeFilter<$PrismaModel> } - export type BoolNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> | null - not?: NestedBoolNullableWithAggregatesFilter<$PrismaModel> | boolean | null - _count?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedBoolNullableFilter<$PrismaModel> - _max?: NestedBoolNullableFilter<$PrismaModel> - } - - export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null + 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?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null - _count?: NestedIntNullableFilter<$PrismaModel> - _avg?: NestedFloatNullableFilter<$PrismaModel> - _sum?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedIntNullableFilter<$PrismaModel> - _max?: NestedIntNullableFilter<$PrismaModel> + not?: NestedIntFilter<$PrismaModel> | number } - export type FloatNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatNullableWithAggregatesFilter<$PrismaModel> | number | null - _count?: NestedIntNullableFilter<$PrismaModel> - _avg?: NestedFloatNullableFilter<$PrismaModel> - _sum?: NestedFloatNullableFilter<$PrismaModel> - _min?: NestedFloatNullableFilter<$PrismaModel> - _max?: NestedFloatNullableFilter<$PrismaModel> + export type UserRelationFilter = { + is?: UserWhereInput + isNot?: UserWhereInput } export type NotebookCountOrderByAggregateInput = { @@ -15906,6 +18650,37 @@ export namespace Prisma { order?: 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 UserNullableRelationFilter = { + is?: UserWhereInput | null + isNot?: UserWhereInput | null + } + + export type NotebookNullableRelationFilter = { + is?: NotebookWhereInput | null + isNot?: NotebookWhereInput | null + } + + export type LabelNotebookIdNameCompoundUniqueInput = { + notebookId: string + name: string + } + export type LabelCountOrderByAggregateInput = { id?: SortOrder name?: SortOrder @@ -15936,47 +18711,274 @@ export namespace Prisma { updatedAt?: SortOrder } - export type UserCountOrderByAggregateInput = { + export type BoolFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolFilter<$PrismaModel> | boolean + } + + export type BoolNullableFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> | null + not?: NestedBoolNullableFilter<$PrismaModel> | boolean | null + } + + export type IntNullableFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableFilter<$PrismaModel> | number | null + } + + export type FloatNullableFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> | null + in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatNullableFilter<$PrismaModel> | number | null + } + + export type NoteEmbeddingNullableRelationFilter = { + is?: NoteEmbeddingWhereInput | null + isNot?: NoteEmbeddingWhereInput | null + } + + export type NoteCountOrderByAggregateInput = { id?: SortOrder - name?: SortOrder - email?: SortOrder - emailVerified?: SortOrder - password?: SortOrder - role?: SortOrder - image?: SortOrder - theme?: SortOrder - resetToken?: SortOrder - resetTokenExpiry?: SortOrder + title?: SortOrder + content?: SortOrder + color?: SortOrder + isPinned?: SortOrder + isArchived?: SortOrder + trashedAt?: SortOrder + type?: SortOrder + dismissedFromRecent?: SortOrder + checkItems?: SortOrder + labels?: SortOrder + images?: SortOrder + links?: SortOrder + reminder?: SortOrder + isReminderDone?: SortOrder + reminderRecurrence?: SortOrder + reminderLocation?: SortOrder + isMarkdown?: SortOrder + size?: SortOrder + sharedWith?: SortOrder + userId?: SortOrder + order?: SortOrder + notebookId?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + contentUpdatedAt?: SortOrder + autoGenerated?: SortOrder + aiProvider?: SortOrder + aiConfidence?: SortOrder + language?: SortOrder + languageConfidence?: SortOrder + lastAiAnalysis?: SortOrder + } + + export type NoteAvgOrderByAggregateInput = { + order?: SortOrder + aiConfidence?: SortOrder + languageConfidence?: SortOrder + } + + export type NoteMaxOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + content?: SortOrder + color?: SortOrder + isPinned?: SortOrder + isArchived?: SortOrder + trashedAt?: SortOrder + type?: SortOrder + dismissedFromRecent?: SortOrder + checkItems?: SortOrder + labels?: SortOrder + images?: SortOrder + links?: SortOrder + reminder?: SortOrder + isReminderDone?: SortOrder + reminderRecurrence?: SortOrder + reminderLocation?: SortOrder + isMarkdown?: SortOrder + size?: SortOrder + sharedWith?: SortOrder + userId?: SortOrder + order?: SortOrder + notebookId?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + contentUpdatedAt?: SortOrder + autoGenerated?: SortOrder + aiProvider?: SortOrder + aiConfidence?: SortOrder + language?: SortOrder + languageConfidence?: SortOrder + lastAiAnalysis?: SortOrder + } + + export type NoteMinOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + content?: SortOrder + color?: SortOrder + isPinned?: SortOrder + isArchived?: SortOrder + trashedAt?: SortOrder + type?: SortOrder + dismissedFromRecent?: SortOrder + checkItems?: SortOrder + labels?: SortOrder + images?: SortOrder + links?: SortOrder + reminder?: SortOrder + isReminderDone?: SortOrder + reminderRecurrence?: SortOrder + reminderLocation?: SortOrder + isMarkdown?: SortOrder + size?: SortOrder + sharedWith?: SortOrder + userId?: SortOrder + order?: SortOrder + notebookId?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + contentUpdatedAt?: SortOrder + autoGenerated?: SortOrder + aiProvider?: SortOrder + aiConfidence?: SortOrder + language?: SortOrder + languageConfidence?: SortOrder + lastAiAnalysis?: SortOrder + } + + export type NoteSumOrderByAggregateInput = { + order?: SortOrder + aiConfidence?: SortOrder + languageConfidence?: SortOrder + } + + export type BoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedBoolFilter<$PrismaModel> + _max?: NestedBoolFilter<$PrismaModel> + } + + export type BoolNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> | null + not?: NestedBoolNullableWithAggregatesFilter<$PrismaModel> | boolean | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedBoolNullableFilter<$PrismaModel> + _max?: NestedBoolNullableFilter<$PrismaModel> + } + + export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null + _count?: NestedIntNullableFilter<$PrismaModel> + _avg?: NestedFloatNullableFilter<$PrismaModel> + _sum?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedIntNullableFilter<$PrismaModel> + _max?: NestedIntNullableFilter<$PrismaModel> + } + + export type FloatNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> | null + in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatNullableWithAggregatesFilter<$PrismaModel> | number | null + _count?: NestedIntNullableFilter<$PrismaModel> + _avg?: NestedFloatNullableFilter<$PrismaModel> + _sum?: NestedFloatNullableFilter<$PrismaModel> + _min?: NestedFloatNullableFilter<$PrismaModel> + _max?: NestedFloatNullableFilter<$PrismaModel> + } + + export type NoteRelationFilter = { + is?: NoteWhereInput + isNot?: NoteWhereInput + } + + export type NoteEmbeddingCountOrderByAggregateInput = { + id?: SortOrder + noteId?: SortOrder + embedding?: SortOrder + createdAt?: SortOrder + } + + export type NoteEmbeddingMaxOrderByAggregateInput = { + id?: SortOrder + noteId?: SortOrder + embedding?: SortOrder + createdAt?: SortOrder + } + + export type NoteEmbeddingMinOrderByAggregateInput = { + id?: SortOrder + noteId?: SortOrder + embedding?: SortOrder + createdAt?: SortOrder + } + + export type NoteShareNoteIdUserIdCompoundUniqueInput = { + noteId: string + userId: string + } + + export type NoteShareCountOrderByAggregateInput = { + id?: SortOrder + noteId?: SortOrder + userId?: SortOrder + sharedBy?: SortOrder + status?: SortOrder + permission?: SortOrder + notifiedAt?: SortOrder + respondedAt?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } - export type UserMaxOrderByAggregateInput = { + export type NoteShareMaxOrderByAggregateInput = { id?: SortOrder - name?: SortOrder - email?: SortOrder - emailVerified?: SortOrder - password?: SortOrder - role?: SortOrder - image?: SortOrder - theme?: SortOrder - resetToken?: SortOrder - resetTokenExpiry?: SortOrder + noteId?: SortOrder + userId?: SortOrder + sharedBy?: SortOrder + status?: SortOrder + permission?: SortOrder + notifiedAt?: SortOrder + respondedAt?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } - export type UserMinOrderByAggregateInput = { + export type NoteShareMinOrderByAggregateInput = { id?: SortOrder - name?: SortOrder - email?: SortOrder - emailVerified?: SortOrder - password?: SortOrder - role?: SortOrder - image?: SortOrder - theme?: SortOrder - resetToken?: SortOrder - resetTokenExpiry?: SortOrder + noteId?: SortOrder + userId?: SortOrder + sharedBy?: SortOrder + status?: SortOrder + permission?: SortOrder + notifiedAt?: SortOrder + respondedAt?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } @@ -16089,50 +19091,6 @@ export namespace Prisma { expires?: SortOrder } - export type NoteShareNoteIdUserIdCompoundUniqueInput = { - noteId: string - userId: string - } - - export type NoteShareCountOrderByAggregateInput = { - id?: SortOrder - noteId?: SortOrder - userId?: SortOrder - sharedBy?: SortOrder - status?: SortOrder - permission?: SortOrder - notifiedAt?: SortOrder - respondedAt?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type NoteShareMaxOrderByAggregateInput = { - id?: SortOrder - noteId?: SortOrder - userId?: SortOrder - sharedBy?: SortOrder - status?: SortOrder - permission?: SortOrder - notifiedAt?: SortOrder - respondedAt?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type NoteShareMinOrderByAggregateInput = { - id?: SortOrder - noteId?: SortOrder - userId?: SortOrder - sharedBy?: SortOrder - status?: SortOrder - permission?: SortOrder - notifiedAt?: SortOrder - respondedAt?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - export type SystemConfigCountOrderByAggregateInput = { key?: SortOrder value?: SortOrder @@ -16186,8 +19144,8 @@ export namespace Prisma { export type FloatFilter<$PrismaModel = never> = { equals?: number | FloatFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] + in?: number[] | ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> lt?: number | FloatFieldRefInput<$PrismaModel> lte?: number | FloatFieldRefInput<$PrismaModel> gt?: number | FloatFieldRefInput<$PrismaModel> @@ -16249,8 +19207,8 @@ export namespace Prisma { export type FloatWithAggregatesFilter<$PrismaModel = never> = { equals?: number | FloatFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] + in?: number[] | ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> lt?: number | FloatFieldRefInput<$PrismaModel> lte?: number | FloatFieldRefInput<$PrismaModel> gt?: number | FloatFieldRefInput<$PrismaModel> @@ -16275,6 +19233,7 @@ export namespace Prisma { fontSize?: SortOrder demoMode?: SortOrder showRecentNotes?: SortOrder + notesViewMode?: SortOrder emailNotifications?: SortOrder desktopNotifications?: SortOrder anonymousAnalytics?: SortOrder @@ -16292,6 +19251,7 @@ export namespace Prisma { fontSize?: SortOrder demoMode?: SortOrder showRecentNotes?: SortOrder + notesViewMode?: SortOrder emailNotifications?: SortOrder desktopNotifications?: SortOrder anonymousAnalytics?: SortOrder @@ -16309,11 +19269,150 @@ export namespace Prisma { fontSize?: SortOrder demoMode?: SortOrder showRecentNotes?: SortOrder + notesViewMode?: SortOrder emailNotifications?: SortOrder desktopNotifications?: SortOrder anonymousAnalytics?: SortOrder } + export type AccountCreateNestedManyWithoutUserInput = { + create?: XOR | AccountCreateWithoutUserInput[] | AccountUncheckedCreateWithoutUserInput[] + connectOrCreate?: AccountCreateOrConnectWithoutUserInput | AccountCreateOrConnectWithoutUserInput[] + createMany?: AccountCreateManyUserInputEnvelope + connect?: AccountWhereUniqueInput | AccountWhereUniqueInput[] + } + + export type AiFeedbackCreateNestedManyWithoutUserInput = { + create?: XOR | AiFeedbackCreateWithoutUserInput[] | AiFeedbackUncheckedCreateWithoutUserInput[] + connectOrCreate?: AiFeedbackCreateOrConnectWithoutUserInput | AiFeedbackCreateOrConnectWithoutUserInput[] + createMany?: AiFeedbackCreateManyUserInputEnvelope + connect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + } + + export type LabelCreateNestedManyWithoutUserInput = { + create?: XOR | LabelCreateWithoutUserInput[] | LabelUncheckedCreateWithoutUserInput[] + connectOrCreate?: LabelCreateOrConnectWithoutUserInput | LabelCreateOrConnectWithoutUserInput[] + createMany?: LabelCreateManyUserInputEnvelope + connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + } + + export type MemoryEchoInsightCreateNestedManyWithoutUserInput = { + create?: XOR | MemoryEchoInsightCreateWithoutUserInput[] | MemoryEchoInsightUncheckedCreateWithoutUserInput[] + connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutUserInput | MemoryEchoInsightCreateOrConnectWithoutUserInput[] + createMany?: MemoryEchoInsightCreateManyUserInputEnvelope + connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + } + + export type NoteCreateNestedManyWithoutUserInput = { + create?: XOR | NoteCreateWithoutUserInput[] | NoteUncheckedCreateWithoutUserInput[] + connectOrCreate?: NoteCreateOrConnectWithoutUserInput | NoteCreateOrConnectWithoutUserInput[] + createMany?: NoteCreateManyUserInputEnvelope + connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + } + + export type NoteShareCreateNestedManyWithoutSharerInput = { + create?: XOR | NoteShareCreateWithoutSharerInput[] | NoteShareUncheckedCreateWithoutSharerInput[] + connectOrCreate?: NoteShareCreateOrConnectWithoutSharerInput | NoteShareCreateOrConnectWithoutSharerInput[] + createMany?: NoteShareCreateManySharerInputEnvelope + connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + } + + export type NoteShareCreateNestedManyWithoutUserInput = { + create?: XOR | NoteShareCreateWithoutUserInput[] | NoteShareUncheckedCreateWithoutUserInput[] + connectOrCreate?: NoteShareCreateOrConnectWithoutUserInput | NoteShareCreateOrConnectWithoutUserInput[] + createMany?: NoteShareCreateManyUserInputEnvelope + connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + } + + export type NotebookCreateNestedManyWithoutUserInput = { + create?: XOR | NotebookCreateWithoutUserInput[] | NotebookUncheckedCreateWithoutUserInput[] + connectOrCreate?: NotebookCreateOrConnectWithoutUserInput | NotebookCreateOrConnectWithoutUserInput[] + createMany?: NotebookCreateManyUserInputEnvelope + connect?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] + } + + export type SessionCreateNestedManyWithoutUserInput = { + create?: XOR | SessionCreateWithoutUserInput[] | SessionUncheckedCreateWithoutUserInput[] + connectOrCreate?: SessionCreateOrConnectWithoutUserInput | SessionCreateOrConnectWithoutUserInput[] + createMany?: SessionCreateManyUserInputEnvelope + connect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + } + + export type UserAISettingsCreateNestedOneWithoutUserInput = { + create?: XOR + connectOrCreate?: UserAISettingsCreateOrConnectWithoutUserInput + connect?: UserAISettingsWhereUniqueInput + } + + export type AccountUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | AccountCreateWithoutUserInput[] | AccountUncheckedCreateWithoutUserInput[] + connectOrCreate?: AccountCreateOrConnectWithoutUserInput | AccountCreateOrConnectWithoutUserInput[] + createMany?: AccountCreateManyUserInputEnvelope + connect?: AccountWhereUniqueInput | AccountWhereUniqueInput[] + } + + export type AiFeedbackUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | AiFeedbackCreateWithoutUserInput[] | AiFeedbackUncheckedCreateWithoutUserInput[] + connectOrCreate?: AiFeedbackCreateOrConnectWithoutUserInput | AiFeedbackCreateOrConnectWithoutUserInput[] + createMany?: AiFeedbackCreateManyUserInputEnvelope + connect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + } + + export type LabelUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | LabelCreateWithoutUserInput[] | LabelUncheckedCreateWithoutUserInput[] + connectOrCreate?: LabelCreateOrConnectWithoutUserInput | LabelCreateOrConnectWithoutUserInput[] + createMany?: LabelCreateManyUserInputEnvelope + connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + } + + export type MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | MemoryEchoInsightCreateWithoutUserInput[] | MemoryEchoInsightUncheckedCreateWithoutUserInput[] + connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutUserInput | MemoryEchoInsightCreateOrConnectWithoutUserInput[] + createMany?: MemoryEchoInsightCreateManyUserInputEnvelope + connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + } + + export type NoteUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | NoteCreateWithoutUserInput[] | NoteUncheckedCreateWithoutUserInput[] + connectOrCreate?: NoteCreateOrConnectWithoutUserInput | NoteCreateOrConnectWithoutUserInput[] + createMany?: NoteCreateManyUserInputEnvelope + connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + } + + export type NoteShareUncheckedCreateNestedManyWithoutSharerInput = { + create?: XOR | NoteShareCreateWithoutSharerInput[] | NoteShareUncheckedCreateWithoutSharerInput[] + connectOrCreate?: NoteShareCreateOrConnectWithoutSharerInput | NoteShareCreateOrConnectWithoutSharerInput[] + createMany?: NoteShareCreateManySharerInputEnvelope + connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + } + + export type NoteShareUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | NoteShareCreateWithoutUserInput[] | NoteShareUncheckedCreateWithoutUserInput[] + connectOrCreate?: NoteShareCreateOrConnectWithoutUserInput | NoteShareCreateOrConnectWithoutUserInput[] + createMany?: NoteShareCreateManyUserInputEnvelope + connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + } + + export type NotebookUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | NotebookCreateWithoutUserInput[] | NotebookUncheckedCreateWithoutUserInput[] + connectOrCreate?: NotebookCreateOrConnectWithoutUserInput | NotebookCreateOrConnectWithoutUserInput[] + createMany?: NotebookCreateManyUserInputEnvelope + connect?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] + } + + export type SessionUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | SessionCreateWithoutUserInput[] | SessionUncheckedCreateWithoutUserInput[] + connectOrCreate?: SessionCreateOrConnectWithoutUserInput | SessionCreateOrConnectWithoutUserInput[] + createMany?: SessionCreateManyUserInputEnvelope + connect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + } + + export type UserAISettingsUncheckedCreateNestedOneWithoutUserInput = { + create?: XOR + connectOrCreate?: UserAISettingsCreateOrConnectWithoutUserInput + connect?: UserAISettingsWhereUniqueInput + } + export type StringFieldUpdateOperationsInput = { set?: string } @@ -16322,14 +19421,320 @@ export namespace Prisma { set?: string | null } - export type BoolFieldUpdateOperationsInput = { - set?: boolean - } - export type NullableDateTimeFieldUpdateOperationsInput = { set?: Date | string | null } + export type DateTimeFieldUpdateOperationsInput = { + set?: Date | string + } + + export type AccountUpdateManyWithoutUserNestedInput = { + create?: XOR | AccountCreateWithoutUserInput[] | AccountUncheckedCreateWithoutUserInput[] + connectOrCreate?: AccountCreateOrConnectWithoutUserInput | AccountCreateOrConnectWithoutUserInput[] + upsert?: AccountUpsertWithWhereUniqueWithoutUserInput | AccountUpsertWithWhereUniqueWithoutUserInput[] + createMany?: AccountCreateManyUserInputEnvelope + set?: AccountWhereUniqueInput | AccountWhereUniqueInput[] + disconnect?: AccountWhereUniqueInput | AccountWhereUniqueInput[] + delete?: AccountWhereUniqueInput | AccountWhereUniqueInput[] + connect?: AccountWhereUniqueInput | AccountWhereUniqueInput[] + update?: AccountUpdateWithWhereUniqueWithoutUserInput | AccountUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: AccountUpdateManyWithWhereWithoutUserInput | AccountUpdateManyWithWhereWithoutUserInput[] + deleteMany?: AccountScalarWhereInput | AccountScalarWhereInput[] + } + + export type AiFeedbackUpdateManyWithoutUserNestedInput = { + create?: XOR | AiFeedbackCreateWithoutUserInput[] | AiFeedbackUncheckedCreateWithoutUserInput[] + connectOrCreate?: AiFeedbackCreateOrConnectWithoutUserInput | AiFeedbackCreateOrConnectWithoutUserInput[] + upsert?: AiFeedbackUpsertWithWhereUniqueWithoutUserInput | AiFeedbackUpsertWithWhereUniqueWithoutUserInput[] + createMany?: AiFeedbackCreateManyUserInputEnvelope + set?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + disconnect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + delete?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + connect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + update?: AiFeedbackUpdateWithWhereUniqueWithoutUserInput | AiFeedbackUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: AiFeedbackUpdateManyWithWhereWithoutUserInput | AiFeedbackUpdateManyWithWhereWithoutUserInput[] + deleteMany?: AiFeedbackScalarWhereInput | AiFeedbackScalarWhereInput[] + } + + export type LabelUpdateManyWithoutUserNestedInput = { + create?: XOR | LabelCreateWithoutUserInput[] | LabelUncheckedCreateWithoutUserInput[] + connectOrCreate?: LabelCreateOrConnectWithoutUserInput | LabelCreateOrConnectWithoutUserInput[] + upsert?: LabelUpsertWithWhereUniqueWithoutUserInput | LabelUpsertWithWhereUniqueWithoutUserInput[] + createMany?: LabelCreateManyUserInputEnvelope + set?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + disconnect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + delete?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + update?: LabelUpdateWithWhereUniqueWithoutUserInput | LabelUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: LabelUpdateManyWithWhereWithoutUserInput | LabelUpdateManyWithWhereWithoutUserInput[] + deleteMany?: LabelScalarWhereInput | LabelScalarWhereInput[] + } + + export type MemoryEchoInsightUpdateManyWithoutUserNestedInput = { + create?: XOR | MemoryEchoInsightCreateWithoutUserInput[] | MemoryEchoInsightUncheckedCreateWithoutUserInput[] + connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutUserInput | MemoryEchoInsightCreateOrConnectWithoutUserInput[] + upsert?: MemoryEchoInsightUpsertWithWhereUniqueWithoutUserInput | MemoryEchoInsightUpsertWithWhereUniqueWithoutUserInput[] + createMany?: MemoryEchoInsightCreateManyUserInputEnvelope + set?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + disconnect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + delete?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + update?: MemoryEchoInsightUpdateWithWhereUniqueWithoutUserInput | MemoryEchoInsightUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: MemoryEchoInsightUpdateManyWithWhereWithoutUserInput | MemoryEchoInsightUpdateManyWithWhereWithoutUserInput[] + deleteMany?: MemoryEchoInsightScalarWhereInput | MemoryEchoInsightScalarWhereInput[] + } + + export type NoteUpdateManyWithoutUserNestedInput = { + create?: XOR | NoteCreateWithoutUserInput[] | NoteUncheckedCreateWithoutUserInput[] + connectOrCreate?: NoteCreateOrConnectWithoutUserInput | NoteCreateOrConnectWithoutUserInput[] + upsert?: NoteUpsertWithWhereUniqueWithoutUserInput | NoteUpsertWithWhereUniqueWithoutUserInput[] + createMany?: NoteCreateManyUserInputEnvelope + set?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + disconnect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + delete?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + update?: NoteUpdateWithWhereUniqueWithoutUserInput | NoteUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: NoteUpdateManyWithWhereWithoutUserInput | NoteUpdateManyWithWhereWithoutUserInput[] + deleteMany?: NoteScalarWhereInput | NoteScalarWhereInput[] + } + + export type NoteShareUpdateManyWithoutSharerNestedInput = { + create?: XOR | NoteShareCreateWithoutSharerInput[] | NoteShareUncheckedCreateWithoutSharerInput[] + connectOrCreate?: NoteShareCreateOrConnectWithoutSharerInput | NoteShareCreateOrConnectWithoutSharerInput[] + upsert?: NoteShareUpsertWithWhereUniqueWithoutSharerInput | NoteShareUpsertWithWhereUniqueWithoutSharerInput[] + createMany?: NoteShareCreateManySharerInputEnvelope + set?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + disconnect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + delete?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + update?: NoteShareUpdateWithWhereUniqueWithoutSharerInput | NoteShareUpdateWithWhereUniqueWithoutSharerInput[] + updateMany?: NoteShareUpdateManyWithWhereWithoutSharerInput | NoteShareUpdateManyWithWhereWithoutSharerInput[] + deleteMany?: NoteShareScalarWhereInput | NoteShareScalarWhereInput[] + } + + export type NoteShareUpdateManyWithoutUserNestedInput = { + create?: XOR | NoteShareCreateWithoutUserInput[] | NoteShareUncheckedCreateWithoutUserInput[] + connectOrCreate?: NoteShareCreateOrConnectWithoutUserInput | NoteShareCreateOrConnectWithoutUserInput[] + upsert?: NoteShareUpsertWithWhereUniqueWithoutUserInput | NoteShareUpsertWithWhereUniqueWithoutUserInput[] + createMany?: NoteShareCreateManyUserInputEnvelope + set?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + disconnect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + delete?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + update?: NoteShareUpdateWithWhereUniqueWithoutUserInput | NoteShareUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: NoteShareUpdateManyWithWhereWithoutUserInput | NoteShareUpdateManyWithWhereWithoutUserInput[] + deleteMany?: NoteShareScalarWhereInput | NoteShareScalarWhereInput[] + } + + export type NotebookUpdateManyWithoutUserNestedInput = { + create?: XOR | NotebookCreateWithoutUserInput[] | NotebookUncheckedCreateWithoutUserInput[] + connectOrCreate?: NotebookCreateOrConnectWithoutUserInput | NotebookCreateOrConnectWithoutUserInput[] + upsert?: NotebookUpsertWithWhereUniqueWithoutUserInput | NotebookUpsertWithWhereUniqueWithoutUserInput[] + createMany?: NotebookCreateManyUserInputEnvelope + set?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] + disconnect?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] + delete?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] + connect?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] + update?: NotebookUpdateWithWhereUniqueWithoutUserInput | NotebookUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: NotebookUpdateManyWithWhereWithoutUserInput | NotebookUpdateManyWithWhereWithoutUserInput[] + deleteMany?: NotebookScalarWhereInput | NotebookScalarWhereInput[] + } + + export type SessionUpdateManyWithoutUserNestedInput = { + create?: XOR | SessionCreateWithoutUserInput[] | SessionUncheckedCreateWithoutUserInput[] + connectOrCreate?: SessionCreateOrConnectWithoutUserInput | SessionCreateOrConnectWithoutUserInput[] + upsert?: SessionUpsertWithWhereUniqueWithoutUserInput | SessionUpsertWithWhereUniqueWithoutUserInput[] + createMany?: SessionCreateManyUserInputEnvelope + set?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + disconnect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + delete?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + connect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + update?: SessionUpdateWithWhereUniqueWithoutUserInput | SessionUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: SessionUpdateManyWithWhereWithoutUserInput | SessionUpdateManyWithWhereWithoutUserInput[] + deleteMany?: SessionScalarWhereInput | SessionScalarWhereInput[] + } + + export type UserAISettingsUpdateOneWithoutUserNestedInput = { + create?: XOR + connectOrCreate?: UserAISettingsCreateOrConnectWithoutUserInput + upsert?: UserAISettingsUpsertWithoutUserInput + disconnect?: UserAISettingsWhereInput | boolean + delete?: UserAISettingsWhereInput | boolean + connect?: UserAISettingsWhereUniqueInput + update?: XOR, UserAISettingsUncheckedUpdateWithoutUserInput> + } + + export type AccountUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | AccountCreateWithoutUserInput[] | AccountUncheckedCreateWithoutUserInput[] + connectOrCreate?: AccountCreateOrConnectWithoutUserInput | AccountCreateOrConnectWithoutUserInput[] + upsert?: AccountUpsertWithWhereUniqueWithoutUserInput | AccountUpsertWithWhereUniqueWithoutUserInput[] + createMany?: AccountCreateManyUserInputEnvelope + set?: AccountWhereUniqueInput | AccountWhereUniqueInput[] + disconnect?: AccountWhereUniqueInput | AccountWhereUniqueInput[] + delete?: AccountWhereUniqueInput | AccountWhereUniqueInput[] + connect?: AccountWhereUniqueInput | AccountWhereUniqueInput[] + update?: AccountUpdateWithWhereUniqueWithoutUserInput | AccountUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: AccountUpdateManyWithWhereWithoutUserInput | AccountUpdateManyWithWhereWithoutUserInput[] + deleteMany?: AccountScalarWhereInput | AccountScalarWhereInput[] + } + + export type AiFeedbackUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | AiFeedbackCreateWithoutUserInput[] | AiFeedbackUncheckedCreateWithoutUserInput[] + connectOrCreate?: AiFeedbackCreateOrConnectWithoutUserInput | AiFeedbackCreateOrConnectWithoutUserInput[] + upsert?: AiFeedbackUpsertWithWhereUniqueWithoutUserInput | AiFeedbackUpsertWithWhereUniqueWithoutUserInput[] + createMany?: AiFeedbackCreateManyUserInputEnvelope + set?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + disconnect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + delete?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + connect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + update?: AiFeedbackUpdateWithWhereUniqueWithoutUserInput | AiFeedbackUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: AiFeedbackUpdateManyWithWhereWithoutUserInput | AiFeedbackUpdateManyWithWhereWithoutUserInput[] + deleteMany?: AiFeedbackScalarWhereInput | AiFeedbackScalarWhereInput[] + } + + export type LabelUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | LabelCreateWithoutUserInput[] | LabelUncheckedCreateWithoutUserInput[] + connectOrCreate?: LabelCreateOrConnectWithoutUserInput | LabelCreateOrConnectWithoutUserInput[] + upsert?: LabelUpsertWithWhereUniqueWithoutUserInput | LabelUpsertWithWhereUniqueWithoutUserInput[] + createMany?: LabelCreateManyUserInputEnvelope + set?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + disconnect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + delete?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + update?: LabelUpdateWithWhereUniqueWithoutUserInput | LabelUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: LabelUpdateManyWithWhereWithoutUserInput | LabelUpdateManyWithWhereWithoutUserInput[] + deleteMany?: LabelScalarWhereInput | LabelScalarWhereInput[] + } + + export type MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | MemoryEchoInsightCreateWithoutUserInput[] | MemoryEchoInsightUncheckedCreateWithoutUserInput[] + connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutUserInput | MemoryEchoInsightCreateOrConnectWithoutUserInput[] + upsert?: MemoryEchoInsightUpsertWithWhereUniqueWithoutUserInput | MemoryEchoInsightUpsertWithWhereUniqueWithoutUserInput[] + createMany?: MemoryEchoInsightCreateManyUserInputEnvelope + set?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + disconnect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + delete?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + update?: MemoryEchoInsightUpdateWithWhereUniqueWithoutUserInput | MemoryEchoInsightUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: MemoryEchoInsightUpdateManyWithWhereWithoutUserInput | MemoryEchoInsightUpdateManyWithWhereWithoutUserInput[] + deleteMany?: MemoryEchoInsightScalarWhereInput | MemoryEchoInsightScalarWhereInput[] + } + + export type NoteUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | NoteCreateWithoutUserInput[] | NoteUncheckedCreateWithoutUserInput[] + connectOrCreate?: NoteCreateOrConnectWithoutUserInput | NoteCreateOrConnectWithoutUserInput[] + upsert?: NoteUpsertWithWhereUniqueWithoutUserInput | NoteUpsertWithWhereUniqueWithoutUserInput[] + createMany?: NoteCreateManyUserInputEnvelope + set?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + disconnect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + delete?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + update?: NoteUpdateWithWhereUniqueWithoutUserInput | NoteUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: NoteUpdateManyWithWhereWithoutUserInput | NoteUpdateManyWithWhereWithoutUserInput[] + deleteMany?: NoteScalarWhereInput | NoteScalarWhereInput[] + } + + export type NoteShareUncheckedUpdateManyWithoutSharerNestedInput = { + create?: XOR | NoteShareCreateWithoutSharerInput[] | NoteShareUncheckedCreateWithoutSharerInput[] + connectOrCreate?: NoteShareCreateOrConnectWithoutSharerInput | NoteShareCreateOrConnectWithoutSharerInput[] + upsert?: NoteShareUpsertWithWhereUniqueWithoutSharerInput | NoteShareUpsertWithWhereUniqueWithoutSharerInput[] + createMany?: NoteShareCreateManySharerInputEnvelope + set?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + disconnect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + delete?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + update?: NoteShareUpdateWithWhereUniqueWithoutSharerInput | NoteShareUpdateWithWhereUniqueWithoutSharerInput[] + updateMany?: NoteShareUpdateManyWithWhereWithoutSharerInput | NoteShareUpdateManyWithWhereWithoutSharerInput[] + deleteMany?: NoteShareScalarWhereInput | NoteShareScalarWhereInput[] + } + + export type NoteShareUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | NoteShareCreateWithoutUserInput[] | NoteShareUncheckedCreateWithoutUserInput[] + connectOrCreate?: NoteShareCreateOrConnectWithoutUserInput | NoteShareCreateOrConnectWithoutUserInput[] + upsert?: NoteShareUpsertWithWhereUniqueWithoutUserInput | NoteShareUpsertWithWhereUniqueWithoutUserInput[] + createMany?: NoteShareCreateManyUserInputEnvelope + set?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + disconnect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + delete?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + update?: NoteShareUpdateWithWhereUniqueWithoutUserInput | NoteShareUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: NoteShareUpdateManyWithWhereWithoutUserInput | NoteShareUpdateManyWithWhereWithoutUserInput[] + deleteMany?: NoteShareScalarWhereInput | NoteShareScalarWhereInput[] + } + + export type NotebookUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | NotebookCreateWithoutUserInput[] | NotebookUncheckedCreateWithoutUserInput[] + connectOrCreate?: NotebookCreateOrConnectWithoutUserInput | NotebookCreateOrConnectWithoutUserInput[] + upsert?: NotebookUpsertWithWhereUniqueWithoutUserInput | NotebookUpsertWithWhereUniqueWithoutUserInput[] + createMany?: NotebookCreateManyUserInputEnvelope + set?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] + disconnect?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] + delete?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] + connect?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] + update?: NotebookUpdateWithWhereUniqueWithoutUserInput | NotebookUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: NotebookUpdateManyWithWhereWithoutUserInput | NotebookUpdateManyWithWhereWithoutUserInput[] + deleteMany?: NotebookScalarWhereInput | NotebookScalarWhereInput[] + } + + export type SessionUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | SessionCreateWithoutUserInput[] | SessionUncheckedCreateWithoutUserInput[] + connectOrCreate?: SessionCreateOrConnectWithoutUserInput | SessionCreateOrConnectWithoutUserInput[] + upsert?: SessionUpsertWithWhereUniqueWithoutUserInput | SessionUpsertWithWhereUniqueWithoutUserInput[] + createMany?: SessionCreateManyUserInputEnvelope + set?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + disconnect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + delete?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + connect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + update?: SessionUpdateWithWhereUniqueWithoutUserInput | SessionUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: SessionUpdateManyWithWhereWithoutUserInput | SessionUpdateManyWithWhereWithoutUserInput[] + deleteMany?: SessionScalarWhereInput | SessionScalarWhereInput[] + } + + export type UserAISettingsUncheckedUpdateOneWithoutUserNestedInput = { + create?: XOR + connectOrCreate?: UserAISettingsCreateOrConnectWithoutUserInput + upsert?: UserAISettingsUpsertWithoutUserInput + disconnect?: UserAISettingsWhereInput | boolean + delete?: UserAISettingsWhereInput | boolean + connect?: UserAISettingsWhereUniqueInput + update?: XOR, UserAISettingsUncheckedUpdateWithoutUserInput> + } + + export type LabelCreateNestedManyWithoutNotebookInput = { + create?: XOR | LabelCreateWithoutNotebookInput[] | LabelUncheckedCreateWithoutNotebookInput[] + connectOrCreate?: LabelCreateOrConnectWithoutNotebookInput | LabelCreateOrConnectWithoutNotebookInput[] + createMany?: LabelCreateManyNotebookInputEnvelope + connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + } + + export type NoteCreateNestedManyWithoutNotebookInput = { + create?: XOR | NoteCreateWithoutNotebookInput[] | NoteUncheckedCreateWithoutNotebookInput[] + connectOrCreate?: NoteCreateOrConnectWithoutNotebookInput | NoteCreateOrConnectWithoutNotebookInput[] + createMany?: NoteCreateManyNotebookInputEnvelope + connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + } + + export type UserCreateNestedOneWithoutNotebooksInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutNotebooksInput + connect?: UserWhereUniqueInput + } + + export type LabelUncheckedCreateNestedManyWithoutNotebookInput = { + create?: XOR | LabelCreateWithoutNotebookInput[] | LabelUncheckedCreateWithoutNotebookInput[] + connectOrCreate?: LabelCreateOrConnectWithoutNotebookInput | LabelCreateOrConnectWithoutNotebookInput[] + createMany?: LabelCreateManyNotebookInputEnvelope + connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + } + + export type NoteUncheckedCreateNestedManyWithoutNotebookInput = { + create?: XOR | NoteCreateWithoutNotebookInput[] | NoteUncheckedCreateWithoutNotebookInput[] + connectOrCreate?: NoteCreateOrConnectWithoutNotebookInput | NoteCreateOrConnectWithoutNotebookInput[] + createMany?: NoteCreateManyNotebookInputEnvelope + connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + } + export type IntFieldUpdateOperationsInput = { set?: number increment?: number @@ -16338,8 +19743,234 @@ export namespace Prisma { divide?: number } - export type DateTimeFieldUpdateOperationsInput = { - set?: Date | string + export type LabelUpdateManyWithoutNotebookNestedInput = { + create?: XOR | LabelCreateWithoutNotebookInput[] | LabelUncheckedCreateWithoutNotebookInput[] + connectOrCreate?: LabelCreateOrConnectWithoutNotebookInput | LabelCreateOrConnectWithoutNotebookInput[] + upsert?: LabelUpsertWithWhereUniqueWithoutNotebookInput | LabelUpsertWithWhereUniqueWithoutNotebookInput[] + createMany?: LabelCreateManyNotebookInputEnvelope + set?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + disconnect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + delete?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + update?: LabelUpdateWithWhereUniqueWithoutNotebookInput | LabelUpdateWithWhereUniqueWithoutNotebookInput[] + updateMany?: LabelUpdateManyWithWhereWithoutNotebookInput | LabelUpdateManyWithWhereWithoutNotebookInput[] + deleteMany?: LabelScalarWhereInput | LabelScalarWhereInput[] + } + + export type NoteUpdateManyWithoutNotebookNestedInput = { + create?: XOR | NoteCreateWithoutNotebookInput[] | NoteUncheckedCreateWithoutNotebookInput[] + connectOrCreate?: NoteCreateOrConnectWithoutNotebookInput | NoteCreateOrConnectWithoutNotebookInput[] + upsert?: NoteUpsertWithWhereUniqueWithoutNotebookInput | NoteUpsertWithWhereUniqueWithoutNotebookInput[] + createMany?: NoteCreateManyNotebookInputEnvelope + set?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + disconnect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + delete?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + update?: NoteUpdateWithWhereUniqueWithoutNotebookInput | NoteUpdateWithWhereUniqueWithoutNotebookInput[] + updateMany?: NoteUpdateManyWithWhereWithoutNotebookInput | NoteUpdateManyWithWhereWithoutNotebookInput[] + deleteMany?: NoteScalarWhereInput | NoteScalarWhereInput[] + } + + export type UserUpdateOneRequiredWithoutNotebooksNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutNotebooksInput + upsert?: UserUpsertWithoutNotebooksInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutNotebooksInput> + } + + export type LabelUncheckedUpdateManyWithoutNotebookNestedInput = { + create?: XOR | LabelCreateWithoutNotebookInput[] | LabelUncheckedCreateWithoutNotebookInput[] + connectOrCreate?: LabelCreateOrConnectWithoutNotebookInput | LabelCreateOrConnectWithoutNotebookInput[] + upsert?: LabelUpsertWithWhereUniqueWithoutNotebookInput | LabelUpsertWithWhereUniqueWithoutNotebookInput[] + createMany?: LabelCreateManyNotebookInputEnvelope + set?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + disconnect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + delete?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + update?: LabelUpdateWithWhereUniqueWithoutNotebookInput | LabelUpdateWithWhereUniqueWithoutNotebookInput[] + updateMany?: LabelUpdateManyWithWhereWithoutNotebookInput | LabelUpdateManyWithWhereWithoutNotebookInput[] + deleteMany?: LabelScalarWhereInput | LabelScalarWhereInput[] + } + + export type NoteUncheckedUpdateManyWithoutNotebookNestedInput = { + create?: XOR | NoteCreateWithoutNotebookInput[] | NoteUncheckedCreateWithoutNotebookInput[] + connectOrCreate?: NoteCreateOrConnectWithoutNotebookInput | NoteCreateOrConnectWithoutNotebookInput[] + upsert?: NoteUpsertWithWhereUniqueWithoutNotebookInput | NoteUpsertWithWhereUniqueWithoutNotebookInput[] + createMany?: NoteCreateManyNotebookInputEnvelope + set?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + disconnect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + delete?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + update?: NoteUpdateWithWhereUniqueWithoutNotebookInput | NoteUpdateWithWhereUniqueWithoutNotebookInput[] + updateMany?: NoteUpdateManyWithWhereWithoutNotebookInput | NoteUpdateManyWithWhereWithoutNotebookInput[] + deleteMany?: NoteScalarWhereInput | NoteScalarWhereInput[] + } + + export type UserCreateNestedOneWithoutLabelsInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutLabelsInput + connect?: UserWhereUniqueInput + } + + export type NotebookCreateNestedOneWithoutLabelsInput = { + create?: XOR + connectOrCreate?: NotebookCreateOrConnectWithoutLabelsInput + connect?: NotebookWhereUniqueInput + } + + export type NoteCreateNestedManyWithoutLabelRelationsInput = { + create?: XOR | NoteCreateWithoutLabelRelationsInput[] | NoteUncheckedCreateWithoutLabelRelationsInput[] + connectOrCreate?: NoteCreateOrConnectWithoutLabelRelationsInput | NoteCreateOrConnectWithoutLabelRelationsInput[] + connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + } + + export type NoteUncheckedCreateNestedManyWithoutLabelRelationsInput = { + create?: XOR | NoteCreateWithoutLabelRelationsInput[] | NoteUncheckedCreateWithoutLabelRelationsInput[] + connectOrCreate?: NoteCreateOrConnectWithoutLabelRelationsInput | NoteCreateOrConnectWithoutLabelRelationsInput[] + connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + } + + export type UserUpdateOneWithoutLabelsNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutLabelsInput + upsert?: UserUpsertWithoutLabelsInput + disconnect?: UserWhereInput | boolean + delete?: UserWhereInput | boolean + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutLabelsInput> + } + + export type NotebookUpdateOneWithoutLabelsNestedInput = { + create?: XOR + connectOrCreate?: NotebookCreateOrConnectWithoutLabelsInput + upsert?: NotebookUpsertWithoutLabelsInput + disconnect?: NotebookWhereInput | boolean + delete?: NotebookWhereInput | boolean + connect?: NotebookWhereUniqueInput + update?: XOR, NotebookUncheckedUpdateWithoutLabelsInput> + } + + export type NoteUpdateManyWithoutLabelRelationsNestedInput = { + create?: XOR | NoteCreateWithoutLabelRelationsInput[] | NoteUncheckedCreateWithoutLabelRelationsInput[] + connectOrCreate?: NoteCreateOrConnectWithoutLabelRelationsInput | NoteCreateOrConnectWithoutLabelRelationsInput[] + upsert?: NoteUpsertWithWhereUniqueWithoutLabelRelationsInput | NoteUpsertWithWhereUniqueWithoutLabelRelationsInput[] + set?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + disconnect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + delete?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + update?: NoteUpdateWithWhereUniqueWithoutLabelRelationsInput | NoteUpdateWithWhereUniqueWithoutLabelRelationsInput[] + updateMany?: NoteUpdateManyWithWhereWithoutLabelRelationsInput | NoteUpdateManyWithWhereWithoutLabelRelationsInput[] + deleteMany?: NoteScalarWhereInput | NoteScalarWhereInput[] + } + + export type NoteUncheckedUpdateManyWithoutLabelRelationsNestedInput = { + create?: XOR | NoteCreateWithoutLabelRelationsInput[] | NoteUncheckedCreateWithoutLabelRelationsInput[] + connectOrCreate?: NoteCreateOrConnectWithoutLabelRelationsInput | NoteCreateOrConnectWithoutLabelRelationsInput[] + upsert?: NoteUpsertWithWhereUniqueWithoutLabelRelationsInput | NoteUpsertWithWhereUniqueWithoutLabelRelationsInput[] + set?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + disconnect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + delete?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] + update?: NoteUpdateWithWhereUniqueWithoutLabelRelationsInput | NoteUpdateWithWhereUniqueWithoutLabelRelationsInput[] + updateMany?: NoteUpdateManyWithWhereWithoutLabelRelationsInput | NoteUpdateManyWithWhereWithoutLabelRelationsInput[] + deleteMany?: NoteScalarWhereInput | NoteScalarWhereInput[] + } + + export type AiFeedbackCreateNestedManyWithoutNoteInput = { + create?: XOR | AiFeedbackCreateWithoutNoteInput[] | AiFeedbackUncheckedCreateWithoutNoteInput[] + connectOrCreate?: AiFeedbackCreateOrConnectWithoutNoteInput | AiFeedbackCreateOrConnectWithoutNoteInput[] + createMany?: AiFeedbackCreateManyNoteInputEnvelope + connect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + } + + export type MemoryEchoInsightCreateNestedManyWithoutNote2Input = { + create?: XOR | MemoryEchoInsightCreateWithoutNote2Input[] | MemoryEchoInsightUncheckedCreateWithoutNote2Input[] + connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutNote2Input | MemoryEchoInsightCreateOrConnectWithoutNote2Input[] + createMany?: MemoryEchoInsightCreateManyNote2InputEnvelope + connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + } + + export type MemoryEchoInsightCreateNestedManyWithoutNote1Input = { + create?: XOR | MemoryEchoInsightCreateWithoutNote1Input[] | MemoryEchoInsightUncheckedCreateWithoutNote1Input[] + connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutNote1Input | MemoryEchoInsightCreateOrConnectWithoutNote1Input[] + createMany?: MemoryEchoInsightCreateManyNote1InputEnvelope + connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + } + + export type NotebookCreateNestedOneWithoutNotesInput = { + create?: XOR + connectOrCreate?: NotebookCreateOrConnectWithoutNotesInput + connect?: NotebookWhereUniqueInput + } + + export type UserCreateNestedOneWithoutNotesInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutNotesInput + connect?: UserWhereUniqueInput + } + + export type NoteShareCreateNestedManyWithoutNoteInput = { + create?: XOR | NoteShareCreateWithoutNoteInput[] | NoteShareUncheckedCreateWithoutNoteInput[] + connectOrCreate?: NoteShareCreateOrConnectWithoutNoteInput | NoteShareCreateOrConnectWithoutNoteInput[] + createMany?: NoteShareCreateManyNoteInputEnvelope + connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + } + + export type LabelCreateNestedManyWithoutNotesInput = { + create?: XOR | LabelCreateWithoutNotesInput[] | LabelUncheckedCreateWithoutNotesInput[] + connectOrCreate?: LabelCreateOrConnectWithoutNotesInput | LabelCreateOrConnectWithoutNotesInput[] + connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + } + + export type NoteEmbeddingCreateNestedOneWithoutNoteInput = { + create?: XOR + connectOrCreate?: NoteEmbeddingCreateOrConnectWithoutNoteInput + connect?: NoteEmbeddingWhereUniqueInput + } + + export type AiFeedbackUncheckedCreateNestedManyWithoutNoteInput = { + create?: XOR | AiFeedbackCreateWithoutNoteInput[] | AiFeedbackUncheckedCreateWithoutNoteInput[] + connectOrCreate?: AiFeedbackCreateOrConnectWithoutNoteInput | AiFeedbackCreateOrConnectWithoutNoteInput[] + createMany?: AiFeedbackCreateManyNoteInputEnvelope + connect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + } + + export type MemoryEchoInsightUncheckedCreateNestedManyWithoutNote2Input = { + create?: XOR | MemoryEchoInsightCreateWithoutNote2Input[] | MemoryEchoInsightUncheckedCreateWithoutNote2Input[] + connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutNote2Input | MemoryEchoInsightCreateOrConnectWithoutNote2Input[] + createMany?: MemoryEchoInsightCreateManyNote2InputEnvelope + connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + } + + export type MemoryEchoInsightUncheckedCreateNestedManyWithoutNote1Input = { + create?: XOR | MemoryEchoInsightCreateWithoutNote1Input[] | MemoryEchoInsightUncheckedCreateWithoutNote1Input[] + connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutNote1Input | MemoryEchoInsightCreateOrConnectWithoutNote1Input[] + createMany?: MemoryEchoInsightCreateManyNote1InputEnvelope + connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + } + + export type NoteShareUncheckedCreateNestedManyWithoutNoteInput = { + create?: XOR | NoteShareCreateWithoutNoteInput[] | NoteShareUncheckedCreateWithoutNoteInput[] + connectOrCreate?: NoteShareCreateOrConnectWithoutNoteInput | NoteShareCreateOrConnectWithoutNoteInput[] + createMany?: NoteShareCreateManyNoteInputEnvelope + connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + } + + export type LabelUncheckedCreateNestedManyWithoutNotesInput = { + create?: XOR | LabelCreateWithoutNotesInput[] | LabelUncheckedCreateWithoutNotesInput[] + connectOrCreate?: LabelCreateOrConnectWithoutNotesInput | LabelCreateOrConnectWithoutNotesInput[] + connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + } + + export type NoteEmbeddingUncheckedCreateNestedOneWithoutNoteInput = { + create?: XOR + connectOrCreate?: NoteEmbeddingCreateOrConnectWithoutNoteInput + connect?: NoteEmbeddingWhereUniqueInput + } + + export type BoolFieldUpdateOperationsInput = { + set?: boolean } export type NullableBoolFieldUpdateOperationsInput = { @@ -16362,6 +19993,316 @@ export namespace Prisma { divide?: number } + export type AiFeedbackUpdateManyWithoutNoteNestedInput = { + create?: XOR | AiFeedbackCreateWithoutNoteInput[] | AiFeedbackUncheckedCreateWithoutNoteInput[] + connectOrCreate?: AiFeedbackCreateOrConnectWithoutNoteInput | AiFeedbackCreateOrConnectWithoutNoteInput[] + upsert?: AiFeedbackUpsertWithWhereUniqueWithoutNoteInput | AiFeedbackUpsertWithWhereUniqueWithoutNoteInput[] + createMany?: AiFeedbackCreateManyNoteInputEnvelope + set?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + disconnect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + delete?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + connect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + update?: AiFeedbackUpdateWithWhereUniqueWithoutNoteInput | AiFeedbackUpdateWithWhereUniqueWithoutNoteInput[] + updateMany?: AiFeedbackUpdateManyWithWhereWithoutNoteInput | AiFeedbackUpdateManyWithWhereWithoutNoteInput[] + deleteMany?: AiFeedbackScalarWhereInput | AiFeedbackScalarWhereInput[] + } + + export type MemoryEchoInsightUpdateManyWithoutNote2NestedInput = { + create?: XOR | MemoryEchoInsightCreateWithoutNote2Input[] | MemoryEchoInsightUncheckedCreateWithoutNote2Input[] + connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutNote2Input | MemoryEchoInsightCreateOrConnectWithoutNote2Input[] + upsert?: MemoryEchoInsightUpsertWithWhereUniqueWithoutNote2Input | MemoryEchoInsightUpsertWithWhereUniqueWithoutNote2Input[] + createMany?: MemoryEchoInsightCreateManyNote2InputEnvelope + set?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + disconnect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + delete?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + update?: MemoryEchoInsightUpdateWithWhereUniqueWithoutNote2Input | MemoryEchoInsightUpdateWithWhereUniqueWithoutNote2Input[] + updateMany?: MemoryEchoInsightUpdateManyWithWhereWithoutNote2Input | MemoryEchoInsightUpdateManyWithWhereWithoutNote2Input[] + deleteMany?: MemoryEchoInsightScalarWhereInput | MemoryEchoInsightScalarWhereInput[] + } + + export type MemoryEchoInsightUpdateManyWithoutNote1NestedInput = { + create?: XOR | MemoryEchoInsightCreateWithoutNote1Input[] | MemoryEchoInsightUncheckedCreateWithoutNote1Input[] + connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutNote1Input | MemoryEchoInsightCreateOrConnectWithoutNote1Input[] + upsert?: MemoryEchoInsightUpsertWithWhereUniqueWithoutNote1Input | MemoryEchoInsightUpsertWithWhereUniqueWithoutNote1Input[] + createMany?: MemoryEchoInsightCreateManyNote1InputEnvelope + set?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + disconnect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + delete?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + update?: MemoryEchoInsightUpdateWithWhereUniqueWithoutNote1Input | MemoryEchoInsightUpdateWithWhereUniqueWithoutNote1Input[] + updateMany?: MemoryEchoInsightUpdateManyWithWhereWithoutNote1Input | MemoryEchoInsightUpdateManyWithWhereWithoutNote1Input[] + deleteMany?: MemoryEchoInsightScalarWhereInput | MemoryEchoInsightScalarWhereInput[] + } + + export type NotebookUpdateOneWithoutNotesNestedInput = { + create?: XOR + connectOrCreate?: NotebookCreateOrConnectWithoutNotesInput + upsert?: NotebookUpsertWithoutNotesInput + disconnect?: NotebookWhereInput | boolean + delete?: NotebookWhereInput | boolean + connect?: NotebookWhereUniqueInput + update?: XOR, NotebookUncheckedUpdateWithoutNotesInput> + } + + export type UserUpdateOneWithoutNotesNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutNotesInput + upsert?: UserUpsertWithoutNotesInput + disconnect?: UserWhereInput | boolean + delete?: UserWhereInput | boolean + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutNotesInput> + } + + export type NoteShareUpdateManyWithoutNoteNestedInput = { + create?: XOR | NoteShareCreateWithoutNoteInput[] | NoteShareUncheckedCreateWithoutNoteInput[] + connectOrCreate?: NoteShareCreateOrConnectWithoutNoteInput | NoteShareCreateOrConnectWithoutNoteInput[] + upsert?: NoteShareUpsertWithWhereUniqueWithoutNoteInput | NoteShareUpsertWithWhereUniqueWithoutNoteInput[] + createMany?: NoteShareCreateManyNoteInputEnvelope + set?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + disconnect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + delete?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + update?: NoteShareUpdateWithWhereUniqueWithoutNoteInput | NoteShareUpdateWithWhereUniqueWithoutNoteInput[] + updateMany?: NoteShareUpdateManyWithWhereWithoutNoteInput | NoteShareUpdateManyWithWhereWithoutNoteInput[] + deleteMany?: NoteShareScalarWhereInput | NoteShareScalarWhereInput[] + } + + export type LabelUpdateManyWithoutNotesNestedInput = { + create?: XOR | LabelCreateWithoutNotesInput[] | LabelUncheckedCreateWithoutNotesInput[] + connectOrCreate?: LabelCreateOrConnectWithoutNotesInput | LabelCreateOrConnectWithoutNotesInput[] + upsert?: LabelUpsertWithWhereUniqueWithoutNotesInput | LabelUpsertWithWhereUniqueWithoutNotesInput[] + set?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + disconnect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + delete?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + update?: LabelUpdateWithWhereUniqueWithoutNotesInput | LabelUpdateWithWhereUniqueWithoutNotesInput[] + updateMany?: LabelUpdateManyWithWhereWithoutNotesInput | LabelUpdateManyWithWhereWithoutNotesInput[] + deleteMany?: LabelScalarWhereInput | LabelScalarWhereInput[] + } + + export type NoteEmbeddingUpdateOneWithoutNoteNestedInput = { + create?: XOR + connectOrCreate?: NoteEmbeddingCreateOrConnectWithoutNoteInput + upsert?: NoteEmbeddingUpsertWithoutNoteInput + disconnect?: NoteEmbeddingWhereInput | boolean + delete?: NoteEmbeddingWhereInput | boolean + connect?: NoteEmbeddingWhereUniqueInput + update?: XOR, NoteEmbeddingUncheckedUpdateWithoutNoteInput> + } + + export type AiFeedbackUncheckedUpdateManyWithoutNoteNestedInput = { + create?: XOR | AiFeedbackCreateWithoutNoteInput[] | AiFeedbackUncheckedCreateWithoutNoteInput[] + connectOrCreate?: AiFeedbackCreateOrConnectWithoutNoteInput | AiFeedbackCreateOrConnectWithoutNoteInput[] + upsert?: AiFeedbackUpsertWithWhereUniqueWithoutNoteInput | AiFeedbackUpsertWithWhereUniqueWithoutNoteInput[] + createMany?: AiFeedbackCreateManyNoteInputEnvelope + set?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + disconnect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + delete?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + connect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] + update?: AiFeedbackUpdateWithWhereUniqueWithoutNoteInput | AiFeedbackUpdateWithWhereUniqueWithoutNoteInput[] + updateMany?: AiFeedbackUpdateManyWithWhereWithoutNoteInput | AiFeedbackUpdateManyWithWhereWithoutNoteInput[] + deleteMany?: AiFeedbackScalarWhereInput | AiFeedbackScalarWhereInput[] + } + + export type MemoryEchoInsightUncheckedUpdateManyWithoutNote2NestedInput = { + create?: XOR | MemoryEchoInsightCreateWithoutNote2Input[] | MemoryEchoInsightUncheckedCreateWithoutNote2Input[] + connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutNote2Input | MemoryEchoInsightCreateOrConnectWithoutNote2Input[] + upsert?: MemoryEchoInsightUpsertWithWhereUniqueWithoutNote2Input | MemoryEchoInsightUpsertWithWhereUniqueWithoutNote2Input[] + createMany?: MemoryEchoInsightCreateManyNote2InputEnvelope + set?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + disconnect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + delete?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + update?: MemoryEchoInsightUpdateWithWhereUniqueWithoutNote2Input | MemoryEchoInsightUpdateWithWhereUniqueWithoutNote2Input[] + updateMany?: MemoryEchoInsightUpdateManyWithWhereWithoutNote2Input | MemoryEchoInsightUpdateManyWithWhereWithoutNote2Input[] + deleteMany?: MemoryEchoInsightScalarWhereInput | MemoryEchoInsightScalarWhereInput[] + } + + export type MemoryEchoInsightUncheckedUpdateManyWithoutNote1NestedInput = { + create?: XOR | MemoryEchoInsightCreateWithoutNote1Input[] | MemoryEchoInsightUncheckedCreateWithoutNote1Input[] + connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutNote1Input | MemoryEchoInsightCreateOrConnectWithoutNote1Input[] + upsert?: MemoryEchoInsightUpsertWithWhereUniqueWithoutNote1Input | MemoryEchoInsightUpsertWithWhereUniqueWithoutNote1Input[] + createMany?: MemoryEchoInsightCreateManyNote1InputEnvelope + set?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + disconnect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + delete?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] + update?: MemoryEchoInsightUpdateWithWhereUniqueWithoutNote1Input | MemoryEchoInsightUpdateWithWhereUniqueWithoutNote1Input[] + updateMany?: MemoryEchoInsightUpdateManyWithWhereWithoutNote1Input | MemoryEchoInsightUpdateManyWithWhereWithoutNote1Input[] + deleteMany?: MemoryEchoInsightScalarWhereInput | MemoryEchoInsightScalarWhereInput[] + } + + export type NoteShareUncheckedUpdateManyWithoutNoteNestedInput = { + create?: XOR | NoteShareCreateWithoutNoteInput[] | NoteShareUncheckedCreateWithoutNoteInput[] + connectOrCreate?: NoteShareCreateOrConnectWithoutNoteInput | NoteShareCreateOrConnectWithoutNoteInput[] + upsert?: NoteShareUpsertWithWhereUniqueWithoutNoteInput | NoteShareUpsertWithWhereUniqueWithoutNoteInput[] + createMany?: NoteShareCreateManyNoteInputEnvelope + set?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + disconnect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + delete?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] + update?: NoteShareUpdateWithWhereUniqueWithoutNoteInput | NoteShareUpdateWithWhereUniqueWithoutNoteInput[] + updateMany?: NoteShareUpdateManyWithWhereWithoutNoteInput | NoteShareUpdateManyWithWhereWithoutNoteInput[] + deleteMany?: NoteShareScalarWhereInput | NoteShareScalarWhereInput[] + } + + export type LabelUncheckedUpdateManyWithoutNotesNestedInput = { + create?: XOR | LabelCreateWithoutNotesInput[] | LabelUncheckedCreateWithoutNotesInput[] + connectOrCreate?: LabelCreateOrConnectWithoutNotesInput | LabelCreateOrConnectWithoutNotesInput[] + upsert?: LabelUpsertWithWhereUniqueWithoutNotesInput | LabelUpsertWithWhereUniqueWithoutNotesInput[] + set?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + disconnect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + delete?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] + update?: LabelUpdateWithWhereUniqueWithoutNotesInput | LabelUpdateWithWhereUniqueWithoutNotesInput[] + updateMany?: LabelUpdateManyWithWhereWithoutNotesInput | LabelUpdateManyWithWhereWithoutNotesInput[] + deleteMany?: LabelScalarWhereInput | LabelScalarWhereInput[] + } + + export type NoteEmbeddingUncheckedUpdateOneWithoutNoteNestedInput = { + create?: XOR + connectOrCreate?: NoteEmbeddingCreateOrConnectWithoutNoteInput + upsert?: NoteEmbeddingUpsertWithoutNoteInput + disconnect?: NoteEmbeddingWhereInput | boolean + delete?: NoteEmbeddingWhereInput | boolean + connect?: NoteEmbeddingWhereUniqueInput + update?: XOR, NoteEmbeddingUncheckedUpdateWithoutNoteInput> + } + + export type NoteCreateNestedOneWithoutNoteEmbeddingInput = { + create?: XOR + connectOrCreate?: NoteCreateOrConnectWithoutNoteEmbeddingInput + connect?: NoteWhereUniqueInput + } + + export type NoteUpdateOneRequiredWithoutNoteEmbeddingNestedInput = { + create?: XOR + connectOrCreate?: NoteCreateOrConnectWithoutNoteEmbeddingInput + upsert?: NoteUpsertWithoutNoteEmbeddingInput + connect?: NoteWhereUniqueInput + update?: XOR, NoteUncheckedUpdateWithoutNoteEmbeddingInput> + } + + export type UserCreateNestedOneWithoutSentSharesInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutSentSharesInput + connect?: UserWhereUniqueInput + } + + export type UserCreateNestedOneWithoutReceivedSharesInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutReceivedSharesInput + connect?: UserWhereUniqueInput + } + + export type NoteCreateNestedOneWithoutSharesInput = { + create?: XOR + connectOrCreate?: NoteCreateOrConnectWithoutSharesInput + connect?: NoteWhereUniqueInput + } + + export type UserUpdateOneRequiredWithoutSentSharesNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutSentSharesInput + upsert?: UserUpsertWithoutSentSharesInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutSentSharesInput> + } + + export type UserUpdateOneRequiredWithoutReceivedSharesNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutReceivedSharesInput + upsert?: UserUpsertWithoutReceivedSharesInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutReceivedSharesInput> + } + + export type NoteUpdateOneRequiredWithoutSharesNestedInput = { + create?: XOR + connectOrCreate?: NoteCreateOrConnectWithoutSharesInput + upsert?: NoteUpsertWithoutSharesInput + connect?: NoteWhereUniqueInput + update?: XOR, NoteUncheckedUpdateWithoutSharesInput> + } + + export type UserCreateNestedOneWithoutAccountsInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutAccountsInput + connect?: UserWhereUniqueInput + } + + export type UserUpdateOneRequiredWithoutAccountsNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutAccountsInput + upsert?: UserUpsertWithoutAccountsInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutAccountsInput> + } + + export type UserCreateNestedOneWithoutSessionsInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutSessionsInput + connect?: UserWhereUniqueInput + } + + export type UserUpdateOneRequiredWithoutSessionsNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutSessionsInput + upsert?: UserUpsertWithoutSessionsInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutSessionsInput> + } + + export type UserCreateNestedOneWithoutAiFeedbackInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutAiFeedbackInput + connect?: UserWhereUniqueInput + } + + export type NoteCreateNestedOneWithoutAiFeedbackInput = { + create?: XOR + connectOrCreate?: NoteCreateOrConnectWithoutAiFeedbackInput + connect?: NoteWhereUniqueInput + } + + export type UserUpdateOneWithoutAiFeedbackNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutAiFeedbackInput + upsert?: UserUpsertWithoutAiFeedbackInput + disconnect?: UserWhereInput | boolean + delete?: UserWhereInput | boolean + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutAiFeedbackInput> + } + + export type NoteUpdateOneRequiredWithoutAiFeedbackNestedInput = { + create?: XOR + connectOrCreate?: NoteCreateOrConnectWithoutAiFeedbackInput + upsert?: NoteUpsertWithoutAiFeedbackInput + connect?: NoteWhereUniqueInput + update?: XOR, NoteUncheckedUpdateWithoutAiFeedbackInput> + } + + export type UserCreateNestedOneWithoutMemoryEchoInsightsInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutMemoryEchoInsightsInput + connect?: UserWhereUniqueInput + } + + export type NoteCreateNestedOneWithoutMemoryEchoAsNote2Input = { + create?: XOR + connectOrCreate?: NoteCreateOrConnectWithoutMemoryEchoAsNote2Input + connect?: NoteWhereUniqueInput + } + + export type NoteCreateNestedOneWithoutMemoryEchoAsNote1Input = { + create?: XOR + connectOrCreate?: NoteCreateOrConnectWithoutMemoryEchoAsNote1Input + connect?: NoteWhereUniqueInput + } + export type FloatFieldUpdateOperationsInput = { set?: number increment?: number @@ -16370,10 +20311,50 @@ export namespace Prisma { divide?: number } + export type UserUpdateOneWithoutMemoryEchoInsightsNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutMemoryEchoInsightsInput + upsert?: UserUpsertWithoutMemoryEchoInsightsInput + disconnect?: UserWhereInput | boolean + delete?: UserWhereInput | boolean + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutMemoryEchoInsightsInput> + } + + export type NoteUpdateOneRequiredWithoutMemoryEchoAsNote2NestedInput = { + create?: XOR + connectOrCreate?: NoteCreateOrConnectWithoutMemoryEchoAsNote2Input + upsert?: NoteUpsertWithoutMemoryEchoAsNote2Input + connect?: NoteWhereUniqueInput + update?: XOR, NoteUncheckedUpdateWithoutMemoryEchoAsNote2Input> + } + + export type NoteUpdateOneRequiredWithoutMemoryEchoAsNote1NestedInput = { + create?: XOR + connectOrCreate?: NoteCreateOrConnectWithoutMemoryEchoAsNote1Input + upsert?: NoteUpsertWithoutMemoryEchoAsNote1Input + connect?: NoteWhereUniqueInput + update?: XOR, NoteUncheckedUpdateWithoutMemoryEchoAsNote1Input> + } + + export type UserCreateNestedOneWithoutAiSettingsInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutAiSettingsInput + connect?: UserWhereUniqueInput + } + + export type UserUpdateOneRequiredWithoutAiSettingsNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutAiSettingsInput + upsert?: UserUpsertWithoutAiSettingsInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutAiSettingsInput> + } + export type NestedStringFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] - notIn?: string[] + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> @@ -16386,8 +20367,8 @@ export namespace Prisma { export type NestedStringNullableFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> | null - in?: string[] | null - notIn?: string[] | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> @@ -16398,15 +20379,10 @@ export namespace Prisma { not?: NestedStringNullableFilter<$PrismaModel> | string | null } - export type NestedBoolFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> - not?: NestedBoolFilter<$PrismaModel> | boolean - } - export type NestedDateTimeNullableFilter<$PrismaModel = never> = { equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | null - notIn?: Date[] | string[] | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> @@ -16414,21 +20390,10 @@ export namespace Prisma { not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null } - export type NestedIntFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntFilter<$PrismaModel> | number - } - export type NestedDateTimeFilter<$PrismaModel = never> = { equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] - notIn?: Date[] | string[] + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> @@ -16436,37 +20401,10 @@ export namespace Prisma { not?: NestedDateTimeFilter<$PrismaModel> | Date | string } - export type NestedBoolNullableFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> | null - not?: NestedBoolNullableFilter<$PrismaModel> | boolean | null - } - - export type NestedIntNullableFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntNullableFilter<$PrismaModel> | number | null - } - - export type NestedFloatNullableFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatNullableFilter<$PrismaModel> | number | null - } - export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] - notIn?: string[] + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> @@ -16480,10 +20418,21 @@ export namespace Prisma { _max?: NestedStringFilter<$PrismaModel> } + export type NestedIntFilter<$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 NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> | null - in?: string[] | null - notIn?: string[] | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> @@ -16497,18 +20446,21 @@ export namespace Prisma { _max?: NestedStringNullableFilter<$PrismaModel> } - export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> - not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedBoolFilter<$PrismaModel> - _max?: NestedBoolFilter<$PrismaModel> + export type NestedIntNullableFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableFilter<$PrismaModel> | number | null } export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | null - notIn?: Date[] | string[] | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> @@ -16519,10 +20471,24 @@ export namespace Prisma { _max?: NestedDateTimeNullableFilter<$PrismaModel> } + export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedDateTimeFilter<$PrismaModel> + _max?: NestedDateTimeFilter<$PrismaModel> + } + export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> @@ -16537,8 +20503,8 @@ export namespace Prisma { export type NestedFloatFilter<$PrismaModel = never> = { equals?: number | FloatFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] + in?: number[] | ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> lt?: number | FloatFieldRefInput<$PrismaModel> lte?: number | FloatFieldRefInput<$PrismaModel> gt?: number | FloatFieldRefInput<$PrismaModel> @@ -16546,18 +20512,33 @@ export namespace Prisma { not?: NestedFloatFilter<$PrismaModel> | number } - export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] - notIn?: Date[] | string[] - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + export type NestedBoolFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolFilter<$PrismaModel> | boolean + } + + export type NestedBoolNullableFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> | null + not?: NestedBoolNullableFilter<$PrismaModel> | boolean | null + } + + export type NestedFloatNullableFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> | null + in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatNullableFilter<$PrismaModel> | number | null + } + + export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean _count?: NestedIntFilter<$PrismaModel> - _min?: NestedDateTimeFilter<$PrismaModel> - _max?: NestedDateTimeFilter<$PrismaModel> + _min?: NestedBoolFilter<$PrismaModel> + _max?: NestedBoolFilter<$PrismaModel> } export type NestedBoolNullableWithAggregatesFilter<$PrismaModel = never> = { @@ -16570,8 +20551,8 @@ export namespace Prisma { export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> @@ -16586,8 +20567,8 @@ export namespace Prisma { export type NestedFloatNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: number | FloatFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null + in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null lt?: number | FloatFieldRefInput<$PrismaModel> lte?: number | FloatFieldRefInput<$PrismaModel> gt?: number | FloatFieldRefInput<$PrismaModel> @@ -16602,8 +20583,8 @@ export namespace Prisma { export type NestedFloatWithAggregatesFilter<$PrismaModel = never> = { equals?: number | FloatFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] + in?: number[] | ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> lt?: number | FloatFieldRefInput<$PrismaModel> lte?: number | FloatFieldRefInput<$PrismaModel> gt?: number | FloatFieldRefInput<$PrismaModel> @@ -16616,15 +20597,4478 @@ export namespace Prisma { _max?: NestedFloatFilter<$PrismaModel> } + export type AccountCreateWithoutUserInput = { + type: string + provider: string + providerAccountId: string + refresh_token?: string | null + access_token?: string | null + expires_at?: number | null + token_type?: string | null + scope?: string | null + id_token?: string | null + session_state?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type AccountUncheckedCreateWithoutUserInput = { + type: string + provider: string + providerAccountId: string + refresh_token?: string | null + access_token?: string | null + expires_at?: number | null + token_type?: string | null + scope?: string | null + id_token?: string | null + session_state?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type AccountCreateOrConnectWithoutUserInput = { + where: AccountWhereUniqueInput + create: XOR + } + + export type AccountCreateManyUserInputEnvelope = { + data: AccountCreateManyUserInput | AccountCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type AiFeedbackCreateWithoutUserInput = { + id?: string + feedbackType: string + feature: string + originalContent: string + correctedContent?: string | null + metadata?: string | null + createdAt?: Date | string + note: NoteCreateNestedOneWithoutAiFeedbackInput + } + + export type AiFeedbackUncheckedCreateWithoutUserInput = { + id?: string + noteId: string + feedbackType: string + feature: string + originalContent: string + correctedContent?: string | null + metadata?: string | null + createdAt?: Date | string + } + + export type AiFeedbackCreateOrConnectWithoutUserInput = { + where: AiFeedbackWhereUniqueInput + create: XOR + } + + export type AiFeedbackCreateManyUserInputEnvelope = { + data: AiFeedbackCreateManyUserInput | AiFeedbackCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type LabelCreateWithoutUserInput = { + id?: string + name: string + color?: string + createdAt?: Date | string + updatedAt?: Date | string + notebook?: NotebookCreateNestedOneWithoutLabelsInput + notes?: NoteCreateNestedManyWithoutLabelRelationsInput + } + + export type LabelUncheckedCreateWithoutUserInput = { + id?: string + name: string + color?: string + notebookId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + notes?: NoteUncheckedCreateNestedManyWithoutLabelRelationsInput + } + + export type LabelCreateOrConnectWithoutUserInput = { + where: LabelWhereUniqueInput + create: XOR + } + + export type LabelCreateManyUserInputEnvelope = { + data: LabelCreateManyUserInput | LabelCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type MemoryEchoInsightCreateWithoutUserInput = { + id?: string + similarityScore: number + insight: string + insightDate?: Date | string + viewed?: boolean + feedback?: string | null + dismissed?: boolean + note2: NoteCreateNestedOneWithoutMemoryEchoAsNote2Input + note1: NoteCreateNestedOneWithoutMemoryEchoAsNote1Input + } + + export type MemoryEchoInsightUncheckedCreateWithoutUserInput = { + id?: string + note1Id: string + note2Id: string + similarityScore: number + insight: string + insightDate?: Date | string + viewed?: boolean + feedback?: string | null + dismissed?: boolean + } + + export type MemoryEchoInsightCreateOrConnectWithoutUserInput = { + where: MemoryEchoInsightWhereUniqueInput + create: XOR + } + + export type MemoryEchoInsightCreateManyUserInputEnvelope = { + data: MemoryEchoInsightCreateManyUserInput | MemoryEchoInsightCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type NoteCreateWithoutUserInput = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + order?: number + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + aiFeedback?: AiFeedbackCreateNestedManyWithoutNoteInput + memoryEchoAsNote2?: MemoryEchoInsightCreateNestedManyWithoutNote2Input + memoryEchoAsNote1?: MemoryEchoInsightCreateNestedManyWithoutNote1Input + notebook?: NotebookCreateNestedOneWithoutNotesInput + shares?: NoteShareCreateNestedManyWithoutNoteInput + labelRelations?: LabelCreateNestedManyWithoutNotesInput + noteEmbedding?: NoteEmbeddingCreateNestedOneWithoutNoteInput + } + + export type NoteUncheckedCreateWithoutUserInput = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + order?: number + notebookId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutNoteInput + memoryEchoAsNote2?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote2Input + memoryEchoAsNote1?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote1Input + shares?: NoteShareUncheckedCreateNestedManyWithoutNoteInput + labelRelations?: LabelUncheckedCreateNestedManyWithoutNotesInput + noteEmbedding?: NoteEmbeddingUncheckedCreateNestedOneWithoutNoteInput + } + + export type NoteCreateOrConnectWithoutUserInput = { + where: NoteWhereUniqueInput + create: XOR + } + + export type NoteCreateManyUserInputEnvelope = { + data: NoteCreateManyUserInput | NoteCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type NoteShareCreateWithoutSharerInput = { + id?: string + status?: string + permission?: string + notifiedAt?: Date | string | null + respondedAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + user: UserCreateNestedOneWithoutReceivedSharesInput + note: NoteCreateNestedOneWithoutSharesInput + } + + export type NoteShareUncheckedCreateWithoutSharerInput = { + id?: string + noteId: string + userId: string + status?: string + permission?: string + notifiedAt?: Date | string | null + respondedAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type NoteShareCreateOrConnectWithoutSharerInput = { + where: NoteShareWhereUniqueInput + create: XOR + } + + export type NoteShareCreateManySharerInputEnvelope = { + data: NoteShareCreateManySharerInput | NoteShareCreateManySharerInput[] + skipDuplicates?: boolean + } + + export type NoteShareCreateWithoutUserInput = { + id?: string + status?: string + permission?: string + notifiedAt?: Date | string | null + respondedAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + sharer: UserCreateNestedOneWithoutSentSharesInput + note: NoteCreateNestedOneWithoutSharesInput + } + + export type NoteShareUncheckedCreateWithoutUserInput = { + id?: string + noteId: string + sharedBy: string + status?: string + permission?: string + notifiedAt?: Date | string | null + respondedAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type NoteShareCreateOrConnectWithoutUserInput = { + where: NoteShareWhereUniqueInput + create: XOR + } + + export type NoteShareCreateManyUserInputEnvelope = { + data: NoteShareCreateManyUserInput | NoteShareCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type NotebookCreateWithoutUserInput = { + id?: string + name: string + icon?: string | null + color?: string | null + order: number + createdAt?: Date | string + updatedAt?: Date | string + labels?: LabelCreateNestedManyWithoutNotebookInput + notes?: NoteCreateNestedManyWithoutNotebookInput + } + + export type NotebookUncheckedCreateWithoutUserInput = { + id?: string + name: string + icon?: string | null + color?: string | null + order: number + createdAt?: Date | string + updatedAt?: Date | string + labels?: LabelUncheckedCreateNestedManyWithoutNotebookInput + notes?: NoteUncheckedCreateNestedManyWithoutNotebookInput + } + + export type NotebookCreateOrConnectWithoutUserInput = { + where: NotebookWhereUniqueInput + create: XOR + } + + export type NotebookCreateManyUserInputEnvelope = { + data: NotebookCreateManyUserInput | NotebookCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type SessionCreateWithoutUserInput = { + sessionToken: string + expires: Date | string + createdAt?: Date | string + updatedAt?: Date | string + } + + export type SessionUncheckedCreateWithoutUserInput = { + sessionToken: string + expires: Date | string + createdAt?: Date | string + updatedAt?: Date | string + } + + export type SessionCreateOrConnectWithoutUserInput = { + where: SessionWhereUniqueInput + create: XOR + } + + export type SessionCreateManyUserInputEnvelope = { + data: SessionCreateManyUserInput | SessionCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type UserAISettingsCreateWithoutUserInput = { + titleSuggestions?: boolean + semanticSearch?: boolean + paragraphRefactor?: boolean + memoryEcho?: boolean + memoryEchoFrequency?: string + aiProvider?: string + preferredLanguage?: string + fontSize?: string + demoMode?: boolean + showRecentNotes?: boolean + notesViewMode?: string + emailNotifications?: boolean + desktopNotifications?: boolean + anonymousAnalytics?: boolean + } + + export type UserAISettingsUncheckedCreateWithoutUserInput = { + titleSuggestions?: boolean + semanticSearch?: boolean + paragraphRefactor?: boolean + memoryEcho?: boolean + memoryEchoFrequency?: string + aiProvider?: string + preferredLanguage?: string + fontSize?: string + demoMode?: boolean + showRecentNotes?: boolean + notesViewMode?: string + emailNotifications?: boolean + desktopNotifications?: boolean + anonymousAnalytics?: boolean + } + + export type UserAISettingsCreateOrConnectWithoutUserInput = { + where: UserAISettingsWhereUniqueInput + create: XOR + } + + export type AccountUpsertWithWhereUniqueWithoutUserInput = { + where: AccountWhereUniqueInput + update: XOR + create: XOR + } + + export type AccountUpdateWithWhereUniqueWithoutUserInput = { + where: AccountWhereUniqueInput + data: XOR + } + + export type AccountUpdateManyWithWhereWithoutUserInput = { + where: AccountScalarWhereInput + data: XOR + } + + export type AccountScalarWhereInput = { + AND?: AccountScalarWhereInput | AccountScalarWhereInput[] + OR?: AccountScalarWhereInput[] + NOT?: AccountScalarWhereInput | AccountScalarWhereInput[] + userId?: StringFilter<"Account"> | string + type?: StringFilter<"Account"> | string + provider?: StringFilter<"Account"> | string + providerAccountId?: StringFilter<"Account"> | string + refresh_token?: StringNullableFilter<"Account"> | string | null + access_token?: StringNullableFilter<"Account"> | string | null + expires_at?: IntNullableFilter<"Account"> | number | null + token_type?: StringNullableFilter<"Account"> | string | null + scope?: StringNullableFilter<"Account"> | string | null + id_token?: StringNullableFilter<"Account"> | string | null + session_state?: StringNullableFilter<"Account"> | string | null + createdAt?: DateTimeFilter<"Account"> | Date | string + updatedAt?: DateTimeFilter<"Account"> | Date | string + } + + export type AiFeedbackUpsertWithWhereUniqueWithoutUserInput = { + where: AiFeedbackWhereUniqueInput + update: XOR + create: XOR + } + + export type AiFeedbackUpdateWithWhereUniqueWithoutUserInput = { + where: AiFeedbackWhereUniqueInput + data: XOR + } + + export type AiFeedbackUpdateManyWithWhereWithoutUserInput = { + where: AiFeedbackScalarWhereInput + data: XOR + } + + export type AiFeedbackScalarWhereInput = { + AND?: AiFeedbackScalarWhereInput | AiFeedbackScalarWhereInput[] + OR?: AiFeedbackScalarWhereInput[] + NOT?: AiFeedbackScalarWhereInput | AiFeedbackScalarWhereInput[] + id?: StringFilter<"AiFeedback"> | string + noteId?: StringFilter<"AiFeedback"> | string + userId?: StringNullableFilter<"AiFeedback"> | string | null + feedbackType?: StringFilter<"AiFeedback"> | string + feature?: StringFilter<"AiFeedback"> | string + originalContent?: StringFilter<"AiFeedback"> | string + correctedContent?: StringNullableFilter<"AiFeedback"> | string | null + metadata?: StringNullableFilter<"AiFeedback"> | string | null + createdAt?: DateTimeFilter<"AiFeedback"> | Date | string + } + + export type LabelUpsertWithWhereUniqueWithoutUserInput = { + where: LabelWhereUniqueInput + update: XOR + create: XOR + } + + export type LabelUpdateWithWhereUniqueWithoutUserInput = { + where: LabelWhereUniqueInput + data: XOR + } + + export type LabelUpdateManyWithWhereWithoutUserInput = { + where: LabelScalarWhereInput + data: XOR + } + + export type LabelScalarWhereInput = { + AND?: LabelScalarWhereInput | LabelScalarWhereInput[] + OR?: LabelScalarWhereInput[] + NOT?: LabelScalarWhereInput | LabelScalarWhereInput[] + id?: StringFilter<"Label"> | string + name?: StringFilter<"Label"> | string + color?: StringFilter<"Label"> | string + notebookId?: StringNullableFilter<"Label"> | string | null + userId?: StringNullableFilter<"Label"> | string | null + createdAt?: DateTimeFilter<"Label"> | Date | string + updatedAt?: DateTimeFilter<"Label"> | Date | string + } + + export type MemoryEchoInsightUpsertWithWhereUniqueWithoutUserInput = { + where: MemoryEchoInsightWhereUniqueInput + update: XOR + create: XOR + } + + export type MemoryEchoInsightUpdateWithWhereUniqueWithoutUserInput = { + where: MemoryEchoInsightWhereUniqueInput + data: XOR + } + + export type MemoryEchoInsightUpdateManyWithWhereWithoutUserInput = { + where: MemoryEchoInsightScalarWhereInput + data: XOR + } + + export type MemoryEchoInsightScalarWhereInput = { + AND?: MemoryEchoInsightScalarWhereInput | MemoryEchoInsightScalarWhereInput[] + OR?: MemoryEchoInsightScalarWhereInput[] + NOT?: MemoryEchoInsightScalarWhereInput | MemoryEchoInsightScalarWhereInput[] + id?: StringFilter<"MemoryEchoInsight"> | string + userId?: StringNullableFilter<"MemoryEchoInsight"> | string | null + note1Id?: StringFilter<"MemoryEchoInsight"> | string + note2Id?: StringFilter<"MemoryEchoInsight"> | string + similarityScore?: FloatFilter<"MemoryEchoInsight"> | number + insight?: StringFilter<"MemoryEchoInsight"> | string + insightDate?: DateTimeFilter<"MemoryEchoInsight"> | Date | string + viewed?: BoolFilter<"MemoryEchoInsight"> | boolean + feedback?: StringNullableFilter<"MemoryEchoInsight"> | string | null + dismissed?: BoolFilter<"MemoryEchoInsight"> | boolean + } + + export type NoteUpsertWithWhereUniqueWithoutUserInput = { + where: NoteWhereUniqueInput + update: XOR + create: XOR + } + + export type NoteUpdateWithWhereUniqueWithoutUserInput = { + where: NoteWhereUniqueInput + data: XOR + } + + export type NoteUpdateManyWithWhereWithoutUserInput = { + where: NoteScalarWhereInput + data: XOR + } + + export type NoteScalarWhereInput = { + AND?: NoteScalarWhereInput | NoteScalarWhereInput[] + OR?: NoteScalarWhereInput[] + NOT?: NoteScalarWhereInput | NoteScalarWhereInput[] + id?: StringFilter<"Note"> | string + title?: StringNullableFilter<"Note"> | string | null + content?: StringFilter<"Note"> | string + color?: StringFilter<"Note"> | string + isPinned?: BoolFilter<"Note"> | boolean + isArchived?: BoolFilter<"Note"> | boolean + trashedAt?: DateTimeNullableFilter<"Note"> | Date | string | null + type?: StringFilter<"Note"> | string + dismissedFromRecent?: BoolFilter<"Note"> | boolean + checkItems?: StringNullableFilter<"Note"> | string | null + labels?: StringNullableFilter<"Note"> | string | null + images?: StringNullableFilter<"Note"> | string | null + links?: StringNullableFilter<"Note"> | string | null + reminder?: DateTimeNullableFilter<"Note"> | Date | string | null + isReminderDone?: BoolFilter<"Note"> | boolean + reminderRecurrence?: StringNullableFilter<"Note"> | string | null + reminderLocation?: StringNullableFilter<"Note"> | string | null + isMarkdown?: BoolFilter<"Note"> | boolean + size?: StringFilter<"Note"> | string + sharedWith?: StringNullableFilter<"Note"> | string | null + userId?: StringNullableFilter<"Note"> | string | null + order?: IntFilter<"Note"> | number + notebookId?: StringNullableFilter<"Note"> | string | null + createdAt?: DateTimeFilter<"Note"> | Date | string + updatedAt?: DateTimeFilter<"Note"> | Date | string + contentUpdatedAt?: DateTimeFilter<"Note"> | Date | string + autoGenerated?: BoolNullableFilter<"Note"> | boolean | null + aiProvider?: StringNullableFilter<"Note"> | string | null + aiConfidence?: IntNullableFilter<"Note"> | number | null + language?: StringNullableFilter<"Note"> | string | null + languageConfidence?: FloatNullableFilter<"Note"> | number | null + lastAiAnalysis?: DateTimeNullableFilter<"Note"> | Date | string | null + } + + export type NoteShareUpsertWithWhereUniqueWithoutSharerInput = { + where: NoteShareWhereUniqueInput + update: XOR + create: XOR + } + + export type NoteShareUpdateWithWhereUniqueWithoutSharerInput = { + where: NoteShareWhereUniqueInput + data: XOR + } + + export type NoteShareUpdateManyWithWhereWithoutSharerInput = { + where: NoteShareScalarWhereInput + data: XOR + } + + export type NoteShareScalarWhereInput = { + AND?: NoteShareScalarWhereInput | NoteShareScalarWhereInput[] + OR?: NoteShareScalarWhereInput[] + NOT?: NoteShareScalarWhereInput | NoteShareScalarWhereInput[] + id?: StringFilter<"NoteShare"> | string + noteId?: StringFilter<"NoteShare"> | string + userId?: StringFilter<"NoteShare"> | string + sharedBy?: StringFilter<"NoteShare"> | string + status?: StringFilter<"NoteShare"> | string + permission?: StringFilter<"NoteShare"> | string + notifiedAt?: DateTimeNullableFilter<"NoteShare"> | Date | string | null + respondedAt?: DateTimeNullableFilter<"NoteShare"> | Date | string | null + createdAt?: DateTimeFilter<"NoteShare"> | Date | string + updatedAt?: DateTimeFilter<"NoteShare"> | Date | string + } + + export type NoteShareUpsertWithWhereUniqueWithoutUserInput = { + where: NoteShareWhereUniqueInput + update: XOR + create: XOR + } + + export type NoteShareUpdateWithWhereUniqueWithoutUserInput = { + where: NoteShareWhereUniqueInput + data: XOR + } + + export type NoteShareUpdateManyWithWhereWithoutUserInput = { + where: NoteShareScalarWhereInput + data: XOR + } + + export type NotebookUpsertWithWhereUniqueWithoutUserInput = { + where: NotebookWhereUniqueInput + update: XOR + create: XOR + } + + export type NotebookUpdateWithWhereUniqueWithoutUserInput = { + where: NotebookWhereUniqueInput + data: XOR + } + + export type NotebookUpdateManyWithWhereWithoutUserInput = { + where: NotebookScalarWhereInput + data: XOR + } + + export type NotebookScalarWhereInput = { + AND?: NotebookScalarWhereInput | NotebookScalarWhereInput[] + OR?: NotebookScalarWhereInput[] + NOT?: NotebookScalarWhereInput | NotebookScalarWhereInput[] + id?: StringFilter<"Notebook"> | string + name?: StringFilter<"Notebook"> | string + icon?: StringNullableFilter<"Notebook"> | string | null + color?: StringNullableFilter<"Notebook"> | string | null + order?: IntFilter<"Notebook"> | number + userId?: StringFilter<"Notebook"> | string + createdAt?: DateTimeFilter<"Notebook"> | Date | string + updatedAt?: DateTimeFilter<"Notebook"> | Date | string + } + + export type SessionUpsertWithWhereUniqueWithoutUserInput = { + where: SessionWhereUniqueInput + update: XOR + create: XOR + } + + export type SessionUpdateWithWhereUniqueWithoutUserInput = { + where: SessionWhereUniqueInput + data: XOR + } + + export type SessionUpdateManyWithWhereWithoutUserInput = { + where: SessionScalarWhereInput + data: XOR + } + + export type SessionScalarWhereInput = { + AND?: SessionScalarWhereInput | SessionScalarWhereInput[] + OR?: SessionScalarWhereInput[] + NOT?: SessionScalarWhereInput | SessionScalarWhereInput[] + sessionToken?: StringFilter<"Session"> | string + userId?: StringFilter<"Session"> | string + expires?: DateTimeFilter<"Session"> | Date | string + createdAt?: DateTimeFilter<"Session"> | Date | string + updatedAt?: DateTimeFilter<"Session"> | Date | string + } + + export type UserAISettingsUpsertWithoutUserInput = { + update: XOR + create: XOR + where?: UserAISettingsWhereInput + } + + export type UserAISettingsUpdateToOneWithWhereWithoutUserInput = { + where?: UserAISettingsWhereInput + data: XOR + } + + export type UserAISettingsUpdateWithoutUserInput = { + titleSuggestions?: BoolFieldUpdateOperationsInput | boolean + semanticSearch?: BoolFieldUpdateOperationsInput | boolean + paragraphRefactor?: BoolFieldUpdateOperationsInput | boolean + memoryEcho?: BoolFieldUpdateOperationsInput | boolean + memoryEchoFrequency?: StringFieldUpdateOperationsInput | string + aiProvider?: StringFieldUpdateOperationsInput | string + preferredLanguage?: StringFieldUpdateOperationsInput | string + fontSize?: StringFieldUpdateOperationsInput | string + demoMode?: BoolFieldUpdateOperationsInput | boolean + showRecentNotes?: BoolFieldUpdateOperationsInput | boolean + notesViewMode?: StringFieldUpdateOperationsInput | string + emailNotifications?: BoolFieldUpdateOperationsInput | boolean + desktopNotifications?: BoolFieldUpdateOperationsInput | boolean + anonymousAnalytics?: BoolFieldUpdateOperationsInput | boolean + } + + export type UserAISettingsUncheckedUpdateWithoutUserInput = { + titleSuggestions?: BoolFieldUpdateOperationsInput | boolean + semanticSearch?: BoolFieldUpdateOperationsInput | boolean + paragraphRefactor?: BoolFieldUpdateOperationsInput | boolean + memoryEcho?: BoolFieldUpdateOperationsInput | boolean + memoryEchoFrequency?: StringFieldUpdateOperationsInput | string + aiProvider?: StringFieldUpdateOperationsInput | string + preferredLanguage?: StringFieldUpdateOperationsInput | string + fontSize?: StringFieldUpdateOperationsInput | string + demoMode?: BoolFieldUpdateOperationsInput | boolean + showRecentNotes?: BoolFieldUpdateOperationsInput | boolean + notesViewMode?: StringFieldUpdateOperationsInput | string + emailNotifications?: BoolFieldUpdateOperationsInput | boolean + desktopNotifications?: BoolFieldUpdateOperationsInput | boolean + anonymousAnalytics?: BoolFieldUpdateOperationsInput | boolean + } + + export type LabelCreateWithoutNotebookInput = { + id?: string + name: string + color?: string + createdAt?: Date | string + updatedAt?: Date | string + user?: UserCreateNestedOneWithoutLabelsInput + notes?: NoteCreateNestedManyWithoutLabelRelationsInput + } + + export type LabelUncheckedCreateWithoutNotebookInput = { + id?: string + name: string + color?: string + userId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + notes?: NoteUncheckedCreateNestedManyWithoutLabelRelationsInput + } + + export type LabelCreateOrConnectWithoutNotebookInput = { + where: LabelWhereUniqueInput + create: XOR + } + + export type LabelCreateManyNotebookInputEnvelope = { + data: LabelCreateManyNotebookInput | LabelCreateManyNotebookInput[] + skipDuplicates?: boolean + } + + export type NoteCreateWithoutNotebookInput = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + order?: number + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + aiFeedback?: AiFeedbackCreateNestedManyWithoutNoteInput + memoryEchoAsNote2?: MemoryEchoInsightCreateNestedManyWithoutNote2Input + memoryEchoAsNote1?: MemoryEchoInsightCreateNestedManyWithoutNote1Input + user?: UserCreateNestedOneWithoutNotesInput + shares?: NoteShareCreateNestedManyWithoutNoteInput + labelRelations?: LabelCreateNestedManyWithoutNotesInput + noteEmbedding?: NoteEmbeddingCreateNestedOneWithoutNoteInput + } + + export type NoteUncheckedCreateWithoutNotebookInput = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + userId?: string | null + order?: number + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutNoteInput + memoryEchoAsNote2?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote2Input + memoryEchoAsNote1?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote1Input + shares?: NoteShareUncheckedCreateNestedManyWithoutNoteInput + labelRelations?: LabelUncheckedCreateNestedManyWithoutNotesInput + noteEmbedding?: NoteEmbeddingUncheckedCreateNestedOneWithoutNoteInput + } + + export type NoteCreateOrConnectWithoutNotebookInput = { + where: NoteWhereUniqueInput + create: XOR + } + + export type NoteCreateManyNotebookInputEnvelope = { + data: NoteCreateManyNotebookInput | NoteCreateManyNotebookInput[] + skipDuplicates?: boolean + } + + export type UserCreateWithoutNotebooksInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput + labels?: LabelCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput + notes?: NoteCreateNestedManyWithoutUserInput + sentShares?: NoteShareCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareCreateNestedManyWithoutUserInput + sessions?: SessionCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput + } + + export type UserUncheckedCreateWithoutNotebooksInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountUncheckedCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput + labels?: LabelUncheckedCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput + notes?: NoteUncheckedCreateNestedManyWithoutUserInput + sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput + sessions?: SessionUncheckedCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput + } + + export type UserCreateOrConnectWithoutNotebooksInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type LabelUpsertWithWhereUniqueWithoutNotebookInput = { + where: LabelWhereUniqueInput + update: XOR + create: XOR + } + + export type LabelUpdateWithWhereUniqueWithoutNotebookInput = { + where: LabelWhereUniqueInput + data: XOR + } + + export type LabelUpdateManyWithWhereWithoutNotebookInput = { + where: LabelScalarWhereInput + data: XOR + } + + export type NoteUpsertWithWhereUniqueWithoutNotebookInput = { + where: NoteWhereUniqueInput + update: XOR + create: XOR + } + + export type NoteUpdateWithWhereUniqueWithoutNotebookInput = { + where: NoteWhereUniqueInput + data: XOR + } + + export type NoteUpdateManyWithWhereWithoutNotebookInput = { + where: NoteScalarWhereInput + data: XOR + } + + export type UserUpsertWithoutNotebooksInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutNotebooksInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutNotebooksInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput + labels?: LabelUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput + notes?: NoteUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUpdateManyWithoutUserNestedInput + sessions?: SessionUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutNotebooksInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput + labels?: LabelUncheckedUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput + notes?: NoteUncheckedUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput + sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput + } + + export type UserCreateWithoutLabelsInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput + notes?: NoteCreateNestedManyWithoutUserInput + sentShares?: NoteShareCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareCreateNestedManyWithoutUserInput + notebooks?: NotebookCreateNestedManyWithoutUserInput + sessions?: SessionCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput + } + + export type UserUncheckedCreateWithoutLabelsInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountUncheckedCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput + notes?: NoteUncheckedCreateNestedManyWithoutUserInput + sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput + notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput + sessions?: SessionUncheckedCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput + } + + export type UserCreateOrConnectWithoutLabelsInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type NotebookCreateWithoutLabelsInput = { + id?: string + name: string + icon?: string | null + color?: string | null + order: number + createdAt?: Date | string + updatedAt?: Date | string + notes?: NoteCreateNestedManyWithoutNotebookInput + user: UserCreateNestedOneWithoutNotebooksInput + } + + export type NotebookUncheckedCreateWithoutLabelsInput = { + id?: string + name: string + icon?: string | null + color?: string | null + order: number + userId: string + createdAt?: Date | string + updatedAt?: Date | string + notes?: NoteUncheckedCreateNestedManyWithoutNotebookInput + } + + export type NotebookCreateOrConnectWithoutLabelsInput = { + where: NotebookWhereUniqueInput + create: XOR + } + + export type NoteCreateWithoutLabelRelationsInput = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + order?: number + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + aiFeedback?: AiFeedbackCreateNestedManyWithoutNoteInput + memoryEchoAsNote2?: MemoryEchoInsightCreateNestedManyWithoutNote2Input + memoryEchoAsNote1?: MemoryEchoInsightCreateNestedManyWithoutNote1Input + notebook?: NotebookCreateNestedOneWithoutNotesInput + user?: UserCreateNestedOneWithoutNotesInput + shares?: NoteShareCreateNestedManyWithoutNoteInput + noteEmbedding?: NoteEmbeddingCreateNestedOneWithoutNoteInput + } + + export type NoteUncheckedCreateWithoutLabelRelationsInput = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + userId?: string | null + order?: number + notebookId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutNoteInput + memoryEchoAsNote2?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote2Input + memoryEchoAsNote1?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote1Input + shares?: NoteShareUncheckedCreateNestedManyWithoutNoteInput + noteEmbedding?: NoteEmbeddingUncheckedCreateNestedOneWithoutNoteInput + } + + export type NoteCreateOrConnectWithoutLabelRelationsInput = { + where: NoteWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutLabelsInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutLabelsInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutLabelsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput + notes?: NoteUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUpdateManyWithoutUserNestedInput + notebooks?: NotebookUpdateManyWithoutUserNestedInput + sessions?: SessionUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutLabelsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput + notes?: NoteUncheckedUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput + notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput + sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput + } + + export type NotebookUpsertWithoutLabelsInput = { + update: XOR + create: XOR + where?: NotebookWhereInput + } + + export type NotebookUpdateToOneWithWhereWithoutLabelsInput = { + where?: NotebookWhereInput + data: XOR + } + + export type NotebookUpdateWithoutLabelsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + icon?: NullableStringFieldUpdateOperationsInput | string | null + color?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + notes?: NoteUpdateManyWithoutNotebookNestedInput + user?: UserUpdateOneRequiredWithoutNotebooksNestedInput + } + + export type NotebookUncheckedUpdateWithoutLabelsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + icon?: NullableStringFieldUpdateOperationsInput | string | null + color?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + userId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + notes?: NoteUncheckedUpdateManyWithoutNotebookNestedInput + } + + export type NoteUpsertWithWhereUniqueWithoutLabelRelationsInput = { + where: NoteWhereUniqueInput + update: XOR + create: XOR + } + + export type NoteUpdateWithWhereUniqueWithoutLabelRelationsInput = { + where: NoteWhereUniqueInput + data: XOR + } + + export type NoteUpdateManyWithWhereWithoutLabelRelationsInput = { + where: NoteScalarWhereInput + data: XOR + } + + export type AiFeedbackCreateWithoutNoteInput = { + id?: string + feedbackType: string + feature: string + originalContent: string + correctedContent?: string | null + metadata?: string | null + createdAt?: Date | string + user?: UserCreateNestedOneWithoutAiFeedbackInput + } + + export type AiFeedbackUncheckedCreateWithoutNoteInput = { + id?: string + userId?: string | null + feedbackType: string + feature: string + originalContent: string + correctedContent?: string | null + metadata?: string | null + createdAt?: Date | string + } + + export type AiFeedbackCreateOrConnectWithoutNoteInput = { + where: AiFeedbackWhereUniqueInput + create: XOR + } + + export type AiFeedbackCreateManyNoteInputEnvelope = { + data: AiFeedbackCreateManyNoteInput | AiFeedbackCreateManyNoteInput[] + skipDuplicates?: boolean + } + + export type MemoryEchoInsightCreateWithoutNote2Input = { + id?: string + similarityScore: number + insight: string + insightDate?: Date | string + viewed?: boolean + feedback?: string | null + dismissed?: boolean + user?: UserCreateNestedOneWithoutMemoryEchoInsightsInput + note1: NoteCreateNestedOneWithoutMemoryEchoAsNote1Input + } + + export type MemoryEchoInsightUncheckedCreateWithoutNote2Input = { + id?: string + userId?: string | null + note1Id: string + similarityScore: number + insight: string + insightDate?: Date | string + viewed?: boolean + feedback?: string | null + dismissed?: boolean + } + + export type MemoryEchoInsightCreateOrConnectWithoutNote2Input = { + where: MemoryEchoInsightWhereUniqueInput + create: XOR + } + + export type MemoryEchoInsightCreateManyNote2InputEnvelope = { + data: MemoryEchoInsightCreateManyNote2Input | MemoryEchoInsightCreateManyNote2Input[] + skipDuplicates?: boolean + } + + export type MemoryEchoInsightCreateWithoutNote1Input = { + id?: string + similarityScore: number + insight: string + insightDate?: Date | string + viewed?: boolean + feedback?: string | null + dismissed?: boolean + user?: UserCreateNestedOneWithoutMemoryEchoInsightsInput + note2: NoteCreateNestedOneWithoutMemoryEchoAsNote2Input + } + + export type MemoryEchoInsightUncheckedCreateWithoutNote1Input = { + id?: string + userId?: string | null + note2Id: string + similarityScore: number + insight: string + insightDate?: Date | string + viewed?: boolean + feedback?: string | null + dismissed?: boolean + } + + export type MemoryEchoInsightCreateOrConnectWithoutNote1Input = { + where: MemoryEchoInsightWhereUniqueInput + create: XOR + } + + export type MemoryEchoInsightCreateManyNote1InputEnvelope = { + data: MemoryEchoInsightCreateManyNote1Input | MemoryEchoInsightCreateManyNote1Input[] + skipDuplicates?: boolean + } + + export type NotebookCreateWithoutNotesInput = { + id?: string + name: string + icon?: string | null + color?: string | null + order: number + createdAt?: Date | string + updatedAt?: Date | string + labels?: LabelCreateNestedManyWithoutNotebookInput + user: UserCreateNestedOneWithoutNotebooksInput + } + + export type NotebookUncheckedCreateWithoutNotesInput = { + id?: string + name: string + icon?: string | null + color?: string | null + order: number + userId: string + createdAt?: Date | string + updatedAt?: Date | string + labels?: LabelUncheckedCreateNestedManyWithoutNotebookInput + } + + export type NotebookCreateOrConnectWithoutNotesInput = { + where: NotebookWhereUniqueInput + create: XOR + } + + export type UserCreateWithoutNotesInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput + labels?: LabelCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput + sentShares?: NoteShareCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareCreateNestedManyWithoutUserInput + notebooks?: NotebookCreateNestedManyWithoutUserInput + sessions?: SessionCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput + } + + export type UserUncheckedCreateWithoutNotesInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountUncheckedCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput + labels?: LabelUncheckedCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput + sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput + notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput + sessions?: SessionUncheckedCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput + } + + export type UserCreateOrConnectWithoutNotesInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type NoteShareCreateWithoutNoteInput = { + id?: string + status?: string + permission?: string + notifiedAt?: Date | string | null + respondedAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + sharer: UserCreateNestedOneWithoutSentSharesInput + user: UserCreateNestedOneWithoutReceivedSharesInput + } + + export type NoteShareUncheckedCreateWithoutNoteInput = { + id?: string + userId: string + sharedBy: string + status?: string + permission?: string + notifiedAt?: Date | string | null + respondedAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type NoteShareCreateOrConnectWithoutNoteInput = { + where: NoteShareWhereUniqueInput + create: XOR + } + + export type NoteShareCreateManyNoteInputEnvelope = { + data: NoteShareCreateManyNoteInput | NoteShareCreateManyNoteInput[] + skipDuplicates?: boolean + } + + export type LabelCreateWithoutNotesInput = { + id?: string + name: string + color?: string + createdAt?: Date | string + updatedAt?: Date | string + user?: UserCreateNestedOneWithoutLabelsInput + notebook?: NotebookCreateNestedOneWithoutLabelsInput + } + + export type LabelUncheckedCreateWithoutNotesInput = { + id?: string + name: string + color?: string + notebookId?: string | null + userId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type LabelCreateOrConnectWithoutNotesInput = { + where: LabelWhereUniqueInput + create: XOR + } + + export type NoteEmbeddingCreateWithoutNoteInput = { + id?: string + embedding: string + createdAt?: Date | string + } + + export type NoteEmbeddingUncheckedCreateWithoutNoteInput = { + id?: string + embedding: string + createdAt?: Date | string + } + + export type NoteEmbeddingCreateOrConnectWithoutNoteInput = { + where: NoteEmbeddingWhereUniqueInput + create: XOR + } + + export type AiFeedbackUpsertWithWhereUniqueWithoutNoteInput = { + where: AiFeedbackWhereUniqueInput + update: XOR + create: XOR + } + + export type AiFeedbackUpdateWithWhereUniqueWithoutNoteInput = { + where: AiFeedbackWhereUniqueInput + data: XOR + } + + export type AiFeedbackUpdateManyWithWhereWithoutNoteInput = { + where: AiFeedbackScalarWhereInput + data: XOR + } + + export type MemoryEchoInsightUpsertWithWhereUniqueWithoutNote2Input = { + where: MemoryEchoInsightWhereUniqueInput + update: XOR + create: XOR + } + + export type MemoryEchoInsightUpdateWithWhereUniqueWithoutNote2Input = { + where: MemoryEchoInsightWhereUniqueInput + data: XOR + } + + export type MemoryEchoInsightUpdateManyWithWhereWithoutNote2Input = { + where: MemoryEchoInsightScalarWhereInput + data: XOR + } + + export type MemoryEchoInsightUpsertWithWhereUniqueWithoutNote1Input = { + where: MemoryEchoInsightWhereUniqueInput + update: XOR + create: XOR + } + + export type MemoryEchoInsightUpdateWithWhereUniqueWithoutNote1Input = { + where: MemoryEchoInsightWhereUniqueInput + data: XOR + } + + export type MemoryEchoInsightUpdateManyWithWhereWithoutNote1Input = { + where: MemoryEchoInsightScalarWhereInput + data: XOR + } + + export type NotebookUpsertWithoutNotesInput = { + update: XOR + create: XOR + where?: NotebookWhereInput + } + + export type NotebookUpdateToOneWithWhereWithoutNotesInput = { + where?: NotebookWhereInput + data: XOR + } + + export type NotebookUpdateWithoutNotesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + icon?: NullableStringFieldUpdateOperationsInput | string | null + color?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + labels?: LabelUpdateManyWithoutNotebookNestedInput + user?: UserUpdateOneRequiredWithoutNotebooksNestedInput + } + + export type NotebookUncheckedUpdateWithoutNotesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + icon?: NullableStringFieldUpdateOperationsInput | string | null + color?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + userId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + labels?: LabelUncheckedUpdateManyWithoutNotebookNestedInput + } + + export type UserUpsertWithoutNotesInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutNotesInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutNotesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput + labels?: LabelUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUpdateManyWithoutUserNestedInput + notebooks?: NotebookUpdateManyWithoutUserNestedInput + sessions?: SessionUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutNotesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput + labels?: LabelUncheckedUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput + notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput + sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput + } + + export type NoteShareUpsertWithWhereUniqueWithoutNoteInput = { + where: NoteShareWhereUniqueInput + update: XOR + create: XOR + } + + export type NoteShareUpdateWithWhereUniqueWithoutNoteInput = { + where: NoteShareWhereUniqueInput + data: XOR + } + + export type NoteShareUpdateManyWithWhereWithoutNoteInput = { + where: NoteShareScalarWhereInput + data: XOR + } + + export type LabelUpsertWithWhereUniqueWithoutNotesInput = { + where: LabelWhereUniqueInput + update: XOR + create: XOR + } + + export type LabelUpdateWithWhereUniqueWithoutNotesInput = { + where: LabelWhereUniqueInput + data: XOR + } + + export type LabelUpdateManyWithWhereWithoutNotesInput = { + where: LabelScalarWhereInput + data: XOR + } + + export type NoteEmbeddingUpsertWithoutNoteInput = { + update: XOR + create: XOR + where?: NoteEmbeddingWhereInput + } + + export type NoteEmbeddingUpdateToOneWithWhereWithoutNoteInput = { + where?: NoteEmbeddingWhereInput + data: XOR + } + + export type NoteEmbeddingUpdateWithoutNoteInput = { + id?: StringFieldUpdateOperationsInput | string + embedding?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type NoteEmbeddingUncheckedUpdateWithoutNoteInput = { + id?: StringFieldUpdateOperationsInput | string + embedding?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type NoteCreateWithoutNoteEmbeddingInput = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + order?: number + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + aiFeedback?: AiFeedbackCreateNestedManyWithoutNoteInput + memoryEchoAsNote2?: MemoryEchoInsightCreateNestedManyWithoutNote2Input + memoryEchoAsNote1?: MemoryEchoInsightCreateNestedManyWithoutNote1Input + notebook?: NotebookCreateNestedOneWithoutNotesInput + user?: UserCreateNestedOneWithoutNotesInput + shares?: NoteShareCreateNestedManyWithoutNoteInput + labelRelations?: LabelCreateNestedManyWithoutNotesInput + } + + export type NoteUncheckedCreateWithoutNoteEmbeddingInput = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + userId?: string | null + order?: number + notebookId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutNoteInput + memoryEchoAsNote2?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote2Input + memoryEchoAsNote1?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote1Input + shares?: NoteShareUncheckedCreateNestedManyWithoutNoteInput + labelRelations?: LabelUncheckedCreateNestedManyWithoutNotesInput + } + + export type NoteCreateOrConnectWithoutNoteEmbeddingInput = { + where: NoteWhereUniqueInput + create: XOR + } + + export type NoteUpsertWithoutNoteEmbeddingInput = { + update: XOR + create: XOR + where?: NoteWhereInput + } + + export type NoteUpdateToOneWithWhereWithoutNoteEmbeddingInput = { + where?: NoteWhereInput + data: XOR + } + + export type NoteUpdateWithoutNoteEmbeddingInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + aiFeedback?: AiFeedbackUpdateManyWithoutNoteNestedInput + memoryEchoAsNote2?: MemoryEchoInsightUpdateManyWithoutNote2NestedInput + memoryEchoAsNote1?: MemoryEchoInsightUpdateManyWithoutNote1NestedInput + notebook?: NotebookUpdateOneWithoutNotesNestedInput + user?: UserUpdateOneWithoutNotesNestedInput + shares?: NoteShareUpdateManyWithoutNoteNestedInput + labelRelations?: LabelUpdateManyWithoutNotesNestedInput + } + + export type NoteUncheckedUpdateWithoutNoteEmbeddingInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + userId?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + notebookId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutNoteNestedInput + memoryEchoAsNote2?: MemoryEchoInsightUncheckedUpdateManyWithoutNote2NestedInput + memoryEchoAsNote1?: MemoryEchoInsightUncheckedUpdateManyWithoutNote1NestedInput + shares?: NoteShareUncheckedUpdateManyWithoutNoteNestedInput + labelRelations?: LabelUncheckedUpdateManyWithoutNotesNestedInput + } + + export type UserCreateWithoutSentSharesInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput + labels?: LabelCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput + notes?: NoteCreateNestedManyWithoutUserInput + receivedShares?: NoteShareCreateNestedManyWithoutUserInput + notebooks?: NotebookCreateNestedManyWithoutUserInput + sessions?: SessionCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput + } + + export type UserUncheckedCreateWithoutSentSharesInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountUncheckedCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput + labels?: LabelUncheckedCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput + notes?: NoteUncheckedCreateNestedManyWithoutUserInput + receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput + notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput + sessions?: SessionUncheckedCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput + } + + export type UserCreateOrConnectWithoutSentSharesInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type UserCreateWithoutReceivedSharesInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput + labels?: LabelCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput + notes?: NoteCreateNestedManyWithoutUserInput + sentShares?: NoteShareCreateNestedManyWithoutSharerInput + notebooks?: NotebookCreateNestedManyWithoutUserInput + sessions?: SessionCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput + } + + export type UserUncheckedCreateWithoutReceivedSharesInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountUncheckedCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput + labels?: LabelUncheckedCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput + notes?: NoteUncheckedCreateNestedManyWithoutUserInput + sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput + notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput + sessions?: SessionUncheckedCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput + } + + export type UserCreateOrConnectWithoutReceivedSharesInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type NoteCreateWithoutSharesInput = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + order?: number + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + aiFeedback?: AiFeedbackCreateNestedManyWithoutNoteInput + memoryEchoAsNote2?: MemoryEchoInsightCreateNestedManyWithoutNote2Input + memoryEchoAsNote1?: MemoryEchoInsightCreateNestedManyWithoutNote1Input + notebook?: NotebookCreateNestedOneWithoutNotesInput + user?: UserCreateNestedOneWithoutNotesInput + labelRelations?: LabelCreateNestedManyWithoutNotesInput + noteEmbedding?: NoteEmbeddingCreateNestedOneWithoutNoteInput + } + + export type NoteUncheckedCreateWithoutSharesInput = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + userId?: string | null + order?: number + notebookId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutNoteInput + memoryEchoAsNote2?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote2Input + memoryEchoAsNote1?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote1Input + labelRelations?: LabelUncheckedCreateNestedManyWithoutNotesInput + noteEmbedding?: NoteEmbeddingUncheckedCreateNestedOneWithoutNoteInput + } + + export type NoteCreateOrConnectWithoutSharesInput = { + where: NoteWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutSentSharesInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutSentSharesInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutSentSharesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput + labels?: LabelUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput + notes?: NoteUpdateManyWithoutUserNestedInput + receivedShares?: NoteShareUpdateManyWithoutUserNestedInput + notebooks?: NotebookUpdateManyWithoutUserNestedInput + sessions?: SessionUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutSentSharesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput + labels?: LabelUncheckedUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput + notes?: NoteUncheckedUpdateManyWithoutUserNestedInput + receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput + notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput + sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput + } + + export type UserUpsertWithoutReceivedSharesInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutReceivedSharesInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutReceivedSharesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput + labels?: LabelUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput + notes?: NoteUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUpdateManyWithoutSharerNestedInput + notebooks?: NotebookUpdateManyWithoutUserNestedInput + sessions?: SessionUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutReceivedSharesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput + labels?: LabelUncheckedUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput + notes?: NoteUncheckedUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput + notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput + sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput + } + + export type NoteUpsertWithoutSharesInput = { + update: XOR + create: XOR + where?: NoteWhereInput + } + + export type NoteUpdateToOneWithWhereWithoutSharesInput = { + where?: NoteWhereInput + data: XOR + } + + export type NoteUpdateWithoutSharesInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + aiFeedback?: AiFeedbackUpdateManyWithoutNoteNestedInput + memoryEchoAsNote2?: MemoryEchoInsightUpdateManyWithoutNote2NestedInput + memoryEchoAsNote1?: MemoryEchoInsightUpdateManyWithoutNote1NestedInput + notebook?: NotebookUpdateOneWithoutNotesNestedInput + user?: UserUpdateOneWithoutNotesNestedInput + labelRelations?: LabelUpdateManyWithoutNotesNestedInput + noteEmbedding?: NoteEmbeddingUpdateOneWithoutNoteNestedInput + } + + export type NoteUncheckedUpdateWithoutSharesInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + userId?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + notebookId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutNoteNestedInput + memoryEchoAsNote2?: MemoryEchoInsightUncheckedUpdateManyWithoutNote2NestedInput + memoryEchoAsNote1?: MemoryEchoInsightUncheckedUpdateManyWithoutNote1NestedInput + labelRelations?: LabelUncheckedUpdateManyWithoutNotesNestedInput + noteEmbedding?: NoteEmbeddingUncheckedUpdateOneWithoutNoteNestedInput + } + + export type UserCreateWithoutAccountsInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput + labels?: LabelCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput + notes?: NoteCreateNestedManyWithoutUserInput + sentShares?: NoteShareCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareCreateNestedManyWithoutUserInput + notebooks?: NotebookCreateNestedManyWithoutUserInput + sessions?: SessionCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput + } + + export type UserUncheckedCreateWithoutAccountsInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput + labels?: LabelUncheckedCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput + notes?: NoteUncheckedCreateNestedManyWithoutUserInput + sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput + notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput + sessions?: SessionUncheckedCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput + } + + export type UserCreateOrConnectWithoutAccountsInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutAccountsInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutAccountsInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutAccountsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput + labels?: LabelUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput + notes?: NoteUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUpdateManyWithoutUserNestedInput + notebooks?: NotebookUpdateManyWithoutUserNestedInput + sessions?: SessionUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutAccountsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput + labels?: LabelUncheckedUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput + notes?: NoteUncheckedUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput + notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput + sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput + } + + export type UserCreateWithoutSessionsInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput + labels?: LabelCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput + notes?: NoteCreateNestedManyWithoutUserInput + sentShares?: NoteShareCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareCreateNestedManyWithoutUserInput + notebooks?: NotebookCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput + } + + export type UserUncheckedCreateWithoutSessionsInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountUncheckedCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput + labels?: LabelUncheckedCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput + notes?: NoteUncheckedCreateNestedManyWithoutUserInput + sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput + notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput + } + + export type UserCreateOrConnectWithoutSessionsInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutSessionsInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutSessionsInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutSessionsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput + labels?: LabelUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput + notes?: NoteUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUpdateManyWithoutUserNestedInput + notebooks?: NotebookUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutSessionsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput + labels?: LabelUncheckedUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput + notes?: NoteUncheckedUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput + notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput + } + + export type UserCreateWithoutAiFeedbackInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountCreateNestedManyWithoutUserInput + labels?: LabelCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput + notes?: NoteCreateNestedManyWithoutUserInput + sentShares?: NoteShareCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareCreateNestedManyWithoutUserInput + notebooks?: NotebookCreateNestedManyWithoutUserInput + sessions?: SessionCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput + } + + export type UserUncheckedCreateWithoutAiFeedbackInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountUncheckedCreateNestedManyWithoutUserInput + labels?: LabelUncheckedCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput + notes?: NoteUncheckedCreateNestedManyWithoutUserInput + sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput + notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput + sessions?: SessionUncheckedCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput + } + + export type UserCreateOrConnectWithoutAiFeedbackInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type NoteCreateWithoutAiFeedbackInput = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + order?: number + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + memoryEchoAsNote2?: MemoryEchoInsightCreateNestedManyWithoutNote2Input + memoryEchoAsNote1?: MemoryEchoInsightCreateNestedManyWithoutNote1Input + notebook?: NotebookCreateNestedOneWithoutNotesInput + user?: UserCreateNestedOneWithoutNotesInput + shares?: NoteShareCreateNestedManyWithoutNoteInput + labelRelations?: LabelCreateNestedManyWithoutNotesInput + noteEmbedding?: NoteEmbeddingCreateNestedOneWithoutNoteInput + } + + export type NoteUncheckedCreateWithoutAiFeedbackInput = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + userId?: string | null + order?: number + notebookId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + memoryEchoAsNote2?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote2Input + memoryEchoAsNote1?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote1Input + shares?: NoteShareUncheckedCreateNestedManyWithoutNoteInput + labelRelations?: LabelUncheckedCreateNestedManyWithoutNotesInput + noteEmbedding?: NoteEmbeddingUncheckedCreateNestedOneWithoutNoteInput + } + + export type NoteCreateOrConnectWithoutAiFeedbackInput = { + where: NoteWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutAiFeedbackInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutAiFeedbackInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutAiFeedbackInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUpdateManyWithoutUserNestedInput + labels?: LabelUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput + notes?: NoteUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUpdateManyWithoutUserNestedInput + notebooks?: NotebookUpdateManyWithoutUserNestedInput + sessions?: SessionUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutAiFeedbackInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput + labels?: LabelUncheckedUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput + notes?: NoteUncheckedUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput + notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput + sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput + } + + export type NoteUpsertWithoutAiFeedbackInput = { + update: XOR + create: XOR + where?: NoteWhereInput + } + + export type NoteUpdateToOneWithWhereWithoutAiFeedbackInput = { + where?: NoteWhereInput + data: XOR + } + + export type NoteUpdateWithoutAiFeedbackInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + memoryEchoAsNote2?: MemoryEchoInsightUpdateManyWithoutNote2NestedInput + memoryEchoAsNote1?: MemoryEchoInsightUpdateManyWithoutNote1NestedInput + notebook?: NotebookUpdateOneWithoutNotesNestedInput + user?: UserUpdateOneWithoutNotesNestedInput + shares?: NoteShareUpdateManyWithoutNoteNestedInput + labelRelations?: LabelUpdateManyWithoutNotesNestedInput + noteEmbedding?: NoteEmbeddingUpdateOneWithoutNoteNestedInput + } + + export type NoteUncheckedUpdateWithoutAiFeedbackInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + userId?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + notebookId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + memoryEchoAsNote2?: MemoryEchoInsightUncheckedUpdateManyWithoutNote2NestedInput + memoryEchoAsNote1?: MemoryEchoInsightUncheckedUpdateManyWithoutNote1NestedInput + shares?: NoteShareUncheckedUpdateManyWithoutNoteNestedInput + labelRelations?: LabelUncheckedUpdateManyWithoutNotesNestedInput + noteEmbedding?: NoteEmbeddingUncheckedUpdateOneWithoutNoteNestedInput + } + + export type UserCreateWithoutMemoryEchoInsightsInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput + labels?: LabelCreateNestedManyWithoutUserInput + notes?: NoteCreateNestedManyWithoutUserInput + sentShares?: NoteShareCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareCreateNestedManyWithoutUserInput + notebooks?: NotebookCreateNestedManyWithoutUserInput + sessions?: SessionCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput + } + + export type UserUncheckedCreateWithoutMemoryEchoInsightsInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountUncheckedCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput + labels?: LabelUncheckedCreateNestedManyWithoutUserInput + notes?: NoteUncheckedCreateNestedManyWithoutUserInput + sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput + notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput + sessions?: SessionUncheckedCreateNestedManyWithoutUserInput + aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput + } + + export type UserCreateOrConnectWithoutMemoryEchoInsightsInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type NoteCreateWithoutMemoryEchoAsNote2Input = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + order?: number + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + aiFeedback?: AiFeedbackCreateNestedManyWithoutNoteInput + memoryEchoAsNote1?: MemoryEchoInsightCreateNestedManyWithoutNote1Input + notebook?: NotebookCreateNestedOneWithoutNotesInput + user?: UserCreateNestedOneWithoutNotesInput + shares?: NoteShareCreateNestedManyWithoutNoteInput + labelRelations?: LabelCreateNestedManyWithoutNotesInput + noteEmbedding?: NoteEmbeddingCreateNestedOneWithoutNoteInput + } + + export type NoteUncheckedCreateWithoutMemoryEchoAsNote2Input = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + userId?: string | null + order?: number + notebookId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutNoteInput + memoryEchoAsNote1?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote1Input + shares?: NoteShareUncheckedCreateNestedManyWithoutNoteInput + labelRelations?: LabelUncheckedCreateNestedManyWithoutNotesInput + noteEmbedding?: NoteEmbeddingUncheckedCreateNestedOneWithoutNoteInput + } + + export type NoteCreateOrConnectWithoutMemoryEchoAsNote2Input = { + where: NoteWhereUniqueInput + create: XOR + } + + export type NoteCreateWithoutMemoryEchoAsNote1Input = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + order?: number + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + aiFeedback?: AiFeedbackCreateNestedManyWithoutNoteInput + memoryEchoAsNote2?: MemoryEchoInsightCreateNestedManyWithoutNote2Input + notebook?: NotebookCreateNestedOneWithoutNotesInput + user?: UserCreateNestedOneWithoutNotesInput + shares?: NoteShareCreateNestedManyWithoutNoteInput + labelRelations?: LabelCreateNestedManyWithoutNotesInput + noteEmbedding?: NoteEmbeddingCreateNestedOneWithoutNoteInput + } + + export type NoteUncheckedCreateWithoutMemoryEchoAsNote1Input = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + userId?: string | null + order?: number + notebookId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutNoteInput + memoryEchoAsNote2?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote2Input + shares?: NoteShareUncheckedCreateNestedManyWithoutNoteInput + labelRelations?: LabelUncheckedCreateNestedManyWithoutNotesInput + noteEmbedding?: NoteEmbeddingUncheckedCreateNestedOneWithoutNoteInput + } + + export type NoteCreateOrConnectWithoutMemoryEchoAsNote1Input = { + where: NoteWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutMemoryEchoInsightsInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutMemoryEchoInsightsInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutMemoryEchoInsightsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput + labels?: LabelUpdateManyWithoutUserNestedInput + notes?: NoteUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUpdateManyWithoutUserNestedInput + notebooks?: NotebookUpdateManyWithoutUserNestedInput + sessions?: SessionUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutMemoryEchoInsightsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput + labels?: LabelUncheckedUpdateManyWithoutUserNestedInput + notes?: NoteUncheckedUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput + notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput + sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput + aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput + } + + export type NoteUpsertWithoutMemoryEchoAsNote2Input = { + update: XOR + create: XOR + where?: NoteWhereInput + } + + export type NoteUpdateToOneWithWhereWithoutMemoryEchoAsNote2Input = { + where?: NoteWhereInput + data: XOR + } + + export type NoteUpdateWithoutMemoryEchoAsNote2Input = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + aiFeedback?: AiFeedbackUpdateManyWithoutNoteNestedInput + memoryEchoAsNote1?: MemoryEchoInsightUpdateManyWithoutNote1NestedInput + notebook?: NotebookUpdateOneWithoutNotesNestedInput + user?: UserUpdateOneWithoutNotesNestedInput + shares?: NoteShareUpdateManyWithoutNoteNestedInput + labelRelations?: LabelUpdateManyWithoutNotesNestedInput + noteEmbedding?: NoteEmbeddingUpdateOneWithoutNoteNestedInput + } + + export type NoteUncheckedUpdateWithoutMemoryEchoAsNote2Input = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + userId?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + notebookId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutNoteNestedInput + memoryEchoAsNote1?: MemoryEchoInsightUncheckedUpdateManyWithoutNote1NestedInput + shares?: NoteShareUncheckedUpdateManyWithoutNoteNestedInput + labelRelations?: LabelUncheckedUpdateManyWithoutNotesNestedInput + noteEmbedding?: NoteEmbeddingUncheckedUpdateOneWithoutNoteNestedInput + } + + export type NoteUpsertWithoutMemoryEchoAsNote1Input = { + update: XOR + create: XOR + where?: NoteWhereInput + } + + export type NoteUpdateToOneWithWhereWithoutMemoryEchoAsNote1Input = { + where?: NoteWhereInput + data: XOR + } + + export type NoteUpdateWithoutMemoryEchoAsNote1Input = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + aiFeedback?: AiFeedbackUpdateManyWithoutNoteNestedInput + memoryEchoAsNote2?: MemoryEchoInsightUpdateManyWithoutNote2NestedInput + notebook?: NotebookUpdateOneWithoutNotesNestedInput + user?: UserUpdateOneWithoutNotesNestedInput + shares?: NoteShareUpdateManyWithoutNoteNestedInput + labelRelations?: LabelUpdateManyWithoutNotesNestedInput + noteEmbedding?: NoteEmbeddingUpdateOneWithoutNoteNestedInput + } + + export type NoteUncheckedUpdateWithoutMemoryEchoAsNote1Input = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + userId?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + notebookId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutNoteNestedInput + memoryEchoAsNote2?: MemoryEchoInsightUncheckedUpdateManyWithoutNote2NestedInput + shares?: NoteShareUncheckedUpdateManyWithoutNoteNestedInput + labelRelations?: LabelUncheckedUpdateManyWithoutNotesNestedInput + noteEmbedding?: NoteEmbeddingUncheckedUpdateOneWithoutNoteNestedInput + } + + export type UserCreateWithoutAiSettingsInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput + labels?: LabelCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput + notes?: NoteCreateNestedManyWithoutUserInput + sentShares?: NoteShareCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareCreateNestedManyWithoutUserInput + notebooks?: NotebookCreateNestedManyWithoutUserInput + sessions?: SessionCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateWithoutAiSettingsInput = { + id?: string + name?: string | null + email: string + emailVerified?: Date | string | null + password?: string | null + role?: string + image?: string | null + theme?: string + cardSizeMode?: string + resetToken?: string | null + resetTokenExpiry?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + accounts?: AccountUncheckedCreateNestedManyWithoutUserInput + aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput + labels?: LabelUncheckedCreateNestedManyWithoutUserInput + memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput + notes?: NoteUncheckedCreateNestedManyWithoutUserInput + sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput + receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput + notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput + sessions?: SessionUncheckedCreateNestedManyWithoutUserInput + } + + export type UserCreateOrConnectWithoutAiSettingsInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutAiSettingsInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutAiSettingsInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutAiSettingsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput + labels?: LabelUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput + notes?: NoteUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUpdateManyWithoutUserNestedInput + notebooks?: NotebookUpdateManyWithoutUserNestedInput + sessions?: SessionUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutAiSettingsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + password?: NullableStringFieldUpdateOperationsInput | string | null + role?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + theme?: StringFieldUpdateOperationsInput | string + cardSizeMode?: StringFieldUpdateOperationsInput | string + resetToken?: NullableStringFieldUpdateOperationsInput | string | null + resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput + labels?: LabelUncheckedUpdateManyWithoutUserNestedInput + memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput + notes?: NoteUncheckedUpdateManyWithoutUserNestedInput + sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput + receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput + notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput + sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput + } + + export type AccountCreateManyUserInput = { + type: string + provider: string + providerAccountId: string + refresh_token?: string | null + access_token?: string | null + expires_at?: number | null + token_type?: string | null + scope?: string | null + id_token?: string | null + session_state?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type AiFeedbackCreateManyUserInput = { + id?: string + noteId: string + feedbackType: string + feature: string + originalContent: string + correctedContent?: string | null + metadata?: string | null + createdAt?: Date | string + } + + export type LabelCreateManyUserInput = { + id?: string + name: string + color?: string + notebookId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type MemoryEchoInsightCreateManyUserInput = { + id?: string + note1Id: string + note2Id: string + similarityScore: number + insight: string + insightDate?: Date | string + viewed?: boolean + feedback?: string | null + dismissed?: boolean + } + + export type NoteCreateManyUserInput = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + order?: number + notebookId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + } + + export type NoteShareCreateManySharerInput = { + id?: string + noteId: string + userId: string + status?: string + permission?: string + notifiedAt?: Date | string | null + respondedAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type NoteShareCreateManyUserInput = { + id?: string + noteId: string + sharedBy: string + status?: string + permission?: string + notifiedAt?: Date | string | null + respondedAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type NotebookCreateManyUserInput = { + id?: string + name: string + icon?: string | null + color?: string | null + order: number + createdAt?: Date | string + updatedAt?: Date | string + } + + export type SessionCreateManyUserInput = { + sessionToken: string + expires: Date | string + createdAt?: Date | string + updatedAt?: Date | string + } + + export type AccountUpdateWithoutUserInput = { + type?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + providerAccountId?: StringFieldUpdateOperationsInput | string + refresh_token?: NullableStringFieldUpdateOperationsInput | string | null + access_token?: NullableStringFieldUpdateOperationsInput | string | null + expires_at?: NullableIntFieldUpdateOperationsInput | number | null + token_type?: NullableStringFieldUpdateOperationsInput | string | null + scope?: NullableStringFieldUpdateOperationsInput | string | null + id_token?: NullableStringFieldUpdateOperationsInput | string | null + session_state?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AccountUncheckedUpdateWithoutUserInput = { + type?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + providerAccountId?: StringFieldUpdateOperationsInput | string + refresh_token?: NullableStringFieldUpdateOperationsInput | string | null + access_token?: NullableStringFieldUpdateOperationsInput | string | null + expires_at?: NullableIntFieldUpdateOperationsInput | number | null + token_type?: NullableStringFieldUpdateOperationsInput | string | null + scope?: NullableStringFieldUpdateOperationsInput | string | null + id_token?: NullableStringFieldUpdateOperationsInput | string | null + session_state?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AccountUncheckedUpdateManyWithoutUserInput = { + type?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + providerAccountId?: StringFieldUpdateOperationsInput | string + refresh_token?: NullableStringFieldUpdateOperationsInput | string | null + access_token?: NullableStringFieldUpdateOperationsInput | string | null + expires_at?: NullableIntFieldUpdateOperationsInput | number | null + token_type?: NullableStringFieldUpdateOperationsInput | string | null + scope?: NullableStringFieldUpdateOperationsInput | string | null + id_token?: NullableStringFieldUpdateOperationsInput | string | null + session_state?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AiFeedbackUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + feedbackType?: StringFieldUpdateOperationsInput | string + feature?: StringFieldUpdateOperationsInput | string + originalContent?: StringFieldUpdateOperationsInput | string + correctedContent?: NullableStringFieldUpdateOperationsInput | string | null + metadata?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + note?: NoteUpdateOneRequiredWithoutAiFeedbackNestedInput + } + + export type AiFeedbackUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + noteId?: StringFieldUpdateOperationsInput | string + feedbackType?: StringFieldUpdateOperationsInput | string + feature?: StringFieldUpdateOperationsInput | string + originalContent?: StringFieldUpdateOperationsInput | string + correctedContent?: NullableStringFieldUpdateOperationsInput | string | null + metadata?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AiFeedbackUncheckedUpdateManyWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + noteId?: StringFieldUpdateOperationsInput | string + feedbackType?: StringFieldUpdateOperationsInput | string + feature?: StringFieldUpdateOperationsInput | string + originalContent?: StringFieldUpdateOperationsInput | string + correctedContent?: NullableStringFieldUpdateOperationsInput | string | null + metadata?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type LabelUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + notebook?: NotebookUpdateOneWithoutLabelsNestedInput + notes?: NoteUpdateManyWithoutLabelRelationsNestedInput + } + + export type LabelUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + notebookId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + notes?: NoteUncheckedUpdateManyWithoutLabelRelationsNestedInput + } + + export type LabelUncheckedUpdateManyWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + notebookId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MemoryEchoInsightUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + similarityScore?: FloatFieldUpdateOperationsInput | number + insight?: StringFieldUpdateOperationsInput | string + insightDate?: DateTimeFieldUpdateOperationsInput | Date | string + viewed?: BoolFieldUpdateOperationsInput | boolean + feedback?: NullableStringFieldUpdateOperationsInput | string | null + dismissed?: BoolFieldUpdateOperationsInput | boolean + note2?: NoteUpdateOneRequiredWithoutMemoryEchoAsNote2NestedInput + note1?: NoteUpdateOneRequiredWithoutMemoryEchoAsNote1NestedInput + } + + export type MemoryEchoInsightUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + note1Id?: StringFieldUpdateOperationsInput | string + note2Id?: StringFieldUpdateOperationsInput | string + similarityScore?: FloatFieldUpdateOperationsInput | number + insight?: StringFieldUpdateOperationsInput | string + insightDate?: DateTimeFieldUpdateOperationsInput | Date | string + viewed?: BoolFieldUpdateOperationsInput | boolean + feedback?: NullableStringFieldUpdateOperationsInput | string | null + dismissed?: BoolFieldUpdateOperationsInput | boolean + } + + export type MemoryEchoInsightUncheckedUpdateManyWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + note1Id?: StringFieldUpdateOperationsInput | string + note2Id?: StringFieldUpdateOperationsInput | string + similarityScore?: FloatFieldUpdateOperationsInput | number + insight?: StringFieldUpdateOperationsInput | string + insightDate?: DateTimeFieldUpdateOperationsInput | Date | string + viewed?: BoolFieldUpdateOperationsInput | boolean + feedback?: NullableStringFieldUpdateOperationsInput | string | null + dismissed?: BoolFieldUpdateOperationsInput | boolean + } + + export type NoteUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + aiFeedback?: AiFeedbackUpdateManyWithoutNoteNestedInput + memoryEchoAsNote2?: MemoryEchoInsightUpdateManyWithoutNote2NestedInput + memoryEchoAsNote1?: MemoryEchoInsightUpdateManyWithoutNote1NestedInput + notebook?: NotebookUpdateOneWithoutNotesNestedInput + shares?: NoteShareUpdateManyWithoutNoteNestedInput + labelRelations?: LabelUpdateManyWithoutNotesNestedInput + noteEmbedding?: NoteEmbeddingUpdateOneWithoutNoteNestedInput + } + + export type NoteUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + notebookId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutNoteNestedInput + memoryEchoAsNote2?: MemoryEchoInsightUncheckedUpdateManyWithoutNote2NestedInput + memoryEchoAsNote1?: MemoryEchoInsightUncheckedUpdateManyWithoutNote1NestedInput + shares?: NoteShareUncheckedUpdateManyWithoutNoteNestedInput + labelRelations?: LabelUncheckedUpdateManyWithoutNotesNestedInput + noteEmbedding?: NoteEmbeddingUncheckedUpdateOneWithoutNoteNestedInput + } + + export type NoteUncheckedUpdateManyWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + notebookId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type NoteShareUpdateWithoutSharerInput = { + id?: StringFieldUpdateOperationsInput | string + status?: StringFieldUpdateOperationsInput | string + permission?: StringFieldUpdateOperationsInput | string + notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutReceivedSharesNestedInput + note?: NoteUpdateOneRequiredWithoutSharesNestedInput + } + + export type NoteShareUncheckedUpdateWithoutSharerInput = { + id?: StringFieldUpdateOperationsInput | string + noteId?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + status?: StringFieldUpdateOperationsInput | string + permission?: StringFieldUpdateOperationsInput | string + notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type NoteShareUncheckedUpdateManyWithoutSharerInput = { + id?: StringFieldUpdateOperationsInput | string + noteId?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + status?: StringFieldUpdateOperationsInput | string + permission?: StringFieldUpdateOperationsInput | string + notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type NoteShareUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + status?: StringFieldUpdateOperationsInput | string + permission?: StringFieldUpdateOperationsInput | string + notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + sharer?: UserUpdateOneRequiredWithoutSentSharesNestedInput + note?: NoteUpdateOneRequiredWithoutSharesNestedInput + } + + export type NoteShareUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + noteId?: StringFieldUpdateOperationsInput | string + sharedBy?: StringFieldUpdateOperationsInput | string + status?: StringFieldUpdateOperationsInput | string + permission?: StringFieldUpdateOperationsInput | string + notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type NoteShareUncheckedUpdateManyWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + noteId?: StringFieldUpdateOperationsInput | string + sharedBy?: StringFieldUpdateOperationsInput | string + status?: StringFieldUpdateOperationsInput | string + permission?: StringFieldUpdateOperationsInput | string + notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type NotebookUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + icon?: NullableStringFieldUpdateOperationsInput | string | null + color?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + labels?: LabelUpdateManyWithoutNotebookNestedInput + notes?: NoteUpdateManyWithoutNotebookNestedInput + } + + export type NotebookUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + icon?: NullableStringFieldUpdateOperationsInput | string | null + color?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + labels?: LabelUncheckedUpdateManyWithoutNotebookNestedInput + notes?: NoteUncheckedUpdateManyWithoutNotebookNestedInput + } + + export type NotebookUncheckedUpdateManyWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + icon?: NullableStringFieldUpdateOperationsInput | string | null + color?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SessionUpdateWithoutUserInput = { + sessionToken?: StringFieldUpdateOperationsInput | string + expires?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SessionUncheckedUpdateWithoutUserInput = { + sessionToken?: StringFieldUpdateOperationsInput | string + expires?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SessionUncheckedUpdateManyWithoutUserInput = { + sessionToken?: StringFieldUpdateOperationsInput | string + expires?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type LabelCreateManyNotebookInput = { + id?: string + name: string + color?: string + userId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type NoteCreateManyNotebookInput = { + id?: string + title?: string | null + content: string + color?: string + isPinned?: boolean + isArchived?: boolean + trashedAt?: Date | string | null + type?: string + dismissedFromRecent?: boolean + checkItems?: string | null + labels?: string | null + images?: string | null + links?: string | null + reminder?: Date | string | null + isReminderDone?: boolean + reminderRecurrence?: string | null + reminderLocation?: string | null + isMarkdown?: boolean + size?: string + sharedWith?: string | null + userId?: string | null + order?: number + createdAt?: Date | string + updatedAt?: Date | string + contentUpdatedAt?: Date | string + autoGenerated?: boolean | null + aiProvider?: string | null + aiConfidence?: number | null + language?: string | null + languageConfidence?: number | null + lastAiAnalysis?: Date | string | null + } + + export type LabelUpdateWithoutNotebookInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneWithoutLabelsNestedInput + notes?: NoteUpdateManyWithoutLabelRelationsNestedInput + } + + export type LabelUncheckedUpdateWithoutNotebookInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + userId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + notes?: NoteUncheckedUpdateManyWithoutLabelRelationsNestedInput + } + + export type LabelUncheckedUpdateManyWithoutNotebookInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + userId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type NoteUpdateWithoutNotebookInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + aiFeedback?: AiFeedbackUpdateManyWithoutNoteNestedInput + memoryEchoAsNote2?: MemoryEchoInsightUpdateManyWithoutNote2NestedInput + memoryEchoAsNote1?: MemoryEchoInsightUpdateManyWithoutNote1NestedInput + user?: UserUpdateOneWithoutNotesNestedInput + shares?: NoteShareUpdateManyWithoutNoteNestedInput + labelRelations?: LabelUpdateManyWithoutNotesNestedInput + noteEmbedding?: NoteEmbeddingUpdateOneWithoutNoteNestedInput + } + + export type NoteUncheckedUpdateWithoutNotebookInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + userId?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutNoteNestedInput + memoryEchoAsNote2?: MemoryEchoInsightUncheckedUpdateManyWithoutNote2NestedInput + memoryEchoAsNote1?: MemoryEchoInsightUncheckedUpdateManyWithoutNote1NestedInput + shares?: NoteShareUncheckedUpdateManyWithoutNoteNestedInput + labelRelations?: LabelUncheckedUpdateManyWithoutNotesNestedInput + noteEmbedding?: NoteEmbeddingUncheckedUpdateOneWithoutNoteNestedInput + } + + export type NoteUncheckedUpdateManyWithoutNotebookInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + userId?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type NoteUpdateWithoutLabelRelationsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + aiFeedback?: AiFeedbackUpdateManyWithoutNoteNestedInput + memoryEchoAsNote2?: MemoryEchoInsightUpdateManyWithoutNote2NestedInput + memoryEchoAsNote1?: MemoryEchoInsightUpdateManyWithoutNote1NestedInput + notebook?: NotebookUpdateOneWithoutNotesNestedInput + user?: UserUpdateOneWithoutNotesNestedInput + shares?: NoteShareUpdateManyWithoutNoteNestedInput + noteEmbedding?: NoteEmbeddingUpdateOneWithoutNoteNestedInput + } + + export type NoteUncheckedUpdateWithoutLabelRelationsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + userId?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + notebookId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutNoteNestedInput + memoryEchoAsNote2?: MemoryEchoInsightUncheckedUpdateManyWithoutNote2NestedInput + memoryEchoAsNote1?: MemoryEchoInsightUncheckedUpdateManyWithoutNote1NestedInput + shares?: NoteShareUncheckedUpdateManyWithoutNoteNestedInput + noteEmbedding?: NoteEmbeddingUncheckedUpdateOneWithoutNoteNestedInput + } + + export type NoteUncheckedUpdateManyWithoutLabelRelationsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + content?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + isPinned?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + trashedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + type?: StringFieldUpdateOperationsInput | string + dismissedFromRecent?: BoolFieldUpdateOperationsInput | boolean + checkItems?: NullableStringFieldUpdateOperationsInput | string | null + labels?: NullableStringFieldUpdateOperationsInput | string | null + images?: NullableStringFieldUpdateOperationsInput | string | null + links?: NullableStringFieldUpdateOperationsInput | string | null + reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isReminderDone?: BoolFieldUpdateOperationsInput | boolean + reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null + reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null + isMarkdown?: BoolFieldUpdateOperationsInput | boolean + size?: StringFieldUpdateOperationsInput | string + sharedWith?: NullableStringFieldUpdateOperationsInput | string | null + userId?: NullableStringFieldUpdateOperationsInput | string | null + order?: IntFieldUpdateOperationsInput | number + notebookId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + contentUpdatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null + aiProvider?: NullableStringFieldUpdateOperationsInput | string | null + aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null + language?: NullableStringFieldUpdateOperationsInput | string | null + languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null + lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type AiFeedbackCreateManyNoteInput = { + id?: string + userId?: string | null + feedbackType: string + feature: string + originalContent: string + correctedContent?: string | null + metadata?: string | null + createdAt?: Date | string + } + + export type MemoryEchoInsightCreateManyNote2Input = { + id?: string + userId?: string | null + note1Id: string + similarityScore: number + insight: string + insightDate?: Date | string + viewed?: boolean + feedback?: string | null + dismissed?: boolean + } + + export type MemoryEchoInsightCreateManyNote1Input = { + id?: string + userId?: string | null + note2Id: string + similarityScore: number + insight: string + insightDate?: Date | string + viewed?: boolean + feedback?: string | null + dismissed?: boolean + } + + export type NoteShareCreateManyNoteInput = { + id?: string + userId: string + sharedBy: string + status?: string + permission?: string + notifiedAt?: Date | string | null + respondedAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type AiFeedbackUpdateWithoutNoteInput = { + id?: StringFieldUpdateOperationsInput | string + feedbackType?: StringFieldUpdateOperationsInput | string + feature?: StringFieldUpdateOperationsInput | string + originalContent?: StringFieldUpdateOperationsInput | string + correctedContent?: NullableStringFieldUpdateOperationsInput | string | null + metadata?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneWithoutAiFeedbackNestedInput + } + + export type AiFeedbackUncheckedUpdateWithoutNoteInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: NullableStringFieldUpdateOperationsInput | string | null + feedbackType?: StringFieldUpdateOperationsInput | string + feature?: StringFieldUpdateOperationsInput | string + originalContent?: StringFieldUpdateOperationsInput | string + correctedContent?: NullableStringFieldUpdateOperationsInput | string | null + metadata?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AiFeedbackUncheckedUpdateManyWithoutNoteInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: NullableStringFieldUpdateOperationsInput | string | null + feedbackType?: StringFieldUpdateOperationsInput | string + feature?: StringFieldUpdateOperationsInput | string + originalContent?: StringFieldUpdateOperationsInput | string + correctedContent?: NullableStringFieldUpdateOperationsInput | string | null + metadata?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MemoryEchoInsightUpdateWithoutNote2Input = { + id?: StringFieldUpdateOperationsInput | string + similarityScore?: FloatFieldUpdateOperationsInput | number + insight?: StringFieldUpdateOperationsInput | string + insightDate?: DateTimeFieldUpdateOperationsInput | Date | string + viewed?: BoolFieldUpdateOperationsInput | boolean + feedback?: NullableStringFieldUpdateOperationsInput | string | null + dismissed?: BoolFieldUpdateOperationsInput | boolean + user?: UserUpdateOneWithoutMemoryEchoInsightsNestedInput + note1?: NoteUpdateOneRequiredWithoutMemoryEchoAsNote1NestedInput + } + + export type MemoryEchoInsightUncheckedUpdateWithoutNote2Input = { + id?: StringFieldUpdateOperationsInput | string + userId?: NullableStringFieldUpdateOperationsInput | string | null + note1Id?: StringFieldUpdateOperationsInput | string + similarityScore?: FloatFieldUpdateOperationsInput | number + insight?: StringFieldUpdateOperationsInput | string + insightDate?: DateTimeFieldUpdateOperationsInput | Date | string + viewed?: BoolFieldUpdateOperationsInput | boolean + feedback?: NullableStringFieldUpdateOperationsInput | string | null + dismissed?: BoolFieldUpdateOperationsInput | boolean + } + + export type MemoryEchoInsightUncheckedUpdateManyWithoutNote2Input = { + id?: StringFieldUpdateOperationsInput | string + userId?: NullableStringFieldUpdateOperationsInput | string | null + note1Id?: StringFieldUpdateOperationsInput | string + similarityScore?: FloatFieldUpdateOperationsInput | number + insight?: StringFieldUpdateOperationsInput | string + insightDate?: DateTimeFieldUpdateOperationsInput | Date | string + viewed?: BoolFieldUpdateOperationsInput | boolean + feedback?: NullableStringFieldUpdateOperationsInput | string | null + dismissed?: BoolFieldUpdateOperationsInput | boolean + } + + export type MemoryEchoInsightUpdateWithoutNote1Input = { + id?: StringFieldUpdateOperationsInput | string + similarityScore?: FloatFieldUpdateOperationsInput | number + insight?: StringFieldUpdateOperationsInput | string + insightDate?: DateTimeFieldUpdateOperationsInput | Date | string + viewed?: BoolFieldUpdateOperationsInput | boolean + feedback?: NullableStringFieldUpdateOperationsInput | string | null + dismissed?: BoolFieldUpdateOperationsInput | boolean + user?: UserUpdateOneWithoutMemoryEchoInsightsNestedInput + note2?: NoteUpdateOneRequiredWithoutMemoryEchoAsNote2NestedInput + } + + export type MemoryEchoInsightUncheckedUpdateWithoutNote1Input = { + id?: StringFieldUpdateOperationsInput | string + userId?: NullableStringFieldUpdateOperationsInput | string | null + note2Id?: StringFieldUpdateOperationsInput | string + similarityScore?: FloatFieldUpdateOperationsInput | number + insight?: StringFieldUpdateOperationsInput | string + insightDate?: DateTimeFieldUpdateOperationsInput | Date | string + viewed?: BoolFieldUpdateOperationsInput | boolean + feedback?: NullableStringFieldUpdateOperationsInput | string | null + dismissed?: BoolFieldUpdateOperationsInput | boolean + } + + export type MemoryEchoInsightUncheckedUpdateManyWithoutNote1Input = { + id?: StringFieldUpdateOperationsInput | string + userId?: NullableStringFieldUpdateOperationsInput | string | null + note2Id?: StringFieldUpdateOperationsInput | string + similarityScore?: FloatFieldUpdateOperationsInput | number + insight?: StringFieldUpdateOperationsInput | string + insightDate?: DateTimeFieldUpdateOperationsInput | Date | string + viewed?: BoolFieldUpdateOperationsInput | boolean + feedback?: NullableStringFieldUpdateOperationsInput | string | null + dismissed?: BoolFieldUpdateOperationsInput | boolean + } + + export type NoteShareUpdateWithoutNoteInput = { + id?: StringFieldUpdateOperationsInput | string + status?: StringFieldUpdateOperationsInput | string + permission?: StringFieldUpdateOperationsInput | string + notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + sharer?: UserUpdateOneRequiredWithoutSentSharesNestedInput + user?: UserUpdateOneRequiredWithoutReceivedSharesNestedInput + } + + export type NoteShareUncheckedUpdateWithoutNoteInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + sharedBy?: StringFieldUpdateOperationsInput | string + status?: StringFieldUpdateOperationsInput | string + permission?: StringFieldUpdateOperationsInput | string + notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type NoteShareUncheckedUpdateManyWithoutNoteInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + sharedBy?: StringFieldUpdateOperationsInput | string + status?: StringFieldUpdateOperationsInput | string + permission?: StringFieldUpdateOperationsInput | string + notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type LabelUpdateWithoutNotesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneWithoutLabelsNestedInput + notebook?: NotebookUpdateOneWithoutLabelsNestedInput + } + + export type LabelUncheckedUpdateWithoutNotesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + notebookId?: NullableStringFieldUpdateOperationsInput | string | null + userId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type LabelUncheckedUpdateManyWithoutNotesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + color?: StringFieldUpdateOperationsInput | string + notebookId?: NullableStringFieldUpdateOperationsInput | string | null + userId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + /** * Aliases for legacy arg types */ /** - * @deprecated Use NoteDefaultArgs instead + * @deprecated Use UserCountOutputTypeDefaultArgs instead */ - export type NoteArgs = NoteDefaultArgs + export type UserCountOutputTypeArgs = UserCountOutputTypeDefaultArgs + /** + * @deprecated Use NotebookCountOutputTypeDefaultArgs instead + */ + export type NotebookCountOutputTypeArgs = NotebookCountOutputTypeDefaultArgs + /** + * @deprecated Use LabelCountOutputTypeDefaultArgs instead + */ + export type LabelCountOutputTypeArgs = LabelCountOutputTypeDefaultArgs + /** + * @deprecated Use NoteCountOutputTypeDefaultArgs instead + */ + export type NoteCountOutputTypeArgs = NoteCountOutputTypeDefaultArgs + /** + * @deprecated Use UserDefaultArgs instead + */ + export type UserArgs = UserDefaultArgs /** * @deprecated Use NotebookDefaultArgs instead */ @@ -16634,9 +25078,17 @@ export namespace Prisma { */ export type LabelArgs = LabelDefaultArgs /** - * @deprecated Use UserDefaultArgs instead + * @deprecated Use NoteDefaultArgs instead */ - export type UserArgs = UserDefaultArgs + export type NoteArgs = NoteDefaultArgs + /** + * @deprecated Use NoteEmbeddingDefaultArgs instead + */ + export type NoteEmbeddingArgs = NoteEmbeddingDefaultArgs + /** + * @deprecated Use NoteShareDefaultArgs instead + */ + export type NoteShareArgs = NoteShareDefaultArgs /** * @deprecated Use AccountDefaultArgs instead */ @@ -16649,10 +25101,6 @@ export namespace Prisma { * @deprecated Use VerificationTokenDefaultArgs instead */ export type VerificationTokenArgs = VerificationTokenDefaultArgs - /** - * @deprecated Use NoteShareDefaultArgs instead - */ - export type NoteShareArgs = NoteShareDefaultArgs /** * @deprecated Use SystemConfigDefaultArgs instead */ diff --git a/mcp-server/node_modules/.prisma/client/index.js b/mcp-server/node_modules/.prisma/client/index.js index f6bafc2..b27e190 100644 --- a/mcp-server/node_modules/.prisma/client/index.js +++ b/mcp-server/node_modules/.prisma/client/index.js @@ -85,40 +85,26 @@ Prisma.NullTypes = { * Enums */ exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', Serializable: 'Serializable' }); -exports.Prisma.NoteScalarFieldEnum = { +exports.Prisma.UserScalarFieldEnum = { id: 'id', - title: 'title', - content: 'content', - color: 'color', - isPinned: 'isPinned', - isArchived: 'isArchived', - type: 'type', - checkItems: 'checkItems', - labels: 'labels', - images: 'images', - links: 'links', - reminder: 'reminder', - isReminderDone: 'isReminderDone', - reminderRecurrence: 'reminderRecurrence', - reminderLocation: 'reminderLocation', - isMarkdown: 'isMarkdown', - size: 'size', - embedding: 'embedding', - sharedWith: 'sharedWith', - userId: 'userId', - order: 'order', - notebookId: 'notebookId', + name: 'name', + email: 'email', + emailVerified: 'emailVerified', + password: 'password', + role: 'role', + image: 'image', + theme: 'theme', + cardSizeMode: 'cardSizeMode', + resetToken: 'resetToken', + resetTokenExpiry: 'resetTokenExpiry', createdAt: 'createdAt', - updatedAt: 'updatedAt', - autoGenerated: 'autoGenerated', - aiProvider: 'aiProvider', - aiConfidence: 'aiConfidence', - language: 'language', - languageConfidence: 'languageConfidence', - lastAiAnalysis: 'lastAiAnalysis' + updatedAt: 'updatedAt' }; exports.Prisma.NotebookScalarFieldEnum = { @@ -142,17 +128,57 @@ exports.Prisma.LabelScalarFieldEnum = { updatedAt: 'updatedAt' }; -exports.Prisma.UserScalarFieldEnum = { +exports.Prisma.NoteScalarFieldEnum = { id: 'id', - name: 'name', - email: 'email', - emailVerified: 'emailVerified', - password: 'password', - role: 'role', - image: 'image', - theme: 'theme', - resetToken: 'resetToken', - resetTokenExpiry: 'resetTokenExpiry', + title: 'title', + content: 'content', + color: 'color', + isPinned: 'isPinned', + isArchived: 'isArchived', + trashedAt: 'trashedAt', + type: 'type', + dismissedFromRecent: 'dismissedFromRecent', + checkItems: 'checkItems', + labels: 'labels', + images: 'images', + links: 'links', + reminder: 'reminder', + isReminderDone: 'isReminderDone', + reminderRecurrence: 'reminderRecurrence', + reminderLocation: 'reminderLocation', + isMarkdown: 'isMarkdown', + size: 'size', + sharedWith: 'sharedWith', + userId: 'userId', + order: 'order', + notebookId: 'notebookId', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + contentUpdatedAt: 'contentUpdatedAt', + autoGenerated: 'autoGenerated', + aiProvider: 'aiProvider', + aiConfidence: 'aiConfidence', + language: 'language', + languageConfidence: 'languageConfidence', + lastAiAnalysis: 'lastAiAnalysis' +}; + +exports.Prisma.NoteEmbeddingScalarFieldEnum = { + id: 'id', + noteId: 'noteId', + embedding: 'embedding', + createdAt: 'createdAt' +}; + +exports.Prisma.NoteShareScalarFieldEnum = { + id: 'id', + noteId: 'noteId', + userId: 'userId', + sharedBy: 'sharedBy', + status: 'status', + permission: 'permission', + notifiedAt: 'notifiedAt', + respondedAt: 'respondedAt', createdAt: 'createdAt', updatedAt: 'updatedAt' }; @@ -187,19 +213,6 @@ exports.Prisma.VerificationTokenScalarFieldEnum = { expires: 'expires' }; -exports.Prisma.NoteShareScalarFieldEnum = { - id: 'id', - noteId: 'noteId', - userId: 'userId', - sharedBy: 'sharedBy', - status: 'status', - permission: 'permission', - notifiedAt: 'notifiedAt', - respondedAt: 'respondedAt', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - exports.Prisma.SystemConfigScalarFieldEnum = { key: 'key', value: 'value' @@ -242,6 +255,7 @@ exports.Prisma.UserAISettingsScalarFieldEnum = { fontSize: 'fontSize', demoMode: 'demoMode', showRecentNotes: 'showRecentNotes', + notesViewMode: 'notesViewMode', emailNotifications: 'emailNotifications', desktopNotifications: 'desktopNotifications', anonymousAnalytics: 'anonymousAnalytics' @@ -252,6 +266,11 @@ exports.Prisma.SortOrder = { desc: 'desc' }; +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + exports.Prisma.NullsOrder = { first: 'first', last: 'last' @@ -259,14 +278,15 @@ exports.Prisma.NullsOrder = { exports.Prisma.ModelName = { - Note: 'Note', + User: 'User', Notebook: 'Notebook', Label: 'Label', - User: 'User', + Note: 'Note', + NoteEmbedding: 'NoteEmbedding', + NoteShare: 'NoteShare', Account: 'Account', Session: 'Session', VerificationToken: 'VerificationToken', - NoteShare: 'NoteShare', SystemConfig: 'SystemConfig', AiFeedback: 'AiFeedback', MemoryEchoInsight: 'MemoryEchoInsight', @@ -283,7 +303,7 @@ const config = { "value": "prisma-client-js" }, "output": { - "value": "/Users/sepehr/dev/Momento/mcp-server/node_modules/.prisma/client", + "value": "/home/devparsa/dev/Momento/mcp-server/node_modules/.prisma/client", "fromEnvVar": null }, "config": { @@ -292,12 +312,16 @@ const config = { "binaryTargets": [ { "fromEnvVar": null, - "value": "darwin-arm64", + "value": "linux-musl-openssl-3.0.x" + }, + { + "fromEnvVar": null, + "value": "debian-openssl-3.0.x", "native": true } ], "previewFeatures": [], - "sourceFilePath": "/Users/sepehr/dev/Momento/mcp-server/prisma/schema.prisma", + "sourceFilePath": "/home/devparsa/dev/Momento/mcp-server/prisma/schema.prisma", "isCustomOutput": true }, "relativeEnvPaths": { @@ -309,18 +333,18 @@ const config = { "datasourceNames": [ "db" ], - "activeProvider": "sqlite", - "postinstall": false, + "activeProvider": "postgresql", + "postinstall": true, "inlineDatasources": { "db": { "url": { - "fromEnvVar": null, - "value": "file:../../memento-note/prisma/dev.db" + "fromEnvVar": "DATABASE_URL", + "value": null } } }, - "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../node_modules/.prisma/client\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n url = \"file:../../memento-note/prisma/dev.db\"\n}\n\nmodel Note {\n id String @id @default(cuid())\n title String?\n content String\n color String @default(\"default\")\n isPinned Boolean @default(false)\n isArchived Boolean @default(false)\n type String @default(\"text\")\n checkItems String?\n labels String?\n images String?\n links String?\n reminder DateTime?\n isReminderDone Boolean @default(false)\n reminderRecurrence String?\n reminderLocation String?\n isMarkdown Boolean @default(false)\n size String @default(\"small\")\n embedding String?\n sharedWith String?\n userId String?\n order Int @default(0)\n notebookId String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n autoGenerated Boolean?\n aiProvider String?\n aiConfidence Int?\n language String?\n languageConfidence Float?\n lastAiAnalysis DateTime?\n}\n\nmodel Notebook {\n id String @id @default(cuid())\n name String\n icon String?\n color String?\n order Int\n userId String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Label {\n id String @id @default(cuid())\n name String\n color String @default(\"gray\")\n notebookId String?\n userId String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String @unique\n emailVerified DateTime?\n password String?\n role String @default(\"USER\")\n image String?\n theme String @default(\"light\")\n resetToken String? @unique\n resetTokenExpiry DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Account {\n userId String\n type String\n provider String\n providerAccountId String\n refresh_token String?\n access_token String?\n expires_at Int?\n token_type String?\n scope String?\n id_token String?\n session_state String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@id([provider, providerAccountId])\n}\n\nmodel Session {\n sessionToken String @unique\n userId String\n expires DateTime\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel VerificationToken {\n identifier String\n token String\n expires DateTime\n\n @@id([identifier, token])\n}\n\nmodel NoteShare {\n id String @id @default(cuid())\n noteId String\n userId String\n sharedBy String\n status String @default(\"pending\")\n permission String @default(\"view\")\n notifiedAt DateTime?\n respondedAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([noteId, userId])\n}\n\nmodel SystemConfig {\n key String @id\n value String\n}\n\nmodel AiFeedback {\n id String @id @default(cuid())\n noteId String\n userId String?\n feedbackType String\n feature String\n originalContent String\n correctedContent String?\n metadata String?\n createdAt DateTime @default(now())\n}\n\nmodel MemoryEchoInsight {\n id String @id @default(cuid())\n userId String?\n note1Id String\n note2Id String\n similarityScore Float\n insight String\n insightDate DateTime @default(now())\n viewed Boolean @default(false)\n feedback String?\n dismissed Boolean @default(false)\n\n @@unique([userId, insightDate])\n}\n\nmodel UserAISettings {\n userId String @id\n titleSuggestions Boolean @default(true)\n semanticSearch Boolean @default(true)\n paragraphRefactor Boolean @default(true)\n memoryEcho Boolean @default(true)\n memoryEchoFrequency String @default(\"daily\")\n aiProvider String @default(\"auto\")\n preferredLanguage String @default(\"auto\")\n fontSize String @default(\"medium\")\n demoMode Boolean @default(false)\n showRecentNotes Boolean @default(false)\n emailNotifications Boolean @default(false)\n desktopNotifications Boolean @default(false)\n anonymousAnalytics Boolean @default(false)\n}\n", - "inlineSchemaHash": "6ce10c6c9fc6897f9259cc0a3de8b8d6f20d740bb72c180eca62e4dbc01158ab", + "inlineSchema": "// ============================================================================\n// MCP Server Schema — exact copy from memento-note (source of truth)\n// Only includes models used by MCP tools.\n// Do NOT modify independently — always sync with memento-note/prisma/schema.prisma\n// ============================================================================\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"../node_modules/.prisma/client\"\n binaryTargets = [\"linux-musl-openssl-3.0.x\", \"native\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n// ── Core models (used by MCP tools) ─────────────────────────────────────────\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String @unique\n emailVerified DateTime?\n password String?\n role String @default(\"USER\")\n image String?\n theme String @default(\"light\")\n cardSizeMode String @default(\"variable\")\n resetToken String? @unique\n resetTokenExpiry DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n accounts Account[]\n aiFeedback AiFeedback[]\n labels Label[]\n memoryEchoInsights MemoryEchoInsight[]\n notes Note[]\n sentShares NoteShare[] @relation(\"SentShares\")\n receivedShares NoteShare[] @relation(\"ReceivedShares\")\n notebooks Notebook[]\n sessions Session[]\n aiSettings UserAISettings?\n}\n\nmodel Notebook {\n id String @id @default(cuid())\n name String\n icon String?\n color String?\n order Int\n userId String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n labels Label[]\n notes Note[]\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([userId, order])\n @@index([userId])\n}\n\nmodel Label {\n id String @id @default(cuid())\n name String\n color String @default(\"gray\")\n notebookId String?\n userId String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n user User? @relation(fields: [userId], references: [id], onDelete: Cascade)\n notebook Notebook? @relation(fields: [notebookId], references: [id], onDelete: Cascade)\n notes Note[] @relation(\"LabelToNote\")\n\n @@unique([notebookId, name])\n @@index([notebookId])\n @@index([userId])\n}\n\nmodel Note {\n id String @id @default(cuid())\n title String?\n content String\n color String @default(\"default\")\n isPinned Boolean @default(false)\n isArchived Boolean @default(false)\n trashedAt DateTime?\n type String @default(\"text\")\n dismissedFromRecent Boolean @default(false)\n checkItems String?\n labels String?\n images String?\n links String?\n reminder DateTime?\n isReminderDone Boolean @default(false)\n reminderRecurrence String?\n reminderLocation String?\n isMarkdown Boolean @default(false)\n size String @default(\"small\")\n sharedWith String?\n userId String?\n order Int @default(0)\n notebookId String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n contentUpdatedAt DateTime @default(now())\n autoGenerated Boolean?\n aiProvider String?\n aiConfidence Int?\n language String?\n languageConfidence Float?\n lastAiAnalysis DateTime?\n aiFeedback AiFeedback[]\n memoryEchoAsNote2 MemoryEchoInsight[] @relation(\"EchoNote2\")\n memoryEchoAsNote1 MemoryEchoInsight[] @relation(\"EchoNote1\")\n notebook Notebook? @relation(fields: [notebookId], references: [id])\n user User? @relation(fields: [userId], references: [id], onDelete: Cascade)\n shares NoteShare[]\n labelRelations Label[] @relation(\"LabelToNote\")\n noteEmbedding NoteEmbedding?\n\n @@index([isPinned])\n @@index([isArchived])\n @@index([trashedAt])\n @@index([order])\n @@index([reminder])\n @@index([userId])\n @@index([userId, notebookId])\n}\n\nmodel NoteEmbedding {\n id String @id @default(cuid())\n noteId String @unique\n embedding String\n createdAt DateTime @default(now())\n note Note @relation(fields: [noteId], references: [id], onDelete: Cascade)\n\n @@index([noteId])\n}\n\nmodel NoteShare {\n id String @id @default(cuid())\n noteId String\n userId String\n sharedBy String\n status String @default(\"pending\")\n permission String @default(\"view\")\n notifiedAt DateTime?\n respondedAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n sharer User @relation(\"SentShares\", fields: [sharedBy], references: [id], onDelete: Cascade)\n user User @relation(\"ReceivedShares\", fields: [userId], references: [id], onDelete: Cascade)\n note Note @relation(fields: [noteId], references: [id], onDelete: Cascade)\n\n @@unique([noteId, userId])\n @@index([userId])\n @@index([status])\n @@index([sharedBy])\n}\n\n// ── Supporting models (used for auth, AI features, config) ──────────────────\n\nmodel Account {\n userId String\n type String\n provider String\n providerAccountId String\n refresh_token String?\n access_token String?\n expires_at Int?\n token_type String?\n scope String?\n id_token String?\n session_state String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@id([provider, providerAccountId])\n}\n\nmodel Session {\n sessionToken String @unique\n userId String\n expires DateTime\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n}\n\nmodel VerificationToken {\n identifier String\n token String\n expires DateTime\n\n @@id([identifier, token])\n}\n\nmodel SystemConfig {\n key String @id\n value String\n}\n\nmodel AiFeedback {\n id String @id @default(cuid())\n noteId String\n userId String?\n feedbackType String\n feature String\n originalContent String\n correctedContent String?\n metadata String?\n createdAt DateTime @default(now())\n user User? @relation(fields: [userId], references: [id], onDelete: Cascade)\n note Note @relation(fields: [noteId], references: [id], onDelete: Cascade)\n\n @@index([noteId])\n @@index([userId])\n @@index([feature])\n}\n\nmodel MemoryEchoInsight {\n id String @id @default(cuid())\n userId String?\n note1Id String\n note2Id String\n similarityScore Float\n insight String\n insightDate DateTime @default(now())\n viewed Boolean @default(false)\n feedback String?\n dismissed Boolean @default(false)\n user User? @relation(fields: [userId], references: [id], onDelete: Cascade)\n note2 Note @relation(\"EchoNote2\", fields: [note2Id], references: [id], onDelete: Cascade)\n note1 Note @relation(\"EchoNote1\", fields: [note1Id], references: [id], onDelete: Cascade)\n\n @@unique([userId, insightDate])\n @@index([userId, insightDate])\n @@index([userId, dismissed])\n}\n\nmodel UserAISettings {\n userId String @id\n titleSuggestions Boolean @default(true)\n semanticSearch Boolean @default(true)\n paragraphRefactor Boolean @default(true)\n memoryEcho Boolean @default(true)\n memoryEchoFrequency String @default(\"daily\")\n aiProvider String @default(\"auto\")\n preferredLanguage String @default(\"auto\")\n fontSize String @default(\"medium\")\n demoMode Boolean @default(false)\n showRecentNotes Boolean @default(true)\n notesViewMode String @default(\"masonry\")\n emailNotifications Boolean @default(false)\n desktopNotifications Boolean @default(false)\n anonymousAnalytics Boolean @default(false)\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([memoryEcho])\n @@index([aiProvider])\n @@index([memoryEchoFrequency])\n @@index([preferredLanguage])\n}\n", + "inlineSchemaHash": "9a602250e87548646a4ad9a989e42dceb241423b3abb7af86833cf0d47729938", "copyEngine": true } @@ -341,7 +365,7 @@ if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { config.isBundled = true } -config.runtimeDataModel = JSON.parse("{\"models\":{\"Note\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"content\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"default\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isPinned\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isArchived\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"text\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"checkItems\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labels\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"images\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"links\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminder\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isReminderDone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminderRecurrence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminderLocation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isMarkdown\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"size\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"small\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"embedding\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sharedWith\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebookId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"autoGenerated\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiProvider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiConfidence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"language\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"languageConfidence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastAiAnalysis\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notebook\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"icon\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Label\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"gray\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebookId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"User\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"emailVerified\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"USER\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"image\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"theme\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"light\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resetToken\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resetTokenExpiry\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Account\":{\"dbName\":null,\"fields\":[{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"provider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"providerAccountId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"refresh_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"access_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"token_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scope\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"id_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"session_state\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":{\"name\":null,\"fields\":[\"provider\",\"providerAccountId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Session\":{\"dbName\":null,\"fields\":[{\"name\":\"sessionToken\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"VerificationToken\":{\"dbName\":null,\"fields\":[{\"name\":\"identifier\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"identifier\",\"token\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"NoteShare\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sharedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"pending\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"permission\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"view\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifiedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"respondedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[[\"noteId\",\"userId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"noteId\",\"userId\"]}],\"isGenerated\":false},\"SystemConfig\":{\"dbName\":null,\"fields\":[{\"name\":\"key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AiFeedback\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feedbackType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feature\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"originalContent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"correctedContent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"metadata\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MemoryEchoInsight\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note1Id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note2Id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"similarityScore\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"insight\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"insightDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"viewed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feedback\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dismissed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"userId\",\"insightDate\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"userId\",\"insightDate\"]}],\"isGenerated\":false},\"UserAISettings\":{\"dbName\":null,\"fields\":[{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"titleSuggestions\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"semanticSearch\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"paragraphRefactor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEcho\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoFrequency\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"daily\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiProvider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"auto\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preferredLanguage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"auto\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fontSize\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"medium\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoMode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"showRecentNotes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"emailNotifications\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"desktopNotifications\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"anonymousAnalytics\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"emailVerified\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"USER\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"image\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"theme\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"light\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cardSizeMode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"variable\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resetToken\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resetTokenExpiry\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"accounts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Account\",\"relationName\":\"AccountToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiFeedback\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AiFeedback\",\"relationName\":\"AiFeedbackToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labels\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Label\",\"relationName\":\"LabelToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoInsights\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MemoryEchoInsight\",\"relationName\":\"MemoryEchoInsightToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"NoteToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentShares\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NoteShare\",\"relationName\":\"SentShares\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"receivedShares\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NoteShare\",\"relationName\":\"ReceivedShares\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebooks\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notebook\",\"relationName\":\"NotebookToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sessions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Session\",\"relationName\":\"SessionToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiSettings\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserAISettings\",\"relationName\":\"UserToUserAISettings\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notebook\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"icon\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"labels\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Label\",\"relationName\":\"LabelToNotebook\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"NoteToNotebook\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"NotebookToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Label\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"gray\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebookId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"LabelToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebook\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notebook\",\"relationName\":\"LabelToNotebook\",\"relationFromFields\":[\"notebookId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"LabelToNote\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"notebookId\",\"name\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"notebookId\",\"name\"]}],\"isGenerated\":false},\"Note\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"content\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"default\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isPinned\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isArchived\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"trashedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"text\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dismissedFromRecent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"checkItems\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labels\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"images\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"links\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminder\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isReminderDone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminderRecurrence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminderLocation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isMarkdown\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"size\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"small\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sharedWith\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebookId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"contentUpdatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"autoGenerated\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiProvider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiConfidence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"language\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"languageConfidence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastAiAnalysis\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiFeedback\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AiFeedback\",\"relationName\":\"AiFeedbackToNote\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoAsNote2\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MemoryEchoInsight\",\"relationName\":\"EchoNote2\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoAsNote1\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MemoryEchoInsight\",\"relationName\":\"EchoNote1\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebook\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notebook\",\"relationName\":\"NoteToNotebook\",\"relationFromFields\":[\"notebookId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"NoteToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"shares\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NoteShare\",\"relationName\":\"NoteToNoteShare\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labelRelations\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Label\",\"relationName\":\"LabelToNote\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noteEmbedding\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NoteEmbedding\",\"relationName\":\"NoteToNoteEmbedding\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"NoteEmbedding\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"embedding\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"NoteToNoteEmbedding\",\"relationFromFields\":[\"noteId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"NoteShare\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sharedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"pending\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"permission\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"view\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifiedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"respondedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"sharer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"SentShares\",\"relationFromFields\":[\"sharedBy\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"ReceivedShares\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"NoteToNoteShare\",\"relationFromFields\":[\"noteId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"noteId\",\"userId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"noteId\",\"userId\"]}],\"isGenerated\":false},\"Account\":{\"dbName\":null,\"fields\":[{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"provider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"providerAccountId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"refresh_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"access_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"token_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scope\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"id_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"session_state\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"AccountToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"provider\",\"providerAccountId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Session\":{\"dbName\":null,\"fields\":[{\"name\":\"sessionToken\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"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\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"SessionToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"VerificationToken\":{\"dbName\":null,\"fields\":[{\"name\":\"identifier\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"identifier\",\"token\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SystemConfig\":{\"dbName\":null,\"fields\":[{\"name\":\"key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AiFeedback\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feedbackType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feature\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"originalContent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"correctedContent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"metadata\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"AiFeedbackToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"AiFeedbackToNote\",\"relationFromFields\":[\"noteId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MemoryEchoInsight\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note1Id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note2Id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"similarityScore\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"insight\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"insightDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"viewed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feedback\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dismissed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"MemoryEchoInsightToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note2\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"EchoNote2\",\"relationFromFields\":[\"note2Id\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note1\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"EchoNote1\",\"relationFromFields\":[\"note1Id\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"userId\",\"insightDate\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"userId\",\"insightDate\"]}],\"isGenerated\":false},\"UserAISettings\":{\"dbName\":null,\"fields\":[{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"titleSuggestions\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"semanticSearch\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"paragraphRefactor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEcho\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoFrequency\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"daily\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiProvider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"auto\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preferredLanguage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"auto\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fontSize\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"medium\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoMode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"showRecentNotes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notesViewMode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"masonry\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"emailNotifications\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"desktopNotifications\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"anonymousAnalytics\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"UserToUserAISettings\",\"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 @@ -358,8 +382,12 @@ exports.PrismaClient = PrismaClient Object.assign(exports, Prisma) // file annotations for bundling tools to include these files -path.join(__dirname, "libquery_engine-darwin-arm64.dylib.node"); -path.join(process.cwd(), "node_modules/.prisma/client/libquery_engine-darwin-arm64.dylib.node") +path.join(__dirname, "libquery_engine-linux-musl-openssl-3.0.x.so.node"); +path.join(process.cwd(), "node_modules/.prisma/client/libquery_engine-linux-musl-openssl-3.0.x.so.node") + +// file annotations for bundling tools to include these files +path.join(__dirname, "libquery_engine-debian-openssl-3.0.x.so.node"); +path.join(process.cwd(), "node_modules/.prisma/client/libquery_engine-debian-openssl-3.0.x.so.node") // file annotations for bundling tools to include these files path.join(__dirname, "schema.prisma"); path.join(process.cwd(), "node_modules/.prisma/client/schema.prisma") diff --git a/mcp-server/node_modules/.prisma/client/package.json b/mcp-server/node_modules/.prisma/client/package.json index dd078b4..94fcc66 100644 --- a/mcp-server/node_modules/.prisma/client/package.json +++ b/mcp-server/node_modules/.prisma/client/package.json @@ -1,5 +1,5 @@ { - "name": "prisma-client-07b35a59db17a461d4c7b787cc433edb9e7b79a627ae71660fd00cce5311cf75", + "name": "prisma-client-8c3c28a242bf05b03713c0c3d78783f929261d76a15352bcfc52a1cfa1e7f92a", "main": "index.js", "types": "index.d.ts", "browser": "index-browser.js", diff --git a/mcp-server/node_modules/.prisma/client/schema.prisma b/mcp-server/node_modules/.prisma/client/schema.prisma index e930253..b1528fa 100644 --- a/mcp-server/node_modules/.prisma/client/schema.prisma +++ b/mcp-server/node_modules/.prisma/client/schema.prisma @@ -1,44 +1,46 @@ +// ============================================================================ +// MCP Server Schema — exact copy from memento-note (source of truth) +// Only includes models used by MCP tools. +// Do NOT modify independently — always sync with memento-note/prisma/schema.prisma +// ============================================================================ + generator client { - provider = "prisma-client-js" - output = "../node_modules/.prisma/client" + provider = "prisma-client-js" + output = "../node_modules/.prisma/client" + binaryTargets = ["linux-musl-openssl-3.0.x", "native"] } datasource db { - provider = "sqlite" - url = "file:../../memento-note/prisma/dev.db" + provider = "postgresql" + url = env("DATABASE_URL") } -model Note { - id String @id @default(cuid()) - title String? - content String - color String @default("default") - isPinned Boolean @default(false) - isArchived Boolean @default(false) - type String @default("text") - checkItems String? - labels String? - images String? - links String? - reminder DateTime? - isReminderDone Boolean @default(false) - reminderRecurrence String? - reminderLocation String? - isMarkdown Boolean @default(false) - size String @default("small") - embedding String? - sharedWith String? - userId String? - order Int @default(0) - notebookId String? - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - autoGenerated Boolean? - aiProvider String? - aiConfidence Int? - language String? - languageConfidence Float? - lastAiAnalysis DateTime? +// ── Core models (used by MCP tools) ───────────────────────────────────────── + +model User { + id String @id @default(cuid()) + name String? + email String @unique + emailVerified DateTime? + password String? + role String @default("USER") + image String? + theme String @default("light") + cardSizeMode String @default("variable") + resetToken String? @unique + resetTokenExpiry DateTime? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + accounts Account[] + aiFeedback AiFeedback[] + labels Label[] + memoryEchoInsights MemoryEchoInsight[] + notes Note[] + sentShares NoteShare[] @relation("SentShares") + receivedShares NoteShare[] @relation("ReceivedShares") + notebooks Notebook[] + sessions Session[] + aiSettings UserAISettings? } model Notebook { @@ -50,33 +52,115 @@ model Notebook { userId String createdAt DateTime @default(now()) updatedAt DateTime @updatedAt + labels Label[] + notes Note[] + user User @relation(fields: [userId], references: [id], onDelete: Cascade) + + @@index([userId, order]) + @@index([userId]) } model Label { - id String @id @default(cuid()) + id String @id @default(cuid()) name String - color String @default("gray") + color String @default("gray") notebookId String? userId String? - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + user User? @relation(fields: [userId], references: [id], onDelete: Cascade) + notebook Notebook? @relation(fields: [notebookId], references: [id], onDelete: Cascade) + notes Note[] @relation("LabelToNote") + + @@unique([notebookId, name]) + @@index([notebookId]) + @@index([userId]) } -model User { - id String @id @default(cuid()) - name String? - email String @unique - emailVerified DateTime? - password String? - role String @default("USER") - image String? - theme String @default("light") - resetToken String? @unique - resetTokenExpiry DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt +model Note { + id String @id @default(cuid()) + title String? + content String + color String @default("default") + isPinned Boolean @default(false) + isArchived Boolean @default(false) + trashedAt DateTime? + type String @default("text") + dismissedFromRecent Boolean @default(false) + checkItems String? + labels String? + images String? + links String? + reminder DateTime? + isReminderDone Boolean @default(false) + reminderRecurrence String? + reminderLocation String? + isMarkdown Boolean @default(false) + size String @default("small") + sharedWith String? + userId String? + order Int @default(0) + notebookId String? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + contentUpdatedAt DateTime @default(now()) + autoGenerated Boolean? + aiProvider String? + aiConfidence Int? + language String? + languageConfidence Float? + lastAiAnalysis DateTime? + aiFeedback AiFeedback[] + memoryEchoAsNote2 MemoryEchoInsight[] @relation("EchoNote2") + memoryEchoAsNote1 MemoryEchoInsight[] @relation("EchoNote1") + notebook Notebook? @relation(fields: [notebookId], references: [id]) + user User? @relation(fields: [userId], references: [id], onDelete: Cascade) + shares NoteShare[] + labelRelations Label[] @relation("LabelToNote") + noteEmbedding NoteEmbedding? + + @@index([isPinned]) + @@index([isArchived]) + @@index([trashedAt]) + @@index([order]) + @@index([reminder]) + @@index([userId]) + @@index([userId, notebookId]) } +model NoteEmbedding { + id String @id @default(cuid()) + noteId String @unique + embedding String + createdAt DateTime @default(now()) + note Note @relation(fields: [noteId], references: [id], onDelete: Cascade) + + @@index([noteId]) +} + +model NoteShare { + id String @id @default(cuid()) + noteId String + userId String + sharedBy String + status String @default("pending") + permission String @default("view") + notifiedAt DateTime? + respondedAt DateTime? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + sharer User @relation("SentShares", fields: [sharedBy], references: [id], onDelete: Cascade) + user User @relation("ReceivedShares", fields: [userId], references: [id], onDelete: Cascade) + note Note @relation(fields: [noteId], references: [id], onDelete: Cascade) + + @@unique([noteId, userId]) + @@index([userId]) + @@index([status]) + @@index([sharedBy]) +} + +// ── Supporting models (used for auth, AI features, config) ────────────────── + model Account { userId String type String @@ -91,6 +175,7 @@ model Account { session_state String? createdAt DateTime @default(now()) updatedAt DateTime @updatedAt + user User @relation(fields: [userId], references: [id], onDelete: Cascade) @@id([provider, providerAccountId]) } @@ -101,6 +186,7 @@ model Session { expires DateTime createdAt DateTime @default(now()) updatedAt DateTime @updatedAt + user User @relation(fields: [userId], references: [id], onDelete: Cascade) } model VerificationToken { @@ -111,21 +197,6 @@ model VerificationToken { @@id([identifier, token]) } -model NoteShare { - id String @id @default(cuid()) - noteId String - userId String - sharedBy String - status String @default("pending") - permission String @default("view") - notifiedAt DateTime? - respondedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - @@unique([noteId, userId]) -} - model SystemConfig { key String @id value String @@ -141,6 +212,12 @@ model AiFeedback { correctedContent String? metadata String? createdAt DateTime @default(now()) + user User? @relation(fields: [userId], references: [id], onDelete: Cascade) + note Note @relation(fields: [noteId], references: [id], onDelete: Cascade) + + @@index([noteId]) + @@index([userId]) + @@index([feature]) } model MemoryEchoInsight { @@ -154,8 +231,13 @@ model MemoryEchoInsight { viewed Boolean @default(false) feedback String? dismissed Boolean @default(false) + user User? @relation(fields: [userId], references: [id], onDelete: Cascade) + note2 Note @relation("EchoNote2", fields: [note2Id], references: [id], onDelete: Cascade) + note1 Note @relation("EchoNote1", fields: [note1Id], references: [id], onDelete: Cascade) @@unique([userId, insightDate]) + @@index([userId, insightDate]) + @@index([userId, dismissed]) } model UserAISettings { @@ -169,8 +251,15 @@ model UserAISettings { preferredLanguage String @default("auto") fontSize String @default("medium") demoMode Boolean @default(false) - showRecentNotes Boolean @default(false) + showRecentNotes Boolean @default(true) + notesViewMode String @default("masonry") emailNotifications Boolean @default(false) desktopNotifications Boolean @default(false) anonymousAnalytics Boolean @default(false) + user User @relation(fields: [userId], references: [id], onDelete: Cascade) + + @@index([memoryEcho]) + @@index([aiProvider]) + @@index([memoryEchoFrequency]) + @@index([preferredLanguage]) } diff --git a/mcp-server/node_modules/.prisma/client/wasm.js b/mcp-server/node_modules/.prisma/client/wasm.js index b2f36bf..84773ba 100644 --- a/mcp-server/node_modules/.prisma/client/wasm.js +++ b/mcp-server/node_modules/.prisma/client/wasm.js @@ -116,40 +116,26 @@ Prisma.NullTypes = { */ exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', Serializable: 'Serializable' }); -exports.Prisma.NoteScalarFieldEnum = { +exports.Prisma.UserScalarFieldEnum = { id: 'id', - title: 'title', - content: 'content', - color: 'color', - isPinned: 'isPinned', - isArchived: 'isArchived', - type: 'type', - checkItems: 'checkItems', - labels: 'labels', - images: 'images', - links: 'links', - reminder: 'reminder', - isReminderDone: 'isReminderDone', - reminderRecurrence: 'reminderRecurrence', - reminderLocation: 'reminderLocation', - isMarkdown: 'isMarkdown', - size: 'size', - embedding: 'embedding', - sharedWith: 'sharedWith', - userId: 'userId', - order: 'order', - notebookId: 'notebookId', + name: 'name', + email: 'email', + emailVerified: 'emailVerified', + password: 'password', + role: 'role', + image: 'image', + theme: 'theme', + cardSizeMode: 'cardSizeMode', + resetToken: 'resetToken', + resetTokenExpiry: 'resetTokenExpiry', createdAt: 'createdAt', - updatedAt: 'updatedAt', - autoGenerated: 'autoGenerated', - aiProvider: 'aiProvider', - aiConfidence: 'aiConfidence', - language: 'language', - languageConfidence: 'languageConfidence', - lastAiAnalysis: 'lastAiAnalysis' + updatedAt: 'updatedAt' }; exports.Prisma.NotebookScalarFieldEnum = { @@ -173,17 +159,57 @@ exports.Prisma.LabelScalarFieldEnum = { updatedAt: 'updatedAt' }; -exports.Prisma.UserScalarFieldEnum = { +exports.Prisma.NoteScalarFieldEnum = { id: 'id', - name: 'name', - email: 'email', - emailVerified: 'emailVerified', - password: 'password', - role: 'role', - image: 'image', - theme: 'theme', - resetToken: 'resetToken', - resetTokenExpiry: 'resetTokenExpiry', + title: 'title', + content: 'content', + color: 'color', + isPinned: 'isPinned', + isArchived: 'isArchived', + trashedAt: 'trashedAt', + type: 'type', + dismissedFromRecent: 'dismissedFromRecent', + checkItems: 'checkItems', + labels: 'labels', + images: 'images', + links: 'links', + reminder: 'reminder', + isReminderDone: 'isReminderDone', + reminderRecurrence: 'reminderRecurrence', + reminderLocation: 'reminderLocation', + isMarkdown: 'isMarkdown', + size: 'size', + sharedWith: 'sharedWith', + userId: 'userId', + order: 'order', + notebookId: 'notebookId', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + contentUpdatedAt: 'contentUpdatedAt', + autoGenerated: 'autoGenerated', + aiProvider: 'aiProvider', + aiConfidence: 'aiConfidence', + language: 'language', + languageConfidence: 'languageConfidence', + lastAiAnalysis: 'lastAiAnalysis' +}; + +exports.Prisma.NoteEmbeddingScalarFieldEnum = { + id: 'id', + noteId: 'noteId', + embedding: 'embedding', + createdAt: 'createdAt' +}; + +exports.Prisma.NoteShareScalarFieldEnum = { + id: 'id', + noteId: 'noteId', + userId: 'userId', + sharedBy: 'sharedBy', + status: 'status', + permission: 'permission', + notifiedAt: 'notifiedAt', + respondedAt: 'respondedAt', createdAt: 'createdAt', updatedAt: 'updatedAt' }; @@ -218,19 +244,6 @@ exports.Prisma.VerificationTokenScalarFieldEnum = { expires: 'expires' }; -exports.Prisma.NoteShareScalarFieldEnum = { - id: 'id', - noteId: 'noteId', - userId: 'userId', - sharedBy: 'sharedBy', - status: 'status', - permission: 'permission', - notifiedAt: 'notifiedAt', - respondedAt: 'respondedAt', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - exports.Prisma.SystemConfigScalarFieldEnum = { key: 'key', value: 'value' @@ -273,6 +286,7 @@ exports.Prisma.UserAISettingsScalarFieldEnum = { fontSize: 'fontSize', demoMode: 'demoMode', showRecentNotes: 'showRecentNotes', + notesViewMode: 'notesViewMode', emailNotifications: 'emailNotifications', desktopNotifications: 'desktopNotifications', anonymousAnalytics: 'anonymousAnalytics' @@ -283,6 +297,11 @@ exports.Prisma.SortOrder = { desc: 'desc' }; +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + exports.Prisma.NullsOrder = { first: 'first', last: 'last' @@ -290,14 +309,15 @@ exports.Prisma.NullsOrder = { exports.Prisma.ModelName = { - Note: 'Note', + User: 'User', Notebook: 'Notebook', Label: 'Label', - User: 'User', + Note: 'Note', + NoteEmbedding: 'NoteEmbedding', + NoteShare: 'NoteShare', Account: 'Account', Session: 'Session', VerificationToken: 'VerificationToken', - NoteShare: 'NoteShare', SystemConfig: 'SystemConfig', AiFeedback: 'AiFeedback', MemoryEchoInsight: 'MemoryEchoInsight', diff --git a/mcp-server/package-lock.json b/mcp-server/package-lock.json index a851e09..36666ce 100644 --- a/mcp-server/package-lock.json +++ b/mcp-server/package-lock.json @@ -870,6 +870,7 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, diff --git a/mcp-server/tools.js b/mcp-server/tools.js index 9470184..a7f3f56 100644 --- a/mcp-server/tools.js +++ b/mcp-server/tools.js @@ -1,13 +1,8 @@ /** - * Memento MCP Server - Optimized Tool Definitions & Handlers + * Memento MCP Server - Tool Definitions & Handlers * - * Performance optimizations: - * - O(1) API key lookup with caching - * - Batch operations for imports - * - Parallel promise execution - * - HTTP timeout wrapper - * - N+1 query fixes - * - Connection pooling + * Fast, minimal overhead. All queries filter trashed notes. + * Compact JSON output. Direct DB lookups. */ import { @@ -18,12 +13,12 @@ import { } from '@modelcontextprotocol/sdk/types.js'; import { requestContext } from './request-context.js'; -// ─── Configuration ───────────────────────────────────────────────────────── - const DEFAULT_SEARCH_LIMIT = 50; const DEFAULT_NOTES_LIMIT = 100; +const MAX_NOTES_LIMIT = 500; -// ─── Helpers ──────────────────────────────────────────────────────────────── +const NOTE_COLORS = 'default, red, orange, yellow, green, teal, blue, purple, pink, gray'; +const LABEL_COLORS = 'red, orange, yellow, green, teal, blue, purple, pink, gray'; export function parseNote(dbNote) { if (!dbNote) return null; @@ -66,65 +61,60 @@ export function parseNoteLightweight(dbNote) { function textResult(data) { return { - content: [{ type: 'text', text: JSON.stringify(data, null, 2) }], + content: [{ type: 'text', text: JSON.stringify(data) }], }; } -// ─── Tool Schemas ─────────────────────────────────────────────────────────── - -const NOTE_COLORS = ['default', 'red', 'orange', 'yellow', 'green', 'teal', 'blue', 'purple', 'pink', 'gray']; -const LABEL_COLORS = ['red', 'orange', 'yellow', 'green', 'teal', 'blue', 'purple', 'pink', 'gray']; +// ─── Tool Definitions ────────────────────────────────────────────────────── const toolDefinitions = [ - // ═══════════════════════════════════════════════════════════ - // NOTE TOOLS - // ═══════════════════════════════════════════════════════════ + // ═══ NOTES ═══ { name: 'create_note', - description: 'Create a new note. Supports text and checklist types, colors, labels, images, links, reminders, markdown, and notebook assignment.', + description: 'Create a new note. Set content (required), optional title, color, labels, notebook assignment, reminder, or checklist items.', inputSchema: { type: 'object', properties: { - title: { type: 'string', description: 'Note title (optional)' }, - content: { type: 'string', description: 'Note content (required)' }, - color: { type: 'string', description: `Note color: ${NOTE_COLORS.join(', ')}`, default: 'default' }, + title: { type: 'string', description: 'Note title' }, + content: { type: 'string', description: 'Note body text (required)' }, + color: { type: 'string', description: `Color: ${NOTE_COLORS}`, default: 'default' }, type: { type: 'string', enum: ['text', 'checklist'], description: 'Note type', default: 'text' }, checkItems: { type: 'array', - description: 'Checklist items (when type is checklist)', + description: 'Checklist items (when type=list)', items: { type: 'object', properties: { id: { type: 'string' }, text: { type: 'string' }, checked: { type: 'boolean' } }, required: ['id', 'text', 'checked'], }, }, - labels: { type: 'array', description: 'Note labels/tags', items: { type: 'string' } }, - isPinned: { type: 'boolean', description: 'Pin the note', default: false }, + labels: { type: 'array', description: 'Tags/labels', items: { type: 'string' } }, + isPinned: { type: 'boolean', description: 'Pin to top', default: false }, isArchived: { type: 'boolean', description: 'Create as archived', default: false }, - images: { type: 'array', description: 'Image URLs or base64 strings', items: { type: 'string' } }, - links: { type: 'array', description: 'URLs attached to the note', items: { type: 'string' } }, + images: { type: 'array', description: 'Image URLs', items: { type: 'string' } }, + links: { type: 'array', description: 'Attached URLs', items: { type: 'string' } }, reminder: { type: 'string', description: 'Reminder datetime (ISO 8601)' }, isReminderDone: { type: 'boolean', default: false }, - reminderRecurrence: { type: 'string', description: 'Recurrence: daily, weekly, monthly, yearly' }, - reminderLocation: { type: 'string', description: 'Location-based reminder' }, - isMarkdown: { type: 'boolean', description: 'Enable markdown rendering', default: false }, + reminderRecurrence: { type: 'string', description: 'daily, weekly, monthly, yearly' }, + reminderLocation: { type: 'string', description: 'Location string' }, + isMarkdown: { type: 'boolean', description: 'Render as markdown', default: false }, size: { type: 'string', enum: ['small', 'medium', 'large'], default: 'small' }, - notebookId: { type: 'string', description: 'Notebook to assign the note to' }, + notebookId: { type: 'string', description: 'Assign to notebook' }, }, required: ['content'], }, }, { name: 'get_notes', - description: 'Get notes with optional filters. Returns lightweight format by default (truncated content, no images). Use fullDetails=true for complete data.', + description: 'List notes. Returns lightweight format by default (truncated content, no images). Use fullDetails=true for full payloads.', inputSchema: { type: 'object', properties: { includeArchived: { type: 'boolean', description: 'Include archived notes', default: false }, - search: { type: 'string', description: 'Filter by keyword in title/content' }, - notebookId: { type: 'string', description: 'Filter by notebook ID. Use "inbox" for notes without a notebook' }, - fullDetails: { type: 'boolean', description: 'Return full details including images (large payload)', default: false }, - limit: { type: 'number', description: `Max notes to return (default ${DEFAULT_NOTES_LIMIT})`, default: DEFAULT_NOTES_LIMIT }, + search: { type: 'string', description: 'Keyword filter on title/content' }, + notebookId: { type: 'string', description: 'Filter by notebook. Use "inbox" for unfiled notes.' }, + fullDetails: { type: 'boolean', description: 'Full payload including images', default: false }, + limit: { type: 'number', description: `Max results (default ${DEFAULT_NOTES_LIMIT})`, default: DEFAULT_NOTES_LIMIT }, }, }, }, @@ -139,14 +129,14 @@ const toolDefinitions = [ }, { name: 'update_note', - description: 'Update an existing note. Only include fields you want to change.', + description: 'Update a note. Only fields you include will be changed.', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Note ID' }, title: { type: 'string' }, content: { type: 'string' }, - color: { type: 'string', description: `One of: ${NOTE_COLORS.join(', ')}` }, + color: { type: 'string', description: `One of: ${NOTE_COLORS}` }, type: { type: 'string', enum: ['text', 'checklist'] }, checkItems: { type: 'array', @@ -173,7 +163,7 @@ const toolDefinitions = [ }, { name: 'delete_note', - description: 'Delete a note by ID.', + description: 'Permanently delete a note.', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Note ID' } }, @@ -187,7 +177,7 @@ const toolDefinitions = [ type: 'object', properties: { query: { type: 'string', description: 'Search query' }, - notebookId: { type: 'string', description: 'Limit search to a notebook' }, + notebookId: { type: 'string', description: 'Limit to a notebook' }, includeArchived: { type: 'boolean', default: false }, }, required: ['query'], @@ -195,12 +185,12 @@ const toolDefinitions = [ }, { name: 'move_note', - description: 'Move a note to a different notebook. Pass null for notebookId to move to Inbox.', + description: 'Move a note to a notebook. Set notebookId to null to move to Inbox.', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Note ID' }, - notebookId: { type: 'string', description: 'Target notebook ID, or null/empty for Inbox' }, + notebookId: { type: 'string', description: 'Target notebook ID, or null for Inbox' }, }, required: ['id'], }, @@ -225,18 +215,18 @@ const toolDefinitions = [ }, { name: 'export_notes', - description: 'Export all notes, labels, and notebooks as a JSON object.', + description: 'Export all notes, notebooks, and labels as JSON.', inputSchema: { type: 'object', properties: {} }, }, { name: 'import_notes', - description: 'Import notes from a previously exported JSON object. Skips duplicates by name.', + description: 'Import notes, notebooks, and labels from a previous export. Duplicates are skipped.', inputSchema: { type: 'object', properties: { data: { type: 'object', - description: 'The exported JSON data (from export_notes)', + description: 'Export JSON (from export_notes)', properties: { version: { type: 'string' }, data: { @@ -254,31 +244,29 @@ const toolDefinitions = [ }, }, - // ═══════════════════════════════════════════════════════════ - // NOTEBOOK TOOLS - // ═══════════════════════════════════════════════════════════ + // ═══ NOTEBOOKS ═══ { name: 'create_notebook', - description: 'Create a new notebook.', + description: 'Create a notebook with a name, icon, and color.', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Notebook name' }, - icon: { type: 'string', description: 'Notebook icon (emoji)', default: '📁' }, - color: { type: 'string', description: 'Hex color code', default: '#3B82F6' }, - order: { type: 'number', description: 'Sort position (auto-assigned if omitted)' }, + icon: { type: 'string', description: 'Icon (emoji)', default: '📁' }, + color: { type: 'string', description: 'Hex color', default: '#3B82F6' }, + order: { type: 'number', description: 'Sort position (auto if omitted)' }, }, required: ['name'], }, }, { name: 'get_notebooks', - description: 'Get all notebooks with label and note counts.', + description: 'List all notebooks with label and note counts.', inputSchema: { type: 'object', properties: {} }, }, { name: 'get_notebook', - description: 'Get a notebook by ID, including its notes.', + description: 'Get a notebook by ID including its notes.', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Notebook ID' } }, @@ -287,7 +275,7 @@ const toolDefinitions = [ }, { name: 'update_notebook', - description: 'Update a notebook\'s name, icon, color, or order.', + description: 'Update a notebook name, icon, color, or order.', inputSchema: { type: 'object', properties: { @@ -302,7 +290,7 @@ const toolDefinitions = [ }, { name: 'delete_notebook', - description: 'Delete a notebook. Notes inside will be moved to Inbox.', + description: 'Delete a notebook. Notes inside are moved to Inbox.', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Notebook ID' } }, @@ -311,13 +299,13 @@ const toolDefinitions = [ }, { name: 'reorder_notebooks', - description: 'Reorder notebooks. Pass an ordered array of notebook IDs.', + description: 'Set the order of all notebooks by passing their IDs in sequence.', inputSchema: { type: 'object', properties: { notebookIds: { type: 'array', - description: 'Notebook IDs in the desired order', + description: 'Notebook IDs in desired order', items: { type: 'string' }, }, }, @@ -325,35 +313,33 @@ const toolDefinitions = [ }, }, - // ═══════════════════════════════════════════════════════════ - // LABEL TOOLS - // ═══════════════════════════════════════════════════════════ + // ═══ LABELS ═══ { name: 'create_label', - description: 'Create a label in a notebook.', + description: 'Create a label inside a notebook.', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Label name' }, - color: { type: 'string', description: `Label color: ${LABEL_COLORS.join(', ')}` }, - notebookId: { type: 'string', description: 'Notebook to attach the label to' }, + color: { type: 'string', description: `Color: ${LABEL_COLORS}` }, + notebookId: { type: 'string', description: 'Parent notebook ID' }, }, required: ['name', 'notebookId'], }, }, { name: 'get_labels', - description: 'Get all labels, optionally filtered by notebook.', + description: 'List labels, optionally filtered by notebook.', inputSchema: { type: 'object', properties: { - notebookId: { type: 'string', description: 'Filter labels by notebook ID' }, + notebookId: { type: 'string', description: 'Filter by notebook' }, }, }, }, { name: 'update_label', - description: 'Update a label\'s name or color.', + description: 'Update a label name or color.', inputSchema: { type: 'object', properties: { @@ -366,7 +352,7 @@ const toolDefinitions = [ }, { name: 'delete_label', - description: 'Delete a label by ID.', + description: 'Delete a label.', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Label ID' } }, @@ -374,33 +360,23 @@ const toolDefinitions = [ }, }, - // ═══════════════════════════════════════════════════════════ - // REMINDER TOOLS - // ═══════════════════════════════════════════════════════════ + // ═══ REMINDERS ═══ { name: 'get_due_reminders', - description: 'Get all notes with due reminders that haven\'t been processed yet. Designed for cron/automation use.', + description: 'Get notes with due reminders. Designed for cron/automation.', inputSchema: { type: 'object', properties: {} }, }, ]; // ─── Tool Handlers ────────────────────────────────────────────────────────── -/** - * Register all tools and handlers on an MCP Server instance. - * - * @param {import('@modelcontextprotocol/sdk/server/index.js').Server} server - * @param {import('@prisma/client').PrismaClient} prisma - */ export function registerTools(server, prisma) { - // Resolve userId per-request from AsyncLocalStorage (set by auth middleware) const getResolvedUserId = () => { const store = requestContext.getStore(); return store?.userId || null; }; - // Fallback: auto-detect first user when no auth context let fallbackUserId = null; let fallbackPromise = null; @@ -418,22 +394,24 @@ export function registerTools(server, prisma) { return fallbackPromise; }; - // ── List Tools ──────────────────────────────────────────────────────────── + const noteWhere = (resolvedUserId, extra = {}) => ({ + trashedAt: null, + ...(resolvedUserId ? { userId: resolvedUserId } : {}), + ...extra, + }); + server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: toolDefinitions }; }); - // ── Call Tools ──────────────────────────────────────────────────────────── server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; - const resolvedUserId = getResolvedUserId(); + const uid = getResolvedUserId(); try { switch (name) { - // ═══════════════════════════════════════════════════════ - // NOTES - // ═══════════════════════════════════════════════════════ + // ═══ NOTES ═══ case 'create_note': { const data = { title: args.title || null, @@ -453,31 +431,29 @@ export function registerTools(server, prisma) { isMarkdown: args.isMarkdown || false, size: args.size || 'small', notebookId: args.notebookId || null, + userId: uid || await ensureUserId(), }; - if (resolvedUserId) data.userId = resolvedUserId; - else data.userId = await ensureUserId(); const note = await prisma.note.create({ data }); return textResult(parseNote(note)); } case 'get_notes': { - const where = {}; - if (resolvedUserId) where.userId = resolvedUserId; - if (!args?.includeArchived) where.isArchived = false; + const extra = {}; + if (!args?.includeArchived) extra.isArchived = false; if (args?.search) { - where.OR = [ + extra.OR = [ { title: { contains: args.search } }, { content: { contains: args.search } }, ]; } if (args?.notebookId) { - where.notebookId = args.notebookId === 'inbox' ? null : args.notebookId; + extra.notebookId = args.notebookId === 'inbox' ? null : args.notebookId; } - const limit = Math.min(args?.limit || DEFAULT_NOTES_LIMIT, 500); // Max 500 + const limit = Math.min(args?.limit || DEFAULT_NOTES_LIMIT, MAX_NOTES_LIMIT); const notes = await prisma.note.findMany({ - where, + where: noteWhere(uid, extra), orderBy: [{ isPinned: 'desc' }, { order: 'asc' }, { updatedAt: 'desc' }], take: limit, }); @@ -487,50 +463,50 @@ export function registerTools(server, prisma) { } case 'get_note': { - const where = { id: args.id }; - if (resolvedUserId) where.userId = resolvedUserId; - const note = await prisma.note.findUnique({ where }); + const note = await prisma.note.findUnique({ + where: { id: args.id, ...(uid ? { userId: uid } : {}), trashedAt: null }, + }); if (!note) throw new McpError(ErrorCode.InvalidRequest, 'Note not found'); return textResult(parseNote(note)); } case 'update_note': { - const updateData = {}; - const fields = ['title', 'color', 'type', 'isPinned', 'isArchived', 'isMarkdown', 'size', 'notebookId', 'isReminderDone', 'reminderRecurrence', 'reminderLocation']; - for (const f of fields) { - if (f in args) updateData[f] = args[f]; + const d = {}; + const simpleFields = ['title', 'color', 'type', 'isPinned', 'isArchived', 'isMarkdown', 'size', 'notebookId', 'isReminderDone', 'reminderRecurrence', 'reminderLocation']; + for (const f of simpleFields) { + if (f in args) d[f] = args[f]; } - if ('content' in args) updateData.content = args.content; - if ('checkItems' in args) updateData.checkItems = args.checkItems ?? null; - if ('labels' in args) updateData.labels = args.labels ?? null; - if ('images' in args) updateData.images = args.images ?? null; - if ('links' in args) updateData.links = args.links ?? null; - if ('reminder' in args) updateData.reminder = args.reminder ? new Date(args.reminder) : null; - updateData.updatedAt = new Date(); + if ('content' in args) d.content = args.content; + if ('checkItems' in args) d.checkItems = args.checkItems ?? null; + if ('labels' in args) d.labels = args.labels ?? null; + if ('images' in args) d.images = args.images ?? null; + if ('links' in args) d.links = args.links ?? null; + if ('reminder' in args) d.reminder = args.reminder ? new Date(args.reminder) : null; + d.updatedAt = new Date(); - const where = { id: args.id }; - if (resolvedUserId) where.userId = resolvedUserId; - const note = await prisma.note.update({ where, data: updateData }); + const note = await prisma.note.update({ + where: { id: args.id, ...(uid ? { userId: uid } : {}), trashedAt: null }, + data: d, + }); return textResult(parseNote(note)); } case 'delete_note': { - const where = { id: args.id }; - if (resolvedUserId) where.userId = resolvedUserId; - await prisma.note.delete({ where }); - return textResult({ success: true, message: 'Note deleted' }); + await prisma.note.delete({ + where: { id: args.id, ...(uid ? { userId: uid } : {}), trashedAt: null }, + }); + return textResult({ success: true, deleted: args.id }); } case 'search_notes': { - const where = { + const where = noteWhere(uid, { isArchived: args.includeArchived || false, OR: [ { title: { contains: args.query } }, { content: { contains: args.query } }, ], - }; - if (resolvedUserId) where.userId = resolvedUserId; - if (args.notebookId) where.notebookId = args.notebookId; + ...(args.notebookId ? { notebookId: args.notebookId } : {}), + }); const notes = await prisma.note.findMany({ where, @@ -541,79 +517,61 @@ export function registerTools(server, prisma) { } case 'move_note': { - const noteWhere = { id: args.id }; - if (resolvedUserId) noteWhere.userId = resolvedUserId; + const targetId = args.notebookId || null; - const targetNotebookId = args.notebookId || null; - - // Optimized: Parallel execution const [note, notebook] = await Promise.all([ prisma.note.update({ - where: noteWhere, - data: { notebookId: targetNotebookId, updatedAt: new Date() }, + where: { id: args.id, ...(uid ? { userId: uid } : {}), trashedAt: null }, + data: { notebookId: targetId, updatedAt: new Date() }, }), - targetNotebookId - ? prisma.notebook.findUnique({ where: { id: targetNotebookId }, select: { name: true } }) + targetId + ? prisma.notebook.findUnique({ where: { id: targetId }, select: { name: true } }) : Promise.resolve(null), ]); - const notebookName = notebook?.name || 'Inbox'; - return textResult({ success: true, - data: { id: note.id, notebookId: note.notebookId, notebook: { name: notebookName } }, - message: `Note moved to ${notebookName}`, + id: note.id, + notebookId: note.notebookId, + notebookName: notebook?.name || 'Inbox', }); } case 'toggle_pin': { - const where = { id: args.id }; - if (resolvedUserId) where.userId = resolvedUserId; - const note = await prisma.note.findUnique({ where }); + const note = await prisma.note.findUnique({ + where: { id: args.id, ...(uid ? { userId: uid } : {}), trashedAt: null }, + }); if (!note) throw new McpError(ErrorCode.InvalidRequest, 'Note not found'); const updated = await prisma.note.update({ - where, + where: { id: args.id }, data: { isPinned: !note.isPinned }, }); return textResult(parseNote(updated)); } case 'toggle_archive': { - const where = { id: args.id }; - if (resolvedUserId) where.userId = resolvedUserId; - const note = await prisma.note.findUnique({ where }); + const note = await prisma.note.findUnique({ + where: { id: args.id, ...(uid ? { userId: uid } : {}), trashedAt: null }, + }); if (!note) throw new McpError(ErrorCode.InvalidRequest, 'Note not found'); const updated = await prisma.note.update({ - where, + where: { id: args.id }, data: { isArchived: !note.isArchived }, }); return textResult(parseNote(updated)); } case 'export_notes': { - const noteWhere = {}; - const nbWhere = {}; - if (resolvedUserId) { noteWhere.userId = resolvedUserId; nbWhere.userId = resolvedUserId; } + const nbWhere = uid ? { userId: uid } : {}; - // Optimized: Parallel queries const [notes, notebooks, labels] = await Promise.all([ - prisma.note.findMany({ - where: noteWhere, + prisma.note.findMany({ + where: noteWhere(uid), orderBy: { updatedAt: 'desc' }, select: { - id: true, - title: true, - content: true, - color: true, - type: true, - isPinned: true, - isArchived: true, - isMarkdown: true, - size: true, - labels: true, - notebookId: true, - createdAt: true, - updatedAt: true, + id: true, title: true, content: true, color: true, type: true, + isPinned: true, isArchived: true, isMarkdown: true, size: true, + labels: true, notebookId: true, createdAt: true, updatedAt: true, }, }), prisma.notebook.findMany({ @@ -626,9 +584,8 @@ export function registerTools(server, prisma) { }), ]); - // Filter labels by userId in memory (faster than multiple queries) - const filteredLabels = resolvedUserId - ? labels.filter(l => l.notebook?.userId === resolvedUserId) + const filteredLabels = uid + ? labels.filter(l => l.notebook?.userId === uid) : labels; return textResult({ @@ -636,32 +593,16 @@ export function registerTools(server, prisma) { exportDate: new Date().toISOString(), data: { notes: notes.map(n => ({ - id: n.id, - title: n.title, - content: n.content, - color: n.color, - type: n.type, - isPinned: n.isPinned, - isArchived: n.isArchived, - isMarkdown: n.isMarkdown, - size: n.size, - labels: Array.isArray(n.labels) ? n.labels : [], - notebookId: n.notebookId, - createdAt: n.createdAt, - updatedAt: n.updatedAt, + id: n.id, title: n.title, content: n.content, color: n.color, type: n.type, + isPinned: n.isPinned, isArchived: n.isArchived, isMarkdown: n.isMarkdown, + size: n.size, labels: Array.isArray(n.labels) ? n.labels : [], + notebookId: n.notebookId, createdAt: n.createdAt, updatedAt: n.updatedAt, })), notebooks: notebooks.map(nb => ({ - id: nb.id, - name: nb.name, - icon: nb.icon, - color: nb.color, - noteCount: nb._count.notes, + id: nb.id, name: nb.name, icon: nb.icon, color: nb.color, noteCount: nb._count.notes, })), labels: filteredLabels.map(l => ({ - id: l.id, - name: l.name, - color: l.color, - notebookId: l.notebookId, + id: l.id, name: l.name, color: l.color, notebookId: l.notebookId, })), }, }); @@ -671,60 +612,51 @@ export function registerTools(server, prisma) { const importData = args.data; let importedNotes = 0, importedLabels = 0, importedNotebooks = 0; - // OPTIMIZED: Batch operations with Promise.all for notebooks if (importData.data?.notebooks?.length > 0) { - const existingNotebooks = await prisma.notebook.findMany({ - where: resolvedUserId ? { userId: resolvedUserId } : {}, + const existing = await prisma.notebook.findMany({ + where: uid ? { userId: uid } : {}, select: { name: true }, }); - const existingNames = new Set(existingNotebooks.map(nb => nb.name)); + const existingNames = new Set(existing.map(nb => nb.name)); - const notebooksToCreate = importData.data.notebooks + const toCreate = importData.data.notebooks .filter(nb => !existingNames.has(nb.name)) - .map(nb => prisma.notebook.create({ - data: { - name: nb.name, - icon: nb.icon || '📁', - color: nb.color || '#3B82F6', - ...(resolvedUserId ? { userId: resolvedUserId } : {}), - }, + .map(nb => ({ + name: nb.name, + icon: nb.icon || '📁', + color: nb.color || '#3B82F6', + ...(uid ? { userId: uid } : {}), })); - await Promise.all(notebooksToCreate); - importedNotebooks = notebooksToCreate.length; + if (toCreate.length > 0) { + await prisma.notebook.createMany({ data: toCreate, skipDuplicates: true }); + importedNotebooks = toCreate.length; + } } - // OPTIMIZED: Batch labels if (importData.data?.labels?.length > 0) { const notebooks = await prisma.notebook.findMany({ - where: resolvedUserId ? { userId: resolvedUserId } : {}, + where: uid ? { userId: uid } : {}, select: { id: true }, }); - const notebookIds = new Set(notebooks.map(nb => nb.id)); + const nbIds = new Set(notebooks.map(nb => nb.id)); - const existingLabels = await prisma.label.findMany({ - where: { notebookId: { in: Array.from(notebookIds) } }, + const existing = await prisma.label.findMany({ + where: { notebookId: { in: Array.from(nbIds) } }, select: { name: true, notebookId: true }, }); - const existingLabelKeys = new Set(existingLabels.map(l => `${l.notebookId}:${l.name}`)); + const existingKeys = new Set(existing.map(l => `${l.notebookId}:${l.name}`)); - const labelsToCreate = []; - for (const label of importData.data.labels) { - if (label.notebookId && notebookIds.has(label.notebookId)) { - const key = `${label.notebookId}:${label.name}`; - if (!existingLabelKeys.has(key)) { - labelsToCreate.push(prisma.label.create({ - data: { name: label.name, color: label.color, notebookId: label.notebookId }, - })); - } - } + const toCreate = importData.data.labels + .filter(l => l.notebookId && nbIds.has(l.notebookId) && !existingKeys.has(`${l.notebookId}:${l.name}`)) + .map(l => ({ name: l.name, color: l.color, notebookId: l.notebookId })); + + if (toCreate.length > 0) { + await prisma.label.createMany({ data: toCreate, skipDuplicates: true }); + importedLabels = toCreate.length; } - - await Promise.all(labelsToCreate); - importedLabels = labelsToCreate.length; } - // OPTIMIZED: Batch notes with createMany if available, else Promise.all if (importData.data?.notes?.length > 0) { const notesData = importData.data.notes.map(note => ({ title: note.title, @@ -737,22 +669,14 @@ export function registerTools(server, prisma) { size: note.size || 'small', labels: note.labels ?? null, notebookId: note.notebookId || null, - ...(resolvedUserId ? { userId: resolvedUserId } : {}), + ...(uid ? { userId: uid } : {}), })); - // Try createMany first (faster), fall back to Promise.all try { - const result = await prisma.note.createMany({ - data: notesData, - skipDuplicates: true, - }); + const result = await prisma.note.createMany({ data: notesData, skipDuplicates: true }); importedNotes = result.count; } catch { - // Fallback to individual creates - const creates = notesData.map(data => - prisma.note.create({ data }).catch(() => null) - ); - const results = await Promise.all(creates); + const results = await Promise.all(notesData.map(d => prisma.note.create({ data: d }).catch(() => null))); importedNotes = results.filter(r => r !== null).length; } } @@ -763,27 +687,23 @@ export function registerTools(server, prisma) { }); } - // ═══════════════════════════════════════════════════════ - // NOTEBOOKS - // ═══════════════════════════════════════════════════════ + // ═══ NOTEBOOKS ═══ case 'create_notebook': { - const highestOrder = await prisma.notebook.findFirst({ - where: resolvedUserId ? { userId: resolvedUserId } : {}, + const highest = await prisma.notebook.findFirst({ + where: uid ? { userId: uid } : {}, orderBy: { order: 'desc' }, select: { order: true }, }); - const nextOrder = args.order !== undefined ? args.order : (highestOrder?.order ?? -1) + 1; - - const data = { - name: args.name.trim(), - icon: args.icon || '📁', - color: args.color || '#3B82F6', - order: nextOrder, - }; - data.userId = resolvedUserId || await ensureUserId(); + const nextOrder = args.order !== undefined ? args.order : (highest?.order ?? -1) + 1; const notebook = await prisma.notebook.create({ - data, + data: { + name: args.name.trim(), + icon: args.icon || '📁', + color: args.color || '#3B82F6', + order: nextOrder, + userId: uid || await ensureUserId(), + }, include: { labels: true, _count: { select: { notes: true } } }, }); @@ -791,9 +711,7 @@ export function registerTools(server, prisma) { } case 'get_notebooks': { - const where = {}; - if (resolvedUserId) where.userId = resolvedUserId; - + const where = uid ? { userId: uid } : {}; const notebooks = await prisma.notebook.findMany({ where, include: { @@ -807,12 +725,10 @@ export function registerTools(server, prisma) { } case 'get_notebook': { - const where = { id: args.id }; - if (resolvedUserId) where.userId = resolvedUserId; - + const where = { id: args.id, ...(uid ? { userId: uid } : {}) }; const notebook = await prisma.notebook.findUnique({ where, - include: { labels: true, notes: true, _count: { select: { notes: true } } }, + include: { labels: true, notes: { where: { trashedAt: null } }, _count: { select: { notes: true } } }, }); if (!notebook) throw new McpError(ErrorCode.InvalidRequest, 'Notebook not found'); @@ -824,18 +740,16 @@ export function registerTools(server, prisma) { } case 'update_notebook': { - const updateData = {}; - if ('name' in args) updateData.name = args.name.trim(); - if ('icon' in args) updateData.icon = args.icon; - if ('color' in args) updateData.color = args.color; - if ('order' in args) updateData.order = args.order; - - const where = { id: args.id }; - if (resolvedUserId) where.userId = resolvedUserId; + const d = {}; + if ('name' in args) d.name = args.name.trim(); + if ('icon' in args) d.icon = args.icon; + if ('color' in args) d.color = args.color; + if ('order' in args) d.order = args.order; + const where = { id: args.id, ...(uid ? { userId: uid } : {}) }; const notebook = await prisma.notebook.update({ where, - data: updateData, + data: d, include: { labels: true, _count: { select: { notes: true } } }, }); @@ -843,38 +757,29 @@ export function registerTools(server, prisma) { } case 'delete_notebook': { - const where = { id: args.id }; - if (resolvedUserId) where.userId = resolvedUserId; - - // Move notes to inbox before deleting await prisma.$transaction([ prisma.note.updateMany({ - where: { notebookId: args.id, ...(resolvedUserId ? { userId: resolvedUserId } : {}) }, + where: { notebookId: args.id, ...(uid ? { userId: uid } : {}) }, data: { notebookId: null }, }), - prisma.notebook.delete({ where }), + prisma.notebook.delete({ + where: { id: args.id, ...(uid ? { userId: uid } : {}) }, + }), ]); - + return textResult({ success: true, message: 'Notebook deleted, notes moved to Inbox' }); } case 'reorder_notebooks': { const ids = args.notebookIds; - - // Optimized: Verify ownership in one query - const where = { id: { in: ids } }; - if (resolvedUserId) where.userId = resolvedUserId; - - const existingNotebooks = await prisma.notebook.findMany({ - where, - select: { id: true }, - }); - - const existingIds = new Set(existingNotebooks.map(nb => nb.id)); - const missingIds = ids.filter(id => !existingIds.has(id)); - - if (missingIds.length > 0) { - throw new McpError(ErrorCode.InvalidRequest, `Notebooks not found: ${missingIds.join(', ')}`); + const where = { id: { in: ids }, ...(uid ? { userId: uid } : {}) }; + + const existing = await prisma.notebook.findMany({ where, select: { id: true } }); + const existingIds = new Set(existing.map(nb => nb.id)); + const missing = ids.filter(id => !existingIds.has(id)); + + if (missing.length > 0) { + throw new McpError(ErrorCode.InvalidRequest, `Notebooks not found: ${missing.join(', ')}`); } await prisma.$transaction( @@ -882,12 +787,10 @@ export function registerTools(server, prisma) { prisma.notebook.update({ where: { id }, data: { order: index } }) ) ); - return textResult({ success: true, message: 'Notebooks reordered' }); + return textResult({ success: true }); } - // ═══════════════════════════════════════════════════════ - // LABELS - OPTIMIZED to fix N+1 query - // ═══════════════════════════════════════════════════════ + // ═══ LABELS ═══ case 'create_label': { const existing = await prisma.label.findFirst({ where: { name: args.name.trim(), notebookId: args.notebookId }, @@ -908,49 +811,37 @@ export function registerTools(server, prisma) { const where = {}; if (args?.notebookId) where.notebookId = args.notebookId; - // OPTIMIZED: Single query with include, then filter in memory const labels = await prisma.label.findMany({ where, include: { notebook: { select: { id: true, name: true, userId: true } } }, orderBy: { name: 'asc' }, }); - // Filter by userId in memory (much faster than N+1 queries) - let filteredLabels = labels; - if (resolvedUserId) { - filteredLabels = labels.filter(l => l.notebook?.userId === resolvedUserId); - } - - return textResult(filteredLabels); + const filtered = uid ? labels.filter(l => l.notebook?.userId === uid) : labels; + return textResult(filtered); } case 'update_label': { - const updateData = {}; - if ('name' in args) updateData.name = args.name.trim(); - if ('color' in args) updateData.color = args.color; + const d = {}; + if ('name' in args) d.name = args.name.trim(); + if ('color' in args) d.color = args.color; - const label = await prisma.label.update({ - where: { id: args.id }, - data: updateData, - }); + const label = await prisma.label.update({ where: { id: args.id }, data: d }); return textResult(label); } case 'delete_label': { await prisma.label.delete({ where: { id: args.id } }); - return textResult({ success: true, message: 'Label deleted' }); + return textResult({ success: true }); } - // ═══════════════════════════════════════════════════════ - // REMINDERS - // ═══════════════════════════════════════════════════════ + // ═══ REMINDERS ═══ case 'get_due_reminders': { - const where = { + const where = noteWhere(uid, { reminder: { not: null, lte: new Date() }, isReminderDone: false, isArchived: false, - }; - if (resolvedUserId) where.userId = resolvedUserId; + }); const reminders = await prisma.note.findMany({ where, @@ -958,7 +849,6 @@ export function registerTools(server, prisma) { orderBy: { reminder: 'asc' }, }); - // Mark them as done if (reminders.length > 0) { await prisma.note.updateMany({ where: { id: { in: reminders.map(r => r.id) } }, @@ -966,7 +856,7 @@ export function registerTools(server, prisma) { }); } - return textResult({ success: true, count: reminders.length, reminders }); + return textResult({ count: reminders.length, reminders }); } default: @@ -974,7 +864,7 @@ export function registerTools(server, prisma) { } } catch (error) { if (error instanceof McpError) throw error; - throw new McpError(ErrorCode.InternalError, `Tool execution failed: ${error.message}`); + throw new McpError(ErrorCode.InternalError, `Tool error: ${error.message}`); } }); -} \ No newline at end of file +} diff --git a/memento-note/.backup-keep/favorites-section.tsx b/memento-note/.backup-keep/favorites-section.tsx deleted file mode 100644 index dcb2d1f..0000000 --- a/memento-note/.backup-keep/favorites-section.tsx +++ /dev/null @@ -1,85 +0,0 @@ -'use client' - -import { useState } from 'react' -import { Note } from '@/lib/types' -import { NoteCard } from './note-card' -import { ChevronDown, ChevronUp, Pin } from 'lucide-react' -import { useLanguage } from '@/lib/i18n' - -interface FavoritesSectionProps { - pinnedNotes: Note[] - onEdit?: (note: Note, readOnly?: boolean) => void - onSizeChange?: (noteId: string, size: 'small' | 'medium' | 'large') => void - isLoading?: boolean -} - -export function FavoritesSection({ pinnedNotes, onEdit, onSizeChange, isLoading }: FavoritesSectionProps) { - const [isCollapsed, setIsCollapsed] = useState(false) - const { t } = useLanguage() - - if (isLoading) { - return ( -
-
- -
-
-
- {[1, 2, 3].map((i) => ( -
- ))} -
-
- ) - } - - if (pinnedNotes.length === 0) { - return null - } - - return ( -
- - - {/* Collapsible Content */} - {!isCollapsed && ( -
- {pinnedNotes.map((note) => ( - onSizeChange?.(note.id, size)} - /> - ))} -
- )} -
- ) -} diff --git a/memento-note/.backup-keep/home-client.tsx b/memento-note/.backup-keep/home-client.tsx deleted file mode 100644 index 1ec25e2..0000000 --- a/memento-note/.backup-keep/home-client.tsx +++ /dev/null @@ -1,454 +0,0 @@ -'use client' - -import { useState, useEffect, useCallback } from 'react' -import { useSearchParams, useRouter } from 'next/navigation' -import dynamic from 'next/dynamic' -import { Note } from '@/lib/types' -import { getAISettings } from '@/app/actions/ai-settings' -import { getAllNotes, searchNotes } from '@/app/actions/notes' -import { NoteInput } from '@/components/note-input' -import { NotesMainSection, type NotesViewMode } from '@/components/notes-main-section' -import { NotesViewToggle } from '@/components/notes-view-toggle' -import { MemoryEchoNotification } from '@/components/memory-echo-notification' -import { NotebookSuggestionToast } from '@/components/notebook-suggestion-toast' -import { FavoritesSection } from '@/components/favorites-section' -import { Button } from '@/components/ui/button' -import { Wand2 } from 'lucide-react' -import { useLabels } from '@/context/LabelContext' -import { useNoteRefresh } from '@/context/NoteRefreshContext' -import { useReminderCheck } from '@/hooks/use-reminder-check' -import { useAutoLabelSuggestion } from '@/hooks/use-auto-label-suggestion' -import { useNotebooks } from '@/context/notebooks-context' -import { Folder, Briefcase, FileText, Zap, BarChart3, Globe, Sparkles, Book, Heart, Crown, Music, Building2, Plane, ChevronRight, Plus } from 'lucide-react' -import { cn } from '@/lib/utils' -import { LabelFilter } from '@/components/label-filter' -import { useLanguage } from '@/lib/i18n' -import { useHomeView } from '@/context/home-view-context' - -// Lazy-load heavy dialogs — uniquement chargés à la demande -const NoteEditor = dynamic( - () => import('@/components/note-editor').then(m => ({ default: m.NoteEditor })), - { ssr: false } -) -const BatchOrganizationDialog = dynamic( - () => import('@/components/batch-organization-dialog').then(m => ({ default: m.BatchOrganizationDialog })), - { ssr: false } -) -const AutoLabelSuggestionDialog = dynamic( - () => import('@/components/auto-label-suggestion-dialog').then(m => ({ default: m.AutoLabelSuggestionDialog })), - { ssr: false } -) - -type InitialSettings = { - showRecentNotes: boolean - notesViewMode: 'masonry' | 'tabs' -} - -interface HomeClientProps { - /** Notes pré-chargées côté serveur — hydratées immédiatement sans loading spinner */ - initialNotes: Note[] - initialSettings: InitialSettings -} - -export function HomeClient({ initialNotes, initialSettings }: HomeClientProps) { - const searchParams = useSearchParams() - const router = useRouter() - const { t } = useLanguage() - - const [notes, setNotes] = useState(initialNotes) - const [pinnedNotes, setPinnedNotes] = useState( - initialNotes.filter(n => n.isPinned) - ) - const [notesViewMode, setNotesViewMode] = useState(initialSettings.notesViewMode) - const [editingNote, setEditingNote] = useState<{ note: Note; readOnly?: boolean } | null>(null) - const [isLoading, setIsLoading] = useState(false) // false by default — data is pre-loaded - const [notebookSuggestion, setNotebookSuggestion] = useState<{ noteId: string; content: string } | null>(null) - const [batchOrganizationOpen, setBatchOrganizationOpen] = useState(false) - const { refreshKey } = useNoteRefresh() - const { labels } = useLabels() - const { setControls } = useHomeView() - - const { shouldSuggest: shouldSuggestLabels, notebookId: suggestNotebookId, dismiss: dismissLabelSuggestion } = useAutoLabelSuggestion() - const [autoLabelOpen, setAutoLabelOpen] = useState(false) - - useEffect(() => { - if (shouldSuggestLabels && suggestNotebookId) { - setAutoLabelOpen(true) - } - }, [shouldSuggestLabels, suggestNotebookId]) - - const notebookFilter = searchParams.get('notebook') - const isInbox = !notebookFilter - - const handleNoteCreated = useCallback((note: Note) => { - setNotes((prevNotes) => { - const notebookFilter = searchParams.get('notebook') - const labelFilter = searchParams.get('labels')?.split(',').filter(Boolean) || [] - const colorFilter = searchParams.get('color') - const search = searchParams.get('search')?.trim() || null - - if (notebookFilter && note.notebookId !== notebookFilter) return prevNotes - if (!notebookFilter && note.notebookId) return prevNotes - - if (labelFilter.length > 0) { - const noteLabels = note.labels || [] - if (!noteLabels.some((label: string) => labelFilter.includes(label))) return prevNotes - } - - if (colorFilter) { - const labelNamesWithColor = labels - .filter((label: any) => label.color === colorFilter) - .map((label: any) => label.name) - const noteLabels = note.labels || [] - if (!noteLabels.some((label: string) => labelNamesWithColor.includes(label))) return prevNotes - } - - if (search) { - router.refresh() - return prevNotes - } - - const isPinned = note.isPinned || false - const pinnedNotes = prevNotes.filter(n => n.isPinned) - const unpinnedNotes = prevNotes.filter(n => !n.isPinned) - - if (isPinned) { - return [note, ...pinnedNotes, ...unpinnedNotes] - } else { - return [...pinnedNotes, note, ...unpinnedNotes] - } - }) - - if (!note.notebookId) { - const wordCount = (note.content || '').trim().split(/\s+/).filter(w => w.length > 0).length - if (wordCount >= 20) { - setNotebookSuggestion({ noteId: note.id, content: note.content || '' }) - } - } - }, [searchParams, labels, router]) - - const handleOpenNote = (noteId: string) => { - const note = notes.find(n => n.id === noteId) - if (note) setEditingNote({ note, readOnly: false }) - } - - const handleSizeChange = useCallback((noteId: string, size: 'small' | 'medium' | 'large') => { - setNotes(prev => prev.map(n => n.id === noteId ? { ...n, size } : n)) - setPinnedNotes(prev => prev.map(n => n.id === noteId ? { ...n, size } : n)) - }, []) - - useReminderCheck(notes) - - // Rechargement uniquement pour les filtres actifs (search, labels, notebook) - // Les notes initiales suffisent sans filtre - useEffect(() => { - const search = searchParams.get('search')?.trim() || null - const labelFilter = searchParams.get('labels')?.split(',').filter(Boolean) || [] - const colorFilter = searchParams.get('color') - const notebook = searchParams.get('notebook') - const semanticMode = searchParams.get('semantic') === 'true' - - // Pour le refreshKey (mutations), toujours recharger - // Pour les filtres, charger depuis le serveur - const hasActiveFilter = search || labelFilter.length > 0 || colorFilter - - const load = async () => { - setIsLoading(true) - let allNotes = search - ? await searchNotes(search, semanticMode, notebook || undefined) - : await getAllNotes() - - // Filtre notebook côté client - if (notebook) { - allNotes = allNotes.filter((note: any) => note.notebookId === notebook) - } else { - allNotes = allNotes.filter((note: any) => !note.notebookId) - } - - // Filtre labels - if (labelFilter.length > 0) { - allNotes = allNotes.filter((note: any) => - note.labels?.some((label: string) => labelFilter.includes(label)) - ) - } - - // Filtre couleur - if (colorFilter) { - const labelNamesWithColor = labels - .filter((label: any) => label.color === colorFilter) - .map((label: any) => label.name) - allNotes = allNotes.filter((note: any) => - note.labels?.some((label: string) => labelNamesWithColor.includes(label)) - ) - } - - // Merger avec les tailles locales pour ne pas écraser les modifications - setNotes(prev => { - const localSizeMap = new Map(prev.map(n => [n.id, n.size])) - return allNotes.map(n => ({ ...n, size: localSizeMap.get(n.id) ?? n.size })) - }) - setPinnedNotes(allNotes.filter((n: any) => n.isPinned)) - setIsLoading(false) - } - - // Éviter le rechargement initial si les notes sont déjà chargées sans filtres - if (refreshKey > 0 || hasActiveFilter) { - const cancelled = { value: false } - load().then(() => { if (cancelled.value) return }) - return () => { cancelled.value = true } - } else { - // Données initiales : filtrage inbox/notebook côté client seulement - let filtered = initialNotes - if (notebook) { - filtered = initialNotes.filter(n => n.notebookId === notebook) - } else { - filtered = initialNotes.filter(n => !n.notebookId) - } - // Merger avec les tailles déjà modifiées localement - setNotes(prev => { - const localSizeMap = new Map(prev.map(n => [n.id, n.size])) - return filtered.map(n => ({ ...n, size: localSizeMap.get(n.id) ?? n.size })) - }) - setPinnedNotes(filtered.filter(n => n.isPinned)) - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [searchParams, refreshKey]) - - const { notebooks } = useNotebooks() - const currentNotebook = notebooks.find((n: any) => n.id === searchParams.get('notebook')) - const [showNoteInput, setShowNoteInput] = useState(false) - - useEffect(() => { - setControls({ - isTabsMode: notesViewMode === 'tabs', - openNoteComposer: () => setShowNoteInput(true), - }) - return () => setControls(null) - }, [notesViewMode, setControls]) - - const getNotebookIcon = (iconName: string) => { - const ICON_MAP: Record = { - 'folder': Folder, - 'briefcase': Briefcase, - 'document': FileText, - 'lightning': Zap, - 'chart': BarChart3, - 'globe': Globe, - 'sparkle': Sparkles, - 'book': Book, - 'heart': Heart, - 'crown': Crown, - 'music': Music, - 'building': Building2, - 'flight_takeoff': Plane, - } - return ICON_MAP[iconName] || Folder - } - - const handleNoteCreatedWrapper = (note: any) => { - handleNoteCreated(note) - setShowNoteInput(false) - } - - const Breadcrumbs = ({ notebookName }: { notebookName: string }) => ( -
- {t('nav.notebooks')} - - {notebookName} -
- ) - - const isTabs = notesViewMode === 'tabs' - - return ( -
- {/* Notebook Specific Header */} - {currentNotebook ? ( -
- -
-
-
- {(() => { - const Icon = getNotebookIcon(currentNotebook.icon || 'folder') - return ( - - ) - })()} -
-

{currentNotebook.name}

-
-
- - { - const params = new URLSearchParams(searchParams.toString()) - if (newLabels.length > 0) params.set('labels', newLabels.join(',')) - else params.delete('labels') - router.push(`/?${params.toString()}`) - }} - className="border-gray-200" - /> - {!isTabs && ( - - )} -
-
-
- ) : ( -
- {!isTabs &&
} -
-
-
- -
-

{t('notes.title')}

-
-
- - { - const params = new URLSearchParams(searchParams.toString()) - if (newLabels.length > 0) params.set('labels', newLabels.join(',')) - else params.delete('labels') - router.push(`/?${params.toString()}`) - }} - className="border-gray-200" - /> - {isInbox && !isLoading && notes.length >= 2 && ( - - )} - {!isTabs && ( - - )} -
-
-
- )} - - {showNoteInput && ( -
- -
- )} - - {isLoading ? ( -
{t('general.loading')}
- ) : ( - <> - setEditingNote({ note, readOnly })} - onSizeChange={handleSizeChange} - /> - - {notes.filter((note) => !note.isPinned).length > 0 && ( -
- !note.isPinned)} - onEdit={(note, readOnly) => setEditingNote({ note, readOnly })} - onSizeChange={handleSizeChange} - currentNotebookId={searchParams.get('notebook')} - /> -
- )} - - {notes.filter(note => !note.isPinned).length === 0 && pinnedNotes.length === 0 && ( -
- {t('notes.emptyState')} -
- )} - - )} - - - - {notebookSuggestion && ( - setNotebookSuggestion(null)} - /> - )} - - {batchOrganizationOpen && ( - router.refresh()} - /> - )} - - {autoLabelOpen && ( - { - setAutoLabelOpen(open) - if (!open) dismissLabelSuggestion() - }} - notebookId={suggestNotebookId} - onLabelsCreated={() => router.refresh()} - /> - )} - - {editingNote && ( - setEditingNote(null)} - /> - )} -
- ) -} diff --git a/memento-note/.backup-keep/masonry-grid.css b/memento-note/.backup-keep/masonry-grid.css deleted file mode 100644 index 9968010..0000000 --- a/memento-note/.backup-keep/masonry-grid.css +++ /dev/null @@ -1,132 +0,0 @@ -/** - * Masonry Grid — CSS Grid avec tailles visibles - * Layout avec espaces minimisés via dense, drag-and-drop via @dnd-kit - */ - -/* ─── Container ──────────────────────────────────── */ -.masonry-container { - width: 100%; - padding: 0 8px 40px 8px; -} - -/* ─── CSS Grid avec dense pour minimiser les trous ─ */ -.masonry-css-grid { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); - grid-auto-rows: auto; - gap: 12px; - align-items: start; - grid-auto-flow: dense; -} - -/* ─── Sortable items ─────────────────────────────── */ -.masonry-sortable-item { - break-inside: avoid; - box-sizing: border-box; - will-change: transform; - transition: opacity 0.15s ease-out; -} - -/* Taille des notes : small=1 colonne, medium=2 colonnes, large=3 colonnes */ -.masonry-sortable-item[data-size="medium"] { - grid-column: span 2; -} - -.masonry-sortable-item[data-size="large"] { - grid-column: span 3; -} - -/* ─── Note card base ─────────────────────────────── */ -.note-card { - width: 100% !important; - min-width: 0; - box-sizing: border-box; -} - -/* ─── Drag overlay ───────────────────────────────── */ -.masonry-drag-overlay { - cursor: grabbing; - box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 8px 16px rgba(0, 0, 0, 0.15); - border-radius: 12px; - opacity: 0.95; - pointer-events: none; -} - -/* ─── Mobile (< 480px) : 1 colonne ──────────────── */ -@media (max-width: 479px) { - .masonry-css-grid { - grid-template-columns: 1fr; - gap: 10px; - } - - /* Sur mobile tout est 1 colonne */ - .masonry-sortable-item[data-size="medium"], - .masonry-sortable-item[data-size="large"] { - grid-column: span 1; - } - - .masonry-container { - padding: 0 4px 16px 4px; - } -} - -/* ─── Small tablet (480–767px) : 2 colonnes ─────── */ -@media (min-width: 480px) and (max-width: 767px) { - .masonry-css-grid { - grid-template-columns: repeat(2, 1fr); - gap: 10px; - } - - /* Sur 2 colonnes, large prend tout */ - .masonry-sortable-item[data-size="large"] { - grid-column: span 2; - } - - .masonry-container { - padding: 0 8px 20px 8px; - } -} - -/* ─── Tablet (768–1023px) ────────────────────────── */ -@media (min-width: 768px) and (max-width: 1023px) { - .masonry-css-grid { - grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); - gap: 12px; - } -} - -/* ─── Desktop (1024–1279px) ─────────────────────── */ -@media (min-width: 1024px) and (max-width: 1279px) { - .masonry-css-grid { - grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); - gap: 12px; - } -} - -/* ─── Large Desktop (1280px+) ───────────────────── */ -@media (min-width: 1280px) { - .masonry-css-grid { - grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); - gap: 14px; - } - .masonry-container { - max-width: 1600px; - margin: 0 auto; - padding: 0 12px 32px 12px; - } -} - -/* ─── Print ──────────────────────────────────────── */ -@media print { - .masonry-sortable-item { - break-inside: avoid; - page-break-inside: avoid; - } -} - -/* ─── Reduced motion ─────────────────────────────── */ -@media (prefers-reduced-motion: reduce) { - .masonry-sortable-item { - transition: none; - } -} diff --git a/memento-note/.backup-keep/masonry-grid.tsx b/memento-note/.backup-keep/masonry-grid.tsx deleted file mode 100644 index 6111465..0000000 --- a/memento-note/.backup-keep/masonry-grid.tsx +++ /dev/null @@ -1,292 +0,0 @@ -'use client' - -import { useState, useEffect, useCallback, memo, useMemo, useRef } from 'react'; -import { - DndContext, - DragEndEvent, - DragOverlay, - DragStartEvent, - PointerSensor, - TouchSensor, - closestCenter, - useSensor, - useSensors, -} from '@dnd-kit/core'; -import { - SortableContext, - arrayMove, - rectSortingStrategy, - useSortable, -} from '@dnd-kit/sortable'; -import { CSS } from '@dnd-kit/utilities'; -import { Note } from '@/lib/types'; -import { NoteCard } from './note-card'; -import { updateFullOrderWithoutRevalidation } from '@/app/actions/notes'; -import { useNotebookDrag } from '@/context/notebook-drag-context'; -import { useLanguage } from '@/lib/i18n'; -import dynamic from 'next/dynamic'; -import './masonry-grid.css'; - -// Lazy-load NoteEditor — uniquement chargé au clic -const NoteEditor = dynamic( - () => import('./note-editor').then(m => ({ default: m.NoteEditor })), - { ssr: false } -); - -interface MasonryGridProps { - notes: Note[]; - onEdit?: (note: Note, readOnly?: boolean) => void; - onSizeChange?: (noteId: string, size: 'small' | 'medium' | 'large') => void; -} - -// ───────────────────────────────────────────── -// Sortable Note Item -// ───────────────────────────────────────────── -interface SortableNoteProps { - note: Note; - onEdit: (note: Note, readOnly?: boolean) => void; - onSizeChange: (noteId: string, newSize: 'small' | 'medium' | 'large') => void; - onDragStartNote?: (noteId: string) => void; - onDragEndNote?: () => void; - isDragging?: boolean; - isOverlay?: boolean; -} - -const SortableNoteItem = memo(function SortableNoteItem({ - note, - onEdit, - onSizeChange, - onDragStartNote, - onDragEndNote, - isDragging, - isOverlay, -}: SortableNoteProps) { - const { - attributes, - listeners, - setNodeRef, - transform, - transition, - isDragging: isSortableDragging, - } = useSortable({ id: note.id }); - - const style: React.CSSProperties = { - transform: CSS.Transform.toString(transform), - transition, - opacity: isSortableDragging && !isOverlay ? 0.3 : 1, - }; - - return ( -
- onSizeChange(note.id, newSize)} - /> -
- ); -}) - -// ───────────────────────────────────────────── -// Sortable Grid Section (pinned or others) -// ───────────────────────────────────────────── -interface SortableGridSectionProps { - notes: Note[]; - onEdit: (note: Note, readOnly?: boolean) => void; - onSizeChange: (noteId: string, newSize: 'small' | 'medium' | 'large') => void; - draggedNoteId: string | null; - onDragStartNote: (noteId: string) => void; - onDragEndNote: () => void; -} - -const SortableGridSection = memo(function SortableGridSection({ - notes, - onEdit, - onSizeChange, - draggedNoteId, - onDragStartNote, - onDragEndNote, -}: SortableGridSectionProps) { - const ids = useMemo(() => notes.map(n => n.id), [notes]); - - return ( - -
- {notes.map(note => ( - - ))} -
-
- ); -}); - -// ───────────────────────────────────────────── -// Main MasonryGrid component -// ───────────────────────────────────────────── -export function MasonryGrid({ notes, onEdit, onSizeChange }: MasonryGridProps) { - const { t } = useLanguage(); - const [editingNote, setEditingNote] = useState<{ note: Note; readOnly?: boolean } | null>(null); - const { startDrag, endDrag, draggedNoteId } = useNotebookDrag(); - - // Local notes state for optimistic size/order updates - const [localNotes, setLocalNotes] = useState(notes); - - useEffect(() => { - setLocalNotes(prev => { - const localSizeMap = new Map(prev.map(n => [n.id, n.size])) - return notes.map(n => ({ ...n, size: localSizeMap.get(n.id) ?? n.size })) - }) - }, [notes]); - - const pinnedNotes = useMemo(() => localNotes.filter(n => n.isPinned), [localNotes]); - const othersNotes = useMemo(() => localNotes.filter(n => !n.isPinned), [localNotes]); - - const [activeId, setActiveId] = useState(null); - const activeNote = useMemo( - () => localNotes.find(n => n.id === activeId) ?? null, - [localNotes, activeId] - ); - - const handleEdit = useCallback((note: Note, readOnly?: boolean) => { - if (onEdit) { - onEdit(note, readOnly); - } else { - setEditingNote({ note, readOnly }); - } - }, [onEdit]); - - const handleSizeChange = useCallback((noteId: string, newSize: 'small' | 'medium' | 'large') => { - setLocalNotes(prev => prev.map(n => n.id === noteId ? { ...n, size: newSize } : n)); - onSizeChange?.(noteId, newSize); - }, [onSizeChange]); - - // @dnd-kit sensors — pointer (desktop) + touch (mobile) - const sensors = useSensors( - useSensor(PointerSensor, { - activationConstraint: { distance: 8 }, // Évite les activations accidentelles - }), - useSensor(TouchSensor, { - activationConstraint: { delay: 200, tolerance: 8 }, // Long-press sur mobile - }) - ); - - const localNotesRef = useRef(localNotes) - useEffect(() => { - localNotesRef.current = localNotes - }, [localNotes]) - - const handleDragStart = useCallback((event: DragStartEvent) => { - setActiveId(event.active.id as string); - startDrag(event.active.id as string); - }, [startDrag]); - - const handleDragEnd = useCallback(async (event: DragEndEvent) => { - const { active, over } = event; - setActiveId(null); - endDrag(); - - if (!over || active.id === over.id) return; - - const reordered = arrayMove( - localNotesRef.current, - localNotesRef.current.findIndex(n => n.id === active.id), - localNotesRef.current.findIndex(n => n.id === over.id), - ); - - if (reordered.length === 0) return; - - setLocalNotes(reordered); - // Persist order outside of setState to avoid "setState in render" warning - const ids = reordered.map(n => n.id); - updateFullOrderWithoutRevalidation(ids).catch(err => { - console.error('Failed to persist order:', err); - }); - }, [endDrag]); - - return ( - -
- {pinnedNotes.length > 0 && ( -
-

- {t('notes.pinned')} -

- -
- )} - - {othersNotes.length > 0 && ( -
- {pinnedNotes.length > 0 && ( -

- {t('notes.others')} -

- )} - -
- )} -
- - {/* DragOverlay — montre une copie flottante pendant le drag */} - - {activeNote ? ( -
- handleSizeChange(activeNote.id, newSize)} - /> -
- ) : null} -
- - {editingNote && ( - setEditingNote(null)} - /> - )} -
- ); -} diff --git a/memento-note/.backup-keep/note-card.tsx b/memento-note/.backup-keep/note-card.tsx deleted file mode 100644 index ca90aff..0000000 --- a/memento-note/.backup-keep/note-card.tsx +++ /dev/null @@ -1,677 +0,0 @@ -'use client' - -import { Note, NOTE_COLORS, NoteColor } from '@/lib/types' -import { Card } from '@/components/ui/card' -import { Button } from '@/components/ui/button' -import { Badge } from '@/components/ui/badge' -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuTrigger, -} from '@/components/ui/dropdown-menu' -import { - AlertDialog, - AlertDialogAction, - AlertDialogCancel, - AlertDialogContent, - AlertDialogDescription, - AlertDialogFooter, - AlertDialogHeader, - AlertDialogTitle, -} from '@/components/ui/alert-dialog' -import { Pin, Bell, GripVertical, X, Link2, FolderOpen, StickyNote, LucideIcon, Folder, Briefcase, FileText, Zap, BarChart3, Globe, Sparkles, Book, Heart, Crown, Music, Building2, LogOut, Trash2 } from 'lucide-react' -import { useState, useEffect, useTransition, useOptimistic, memo } from 'react' -import { useSession } from 'next-auth/react' -import { useRouter, useSearchParams } from 'next/navigation' -import { deleteNote, toggleArchive, togglePin, updateColor, updateNote, updateSize, getNoteAllUsers, leaveSharedNote, removeFusedBadge } from '@/app/actions/notes' -import { cn } from '@/lib/utils' -import { formatDistanceToNow, Locale } from 'date-fns' -import { enUS } from 'date-fns/locale/en-US' -import { fr } from 'date-fns/locale/fr' -import { es } from 'date-fns/locale/es' -import { de } from 'date-fns/locale/de' -import { faIR } from 'date-fns/locale/fa-IR' -import { it } from 'date-fns/locale/it' -import { pt } from 'date-fns/locale/pt' -import { ru } from 'date-fns/locale/ru' -import { zhCN } from 'date-fns/locale/zh-CN' -import { ja } from 'date-fns/locale/ja' -import { ko } from 'date-fns/locale/ko' -import { ar } from 'date-fns/locale/ar' -import { hi } from 'date-fns/locale/hi' -import { nl } from 'date-fns/locale/nl' -import { pl } from 'date-fns/locale/pl' -import { MarkdownContent } from './markdown-content' -import { LabelBadge } from './label-badge' -import { NoteImages } from './note-images' -import { NoteChecklist } from './note-checklist' -import { NoteActions } from './note-actions' -import { CollaboratorDialog } from './collaborator-dialog' -import { CollaboratorAvatars } from './collaborator-avatars' -import { ConnectionsBadge } from './connections-badge' -import { ConnectionsOverlay } from './connections-overlay' -import { ComparisonModal } from './comparison-modal' -import { useConnectionsCompare } from '@/hooks/use-connections-compare' -import { useLabels } from '@/context/LabelContext' -import { useLanguage } from '@/lib/i18n' -import { useNotebooks } from '@/context/notebooks-context' -import { toast } from 'sonner' - -// Mapping of supported languages to date-fns locales -const localeMap: Record = { - en: enUS, - fr: fr, - es: es, - de: de, - fa: faIR, - it: it, - pt: pt, - ru: ru, - zh: zhCN, - ja: ja, - ko: ko, - ar: ar, - hi: hi, - nl: nl, - pl: pl, -} - -function getDateLocale(language: string): Locale { - return localeMap[language] || enUS -} - -// Map icon names to lucide-react components -const ICON_MAP: Record = { - 'folder': Folder, - 'briefcase': Briefcase, - 'document': FileText, - 'lightning': Zap, - 'chart': BarChart3, - 'globe': Globe, - 'sparkle': Sparkles, - 'book': Book, - 'heart': Heart, - 'crown': Crown, - 'music': Music, - 'building': Building2, -} - -// Function to get icon component by name -function getNotebookIcon(iconName: string): LucideIcon { - const IconComponent = ICON_MAP[iconName] || Folder - return IconComponent -} - -interface NoteCardProps { - note: Note - onEdit?: (note: Note, readOnly?: boolean) => void - isDragging?: boolean - isDragOver?: boolean - onDragStart?: (noteId: string) => void - onDragEnd?: () => void - onResize?: () => void - onSizeChange?: (newSize: 'small' | 'medium' | 'large') => void -} - -// Helper function to get initials from name -function getInitials(name: string): string { - if (!name) return '??' - const trimmedName = name.trim() - const parts = trimmedName.split(' ') - if (parts.length === 1) { - return trimmedName.substring(0, 2).toUpperCase() - } - return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase() -} - -// Helper function to get avatar color based on name hash -function getAvatarColor(name: string): string { - const colors = [ - 'bg-primary', - 'bg-purple-500', - 'bg-green-500', - 'bg-orange-500', - 'bg-pink-500', - 'bg-teal-500', - 'bg-red-500', - 'bg-indigo-500', - ] - - const hash = name.split('').reduce((acc, char) => acc + char.charCodeAt(0), 0) - return colors[hash % colors.length] -} - -export const NoteCard = memo(function NoteCard({ - note, - onEdit, - onDragStart, - onDragEnd, - isDragging, - onResize, - onSizeChange -}: NoteCardProps) { - const router = useRouter() - const searchParams = useSearchParams() - const { refreshLabels } = useLabels() - const { data: session } = useSession() - const { t, language } = useLanguage() - const { notebooks, moveNoteToNotebookOptimistic } = useNotebooks() - const [, startTransition] = useTransition() - const [isDeleting, setIsDeleting] = useState(false) - const [showDeleteDialog, setShowDeleteDialog] = useState(false) - const [showCollaboratorDialog, setShowCollaboratorDialog] = useState(false) - const [collaborators, setCollaborators] = useState([]) - const [owner, setOwner] = useState(null) - const [showConnectionsOverlay, setShowConnectionsOverlay] = useState(false) - const [comparisonNotes, setComparisonNotes] = useState(null) - const [showNotebookMenu, setShowNotebookMenu] = useState(false) - - // Move note to a notebook - const handleMoveToNotebook = async (notebookId: string | null) => { - await moveNoteToNotebookOptimistic(note.id, notebookId) - setShowNotebookMenu(false) - // No need for router.refresh() - triggerRefresh() is already called in moveNoteToNotebookOptimistic - } - - // Optimistic UI state for instant feedback - const [optimisticNote, addOptimisticNote] = useOptimistic( - note, - (state, newProps: Partial) => ({ ...state, ...newProps }) - ) - - // Local color state so color persists after transition ends - const [localColor, setLocalColor] = useState(note.color) - - const colorClasses = NOTE_COLORS[(localColor || optimisticNote.color) as NoteColor] || NOTE_COLORS.default - - // Check if this note is currently open in the editor - const isNoteOpenInEditor = searchParams.get('note') === note.id - - // Only fetch comparison notes when we have IDs to compare - const { notes: comparisonNotesData, isLoading: isLoadingComparison } = useConnectionsCompare( - comparisonNotes && comparisonNotes.length > 0 ? comparisonNotes : null - ) - - const currentUserId = session?.user?.id - const canManageCollaborators = currentUserId && note.userId && currentUserId === note.userId - const isSharedNote = currentUserId && note.userId && currentUserId !== note.userId - const isOwner = currentUserId && note.userId && currentUserId === note.userId - - // Load collaborators only for shared notes (not owned by current user) - useEffect(() => { - // Skip API call for notes owned by current user — no need to fetch collaborators - if (!isSharedNote) { - // For own notes, set owner to current user - if (currentUserId && session?.user) { - setOwner({ - id: currentUserId, - name: session.user.name, - email: session.user.email, - image: session.user.image, - }) - } - return - } - - let isMounted = true - - const loadCollaborators = async () => { - if (note.userId && isMounted) { - try { - const users = await getNoteAllUsers(note.id) - if (isMounted) { - setCollaborators(users) - if (users.length > 0) { - setOwner(users[0]) - } - } - } catch (error) { - console.error('Failed to load collaborators:', error) - if (isMounted) { - setCollaborators([]) - } - } - } - } - - loadCollaborators() - - return () => { - isMounted = false - } - }, [note.id, note.userId, isSharedNote, currentUserId, session?.user]) - - const handleDelete = async () => { - setIsDeleting(true) - try { - await deleteNote(note.id) - await refreshLabels() - } catch (error) { - console.error('Failed to delete note:', error) - setIsDeleting(false) - } - } - - const handleTogglePin = async () => { - startTransition(async () => { - addOptimisticNote({ isPinned: !note.isPinned }) - await togglePin(note.id, !note.isPinned) - - if (!note.isPinned) { - toast.success(t('notes.pinned') || 'Note pinned') - } else { - toast.info(t('notes.unpinned') || 'Note unpinned') - } - }) - } - - const handleToggleArchive = async () => { - startTransition(async () => { - addOptimisticNote({ isArchived: !note.isArchived }) - await toggleArchive(note.id, !note.isArchived) - }) - } - - const handleColorChange = async (color: string) => { - setLocalColor(color) // instant visual update, survives transition - startTransition(async () => { - addOptimisticNote({ color }) - await updateNote(note.id, { color }, { skipRevalidation: false }) - }) - } - - const handleSizeChange = (size: 'small' | 'medium' | 'large') => { - // Notifier le parent immédiatement (hors transition) — c'est lui - // qui détient la source de vérité via localNotes - onSizeChange?.(size) - onResize?.() - - // Persister en arrière-plan - updateSize(note.id, size).catch(err => - console.error('Failed to update note size:', err) - ) - } - - const handleCheckItem = async (checkItemId: string) => { - if (note.type === 'checklist' && Array.isArray(note.checkItems)) { - const updatedItems = note.checkItems.map(item => - item.id === checkItemId ? { ...item, checked: !item.checked } : item - ) - startTransition(async () => { - addOptimisticNote({ checkItems: updatedItems }) - await updateNote(note.id, { checkItems: updatedItems }) - // No router.refresh() — optimistic update is sufficient and avoids grid rebuild - }) - } - } - - const handleLeaveShare = async () => { - if (confirm(t('notes.confirmLeaveShare'))) { - try { - await leaveSharedNote(note.id) - setIsDeleting(true) // Hide the note from view - } catch (error) { - console.error('Failed to leave share:', error) - } - } - } - - const handleRemoveFusedBadge = async (e: React.MouseEvent) => { - e.stopPropagation() // Prevent opening the note editor - startTransition(async () => { - addOptimisticNote({ autoGenerated: null }) - await removeFusedBadge(note.id) - // No router.refresh() — optimistic update is sufficient and avoids grid rebuild - }) - } - - if (isDeleting) return null - - const getMinHeight = (size?: string) => { - switch (size) { - case 'medium': return '350px' - case 'large': return '500px' - default: return '150px' // small - } - } - - - - return ( - { - e.dataTransfer.setData('text/plain', note.id) - e.dataTransfer.effectAllowed = 'move' - e.dataTransfer.setData('text/html', '') // Prevent ghost image in some browsers - onDragStart?.(note.id) - }} - onDragEnd={() => onDragEnd?.()} - className={cn( - 'note-card group relative rounded-2xl overflow-hidden p-5 border shadow-sm', - 'transition-all duration-200 ease-out', - 'hover:shadow-xl hover:-translate-y-1', - colorClasses.bg, - colorClasses.card, - colorClasses.hover, - colorClasses.hover, - isDragging && 'shadow-2xl' // Removed opacity, scale, and rotation for clean drag - )} - onClick={(e) => { - // Only trigger edit if not clicking on buttons - const target = e.target as HTMLElement - if (!target.closest('button') && !target.closest('[role="checkbox"]') && !target.closest('.muuri-drag-handle') && !target.closest('.drag-handle')) { - // For shared notes, pass readOnly flag - onEdit?.(note, !!isSharedNote) // Pass second parameter as readOnly flag (convert to boolean) - } - }} - > - {/* Drag Handle - Only visible on mobile/touch devices */} -
- -
- - {/* Move to Notebook Dropdown Menu */} -
e.stopPropagation()} className="absolute top-2 right-2 z-20"> - - - - - -
- {t('notebookSuggestion.moveToNotebook')} -
- handleMoveToNotebook(null)}> - - {t('notebookSuggestion.generalNotes')} - - {notebooks.map((notebook: any) => { - const NotebookIcon = getNotebookIcon(notebook.icon || 'folder') - return ( - handleMoveToNotebook(notebook.id)} - > - - {notebook.name} - - ) - })} -
-
-
- - {/* Pin Button - Visible on hover or if pinned */} - - - - - {/* Reminder Icon - Move slightly if pin button is there */} - {note.reminder && new Date(note.reminder) > new Date() && ( - - )} - - {/* Memory Echo Badges - Fusion + Connections (BEFORE Title) */} -
- {/* Fusion Badge with remove button */} - {note.autoGenerated && ( -
- - {t('memoryEcho.fused')} - -
- )} - - {/* Connections Badge */} - { - // Only open overlay if note is NOT open in editor - // (to avoid having 2 Dialogs with 2 close buttons) - if (!isNoteOpenInEditor) { - setShowConnectionsOverlay(true) - } - }} - /> -
- - {/* Title */} - {optimisticNote.title && ( -

- {optimisticNote.title} -

- )} - - {/* Search Match Type Badge */} - {optimisticNote.matchType && ( - - {t(`semanticSearch.${optimisticNote.matchType === 'exact' ? 'exactMatch' : 'related'}`)} - - )} - - {/* Shared badge */} - {isSharedNote && owner && ( -
- - {t('notes.sharedBy')} {owner.name || owner.email} - - -
- )} - - {/* Images Component */} - - - {/* Link Previews */} - {Array.isArray(optimisticNote.links) && optimisticNote.links.length > 0 && ( -
- {optimisticNote.links.map((link, idx) => ( - e.stopPropagation()} - > - {link.imageUrl && ( - - )} - - {/* Content */} - {optimisticNote.type === 'text' ? ( -
- -
- ) : ( - - )} - - {/* Labels - using shared LabelBadge component */} - {optimisticNote.notebookId && Array.isArray(optimisticNote.labels) && optimisticNote.labels.length > 0 && ( -
- {optimisticNote.labels.map((label) => ( - - ))} -
- )} - - {/* Footer with Date only */} -
- {/* Creation Date */} -
- {formatDistanceToNow(new Date(note.createdAt), { addSuffix: true, locale: getDateLocale(language) })} -
-
- - {/* Owner Avatar - Aligned with action buttons at bottom */} - {owner && ( -
- {getInitials(owner.name || owner.email || '??')} -
- )} - - {/* Action Bar Component - Always show for now to fix regression */} - {true && ( - setShowDeleteDialog(true)} - onShareCollaborators={() => setShowCollaboratorDialog(true)} - className="absolute bottom-0 left-0 right-0 p-2 opacity-100 md:opacity-0 group-hover:opacity-100 transition-opacity" - /> - )} - - {/* Collaborator Dialog */} - {currentUserId && note.userId && ( -
e.stopPropagation()}> - -
- )} - - {/* Connections Overlay */} -
e.stopPropagation()}> - setShowConnectionsOverlay(false)} - noteId={note.id} - onOpenNote={(noteId) => { - // Find the note and open it - onEdit?.(note, false) - }} - onCompareNotes={(noteIds) => { - setComparisonNotes(noteIds) - }} - /> -
- - {/* Comparison Modal */} - {comparisonNotes && comparisonNotesData.length > 0 && ( -
e.stopPropagation()}> - setComparisonNotes(null)} - notes={comparisonNotesData} - onOpenNote={(noteId) => { - const foundNote = comparisonNotesData.find(n => n.id === noteId) - if (foundNote) { - onEdit?.(foundNote, false) - } - }} - /> -
- )} - - {/* Delete Confirmation Dialog */} - - - - {t('notes.confirmDeleteTitle') || t('notes.delete')} - - {t('notes.confirmDelete') || 'Are you sure you want to delete this note?'} - - - - {t('common.cancel') || 'Cancel'} - - {t('notes.delete') || 'Delete'} - - - - - - ) -}) \ No newline at end of file diff --git a/memento-note/.backup-keep/notes-main-section.tsx b/memento-note/.backup-keep/notes-main-section.tsx deleted file mode 100644 index 2efa102..0000000 --- a/memento-note/.backup-keep/notes-main-section.tsx +++ /dev/null @@ -1,44 +0,0 @@ -'use client' - -import dynamic from 'next/dynamic' -import { Note } from '@/lib/types' -import { NotesTabsView } from '@/components/notes-tabs-view' - -const MasonryGridLazy = dynamic( - () => import('@/components/masonry-grid').then((m) => m.MasonryGrid), - { - ssr: false, - loading: () => ( -
- ), - } -) - -export type NotesViewMode = 'masonry' | 'tabs' - -interface NotesMainSectionProps { - notes: Note[] - viewMode: NotesViewMode - onEdit?: (note: Note, readOnly?: boolean) => void - onSizeChange?: (noteId: string, size: 'small' | 'medium' | 'large') => void - currentNotebookId?: string | null -} - -export function NotesMainSection({ notes, viewMode, onEdit, onSizeChange, currentNotebookId }: NotesMainSectionProps) { - if (viewMode === 'tabs') { - return ( -
- -
- ) - } - - return ( -
- -
- ) -} diff --git a/memento-note/app/actions/notes.ts b/memento-note/app/actions/notes.ts index 431bf0a..2672dc7 100644 --- a/memento-note/app/actions/notes.ts +++ b/memento-note/app/actions/notes.ts @@ -1375,28 +1375,35 @@ export async function syncAllEmbeddings() { } // Get all notes including those shared with the user -export async function getAllNotes(includeArchived = false) { +export async function getAllNotes(includeArchived = false, notebookId?: string) { const session = await auth(); if (!session?.user?.id) return []; const userId = session.user.id; try { - // Fetch own notes + shared notes in parallel — no embedding to keep transfer fast - const [ownNotes, acceptedShares] = await Promise.all([ - prisma.note.findMany({ - where: { - userId, - trashedAt: null, - ...(includeArchived ? {} : { isArchived: false }), - }, - select: NOTE_LIST_SELECT, - orderBy: [ - { isPinned: 'desc' }, - { order: 'asc' }, - { updatedAt: 'desc' } - ] - }), + const whereClause: any = { + userId, + trashedAt: null, + ...(includeArchived ? {} : { isArchived: false }), + ...(notebookId !== undefined ? { notebookId: notebookId || null } : {}), + } + + const ownNotes = await prisma.note.findMany({ + where: whereClause, + select: NOTE_LIST_SELECT, + orderBy: [ + { isPinned: 'desc' }, + { order: 'asc' }, + { updatedAt: 'desc' } + ] + }) + + if (notebookId) { + return ownNotes.map(parseNote) + } + + const [acceptedShares] = await Promise.all([ prisma.noteShare.findMany({ where: { userId, status: 'accepted' }, include: { note: { select: NOTE_LIST_SELECT } } diff --git a/memento-note/app/api/admin/randomize-labels/route.ts b/memento-note/app/api/admin/randomize-labels/route.ts index c5dd3e4..91566de 100644 --- a/memento-note/app/api/admin/randomize-labels/route.ts +++ b/memento-note/app/api/admin/randomize-labels/route.ts @@ -5,7 +5,7 @@ import { auth } from '@/auth'; export const dynamic = 'force-dynamic'; -export async function GET() { +export async function POST() { try { const session = await auth() if (!session?.user?.id || (session.user as any).role !== 'ADMIN') { diff --git a/memento-note/app/api/cron/agents/route.ts b/memento-note/app/api/cron/agents/route.ts index 73bb401..ec2d6bf 100644 --- a/memento-note/app/api/cron/agents/route.ts +++ b/memento-note/app/api/cron/agents/route.ts @@ -14,13 +14,14 @@ export const dynamic = 'force-dynamic' * Authorization: Bearer */ export async function POST(request: NextRequest) { - // Optional auth const cronSecret = process.env.CRON_SECRET - if (cronSecret) { - const authHeader = request.headers.get('authorization') - if (authHeader !== `Bearer ${cronSecret}`) { - return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) - } + if (!cronSecret) { + console.error('[CronAgents] CRON_SECRET env var is required but not set') + return NextResponse.json({ error: 'Server misconfiguration' }, { status: 500 }) + } + const authHeader = request.headers.get('authorization') + if (authHeader !== `Bearer ${cronSecret}`) { + return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) } try { diff --git a/memento-note/app/api/cron/reminders/route.ts b/memento-note/app/api/cron/reminders/route.ts index 9d25b9b..a195282 100644 --- a/memento-note/app/api/cron/reminders/route.ts +++ b/memento-note/app/api/cron/reminders/route.ts @@ -4,14 +4,14 @@ import prisma from '@/lib/prisma'; export const dynamic = 'force-dynamic'; // No caching export async function POST(request: NextRequest) { - // Optional auth: set CRON_SECRET env var, callers must pass - // Authorization: Bearer const cronSecret = process.env.CRON_SECRET - if (cronSecret) { - const authHeader = request.headers.get('authorization') - if (authHeader !== `Bearer ${cronSecret}`) { - return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) - } + if (!cronSecret) { + console.error('[CronReminders] CRON_SECRET env var is required but not set') + return NextResponse.json({ error: 'Server misconfiguration' }, { status: 500 }) + } + const authHeader = request.headers.get('authorization') + if (authHeader !== `Bearer ${cronSecret}`) { + return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) } try { diff --git a/memento-note/app/api/debug/client-error/route.ts b/memento-note/app/api/debug/client-error/route.ts index 55a5998..90957fa 100644 --- a/memento-note/app/api/debug/client-error/route.ts +++ b/memento-note/app/api/debug/client-error/route.ts @@ -1,12 +1,17 @@ import { NextRequest, NextResponse } from 'next/server' +import { auth } from '@/auth' export async function POST(request: NextRequest) { + const session = await auth() + if (!session?.user?.id) { + return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) + } + try { const body = await request.json() - // Visible directement dans `docker logs memento-web` console.error('[CLIENT-ERROR-REPORT]', JSON.stringify(body, null, 2)) } catch { - // ignore + // ignore malformed payload } return NextResponse.json({ ok: true }) } diff --git a/memento-note/app/api/debug/config/route.ts b/memento-note/app/api/debug/config/route.ts deleted file mode 100644 index 5557143..0000000 --- a/memento-note/app/api/debug/config/route.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { NextResponse } from 'next/server'; -import { getSystemConfig } from '@/lib/config'; -import { auth } from '@/auth'; - -/** - * Debug endpoint to check AI configuration - * This helps verify that OpenAI is properly configured - */ -export async function GET() { - const session = await auth() - if (!session?.user?.id) { - return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) - } - if ((session.user as any).role !== 'ADMIN') { - return NextResponse.json({ error: 'Forbidden' }, { status: 403 }) - } - - try { - const config = await getSystemConfig(); - - // Return only AI-related config for debugging - const aiConfig = { - AI_PROVIDER_TAGS: config.AI_PROVIDER_TAGS || 'not set', - AI_PROVIDER_EMBEDDING: config.AI_PROVIDER_EMBEDDING || 'not set', - AI_MODEL_TAGS: config.AI_MODEL_TAGS || 'not set', - AI_MODEL_EMBEDDING: config.AI_MODEL_EMBEDDING || 'not set', - OPENAI_API_KEY: config.OPENAI_API_KEY ? 'set (hidden)' : 'not set', - OLLAMA_BASE_URL: config.OLLAMA_BASE_URL || 'not set', - OLLAMA_MODEL: config.OLLAMA_MODEL || 'not set', - CUSTOM_OPENAI_BASE_URL: config.CUSTOM_OPENAI_BASE_URL || 'not set', - CUSTOM_OPENAI_API_KEY: config.CUSTOM_OPENAI_API_KEY ? 'set (hidden)' : 'not set', - }; - - return NextResponse.json(aiConfig); - } catch (error) { - return NextResponse.json( - { error: 'Failed to get config', details: error }, - { status: 500 } - ); - } -} diff --git a/memento-note/app/api/debug/test-chat/route.ts b/memento-note/app/api/debug/test-chat/route.ts deleted file mode 100644 index d921a3e..0000000 --- a/memento-note/app/api/debug/test-chat/route.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { NextResponse } from 'next/server'; -import { chatService } from '@/lib/ai/services/chat.service'; -import { auth } from '@/auth'; - -export async function POST(req: Request) { - const session = await auth() - if (!session?.user?.id) { - return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) - } - if ((session.user as any).role !== 'ADMIN') { - return NextResponse.json({ error: 'Forbidden' }, { status: 403 }) - } - - try { - const body = await req.json(); - console.log("TEST ROUTE INCOMING BODY:", body); - - // Simulate what the server action does - const result = await chatService.chat(body.message, body.conversationId, body.notebookId); - - return NextResponse.json({ success: true, result }); - } catch (err: any) { - console.error("====== TEST ROUTE CHAT ERROR ======"); - console.error("NAME:", err.name); - console.error("MSG:", err.message); - if (err.cause) console.error("CAUSE:", JSON.stringify(err.cause, null, 2)); - if (err.data) console.error("DATA:", JSON.stringify(err.data, null, 2)); - if (err.stack) console.error("STACK:", err.stack); - console.error("==================================="); - return NextResponse.json({ - success: false, - error: err.message, - name: err.name, - cause: err.cause, - data: err.data - }, { status: 500 }); - } -} diff --git a/memento-note/app/api/fix-labels/route.ts b/memento-note/app/api/fix-labels/route.ts deleted file mode 100644 index 84381e0..0000000 --- a/memento-note/app/api/fix-labels/route.ts +++ /dev/null @@ -1,127 +0,0 @@ -import { NextResponse } from 'next/server' -import prisma from '@/lib/prisma' -import { revalidatePath } from 'next/cache' -import { auth } from '@/auth' - -function getHashColor(name: string): string { - const colors = ['red', 'blue', 'green', 'yellow', 'purple', 'pink', 'orange', 'gray'] - let hash = 0 - for (let i = 0; i < name.length; i++) { - hash = name.charCodeAt(i) + ((hash << 5) - hash) - } - return colors[Math.abs(hash) % colors.length] -} - -export async function POST() { - const session = await auth() - if (!session?.user?.id) { - return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) - } - if ((session.user as any).role !== 'ADMIN') { - return NextResponse.json({ error: 'Forbidden' }, { status: 403 }) - } - - try { - const result = { created: 0, deleted: 0, missing: [] as string[] } - - // Get ALL users - const users = await prisma.user.findMany({ - select: { id: true, email: true } - }) - - - for (const user of users) { - const userId = user.id - - // 1. Get all labels from notes - const allNotes = await prisma.note.findMany({ - where: { userId }, - select: { labels: true } - }) - - const labelsInNotes = new Set() - allNotes.forEach(note => { - if (note.labels) { - try { - const parsed: string[] = Array.isArray(note.labels) ? (note.labels as string[]) : [] - if (Array.isArray(parsed)) { - parsed.forEach(l => { - if (l && l.trim()) labelsInNotes.add(l.trim()) - }) - } - } catch (e) {} - } - }) - - - // 2. Get existing Label records - const existingLabels = await prisma.label.findMany({ - where: { userId }, - select: { id: true, name: true } - }) - - - const existingLabelMap = new Map() - existingLabels.forEach(label => { - existingLabelMap.set(label.name.toLowerCase(), label) - }) - - // 3. Create missing Label records - for (const labelName of labelsInNotes) { - if (!existingLabelMap.has(labelName.toLowerCase())) { - try { - await prisma.label.create({ - data: { - userId, - name: labelName, - color: getHashColor(labelName) - } - }) - result.created++ - } catch (e: any) { - console.error(`[FIX] ✗ Failed to create "${labelName}":`, e.message, e.code) - result.missing.push(labelName) - } - } - } - - // 4. Delete orphan Label records - const usedLabelsSet = new Set() - allNotes.forEach(note => { - if (note.labels) { - try { - const parsed: string[] = Array.isArray(note.labels) ? (note.labels as string[]) : [] - if (Array.isArray(parsed)) { - parsed.forEach(l => usedLabelsSet.add(l.toLowerCase())) - } - } catch (e) {} - } - }) - - for (const label of existingLabels) { - if (!usedLabelsSet.has(label.name.toLowerCase())) { - try { - await prisma.label.delete({ - where: { id: label.id } - }) - result.deleted++ - } catch (e) {} - } - } - } - - revalidatePath('/') - - return NextResponse.json({ - success: true, - ...result, - message: `Created ${result.created} labels, deleted ${result.deleted} orphans` - }) - } catch (error) { - console.error('[FIX] Error:', error) - return NextResponse.json( - { success: false, error: String(error) }, - { status: 500 } - ) - } -} diff --git a/memento-note/auth.ts b/memento-note/auth.ts index 104966d..c186dcd 100644 --- a/memento-note/auth.ts +++ b/memento-note/auth.ts @@ -4,6 +4,7 @@ import Credentials from 'next-auth/providers/credentials'; import { z } from 'zod'; import prisma from '@/lib/prisma'; import bcrypt from 'bcryptjs'; +import { rateLimit } from '@/lib/rate-limit'; export const { auth, signIn, signOut, handlers } = NextAuth({ ...authConfig, @@ -16,17 +17,21 @@ export const { auth, signIn, signOut, handlers } = NextAuth({ .safeParse(credentials); if (!parsedCredentials.success) { - console.error('Invalid credentials format'); return null; } const { email, password } = parsedCredentials.data; + + const { allowed } = rateLimit(`login:${email.toLowerCase()}`) + if (!allowed) { + return null; + } + const user = await prisma.user.findUnique({ where: { email: email.toLowerCase() } }); if (!user || !user.password) { - console.error('User not found or no password set'); return null; } @@ -41,10 +46,8 @@ export const { auth, signIn, signOut, handlers } = NextAuth({ }; } - console.error('Password mismatch'); return null; - } catch (error) { - console.error('CRITICAL AUTH ERROR:', error); + } catch { return null; } }, diff --git a/memento-note/components/debug-theme.tsx b/memento-note/components/debug-theme.tsx deleted file mode 100644 index 2e4285d..0000000 --- a/memento-note/components/debug-theme.tsx +++ /dev/null @@ -1,9 +0,0 @@ -'use client' - -export function DebugTheme({ theme }: { theme: string }) { - return ( -
- Debug Theme: {theme} -
- ) -} diff --git a/memento-note/components/error-reporter.tsx b/memento-note/components/error-reporter.tsx index e5be3d4..0fe5317 100644 --- a/memento-note/components/error-reporter.tsx +++ b/memento-note/components/error-reporter.tsx @@ -14,7 +14,9 @@ export function ErrorReporter() { headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload), keepalive: true, - }).catch(() => {}) + }).catch(() => { + console.error('[ErrorReporter] Failed to report client error (endpoint removed)') + }) } function onError(event: ErrorEvent) { diff --git a/memento-note/components/home-client.tsx b/memento-note/components/home-client.tsx index 3f8d7cd..f43dc82 100644 --- a/memento-note/components/home-client.tsx +++ b/memento-note/components/home-client.tsx @@ -237,13 +237,9 @@ export function HomeClient({ initialNotes, initialSettings }: HomeClientProps) { } let allNotes = search ? await searchNotes(search, semanticMode, notebook || undefined) - : await getAllNotes() + : await getAllNotes(false, notebook || undefined) - // Filtre notebook côté client - // Shared notes appear ONLY in inbox (general notes), not in notebooks - if (notebook) { - allNotes = allNotes.filter((note: any) => note.notebookId === notebook && !note._isShared) - } else { + if (!notebook && !search) { allNotes = allNotes.filter((note: any) => !note.notebookId || note._isShared) } diff --git a/memento-note/components/masonry-grid.tsx b/memento-note/components/masonry-grid.tsx index 465512c..25cad3e 100644 --- a/memento-note/components/masonry-grid.tsx +++ b/memento-note/components/masonry-grid.tsx @@ -185,7 +185,16 @@ export function MasonryGrid({ if (notes !== prevNotesRef.current) { const localSizeMap = new Map(localNotes.map(n => [n.id, n.size])); + const localOrderMap = new Map(localNotes.map((n, i) => [n.id, i])); const newLocalNotes = notes.map(n => ({ ...n, size: localSizeMap.get(n.id) ?? n.size })); + newLocalNotes.sort((a, b) => { + const oA = localOrderMap.get(a.id) + const oB = localOrderMap.get(b.id) + if (oA !== undefined && oB !== undefined) return oA - oB + if (oA !== undefined) return -1 + if (oB !== undefined) return 1 + return 0 + }) setLocalNotes(newLocalNotes); prevNotesRef.current = notes; } @@ -239,16 +248,20 @@ export function MasonryGrid({ if (!over || active.id === over.id) return; - const reordered = arrayMove( - localNotesRef.current, - localNotesRef.current.findIndex(n => n.id === active.id), - localNotesRef.current.findIndex(n => n.id === over.id), - ); + const current = localNotesRef.current + const activeIdx = current.findIndex(n => n.id === active.id) + const overIdx = current.findIndex(n => n.id === over.id) + if (activeIdx === -1 || overIdx === -1) return + const activeNote = current[activeIdx] + const overNote = current[overIdx] + + if (activeNote.isPinned !== overNote.isPinned) return + + const reordered = arrayMove(current, activeIdx, overIdx); if (reordered.length === 0) return; setLocalNotes(reordered); - // Persist order outside of setState to avoid "setState in render" warning const ids = reordered.map(n => n.id); updateFullOrderWithoutRevalidation(ids).catch(err => { console.error('Failed to persist order:', err); diff --git a/memento-note/components/note-card.tsx b/memento-note/components/note-card.tsx index 47ae273..002484a 100644 --- a/memento-note/components/note-card.tsx +++ b/memento-note/components/note-card.tsx @@ -21,7 +21,8 @@ import { AlertDialogTitle, } from '@/components/ui/alert-dialog' import { Pin, Bell, GripVertical, X, Link2, FolderOpen, StickyNote, LucideIcon, Folder, Briefcase, FileText, Zap, BarChart3, Globe, Sparkles, Book, Heart, Crown, Music, Building2, LogOut, Trash2, AlignLeft, FileCode2, PenLine, ListChecks } from 'lucide-react' -import { useState, useEffect, useTransition, useOptimistic, memo } from 'react' +import { useState, useEffect, useTransition, useOptimistic, memo, useMemo } from 'react' +import dynamic from 'next/dynamic' import { useSession } from 'next-auth/react' import { useRouter, useSearchParams } from 'next/navigation' import { deleteNote, toggleArchive, togglePin, updateColor, updateNote, updateSize, getNoteAllUsers, leaveSharedNote, removeFusedBadge, createNote, restoreNote, permanentDeleteNote } from '@/app/actions/notes' @@ -42,17 +43,20 @@ import { ar } from 'date-fns/locale/ar' import { hi } from 'date-fns/locale/hi' import { nl } from 'date-fns/locale/nl' import { pl } from 'date-fns/locale/pl' -import { MarkdownContent } from './markdown-content' import { LabelBadge } from './label-badge' import { NoteImages } from './note-images' import { NoteChecklist } from './note-checklist' import { NoteActions } from './note-actions' -import { CollaboratorDialog } from './collaborator-dialog' import { CollaboratorAvatars } from './collaborator-avatars' import { ConnectionsBadge } from './connections-badge' -import { ConnectionsOverlay } from './connections-overlay' -import { ComparisonModal } from './comparison-modal' -import { FusionModal } from './fusion-modal' + +const MarkdownContent = dynamic(() => import('./markdown-content').then(m => ({ default: m.MarkdownContent })), { + loading: () =>
, +}) +const CollaboratorDialog = dynamic(() => import('./collaborator-dialog').then(m => ({ default: m.CollaboratorDialog })), { ssr: false }) +const ConnectionsOverlay = dynamic(() => import('./connections-overlay').then(m => ({ default: m.ConnectionsOverlay })), { ssr: false }) +const ComparisonModal = dynamic(() => import('./comparison-modal').then(m => ({ default: m.ComparisonModal })), { ssr: false }) +const FusionModal = dynamic(() => import('./fusion-modal').then(m => ({ default: m.FusionModal })), { ssr: false }) import { useConnectionsCompare } from '@/hooks/use-connections-compare' import { useLabels } from '@/context/LabelContext' import { useNoteRefresh } from '@/context/NoteRefreshContext' @@ -186,6 +190,14 @@ export const NoteCard = memo(function NoteCard({ const [showNotebookMenu, setShowNotebookMenu] = useState(false) const [reminderDate, setReminderDate] = useState(note.reminder ? new Date(note.reminder) : null) + const sanitizedHtml = useMemo(() => { + if (note.type !== 'richtext' || !note.content) return '' + if (typeof window !== 'undefined') { + return require('isomorphic-dompurify').sanitize(note.content) + } + return note.content + }, [note.type, note.content]) + const handleUpdateReminder = async (noteId: string, reminder: Date | null) => { startTransition(async () => { try { @@ -257,6 +269,8 @@ export const NoteCard = memo(function NoteCard({ return } + if (!isSharedNote) return + let isMounted = true const loadCollaborators = async () => { @@ -270,7 +284,6 @@ export const NoteCard = memo(function NoteCard({ } } } catch (error) { - console.error('Failed to load collaborators:', error) if (isMounted) { setCollaborators([]) } @@ -633,7 +646,7 @@ export const NoteCard = memo(function NoteCard({ onToggleItem={handleCheckItem} /> ) : note.type === 'richtext' ? ( -
+
) : (
) : isRt ? ( -
+
) : (
{entry.content || ''}
)} diff --git a/memento-note/components/note-images.tsx b/memento-note/components/note-images.tsx index 18bc9f9..158d908 100644 --- a/memento-note/components/note-images.tsx +++ b/memento-note/components/note-images.tsx @@ -18,6 +18,7 @@ export function NoteImages({ images: rawImages, title }: NoteImagesProps) { ) : images.length === 2 ? ( @@ -27,6 +28,7 @@ export function NoteImages({ images: rawImages, title }: NoteImagesProps) { key={idx} src={img} alt="" + loading="lazy" className="w-full h-auto rounded-lg" /> ))} @@ -36,6 +38,7 @@ export function NoteImages({ images: rawImages, title }: NoteImagesProps) { {images.slice(1).map((img, idx) => ( @@ -43,6 +46,7 @@ export function NoteImages({ images: rawImages, title }: NoteImagesProps) { key={idx} src={img} alt="" + loading="lazy" className="w-full h-auto rounded-lg" /> ))} @@ -54,6 +58,7 @@ export function NoteImages({ images: rawImages, title }: NoteImagesProps) { key={idx} src={img} alt="" + loading="lazy" className="w-full h-auto rounded-lg" /> ))} diff --git a/memento-note/components/notebooks-list.tsx b/memento-note/components/notebooks-list.tsx index 00405b4..b6a05f9 100644 --- a/memento-note/components/notebooks-list.tsx +++ b/memento-note/components/notebooks-list.tsx @@ -1,6 +1,6 @@ 'use client' -import { useState, useCallback } from 'react' +import { useState, useCallback, useRef } from 'react' import Link from 'next/link' import { usePathname, useRouter, useSearchParams } from 'next/navigation' import { cn } from '@/lib/utils' @@ -18,6 +18,36 @@ import { useLabels } from '@/context/LabelContext' import { LabelManagementDialog } from '@/components/label-management-dialog' import { Notebook } from '@/lib/types' import { getNotebookIcon } from '@/lib/notebook-icon' +import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' + +function NotebookNameTooltip({ name, children }: { name: string; children: React.ReactNode }) { + const spanRef = useRef(null) + const [isTruncated, setIsTruncated] = useState(false) + + const checkTruncation = useCallback((node: HTMLSpanElement | null) => { + if (!node) return + setIsTruncated(node.scrollWidth > node.clientWidth) + }, []) + + return ( + + + { spanRef.current = el; checkTruncation(el) }} + onMouseEnter={() => checkTruncation(spanRef.current)} + className="truncate min-w-0" + > + {children} + + + {isTruncated && ( + + {name} + + )} + + ) +} export function NotebooksList() { const pathname = usePathname() @@ -152,12 +182,14 @@ export function NotebooksList() { className={cn("w-5 h-5 flex-shrink-0 fill-current", !notebook.color && "text-primary dark:text-primary-foreground")} style={notebook.color ? { color: notebook.color } : undefined} /> - - {notebook.name} - + + + {notebook.name} + +
{/* Actions menu for active notebook */} @@ -241,7 +273,11 @@ export function NotebooksList() { )} > - {notebook.name} + + + {notebook.name} + + {(notebook as any).notesCount > 0 && ( ({new Intl.NumberFormat(language).format((notebook as any).notesCount)}) )} diff --git a/memento-note/components/settings-backup-1776541530/SettingInput.tsx b/memento-note/components/settings-backup-1776541530/SettingInput.tsx deleted file mode 100644 index ec305ae..0000000 --- a/memento-note/components/settings-backup-1776541530/SettingInput.tsx +++ /dev/null @@ -1,87 +0,0 @@ -'use client' - -import { useState } from 'react' -import { Label } from '@/components/ui/label' -import { Loader2, Check } from 'lucide-react' -import { cn } from '@/lib/utils' -import { toast } from 'sonner' -import { useLanguage } from '@/lib/i18n' - -interface SettingInputProps { - label: string - description?: string - value: string - type?: 'text' | 'password' | 'email' | 'url' - onChange: (value: string) => Promise - placeholder?: string - disabled?: boolean -} - -export function SettingInput({ - label, - description, - value, - type = 'text', - onChange, - placeholder, - disabled -}: SettingInputProps) { - const { t } = useLanguage() - const [isLoading, setIsLoading] = useState(false) - const [isSaved, setIsSaved] = useState(false) - - const handleChange = async (newValue: string) => { - setIsLoading(true) - setIsSaved(false) - - try { - await onChange(newValue) - setIsSaved(true) - toast.success(t('toast.saved')) - - setTimeout(() => setIsSaved(false), 2000) - } catch (err) { - console.error('Error updating setting:', err) - toast.error(t('toast.saveFailed')) - } finally { - setIsLoading(false) - } - } - - return ( -
- - {description && ( -

- {description} -

- )} -
- handleChange(e.target.value)} - placeholder={placeholder} - disabled={disabled || isLoading} - className={cn( - 'w-full px-3 py-2 border rounded-lg', - 'focus:ring-2 focus:ring-primary-500 focus:border-transparent', - 'disabled:opacity-50 disabled:cursor-not-allowed', - 'bg-white dark:bg-gray-900', - 'border-gray-300 dark:border-gray-700', - 'text-gray-900 dark:text-gray-100', - 'placeholder:text-gray-400 dark:placeholder:text-gray-600' - )} - /> - {isLoading && ( - - )} - {isSaved && !isLoading && ( - - )} -
-
- ) -} diff --git a/memento-note/components/settings-backup-1776541530/SettingSelect.tsx b/memento-note/components/settings-backup-1776541530/SettingSelect.tsx deleted file mode 100644 index 5817425..0000000 --- a/memento-note/components/settings-backup-1776541530/SettingSelect.tsx +++ /dev/null @@ -1,86 +0,0 @@ -'use client' - -import { useState } from 'react' -import { Label } from '@/components/ui/label' -import { Loader2 } from 'lucide-react' -import { cn } from '@/lib/utils' -import { toast } from 'sonner' -import { useLanguage } from '@/lib/i18n' - -interface SelectOption { - value: string - label: string - description?: string -} - -interface SettingSelectProps { - label: string - description?: string - value: string - options: SelectOption[] - onChange: (value: string) => Promise - disabled?: boolean -} - -export function SettingSelect({ - label, - description, - value, - options, - onChange, - disabled -}: SettingSelectProps) { - const { t } = useLanguage() - const [isLoading, setIsLoading] = useState(false) - - const handleChange = async (newValue: string) => { - setIsLoading(true) - - try { - await onChange(newValue) - toast.success(t('toast.saved')) - } catch (err) { - console.error('Error updating setting:', err) - toast.error(t('toast.saveFailed')) - } finally { - setIsLoading(false) - } - } - - return ( -
- - {description && ( -

- {description} -

- )} -
- - {isLoading && ( - - )} -
-
- ) -} diff --git a/memento-note/components/settings-backup-1776541530/SettingToggle.tsx b/memento-note/components/settings-backup-1776541530/SettingToggle.tsx deleted file mode 100644 index 1bf6e32..0000000 --- a/memento-note/components/settings-backup-1776541530/SettingToggle.tsx +++ /dev/null @@ -1,73 +0,0 @@ -'use client' - -import { useState } from 'react' -import { Switch } from '@/components/ui/switch' -import { Label } from '@/components/ui/label' -import { Loader2, Check, X } from 'lucide-react' -import { cn } from '@/lib/utils' -import { toast } from 'sonner' -import { useLanguage } from '@/lib/i18n' - -interface SettingToggleProps { - label: string - description?: string - checked: boolean - onChange: (checked: boolean) => Promise - disabled?: boolean -} - -export function SettingToggle({ - label, - description, - checked, - onChange, - disabled -}: SettingToggleProps) { - const { t } = useLanguage() - const [isLoading, setIsLoading] = useState(false) - const [error, setError] = useState(false) - - const handleChange = async (newChecked: boolean) => { - setIsLoading(true) - setError(false) - - try { - await onChange(newChecked) - toast.success(t('toast.saved')) - } catch (err) { - console.error('Error updating setting:', err) - setError(true) - toast.error(t('toast.saveFailed')) - } finally { - setIsLoading(false) - } - } - - return ( -
-
- - {description && ( -

- {description} -

- )} -
-
- {isLoading && } - {!isLoading && !error && checked && } - {!isLoading && !error && !checked && } - -
-
- ) -} diff --git a/memento-note/components/settings-backup-1776541530/SettingsNav.tsx b/memento-note/components/settings-backup-1776541530/SettingsNav.tsx deleted file mode 100644 index 636a2ff..0000000 --- a/memento-note/components/settings-backup-1776541530/SettingsNav.tsx +++ /dev/null @@ -1,97 +0,0 @@ -'use client' - -import Link from 'next/link' -import { usePathname } from 'next/navigation' -import { Settings, Sparkles, Palette, User, Database, Info, Check, Key } from 'lucide-react' -import { cn } from '@/lib/utils' -import { useLanguage } from '@/lib/i18n' - -interface SettingsSection { - id: string - label: string - icon: React.ReactNode - href: string -} - -interface SettingsNavProps { - className?: string -} - -export function SettingsNav({ className }: SettingsNavProps) { - const pathname = usePathname() - const { t } = useLanguage() - - const sections: SettingsSection[] = [ - { - id: 'general', - label: t('generalSettings.title'), - icon: , - href: '/settings/general' - }, - { - id: 'ai', - label: t('aiSettings.title'), - icon: , - href: '/settings/ai' - }, - { - id: 'appearance', - label: t('appearance.title'), - icon: , - href: '/settings/appearance' - }, - { - id: 'profile', - label: t('profile.title'), - icon: , - href: '/settings/profile' - }, - { - id: 'data', - label: t('dataManagement.title'), - icon: , - href: '/settings/data' - }, - { - id: 'mcp', - label: t('mcpSettings.title'), - icon: , - href: '/settings/mcp' - }, - { - id: 'about', - label: t('about.title'), - icon: , - href: '/settings/about' - } - ] - - const isActive = (href: string) => pathname === href || pathname.startsWith(href + '/') - - return ( - - ) -} diff --git a/memento-note/components/settings-backup-1776541530/SettingsSearch.tsx b/memento-note/components/settings-backup-1776541530/SettingsSearch.tsx deleted file mode 100644 index e2103ff..0000000 --- a/memento-note/components/settings-backup-1776541530/SettingsSearch.tsx +++ /dev/null @@ -1,105 +0,0 @@ -'use client' - -import { useState, useEffect } from 'react' -import { Search, X } from 'lucide-react' -import { Input } from '@/components/ui/input' -import { cn } from '@/lib/utils' -import { useLanguage } from '@/lib/i18n' - -export interface Section { - id: string - label: string - description: string - icon: React.ReactNode - href: string -} - -interface SettingsSearchProps { - sections: Section[] - onFilter: (filteredSections: Section[]) => void - placeholder?: string - className?: string -} - -export function SettingsSearch({ - sections, - onFilter, - placeholder, - className -}: SettingsSearchProps) { - const { t } = useLanguage() - const [query, setQuery] = useState('') - const [filteredSections, setFilteredSections] = useState(sections) - - const searchPlaceholder = placeholder || t('settings.searchNoResults') || 'Search settings...' - - useEffect(() => { - if (!query.trim()) { - setFilteredSections(sections) - return - } - - const queryLower = query.toLowerCase() - const filtered = sections.filter(section => { - const labelMatch = section.label.toLowerCase().includes(queryLower) - const descMatch = section.description.toLowerCase().includes(queryLower) - return labelMatch || descMatch - }) - setFilteredSections(filtered) - }, [query, sections]) - - const handleClearSearch = () => { - setQuery('') - setFilteredSections(sections) - } - - useEffect(() => { - const handleKeyDown = (e: KeyboardEvent) => { - if (e.key === 'Escape') { - handleClearSearch() - e.stopPropagation() - } - } - - document.addEventListener('keydown', handleKeyDown) - return () => { - document.removeEventListener('keydown', handleKeyDown) - } - }, []) - - const handleSearchChange = (value: string) => { - setQuery(value) - } - - const hasResults = query.trim() && filteredSections.length < sections.length - const isEmptySearch = query.trim() && filteredSections.length === 0 - - return ( -
- - handleSearchChange(e.target.value)} - placeholder={searchPlaceholder} - className="pl-10" - autoFocus - /> - {hasResults && ( - - )} - {isEmptySearch && ( -
-

{t('settings.searchNoResults')}

-
- )} -
- ) -} diff --git a/memento-note/components/settings-backup-1776541530/SettingsSection.tsx b/memento-note/components/settings-backup-1776541530/SettingsSection.tsx deleted file mode 100644 index 4e2a8e1..0000000 --- a/memento-note/components/settings-backup-1776541530/SettingsSection.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' - -interface SettingsSectionProps { - title: string - description?: string - icon?: React.ReactNode - children: React.ReactNode - className?: string -} - -export function SettingsSection({ - title, - description, - icon, - children, - className -}: SettingsSectionProps) { - return ( - - - - {icon} - {title} - - {description && ( -

- {description} -

- )} -
- - {children} - -
- ) -} diff --git a/memento-note/components/settings-backup-1776541530/index.ts b/memento-note/components/settings-backup-1776541530/index.ts deleted file mode 100644 index ece90c4..0000000 --- a/memento-note/components/settings-backup-1776541530/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { SettingsNav } from './SettingsNav' -export { SettingsSection } from './SettingsSection' -export { SettingToggle } from './SettingToggle' -export { SettingSelect } from './SettingSelect' -export { SettingInput } from './SettingInput' -export { SettingsSearch } from './SettingsSearch' diff --git a/memento-note/components/sidebar.tsx b/memento-note/components/sidebar.tsx index aec96f0..1ca6a32 100644 --- a/memento-note/components/sidebar.tsx +++ b/memento-note/components/sidebar.tsx @@ -46,7 +46,7 @@ export function Sidebar({ className, user }: { className?: string, user?: any }) useEffect(() => { if (HIDDEN_ROUTES.some(r => pathname.startsWith(r))) return getTrashCount().then(setTrashCount) - }, [pathname, searchKey, refreshKey]) + }, [pathname, refreshKey]) // Hide sidebar on Agents, Chat IA and Lab routes if (HIDDEN_ROUTES.some(r => pathname.startsWith(r))) return null diff --git a/memento-note/context/NoteRefreshContext.tsx b/memento-note/context/NoteRefreshContext.tsx index def6a7a..abd372f 100644 --- a/memento-note/context/NoteRefreshContext.tsx +++ b/memento-note/context/NoteRefreshContext.tsx @@ -5,18 +5,25 @@ import { createContext, useContext, useState, useCallback, useMemo } from 'react interface NoteRefreshContextType { refreshKey: number triggerRefresh: () => void + notebooksRefreshKey: number + triggerNotebooksRefresh: () => void } const NoteRefreshContext = createContext(undefined) export function NoteRefreshProvider({ children }: { children: React.ReactNode }) { const [refreshKey, setRefreshKey] = useState(0) + const [notebooksRefreshKey, setNotebooksRefreshKey] = useState(0) const triggerRefresh = useCallback(() => { setRefreshKey(prev => prev + 1) }, []) - const value = useMemo(() => ({ refreshKey, triggerRefresh }), [refreshKey, triggerRefresh]) + const triggerNotebooksRefresh = useCallback(() => { + setNotebooksRefreshKey(prev => prev + 1) + }, []) + + const value = useMemo(() => ({ refreshKey, triggerRefresh, notebooksRefreshKey, triggerNotebooksRefresh }), [refreshKey, triggerRefresh, notebooksRefreshKey, triggerNotebooksRefresh]) return ( @@ -33,11 +40,7 @@ export function useNoteRefresh() { return context } -/** - * Same as useNoteRefresh but tolerates being called outside the provider - * (e.g. shared header rendered in admin pages). Returns a no-op when absent. - */ export function useNoteRefreshOptional(): NoteRefreshContextType { const context = useContext(NoteRefreshContext) - return context ?? { refreshKey: 0, triggerRefresh: () => {} } + return context ?? { refreshKey: 0, triggerRefresh: () => {}, notebooksRefreshKey: 0, triggerNotebooksRefresh: () => {} } } diff --git a/memento-note/context/notebooks-context.tsx b/memento-note/context/notebooks-context.tsx index dba3ae7..15a342c 100644 --- a/memento-note/context/notebooks-context.tsx +++ b/memento-note/context/notebooks-context.tsx @@ -84,7 +84,7 @@ export function NotebooksProvider({ children, initialNotebooks = [] }: Notebooks const [isLoading, setIsLoading] = useState(true) const [isMovingNote, setIsMovingNote] = useState(false) const [error, setError] = useState(null) - const { triggerRefresh, refreshKey } = useNoteRefresh() + const { triggerRefresh, triggerNotebooksRefresh, notebooksRefreshKey } = useNoteRefresh() // ===== DERIVED STATE ===== const currentLabels = useMemo(() => { @@ -115,10 +115,9 @@ export function NotebooksProvider({ children, initialNotebooks = [] }: Notebooks loadNotebooks() }, [loadNotebooks]) - // Recharge les carnets à chaque fois qu'une note est modifiée/supprimée useEffect(() => { - if (refreshKey > 0) loadNotebooks() - }, [refreshKey, loadNotebooks]) + if (notebooksRefreshKey > 0) loadNotebooks() + }, [notebooksRefreshKey, loadNotebooks]) // ===== ACTIONS: NOTEBOOKS ===== const createNotebookOptimistic = useCallback(async (data: CreateNotebookInput) => { @@ -134,8 +133,9 @@ export function NotebooksProvider({ children, initialNotebooks = [] }: Notebooks // Reload notebooks from server to update sidebar state await loadNotebooks() + triggerNotebooksRefresh() triggerRefresh() - }, [loadNotebooks, triggerRefresh]) + }, [loadNotebooks, triggerNotebooksRefresh, triggerRefresh]) const updateNotebook = useCallback(async (notebookId: string, data: UpdateNotebookInput) => { const response = await fetch(`/api/notebooks/${notebookId}`, { @@ -149,8 +149,9 @@ export function NotebooksProvider({ children, initialNotebooks = [] }: Notebooks } await loadNotebooks() + triggerNotebooksRefresh() triggerRefresh() - }, [loadNotebooks, triggerRefresh]) + }, [loadNotebooks, triggerNotebooksRefresh, triggerRefresh]) const deleteNotebook = useCallback(async (notebookId: string) => { const response = await fetch(`/api/notebooks/${notebookId}`, { @@ -162,8 +163,9 @@ export function NotebooksProvider({ children, initialNotebooks = [] }: Notebooks } await loadNotebooks() + triggerNotebooksRefresh() triggerRefresh() - }, [loadNotebooks, triggerRefresh]) + }, [loadNotebooks, triggerNotebooksRefresh, triggerRefresh]) const updateNotebookOrderOptimistic = useCallback(async (notebookIds: string[]) => { const response = await fetch('/api/notebooks/reorder', { @@ -177,8 +179,9 @@ export function NotebooksProvider({ children, initialNotebooks = [] }: Notebooks } await loadNotebooks() + triggerNotebooksRefresh() triggerRefresh() - }, [loadNotebooks, triggerRefresh]) + }, [loadNotebooks, triggerNotebooksRefresh, triggerRefresh]) // ===== ACTIONS: LABELS ===== const createLabel = useCallback(async (data: CreateLabelInput) => { @@ -233,6 +236,7 @@ export function NotebooksProvider({ children, initialNotebooks = [] }: Notebooks } await loadNotebooks() + triggerNotebooksRefresh() triggerRefresh() } catch (error) { toast.error('Failed to move note. Please try again.') diff --git a/memento-note/fix-admin-settings.js b/memento-note/fix-admin-settings.js deleted file mode 100644 index d1e1436..0000000 --- a/memento-note/fix-admin-settings.js +++ /dev/null @@ -1,178 +0,0 @@ -const fs = require('fs'); -const file = 'app/(admin)/admin/settings/admin-settings-form.tsx'; -let content = fs.readFileSync(file, 'utf-8'); - -// 1. Add icons -content = content.replace( - "import { TestTube, ExternalLink, RefreshCw } from 'lucide-react'", - "import { TestTube, ExternalLink, RefreshCw, Shield, Brain, Mail, Wrench } from 'lucide-react'" -); - -// 2. Change root wrapper to 2 columns -content = content.replace( - '
', - `
- {/* Left Column */} -
` -); - -// 3. Close left column and open right column right before AI Providers -content = content.replace( - ' \n \n {t(\'admin.ai.title\')}', - `
- {/* Right Column */} -
- - - {t('admin.ai.title')}` -); - -// 4. Move Email from after AI to Left Column? No, let's keep the order and just split them. -// Wait, in my previous attempt I put Security + AI on left, and Email + Tools on right? -// Let's just do that to be safe. -// Let's put Security + AI in Left Column, and Email + Tools in Right Column. -// So: -// Left Column ends after AI Providers. -// Right Column starts before Email. -content = content.replace( - ' \n \n {t(\'admin.email.title\')}', - `
- {/* Right Column */} -
- - - {t('admin.email.title')}` -); - -// Add the closing div for Right Column at the very end -content = content.replace( - '
\n )\n}\n', - '
\n
\n )\n}\n' -); - -// Now let's replace all Card components with the custom design system -// Security Card -content = content.replace( - '\n \n {t(\'admin.security.title\')}\n {t(\'admin.security.description\')}\n ', - `
-
-
- -
-
-

{t('admin.security.title')}

-

{t('admin.security.description')}

-
-
` -); -content = content.replace(//g, '
'); -content = content.replace(//g, '
'); -content = content.replace(/<\/CardFooter>/g, '
'); - -content = content.replace( - '\n
', - '\n
' -); // do it 4 times -content = content.replace('\n ', '\n
'); -content = content.replace('\n ', '\n
'); -content = content.replace('\n ', '\n
'); - -// AI Card -content = content.replace( - '\n \n {t(\'admin.ai.title\')}\n {t(\'admin.ai.description\')}\n ', - `
-
-
- -
-
-

{t('admin.ai.title')}

-

{t('admin.ai.description')}

-
-
` -); - -// Email Card -content = content.replace( - '\n \n {t(\'admin.email.title\')}\n {t(\'admin.email.description\')}\n ', - `
-
-
- -
-
-

{t('admin.email.title')}

-

{t('admin.email.description')}

-
-
` -); - -// Tools Card -content = content.replace( - '\n \n {t(\'admin.tools.title\')}\n {t(\'admin.tools.description\')}\n ', - `
-
-
- -
-
-

{t('admin.tools.title')}

-

{t('admin.tools.description')}

-
-
` -); - -// Replace AI block styling -content = content.replace( - 'p-4 border rounded-lg bg-primary/5 dark:bg-primary/10', - 'p-4 border border-border/50 rounded-lg bg-muted/50' -); -content = content.replace( - 'p-4 border rounded-lg bg-green-50/50 dark:bg-green-950/20', - 'p-4 border border-border/50 rounded-lg bg-muted/50 mt-4' -); -content = content.replace( - 'p-4 border rounded-lg bg-blue-50/50 dark:bg-blue-950/20', - 'p-4 border border-border/50 rounded-lg bg-muted/50 mt-4' -); - -// Also replace dark text colors inside headers -content = content.replace( - '

\\n 🏷️', - '

\\n 🏷️' -); -content = content.replace( - '

\\n 🔍', - '

\\n 🔍' -); -content = content.replace( - '

\\n 💬', - '

\\n 💬' -); - -// Email / Search test result classes -content = content.replace( - /border-green-200 bg-green-50 text-green-800 dark:border-green-800 dark:bg-green-950\/30 dark:text-green-300/g, - 'border-green-500/20 bg-green-500/10 text-green-600' -); -content = content.replace( - /border-red-200 bg-red-50 text-red-800 dark:border-red-800 dark:bg-red-950\/30 dark:text-red-300/g, - 'border-red-500/20 bg-red-500/10 text-red-600' -); - -// CardFooter specific layout fixes since it became a div -content = content.replace( - '
', - '
' -); // Might not match exact, let's fix manually if needed. - -// Wait, the CardFooter replacement was: content.replace(//g, '
'); -// Then there was which became
... Need to make sure it has padding. -content = content.replace( - '
', - '
' -); - -fs.writeFileSync(file, content); -console.log("Success"); diff --git a/memento-note/fix-card-footer.js b/memento-note/fix-card-footer.js deleted file mode 100644 index d133cba..0000000 --- a/memento-note/fix-card-footer.js +++ /dev/null @@ -1,11 +0,0 @@ -const fs = require('fs'); -const file = 'app/(admin)/admin/settings/admin-settings-form.tsx'; -let content = fs.readFileSync(file, 'utf-8'); - -// Replace any leftover tags -content = content.replace(//g, '
'); -content = content.replace(//g, '
'); -content = content.replace(/<\/CardFooter>/g, '
'); - -fs.writeFileSync(file, content); -console.log("Fixed CardFooters"); diff --git a/memento-note/fix-mcp-settings.js b/memento-note/fix-mcp-settings.js deleted file mode 100644 index 1c80fe8..0000000 --- a/memento-note/fix-mcp-settings.js +++ /dev/null @@ -1,192 +0,0 @@ -const fs = require('fs'); -const file = 'components/mcp/mcp-settings-panel.tsx'; -let content = fs.readFileSync(file, 'utf-8'); - -// Replace standard with our styled headers -// Section 1 -content = content.replace( - ` -
- -
-

{t('mcpSettings.whatIsMcp.title')}

`, - `
-
-
- -
-
-

{t('mcpSettings.whatIsMcp.title')}

-
-
-
` -); - -// We need to close the p-6 div, wait, the ends with . So we need to replace carefully. -// Let's do it section by section or just globally replace with
since we added a new wrapping div. -// For Section 1, the end is -content = content.replace( - ` - -
-
-
`, - ` - -
-
` -); // The original has
- -// Section 2 -content = content.replace( - ` -
- -

{t('mcpSettings.serverStatus.title')}

-
`, - `
-
-
- -
-
-

{t('mcpSettings.serverStatus.title')}

-
-
-
` -); -content = content.replace( - `
- )} -
-
`, - `
- )} -
-
-

` -); - - -// Section 3 -content = content.replace( - ` -
-
- -
-

{t('mcpSettings.apiKeys.title')}

-

- {t('mcpSettings.apiKeys.description')} -

-
-
`, - `
-
-
-
- -
-
-

{t('mcpSettings.apiKeys.title')}

-

- {t('mcpSettings.apiKeys.description')} -

-
-
` -); - -content = content.replace( - ` ))} -
- )} - `, - ` ))} -
- )} -
` -); -// Wait! I forgot to add `
` after the header for Section 3! -// The header ended at - -
`, - ` - -
-
` -); - -// Section 4 -// Wait, Section 4 is a subcomponent! -content = content.replace( - ` -
- -
-

- {t('mcpSettings.configInstructions.title')} -

-

- {t('mcpSettings.configInstructions.description')} -

-
-
`, - `
-
-
- -
-
-

- {t('mcpSettings.configInstructions.title')} -

-

- {t('mcpSettings.configInstructions.description')} -

-
-
-
` -); - -content = content.replace( - ` ))} -
- `, - ` ))} -
-
` -); -// In Section 4, remove `
` because I merged it into `
` -content = content.replace( - `
\n
`, - `
` -); - -// Fix colors -content = content.replace(/text-gray-500/g, 'text-muted-foreground'); -content = content.replace(/text-gray-600/g, 'text-muted-foreground'); -content = content.replace(/text-gray-400/g, 'text-muted-foreground'); -content = content.replace(/bg-gray-100 dark:bg-gray-800/g, 'bg-muted'); -content = content.replace(/bg-gray-50 dark:bg-gray-900/g, 'bg-muted/50'); -content = content.replace(/bg-gray-50/g, 'bg-muted/50'); -content = content.replace(/dark:hover:bg-gray-900/g, 'hover:bg-muted'); - -// Remove Card import -content = content.replace("import { Card } from '@/components/ui/card'", ""); - -// Grid layout for mcp-settings-panel root -content = content.replace( - '
', - '
' -); - -fs.writeFileSync(file, content); -console.log("Done"); diff --git a/memento-note/lib/ai/providers/ollama.ts b/memento-note/lib/ai/providers/ollama.ts index 118d318..d57bf0f 100644 --- a/memento-note/lib/ai/providers/ollama.ts +++ b/memento-note/lib/ai/providers/ollama.ts @@ -27,6 +27,16 @@ export class OllamaProvider implements AIProvider { this.model = ollamaClient.chat(modelName); } + private async fetchWithTimeout(url: string, options: RequestInit, timeoutMs: number = 30_000): Promise { + const controller = new AbortController() + const timer = setTimeout(() => controller.abort(), timeoutMs) + try { + return await fetch(url, { ...options, signal: controller.signal }) + } finally { + clearTimeout(timer) + } + } + async generateTags(content: string, language: string = "en"): Promise { try { const promptText = language === 'fa' @@ -55,7 +65,7 @@ Rules: Respond ONLY as a JSON list of objects: [{"tag": "string", "confidence": number}]. Note content: "${content}"`; - const response = await fetch(`${this.baseUrl}/generate`, { + const response = await this.fetchWithTimeout(`${this.baseUrl}/generate`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ @@ -75,7 +85,6 @@ Note content: "${content}"`; return JSON.parse(jsonMatch[0]); } - // Support for { "tags": [...] } format const objectMatch = text.match(/\{\s*"tags"\s*:\s*(\[[\s\S]*\])\s*\}/); if (objectMatch && objectMatch[1]) { return JSON.parse(objectMatch[1]); @@ -90,14 +99,14 @@ Note content: "${content}"`; async getEmbeddings(text: string): Promise { try { - const response = await fetch(`${this.baseUrl}/embeddings`, { + const response = await this.fetchWithTimeout(`${this.baseUrl}/embeddings`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ model: this.embeddingModelName, prompt: text, }), - }); + }, 60_000); if (!response.ok) throw new Error(`Ollama error: ${response.statusText}`); @@ -111,7 +120,7 @@ Note content: "${content}"`; async generateTitles(prompt: string): Promise { try { - const response = await fetch(`${this.baseUrl}/generate`, { + const response = await this.fetchWithTimeout(`${this.baseUrl}/generate`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ @@ -126,7 +135,6 @@ Note content: "${content}"`; const data = await response.json(); const text = data.response; - // Extract JSON from response const jsonMatch = text.match(/\[\s*\{[\s\S]*\}\s*\]/); if (jsonMatch) { return JSON.parse(jsonMatch[0]); @@ -141,7 +149,7 @@ Note content: "${content}"`; async generateText(prompt: string): Promise { try { - const response = await fetch(`${this.baseUrl}/generate`, { + const response = await this.fetchWithTimeout(`${this.baseUrl}/generate`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ @@ -172,7 +180,7 @@ Note content: "${content}"`; ollamaMessages.unshift({ role: 'system', content: systemPrompt }); } - const response = await fetch(`${this.baseUrl}/chat`, { + const response = await this.fetchWithTimeout(`${this.baseUrl}/chat`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ diff --git a/memento-note/lib/api-auth.ts b/memento-note/lib/api-auth.ts new file mode 100644 index 0000000..f42ee8d --- /dev/null +++ b/memento-note/lib/api-auth.ts @@ -0,0 +1,19 @@ +import { auth } from '@/auth' +import { NextResponse } from 'next/server' + +export async function requireAuth() { + const session = await auth() + if (!session?.user?.id) { + return { session: null, error: NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) } + } + return { session, error: null } +} + +export async function requireAdmin() { + const result = await requireAuth() + if (result.error) return result + if ((result.session!.user as any).role !== 'ADMIN') { + return { session: null, error: NextResponse.json({ error: 'Forbidden' }, { status: 403 }) } + } + return result +} diff --git a/memento-note/lib/rate-limit.ts b/memento-note/lib/rate-limit.ts new file mode 100644 index 0000000..fd6554d --- /dev/null +++ b/memento-note/lib/rate-limit.ts @@ -0,0 +1,29 @@ +const attempts = new Map() + +const WINDOW_MS = 60_000 +const MAX_ATTEMPTS = 5 + +export function rateLimit(key: string): { allowed: boolean; retryAfterMs: number } { + const now = Date.now() + const entry = attempts.get(key) + + if (!entry || now > entry.resetAt) { + attempts.set(key, { count: 1, resetAt: now + WINDOW_MS }) + return { allowed: true, retryAfterMs: 0 } + } + + entry.count++ + + if (entry.count > MAX_ATTEMPTS) { + return { allowed: false, retryAfterMs: entry.resetAt - now } + } + + return { allowed: true, retryAfterMs: 0 } +} + +setInterval(() => { + const now = Date.now() + for (const [k, v] of attempts) { + if (now > v.resetAt) attempts.delete(k) + } +}, 60_000) diff --git a/memento-note/locales/ar.json b/memento-note/locales/ar.json index 9e54181..0f8994e 100644 --- a/memento-note/locales/ar.json +++ b/memento-note/locales/ar.json @@ -26,21 +26,21 @@ "sending": "جاري الإرسال...", "sendResetLink": "إرسال رابط إعادة التعيين", "backToLogin": "العودة إلى تسجيل الدخول", - "signOut": "Sign out", + "signOut": "تسجيل الخروج", "confirmPassword": "تأكيد كلمة المرور", "confirmPasswordPlaceholder": "أعد إدخال كلمة المرور" }, "sidebar": { - "notes": "Notes", - "reminders": "Reminders", - "labels": "Labels", - "editLabels": "Edit labels", + "notes": "الملاحظات", + "reminders": "التذكيرات", + "labels": "التسميات", + "editLabels": "تعديل التسميات", "newNoteTabs": "ملاحظة جديدة", "newNoteTabsHint": "إنشاء ملاحظة في هذا الدفتر", "noLabelsInNotebook": "لا توجد تسميات في هذا الدفتر", - "archive": "Archive", - "trash": "Trash", - "clearFilter": "Remove filter" + "archive": "الأرشيف", + "trash": "المهملات", + "clearFilter": "إزالة الفلتر" }, "notes": { "title": "الملاحظات", @@ -88,8 +88,8 @@ "itemOrMediaRequired": "الرجاء إضافة عنصر واحد على الأقل أو وسائط", "noteCreated": "تم إنشاء الملاحظة بنجاح", "noteCreateFailed": "فشل في إنشاء الملاحظة", - "deleted": "Note deleted", - "deleteFailed": "Failed to delete note", + "deleted": "تم حذف الملاحظة", + "deleteFailed": "فشل حذف الملاحظة", "aiAssistant": "مساعد الذكاء الاصطناعي", "changeSize": "تغيير الحجم", "backgroundOptions": "خيارات الخلفية", @@ -176,10 +176,10 @@ "history": "السجل", "historyRestored": "تم استعادة النسخة", "historyEnabled": "تم تفعيل السجل", - "historyDisabledTitle": "Version history", + "historyDisabledTitle": "سجل النسخ", "historyDisabledDesc": "السجل معطل لحسابك.", - "historyEnabledTitle": "History enabled!", - "historyEnabledDesc": "Versions of this note will now be recorded.", + "historyEnabledTitle": "تم تفعيل السجل!", + "historyEnabledDesc": "سيتم الآن تسجيل نسخ هذه الملاحظة.", "enableHistory": "تفعيل السجل", "historyEmpty": "لا توجد نسخ متاحة", "historySelectVersion": "اختر نسخة لمعاينة محتواها", @@ -188,32 +188,37 @@ "sortDateAsc": "التاريخ (الأقدم)", "sortTitleAsc": "العنوان أ ← ي", "sortTitleDesc": "العنوان ي ← أ", - "suggestTitle": "AI title", - "generateTitleFromImage": "Generate title from image", - "titleGenerated": "Title generated", - "content": "Content", - "restore": "Restore", - "createFailed": "Failed to create note", - "updateFailed": "Failed to update note", - "archived": "Note archived", - "archiveFailed": "Failed to archive", - "sort": "Sort", - "confirmDeleteTitle": "Delete note", - "leftShare": "Share removed", - "dismissed": "Note dismissed from recent", - "generalNotes": "General Notes", + "suggestTitle": "عنوان بالذكاء الاصطناعي", + "generateTitleFromImage": "إنشاء عنوان من الصورة", + "titleGenerated": "تم إنشاء العنوان", + "content": "المحتوى", + "restore": "استعادة", + "createFailed": "فشل إنشاء الملاحظة", + "updateFailed": "فشل تحديث الملاحظة", + "archived": "تم أرشفة الملاحظة", + "archiveFailed": "فشل الأرشفة", + "sort": "ترتيب", + "confirmDeleteTitle": "حذف الملاحظة", + "leftShare": "تمت إزالة المشاركة", + "dismissed": "تمت إزالة الملاحظة من الحديثة", + "generalNotes": "الملاحظات العامة", "noteType": "نوع الملاحظة", "typeText": "نص", "typeMarkdown": "ماركداون", "typeRichText": "نص منسق", "typeChecklist": "قائمة مراجعة", - "convertedToRichText": "Converted to rich text", - "conversionFailed": "Conversion failed, staying in Markdown", + "convertedToRichText": "تم التحويل إلى نص منسق", + "conversionFailed": "فشل التحويل، البقاء في Markdown", "richTextPlaceholder": "اكتب ملاحظة...", "switchTypeTitle": "تغيير نوع الملاحظة؟", "switchTypeWarning": "قد يفقد بعض التنسيق عند التحويل إلى {type}.", "switchTypeContentPreserved": "سيتم الحفاظ على المحتوى كنص عادي.", - "switchType": "تحويل إلى {type}" + "switchType": "تحويل إلى {type}", + "deleteVersionDesc": "لا يمكن التراجع عن هذا الإجراء. سيتم حذف النسخة نهائياً من السجل.", + "compareVersions": "مقارنة", + "currentVersion": "الحالي", + "diffSelectHint": "انقر على نسختين في القائمة للمقارنة بينهما", + "diffTitle": "المقارنة" }, "pagination": { "previous": "←", @@ -221,81 +226,81 @@ "next": "→" }, "labels": { - "title": "Labels", - "filter": "Filter by Label", - "manage": "Manage Labels", - "manageTooltip": "Manage Labels", - "changeColor": "Change Color", - "changeColorTooltip": "Change color", - "delete": "Delete", - "deleteTooltip": "Delete label", - "confirmDelete": "Are you sure you want to delete this label?", - "newLabelPlaceholder": "Create new label", - "namePlaceholder": "Enter label name", - "addLabel": "Add label", - "createLabel": "Create label", - "labelName": "Label name", - "labelColor": "Label color", - "manageLabels": "Manage labels", - "manageLabelsDescription": "Add or remove labels for this note. Click on a label to change its color.", - "selectedLabels": "Selected Labels", - "allLabels": "All Labels", - "clearAll": "Clear all", - "filterByLabel": "Filter by label", - "tagAdded": "Tag \"{tag}\" added", - "showLess": "Show less", - "showMore": "Show more", - "editLabels": "Edit Labels", - "editLabelsDescription": "Create, edit colors, or delete labels.", - "noLabelsFound": "No labels found.", - "loading": "Loading...", - "notebookRequired": "⚠️ Labels are only available in notebooks. Move this note to a notebook first.", - "count": "{count} labels", - "noLabels": "No labels", - "confirmDeleteShort": "Confirm?", - "labelRemoved": "Label \"{label}\" removed" + "title": "التسميات", + "filter": "تصفية حسب التسمية", + "manage": "إدارة التسميات", + "manageTooltip": "إدارة التسميات", + "changeColor": "تغيير اللون", + "changeColorTooltip": "تغيير اللون", + "delete": "حذف", + "deleteTooltip": "حذف التسمية", + "confirmDelete": "هل أنت متأكد أنك تريد حذف هذه التسمية؟", + "newLabelPlaceholder": "إنشاء تسمية جديدة", + "namePlaceholder": "أدخل اسم التسمية", + "addLabel": "إضافة تسمية", + "createLabel": "إنشاء تسمية", + "labelName": "اسم التسمية", + "labelColor": "لون التسمية", + "manageLabels": "إدارة التسميات", + "manageLabelsDescription": "إضافة أو إزالة تسميات لهذه الملاحظة. انقر على التسمية لتغيير لونها.", + "selectedLabels": "التسميات المحددة", + "allLabels": "جميع التسميات", + "clearAll": "مسح الكل", + "filterByLabel": "تصفية حسب التسمية", + "tagAdded": "تمت إضافة الوسم \"{tag}\"", + "showLess": "عرض أقل", + "showMore": "عرض المزيد", + "editLabels": "تعديل التسميات", + "editLabelsDescription": "إنشاء أو تعديل الألوان أو حذف التسميات.", + "noLabelsFound": "لم يتم العثور على تسميات.", + "loading": "جاري التحميل...", + "notebookRequired": "⚠️ التسميات متاحة فقط في الدفاتر. انقل هذه الملاحظة إلى دفتر أولاً.", + "count": "{count} تسميات", + "noLabels": "لا توجد تسميات", + "confirmDeleteShort": "تأكيد؟", + "labelRemoved": "تمت إزالة التسمية \"{label}\"" }, "search": { - "placeholder": "Search", - "searchPlaceholder": "Search your notes...", - "semanticInProgress": "AI search in progress...", - "semanticTooltip": "AI semantic search", - "searching": "Searching...", - "noResults": "No results found", - "resultsFound": "{count} notes found", - "exactMatch": "Exact match", - "related": "Related", + "placeholder": "بحث", + "searchPlaceholder": "ابحث في ملاحظاتك...", + "semanticInProgress": "بحث الذكاء الاصطناعي جارٍ...", + "semanticTooltip": "بحث دلالي بالذكاء الاصطناعي", + "searching": "جاري البحث...", + "noResults": "لم يتم العثور على نتائج", + "resultsFound": "تم العثور على {count} ملاحظات", + "exactMatch": "تطابق تام", + "related": "ذات صلة", "disabledAdmin": "البحث معطل في وضع المسؤول" }, "collaboration": { - "emailPlaceholder": "Enter email address", - "addCollaborator": "Add collaborator", - "removeCollaborator": "Remove collaborator", - "owner": "Owner", - "canEdit": "Can edit", - "canView": "Can view", - "shareNote": "Share note", - "shareWithCollaborators": "Share with collaborators", - "addCollaboratorDescription": "Add people to collaborate on this note by their email address.", - "viewerDescription": "You have access to this note. Only the owner can manage collaborators.", - "emailAddress": "Email address", - "enterEmailAddress": "Enter email address", - "invite": "Invite", - "peopleWithAccess": "People with access", - "noCollaborators": "No collaborators yet. Add someone above!", - "noCollaboratorsViewer": "No collaborators yet.", - "pendingInvite": "Pending Invite", - "pending": "Pending", - "remove": "Remove", - "unnamedUser": "Unnamed User", - "done": "Done", - "willBeAdded": "{email} will be added as collaborator when note is created", - "alreadyInList": "This email is already in the list", - "nowHasAccess": "{name} now has access to this note", - "accessRevoked": "Access has been revoked", - "errorLoading": "Error loading collaborators", - "failedToAdd": "Failed to add collaborator", - "failedToRemove": "Failed to remove collaborator" + "emailPlaceholder": "أدخل عنوان البريد الإلكتروني", + "addCollaborator": "إضافة متعاون", + "removeCollaborator": "إزالة متعاون", + "owner": "المالك", + "canEdit": "يمكنه التعديل", + "canView": "يمكنه العرض", + "shareNote": "مشاركة الملاحظة", + "shareWithCollaborators": "المشاركة مع المتعاونين", + "addCollaboratorDescription": "أضف أشخاصاً للتعاون في هذه الملاحظة عبر عنوان بريدهم الإلكتروني.", + "viewerDescription": "لديك صلاحية الوصول إلى هذه الملاحظة. فقط المالك يمكنه إدارة المتعاونين.", + "emailAddress": "عنوان البريد الإلكتروني", + "enterEmailAddress": "أدخل عنوان البريد الإلكتروني", + "invite": "دعوة", + "peopleWithAccess": "الأشخاص الذين لديهم صلاحية الوصول", + "noCollaborators": "لا يوجد متعاونون بعد. أضف شخصاً أعلاه!", + "noCollaboratorsViewer": "لا يوجد متعاونون بعد.", + "pendingInvite": "دعوة معلقة", + "pending": "معلق", + "remove": "إزالة", + "unnamedUser": "مستخدم بدون اسم", + "done": "تم", + "willBeAdded": "سيتم إضافة {email} كمتعاون عند إنشاء الملاحظة", + "alreadyInList": "هذا البريد الإلكتروني موجود بالفعل في القائمة", + "nowHasAccess": "{name} لديه الآن صلاحية الوصول إلى هذه الملاحظة", + "accessRevoked": "تم إلغاء صلاحية الوصول", + "errorLoading": "خطأ في تحميل المتعاونين", + "failedToAdd": "فشل في إضافة المتعاون", + "failedToRemove": "فشل في إزالة المتعاون" }, "ai": { "analyzing": "الذكاء الاصطناعي يحلل...", @@ -417,14 +422,17 @@ "transformationsDesc": "التحويلات — مطبقة مباشرة في الملاحظة", "writeMinWordsAction": "اكتب 5 كلمات على الأقل لتفعيل إجراءات الذكاء الاصطناعي.", "processingAction": "جاري المعالجة...", - "noImagesError": "No images in this note", - "overview": "Overview", + "noImagesError": "لا توجد صور في هذه الملاحظة", + "overview": "نظرة عامة", "action": { "clarify": "توضيح", "shorten": "تقصير", "improve": "تحسين", "toMarkdown": "إلى Markdown", - "describeImages": "Describe images" + "describeImages": "وصف الصور", + "fixGrammar": "تصحيح القواعد", + "translate": "ترجمة", + "explain": "شرح" }, "openAssistant": "فتح مساعد الذكاء الاصطناعي", "poweredByMomento": "مدعوم من Momento AI", @@ -440,8 +448,50 @@ "insightsTab": "رؤى", "aiCopilot": "مساعد ذكي", "suggestTitle": "اقتراح عنوان بالذكاء الاصطناعي", - "generateTitleFromImage": "Generate title from image", - "titleGenerated": "Title generated from image" + "generateTitleFromImage": "إنشاء عنوان من الصورة", + "titleGenerated": "تم إنشاء العنوان من الصورة", + "wordCountMin": "الرجاء تحديد {min} كلمات على الأقل لإعادة الصياغة (حالياً {current} كلمة)", + "wordCountMax": "الرجاء تحديد {max} كلمة كحد أقصى لإعادة الصياغة (حالياً {current} كلمة)", + "resourceTab": "المصدر", + "aiNoteTitle": "ملاحظة الذكاء الاصطناعي", + "injectReplace": "استبدال", + "injectReplaceTitle": "استبدال محتوى الملاحظة بهذه الرسالة", + "injectComplete": "إكمال", + "injectCompleteTitle": "إكمال الملاحظة بهذه الرسالة (ذكاء اصطناعي)", + "injectMerge": "دمج", + "injectMergeTitle": "دمج مع الملاحظة (ذكاء اصطناعي)", + "imagesCount": "{count} صور", + "resource": { + "failedToLoadUrl": "فشل تحميل هذا الرابط", + "pageLoaded": "تم تحميل الصفحة: {title}", + "pageLoadError": "خطأ في تحميل الصفحة", + "pasteOrUrlFirst": "الصق نصاً أو حمّل رابطاً أولاً", + "enrichError": "خطأ في الإثراء", + "enrichErrorShort": "خطأ في الإثراء", + "contentApplied": "تم تطبيق المحتوى على الملاحظة ✓", + "fromChat": "💬 من الدردشة", + "replacement": "↓ استبدال", + "completedByAI": "✦ أكمله الذكاء الاصطناعي", + "mergedByAI": "⟳ دمجه الذكاء الاصطناعي", + "rendered": "تم العرض", + "cancel": "إلغاء", + "applyToNote": "تطبيق على الملاحظة", + "urlLabel": "رابط URL (اختياري)", + "resourceText": "نص المصدر", + "resourcePlaceholder": "الصق النص هنا (ماركداون، HTML، نص عادي…)", + "words": "كلمات", + "integrationMode": "وضع التكامل", + "modeReplace": "استبدال", + "modeReplaceDesc": "مباشر، بدون ذكاء اصطناعي", + "modeComplete": "إكمال", + "modeCompleteDesc": "يضيف بدون إعادة كتابة", + "modeMerge": "دمج", + "modeMergeDesc": "يعيد الكتابة ويكامل", + "aiProcessing": "جاري المعالجة بالذكاء الاصطناعي…", + "preview": "معاينة", + "generatePreview": "إنشاء معاينة", + "emptyNoteHint": "💡 الملاحظة فارغة — سيتم دمج محتوى المصدر مباشرة." + } }, "titleSuggestions": { "available": "اقتراحات العنوان", @@ -533,16 +583,16 @@ "confirmFusion": "تأكيد الدمج", "success": "تم دمج الملاحظات بنجاح!", "error": "فشل في دمج الملاحظات", - "generateError": "Failed to generate fusion", - "noContentReturned": "No fusion content returned from API", - "unknownDate": "Unknown date" + "generateError": "فشل في إنشاء الدمج", + "noContentReturned": "لم يتم إرجاع محتوى دمج من API", + "unknownDate": "تاريخ غير معروف" } }, "notification": { - "accept": "Accept", - "accepted": "Share accepted", - "decline": "Decline", - "noNotifications": "No new notifications", + "accept": "قبول", + "accepted": "تم قبول المشاركة", + "decline": "رفض", + "noNotifications": "لا توجد إشعارات جديدة", "shared": "شارك \"{title}\"", "untitled": "بدون عنوان", "notifications": "الإشعارات", @@ -603,24 +653,24 @@ "about": "حول", "version": "الإصدار", "settingsSaved": "تم حفظ الإعدادات", - "cardSizeMode": "Note Size", - "cardSizeModeDescription": "Choose between variable sizes or uniform size", - "selectCardSizeMode": "Select display mode", - "cardSizeVariable": "Variable sizes (small/medium/large)", - "cardSizeUniform": "Uniform size", + "cardSizeMode": "حجم الملاحظة", + "cardSizeModeDescription": "اختر بين أحجام متغيرة أو حجم موحد", + "selectCardSizeMode": "اختر وضع العرض", + "cardSizeVariable": "أحجام متغيرة (صغير/متوسط/كبير)", + "cardSizeUniform": "حجم موحد", "settingsError": "خطأ في حفظ الإعدادات", - "maintenance": "Maintenance", - "maintenanceDescription": "Tools to maintain your database health", - "cleanTags": "Clean Orphan Tags", - "cleanTagsDescription": "Remove tags that are no longer used by any notes", + "maintenance": "الصيانة", + "maintenanceDescription": "أدوات للحفاظ على صحة قاعدة البيانات", + "cleanTags": "تنظيف الوسوم اليتيمة", + "cleanTagsDescription": "إزالة الوسوم التي لم تعد مستخدمة في أي ملاحظة", "cleanupDone": "تمت مزامنة {created} تسمية، حذف {deleted} يتيمة", "cleanupNothing": "لا حاجة لأي إجراء — التسميات متزامنة بالفعل مع ملاحظاتك", "cleanupWithErrors": "بعض العمليات فشلت", "cleanupError": "تعذر تنظيف التسميات", "indexingComplete": "اكتملت الفهرسة: تمت معالجة {count} ملاحظة", "indexingError": "خطأ أثناء الفهرسة", - "semanticIndexing": "Semantic Indexing", - "semanticIndexingDescription": "Generate vectors for all notes to enable intent-based search", + "semanticIndexing": "الفهرسة الدلالية", + "semanticIndexingDescription": "إنشاء متجهات لجميع الملاحظات لتفعيل البحث القائم على النية", "profile": "الملف الشخصي", "searchNoResults": "لم يتم العثور على إعدادات مطابقة", "languageAuto": "الكشف التلقائي", @@ -670,10 +720,10 @@ "fontSizeDescription": "قم بضبط حجم الخط لتحسين القراءة. ينطبق هذا على جميع النصوص في الواجهة.", "fontSizeUpdateSuccess": "تم تحديث حجم الخط بنجاح", "fontSizeUpdateFailed": "فشل في تحديث حجم الخط", - "showRecentNotes": "Show Recent Notes Section", - "showRecentNotesDescription": "Display recent notes (last 7 days) on the main page", - "recentNotesUpdateSuccess": "Recent notes setting updated successfully", - "recentNotesUpdateFailed": "Failed to update recent notes setting" + "showRecentNotes": "عرض قسم الملاحظات الحديثة", + "showRecentNotesDescription": "عرض الملاحظات الحديثة (آخر 7 أيام) في الصفحة الرئيسية", + "recentNotesUpdateSuccess": "تم تحديث إعدادات الملاحظات الحديثة بنجاح", + "recentNotesUpdateFailed": "فشل تحديث إعدادات الملاحظات الحديثة" }, "aiSettings": { "title": "إعدادات الذكاء الاصطناعي", @@ -695,7 +745,15 @@ "providerDesc": "اختر مزود الذكاء الاصطناعي المفضل", "providerAutoDesc": "Ollama عند توفره، OpenAI كبديل", "providerOllamaDesc": "خصوصية 100%، يعمل محليًا", - "providerOpenAIDesc": "الأكثر دقة، يتطلب مفتاح API" + "providerOpenAIDesc": "الأكثر دقة، يتطلب مفتاح API", + "aiNote": "ملاحظة الذكاء الاصطناعي", + "aiNoteDesc": "تفعيل زر دردشة الذكاء الاصطناعي وأدوات تحسين النص", + "languageDetection": "اكتشاف اللغة", + "languageDetectionDesc": "يكتشف تلقائياً لغة ملاحظاتك", + "autoLabeling": "اقتراحات التسميات", + "autoLabelingDesc": "يقترح ويطبق التسميات تلقائياً على ملاحظاتك", + "noteHistory": "سجل الملاحظة", + "noteHistoryDesc": "تفعيل لقطات النسخ والاستعادة من السجل" }, "general": { "loading": "جاري التحميل...", @@ -717,9 +775,9 @@ "error": "حدث خطأ", "operationSuccess": "نجحت العملية", "operationFailed": "فشلت العملية", - "testConnection": "Test Connection", - "clean": "Clean", - "indexAll": "Index All", + "testConnection": "اختبار الاتصال", + "clean": "تنظيف", + "indexAll": "فهرسة الكل", "preview": "معاينة" }, "colors": { @@ -752,7 +810,9 @@ "markDone": "وضع علامة مكتمل", "markUndone": "وضع علامة غير مكتمل", "todayAt": "اليوم في {time}", - "tomorrowAt": "غداً في {time}" + "tomorrowAt": "غداً في {time}", + "clearCompleted": "مسح المكتملة", + "viewAll": "عرض جميع التذكيرات" }, "notebook": { "create": "إنشاء دفتر", @@ -783,7 +843,7 @@ "confidence": "ثقة", "savingReminder": "خطأ في حفظ التذكير", "removingReminder": "خطأ في إزالة التذكير", - "generatingDescription": "Please wait..." + "generatingDescription": "يرجى الانتظار..." }, "notebookSuggestion": { "title": "النقل إلى {name}؟", @@ -797,10 +857,10 @@ "admin": { "title": "لوحة تحكم المشرف", "userManagement": "إدارة المستخدمين", - "chat": "AI Chat", - "lab": "The Lab", - "agents": "Agents", - "workspace": "Workspace", + "chat": "دردشة الذكاء الاصطناعي", + "lab": "المختبر", + "agents": "الوكلاء", + "workspace": "مساحة العمل", "settings": "إعدادات المشرف", "security": { "title": "إعدادات الأمان", @@ -896,14 +956,14 @@ "description": "تكوين إرسال البريد الإلكتروني لإشعارات الوكلاء وإعادة تعيين كلمة المرور.", "provider": "مزود البريد الإلكتروني", "saveSettings": "حفظ إعدادات البريد الإلكتروني", - "status": "Service Status", - "keySet": "key configured", - "activeAuto": "Auto mode: Resend will be used first, SMTP as fallback.", - "activeSmtp": "Auto mode: SMTP will be used (Resend not configured).", - "noneConfigured": "No email service configured. Set up Resend or SMTP.", - "activeProvider": "Active provider", - "testOk": "test passed", - "testFail": "test failed" + "status": "حالة الخدمة", + "keySet": "تم تكوين المفتاح", + "activeAuto": "الوضع التلقائي: سيتم استخدام Resend أولاً، ثم SMTP كبديل.", + "activeSmtp": "الوضع التلقائي: سيتم استخدام SMTP (Resend غير مكوّن).", + "noneConfigured": "لم يتم تكوين خدمة بريد إلكتروني. قم بإعداد Resend أو SMTP.", + "activeProvider": "المزود النشط", + "testOk": "نجح الاختبار", + "testFail": "فشل الاختبار" }, "smtp": { "title": "تكوين SMTP", @@ -937,9 +997,9 @@ "deleteFailed": "فشل الحذف", "roleUpdateSuccess": "تم تحديث دور المستخدم إلى {role}", "roleUpdateFailed": "فشل تحديث الدور", - "demote": "تخفيض", - "promote": "ترقية", - "confirmDelete": "Are you sure? This action cannot be undone.", + "demote": "تخفيض إلى مستخدم", + "promote": "ترقية إلى مشرف", + "confirmDelete": "هل أنت متأكد؟ لا يمكن التراجع عن هذا الإجراء.", "table": { "name": "الاسم", "email": "البريد الإلكتروني", @@ -1182,7 +1242,7 @@ "notesViewLabel": "عرض الملاحظات", "notesViewTabs": "علامات تبويب (نمط OneNote)", "notesViewMasonry": "بطاقات (شبكة)", - "selectTheme": "Select theme", + "selectTheme": "اختر المظهر", "fontFamilyLabel": "عائلة الخطوط", "fontFamilyDescription": "اختر الخط المستخدم في جميع أنحاء التطبيق", "selectFontFamily": "Inter مُحسّن لسهولة القراءة، النظام يستخدم الخط الأصلي لنظام التشغيل", @@ -1248,12 +1308,12 @@ }, "diagnostics": { "title": "التشخيص", - "description": "Check your AI provider connection status", + "description": "تحقق من حالة اتصال مزود الذكاء الاصطناعي", "configuredProvider": "المزود المكوّن", "apiStatus": "حالة API", - "operational": "Operational", - "errorStatus": "Error", - "checking": "Checking...", + "operational": "يعمل", + "errorStatus": "خطأ", + "checking": "جاري التحقق...", "testDetails": "تفاصيل الاختبار:", "troubleshootingTitle": "نصائح استكشاف الأخطاء:", "tip1": "تأكد من تشغيل Ollama (ollama serve)", @@ -1376,10 +1436,10 @@ "subtitle": "أتمتة مهام المراقبة والبحث الخاصة بك", "newAgent": "وكيل جديد", "myAgents": "وكلائي", - "searchPlaceholder": "Search agents...", - "filterAll": "All", - "newBadge": "New", - "noResults": "No agents match your search.", + "searchPlaceholder": "البحث عن وكلاء...", + "filterAll": "الكل", + "newBadge": "جديد", + "noResults": "لا يوجد وكلاء يطابقون بحثك.", "noAgents": "لا يوجد وكلاء", "noAgentsDescription": "أنشئ أول وكيل لك أو ثبّت قالبًا أدناه لأتمتة مهام المراقبة.", "types": { @@ -1423,8 +1483,8 @@ "researchTopicPlaceholder": "مثال: أحدث التطورات في الذكاء الاصطناعي", "notifyEmail": "إشعار بالبريد الإلكتروني", "notifyEmailHint": "استلام بريد إلكتروني بنتائج الوكيل بعد كل تشغيل", - "includeImages": "Include images", - "includeImagesHint": "Extract images from scraped pages and attach them to the generated note" + "includeImages": "تضمين الصور", + "includeImagesHint": "استخراج الصور من الصفحات المجمعة وإرفاقها بالملاحظة المولدة" }, "frequencies": { "manual": "يدوي", @@ -1434,19 +1494,19 @@ "monthly": "شهري" }, "schedule": { - "nextRun": "Next run", - "pending": "Pending trigger", - "time": "Time", - "dayOfWeek": "Day of week", - "dayOfMonth": "Day of month", + "nextRun": "التنفيذ التالي", + "pending": "في انتظار التشغيل", + "time": "الوقت", + "dayOfWeek": "يوم الأسبوع", + "dayOfMonth": "يوم الشهر", "days": { - "mon": "Monday", - "tue": "Tuesday", - "wed": "Wednesday", - "thu": "Thursday", - "fri": "Friday", - "sat": "Saturday", - "sun": "Sunday" + "mon": "الاثنين", + "tue": "الثلاثاء", + "wed": "الأربعاء", + "thu": "الخميس", + "fri": "الجمعة", + "sat": "السبت", + "sun": "الأحد" } }, "status": { @@ -1478,8 +1538,8 @@ "installSuccess": "تم تثبيت \"{name}\"", "installError": "خطأ أثناء التثبيت", "saveError": "خطأ في الحفظ", - "autoRunSuccess": "Agent \"{name}\" executed automatically with success", - "autoRunError": "Agent \"{name}\" failed during automatic execution" + "autoRunSuccess": "تم تنفيذ الوكيل \"{name}\" تلقائياً بنجاح", + "autoRunError": "فشل الوكيل \"{name}\" أثناء التنفيذ التلقائي" }, "templates": { "title": "القوالب", @@ -1593,7 +1653,7 @@ "searching": "جاري البحث...", "noNotesFoundForContext": "لم يتم العثور على ملاحظات ذات صلة لهذا السؤال. أجب باستخدام معرفتك العامة.", "webSearch": "بحث الويب", - "timeoutWarning": "Response is taking longer than expected..." + "timeoutWarning": "الاستجابة تستغرق وقتاً أطول من المتوقع..." }, "labHeader": { "title": "المختبر", @@ -1611,10 +1671,81 @@ "deleteSpace": "حذف المساحة", "deleted": "تم حذف المساحة", "deleteError": "خطأ في الحذف", - "rename": "Rename" + "rename": "إعادة تسمية" }, "lab": { "initializing": "تهيئة المساحة", "loadingIdeas": "جاري تحميل أفكارك..." + }, + "richTextEditor": { + "slashHint": "↑↓ تنقل · Enter إدراج · Tab تبديل القسم", + "slashLoading": "الذكاء الاصطناعي يفكر...", + "slashTabAll": "الكل", + "slashCatBasic": "كتل أساسية", + "slashCatMedia": "وسائط", + "slashCatFormatting": "تنسيق", + "slashCatAi": "ملاحظة ذكاء اصطناعي", + "insertImage": "إدراج صورة", + "imageUrlPlaceholder": "https://example.com/image.png", + "preview": "معاينة", + "cancel": "إلغاء", + "insert": "إدراج", + "slashText": "نص", + "slashTextDesc": "فقرة بسيطة", + "slashH1": "عنوان 1", + "slashH1Desc": "عنوان قسم كبير", + "slashH2": "عنوان 2", + "slashH2Desc": "عنوان قسم متوسط", + "slashH3": "عنوان 3", + "slashH3Desc": "عنوان قسم صغير", + "slashBullet": "قائمة نقطية", + "slashBulletDesc": "قائمة غير مرتبة", + "slashNumbered": "قائمة مرقمة", + "slashNumberedDesc": "قائمة مرقمة مرتبة", + "slashTodo": "قائمة مهام", + "slashTodoDesc": "مهام ب مربع اختيار", + "slashQuote": "اقتباس", + "slashQuoteDesc": "التقاط اقتباس", + "slashCode": "كتلة كود", + "slashCodeDesc": "مقتطف كود", + "slashDivider": "فاصل", + "slashDividerDesc": "فاصل أفقي", + "slashImage": "صورة", + "slashImageDesc": "تضمين صورة من رابط", + "slashAlignLeft": "محاذاة لليسار", + "slashAlignLeftDesc": "محاذاة النص لليسار", + "slashAlignCenter": "توسيط", + "slashAlignCenterDesc": "توسيط النص", + "slashAlignRight": "محاذاة لليمين", + "slashAlignRightDesc": "محاذاة النص لليمين", + "slashSuperscript": "نص مرتفع", + "slashSuperscriptDesc": "نص فوق خط الأساس", + "slashSubscript": "نص منخفض", + "slashSubscriptDesc": "نص تحت خط الأساس", + "slashClarify": "توضيح", + "slashClarifyDesc": "جعل النص أوضح", + "slashShorten": "اختصار", + "slashShortenDesc": "تكثيف النص", + "slashImprove": "تحسين", + "slashImproveDesc": "تحسين الأسلوب", + "slashExpand": "توسيع", + "slashExpandDesc": "توسيع وإثراء النص", + "imageModalTitle": "إدراج صورة", + "imageModalPreview": "معاينة", + "imageModalCancel": "إلغاء", + "imageModalInsert": "إدراج", + "imageModalInvalidUrl": "الرجاء إدخال رابط صالح", + "imageModalLoadFailed": "فشل تحميل الصورة", + "linkPlaceholder": "الصق أو اكتب رابطاً...", + "bold": "عريض", + "italic": "مائل", + "underline": "تسطير", + "strike": "يتوسطه خط", + "code": "كود", + "highlight": "تمييز", + "superscript": "نص مرتفع", + "subscript": "نص منخفض", + "addBlock": "إضافة كتلة", + "placeholder": "اكتب '/' للأوامر..." } -} +} \ No newline at end of file diff --git a/memento-note/locales/fa.json b/memento-note/locales/fa.json index 019f4c8..b89e307 100644 --- a/memento-note/locales/fa.json +++ b/memento-note/locales/fa.json @@ -429,7 +429,10 @@ "shorten": "خلاصه کردن", "improve": "بهبود", "toMarkdown": "به مارک‌داون", - "describeImages": "توصیف تصاویر" + "describeImages": "توصیف تصاویر", + "fixGrammar": "اصلاح گرامر", + "translate": "ترجمه", + "explain": "توضیح" }, "openAssistant": "باز کردن دستیار هوش مصنوعی", "poweredByMomento": "پشتیبانی شده توسط Momento AI", diff --git a/memento-note/package-lock.json b/memento-note/package-lock.json index c192aec..acb27d1 100644 --- a/memento-note/package-lock.json +++ b/memento-note/package-lock.json @@ -55,6 +55,7 @@ "date-fns": "^4.1.0", "diff": "^9.0.0", "dotenv": "^17.2.3", + "isomorphic-dompurify": "^3.12.0", "jsdom": "^29.0.2", "katex": "^0.16.27", "lucide-react": "^0.562.0", @@ -8769,9 +8770,9 @@ } }, "node_modules/dompurify": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.0.tgz", - "integrity": "sha512-nolgK9JcaUXMSmW+j1yaSvaEaoXYHwWyGJlkoCTghc97KgGDDSnpoU/PlEnw63Ah+TGKFOyY+X5LnxaWbCSfXg==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.2.tgz", + "integrity": "sha512-lHeS9SA/IKeIFFyYciHBr2n0v1VMPlSj843HdLOwjb2OxNwdq9Xykxqhk+FE42MzAdHvInbAolSE4mhahPpjXA==", "license": "(MPL-2.0 OR Apache-2.0)", "optionalDependencies": { "@types/trusted-types": "^2.0.7" @@ -9544,6 +9545,19 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "license": "ISC" }, + "node_modules/isomorphic-dompurify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/isomorphic-dompurify/-/isomorphic-dompurify-3.12.0.tgz", + "integrity": "sha512-8n+j+6ypTHvriJwFOQ2qusQ6bzGjZVcR3jbe1pBpLcGI1dn4WIl0ctLBngqE5QttquQBAlKXwJeTMw+X7x7qKw==", + "license": "MIT", + "dependencies": { + "dompurify": "^3.4.2", + "jsdom": "^29.1.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24.0.0" + } + }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", @@ -9641,27 +9655,27 @@ "license": "MIT" }, "node_modules/jsdom": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-29.0.2.tgz", - "integrity": "sha512-9VnGEBosc/ZpwyOsJBCQ/3I5p7Q5ngOY14a9bf5btenAORmZfDse1ZEheMiWcJ3h81+Fv7HmJFdS0szo/waF2w==", + "version": "29.1.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-29.1.1.tgz", + "integrity": "sha512-ECi4Fi2f7BdJtUKTflYRTiaMxIB0O6zfR1fX0GXpUrf6flp8QIYn1UT20YQqdSOfk2dfkCwS8LAFoJDEppNK5Q==", "license": "MIT", "dependencies": { - "@asamuzakjp/css-color": "^5.1.5", - "@asamuzakjp/dom-selector": "^7.0.6", + "@asamuzakjp/css-color": "^5.1.11", + "@asamuzakjp/dom-selector": "^7.1.1", "@bramus/specificity": "^2.4.2", - "@csstools/css-syntax-patches-for-csstree": "^1.1.1", + "@csstools/css-syntax-patches-for-csstree": "^1.1.3", "@exodus/bytes": "^1.15.0", "css-tree": "^3.2.1", "data-urls": "^7.0.0", "decimal.js": "^10.6.0", "html-encoding-sniffer": "^6.0.0", "is-potential-custom-element-name": "^1.0.1", - "lru-cache": "^11.2.7", - "parse5": "^8.0.0", + "lru-cache": "^11.3.5", + "parse5": "^8.0.1", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", "tough-cookie": "^6.0.1", - "undici": "^7.24.5", + "undici": "^7.25.0", "w3c-xmlserializer": "^5.0.0", "webidl-conversions": "^8.0.1", "whatwg-mimetype": "^5.0.0", diff --git a/memento-note/package.json b/memento-note/package.json index 55698bd..4427ceb 100644 --- a/memento-note/package.json +++ b/memento-note/package.json @@ -72,6 +72,7 @@ "date-fns": "^4.1.0", "diff": "^9.0.0", "dotenv": "^17.2.3", + "isomorphic-dompurify": "^3.12.0", "jsdom": "^29.0.2", "katex": "^0.16.27", "lucide-react": "^0.562.0", diff --git a/memento-note/scripts/fix-chat-buttons.js b/memento-note/scripts/fix-chat-buttons.js deleted file mode 100644 index dacd77d..0000000 --- a/memento-note/scripts/fix-chat-buttons.js +++ /dev/null @@ -1,54 +0,0 @@ -const fs = require('fs'); -const path = require('path'); -const filePath = path.join(__dirname, '..', 'components', 'contextual-ai-chat.tsx'); -let src = fs.readFileSync(filePath, 'utf8'); - -// ─── FIX 1: make inject buttons always visible on last assistant msg ────────── -// Replace the hover-gated condition with always-visible for last msg -const OLD_BUTTONS_CONDITION = ` {/* Hover-actions \u2014 visible only on assistant messages */}\r\n {isAssistant && onApplyToNote && (\r\n
`; - -const NEW_BUTTONS_CONDITION = ` {/* Inject buttons \u2014 always visible on last assistant msg */}\r\n {isAssistant && onApplyToNote && (() => {\r\n const lastAssistantId = messages.filter(m => m.role === 'assistant').at(-1)?.id\r\n const alwaysShow = msg.id === lastAssistantId\r\n return (\r\n
`; - -// Also need to close the IIFE -const OLD_BUTTONS_CLOSE = `
\r\n )}\r\n
`; -const NEW_BUTTONS_CLOSE = `
\r\n )\r\n })()}\r\n
`; - -if (src.includes(OLD_BUTTONS_CONDITION)) { - src = src.replace(OLD_BUTTONS_CONDITION, NEW_BUTTONS_CONDITION); - console.log('Fix 1a: buttons condition updated'); -} else { - console.error('Fix 1a: OLD_BUTTONS_CONDITION not found!'); - process.exit(1); -} - -if (src.includes(OLD_BUTTONS_CLOSE)) { - src = src.replace(OLD_BUTTONS_CLOSE, NEW_BUTTONS_CLOSE); - console.log('Fix 1b: buttons IIFE close updated'); -} else { - console.error('Fix 1b: OLD_BUTTONS_CLOSE not found!'); - process.exit(1); -} - -// ─── FIX 2: Move preview panel OUTSIDE the scrollable div ──────────────────── -// The scrollable div ends with: messagesEndRef then
-// We need to: -// A) Remove the preview block from inside the scrollable area (already was removed in previous sessions since it was added after messagesEndRef) -// B) Add preview as shrink-0 panel between the scroll div and controls - -// Find the closing of the scrollable area + start of controls -const OLD_SCROLL_END = `
\r\n
\r\n\r\n {/* Scope & Tone Control Area */}`; -const NEW_SCROLL_END = `
\r\n
\r\n\r\n {/* \u2550\u2550 Inject Preview Panel \u2014 fixed, always visible, NO scroll needed \u2550\u2550 */}\r\n {resourceEnriching && (\r\n
\r\n \r\n Traitement IA en cours...\r\n
\r\n )}\r\n {resourcePreview && !resourceEnriching && (\r\n
\r\n
\r\n \r\n {resourcePreview.source === 'complete' ? 'Compl\u00e9t\u00e9 par IA'\r\n : resourcePreview.source === 'merge' ? 'Fusionn\u00e9 par IA'\r\n : 'Aper\u00e7u'}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n setResourcePreview(null)}\r\n className="flex-1 text-[11px] py-1.5 rounded-lg border border-border/60 text-muted-foreground hover:bg-muted transition-colors"\r\n >\r\n Annuler\r\n \r\n {\r\n if (onApplyToNote && resourcePreview) {\r\n onApplyToNote(resourcePreview.text)\r\n setResourcePreview(null)\r\n setResourceText('')\r\n toast.success('Appliqu\u00e9 \u00e0 la note')\r\n }\r\n }}\r\n disabled={!onApplyToNote}\r\n className="flex-1 text-[11px] py-1.5 rounded-lg bg-primary text-primary-foreground font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 flex items-center justify-center gap-1"\r\n >\r\n \r\n Appliquer \u00e0 la note\r\n \r\n
\r\n
\r\n )}\r\n\r\n {/* Scope & Tone Control Area */}`; - -if (src.includes(OLD_SCROLL_END)) { - src = src.replace(OLD_SCROLL_END, NEW_SCROLL_END); - console.log('Fix 2: preview panel moved outside scroll'); -} else { - console.error('Fix 2: OLD_SCROLL_END not found!'); - // Show what we're looking for context - const idx = src.indexOf('messagesEndRef'); - console.error('Context around messagesEndRef:', JSON.stringify(src.slice(idx-20, idx+200))); - process.exit(1); -} - -fs.writeFileSync(filePath, src); -console.log('Done!'); diff --git a/memento-note/scripts/fix-translation-ui.js b/memento-note/scripts/fix-translation-ui.js deleted file mode 100644 index 0c416f1..0000000 --- a/memento-note/scripts/fix-translation-ui.js +++ /dev/null @@ -1,51 +0,0 @@ -const fs = require('fs'); -const path = require('path'); -const filePath = path.join(__dirname, '..', 'components', 'contextual-ai-chat.tsx'); -let src = fs.readFileSync(filePath, 'utf8'); - -// Sync presets buttons -const OLD_PRESET_CLICK = `onClick={() => setTranslateTarget(l)}`; -const NEW_PRESET_CLICK = `onClick={() => { setTranslateTarget(l); setCustomLangInput(l); }}`; - -if (src.includes(OLD_PRESET_CLICK)) { - src = src.replace(OLD_PRESET_CLICK, NEW_PRESET_CLICK); - console.log('Fix 1: Preset buttons sync updated'); -} else { - console.error('Fix 1: OLD_PRESET_CLICK not found'); - process.exit(1); -} - -// Sync input and enable live update -const OLD_INPUT_LOGIC = `onChange={e => setCustomLangInput(e.target.value)}\r\n onKeyDown={e => { if (e.key === 'Enter' && customLangInput.trim()) { setTranslateTarget(customLangInput.trim()); setCustomLangInput('') } }}`; -// Fallback for different line endings if needed, but let's try matching a smaller part first -const OLD_ONCHANGE = `onChange={e => setCustomLangInput(e.target.value)}`; -const NEW_ONCHANGE = `onChange={e => { const val = e.target.value; setCustomLangInput(val); setTranslateTarget(val); }}`; - -const OLD_ONKEYDOWN = `onKeyDown={e => { if (e.key === 'Enter' && customLangInput.trim()) { setTranslateTarget(customLangInput.trim()); setCustomLangInput('') } }}`; -const NEW_ONKEYDOWN = `onKeyDown={e => { if (e.key === 'Enter' && translateTarget.trim()) { handleAction(action, translateTarget.trim()); } }}`; - -if (src.includes(OLD_ONCHANGE)) { - src = src.replace(OLD_ONCHANGE, NEW_ONCHANGE); - console.log('Fix 2: Input onChange updated'); -} else { - console.error('Fix 2: OLD_ONCHANGE not found'); - process.exit(1); -} - -if (src.includes(OLD_ONKEYDOWN)) { - src = src.replace(OLD_ONKEYDOWN, NEW_ONKEYDOWN); - console.log('Fix 3: Input onKeyDown updated'); -} else { - console.error('Fix 3: OLD_ONKEYDOWN not found'); - // Try without \r if it failed - const altOnKeyDown = OLD_ONKEYDOWN.replace('\r\n', '\n'); - if (src.includes(altOnKeyDown)) { - src = src.replace(altOnKeyDown, NEW_ONKEYDOWN); - console.log('Fix 3: Input onKeyDown updated (alt line ending)'); - } else { - process.exit(1); - } -} - -fs.writeFileSync(filePath, src); -console.log('Done!');