mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-20 17:29:30 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b1428bf51 | ||
|
|
d5b3b1868e | ||
|
|
49f3fc0be5 | ||
|
|
59e641ccb3 | ||
|
|
1d9268b224 | ||
|
|
470a4bd6f7 | ||
|
|
8801d59b2e | ||
|
|
6a20e06982 | ||
|
|
b17abce2c2 | ||
|
|
f67e334016 | ||
|
|
c1de66520e | ||
|
|
37e086d822 | ||
|
|
d21f8ca8de | ||
|
|
6af4e7c2ec | ||
|
|
1f2bdc8c9e |
@@ -22,9 +22,9 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
bun-version: 1.3.14
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
@@ -76,9 +76,9 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
bun-version: 1.3.14
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
@@ -118,9 +118,9 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
bun-version: 1.3.14
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
@@ -152,9 +152,9 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
bun-version: 1.3.14
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
bun-version: 1.3.14
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v6
|
||||
|
||||
@@ -11,6 +11,7 @@ data/
|
||||
*.db
|
||||
*.diff
|
||||
*.orig
|
||||
code_quality.md
|
||||
.agents
|
||||
|
||||
# Playwright
|
||||
|
||||
+7
-2
@@ -1,6 +1,6 @@
|
||||
#syntax=docker/dockerfile:1.7-labs
|
||||
# Stage 1: Builder
|
||||
FROM oven/bun:1 AS builder
|
||||
FROM oven/bun:1.3.14 AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -25,7 +25,7 @@ RUN bun run build.ts
|
||||
RUN bun run scripts/extract-runtime-deps.ts
|
||||
|
||||
# Stage 2: Runner
|
||||
FROM oven/bun:1 AS runner
|
||||
FROM oven/bun:1.3.14 AS runner
|
||||
|
||||
# Install ffmpeg/ffprobe
|
||||
COPY --from=mwader/static-ffmpeg:8.1 /ffmpeg /usr/local/bin/
|
||||
@@ -80,6 +80,11 @@ USER root
|
||||
COPY scripts/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
# Expose "bun index.js" as "shumai" CLI command (and alias "shuami")
|
||||
RUN printf '#!/bin/sh\nexec bun /app/index.js "$@"\n' > /usr/local/bin/shumai \
|
||||
&& chmod +x /usr/local/bin/shumai \
|
||||
&& ln -s /usr/local/bin/shumai /usr/local/bin/shuami
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
|
||||
# Default command: run migrations and start API server
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/agent-app",
|
||||
"version": "0.3.9",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"bin": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/cli",
|
||||
"version": "0.3.9",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"bin": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/transcode-app",
|
||||
"version": "0.3.9",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"bin": {
|
||||
|
||||
@@ -56,6 +56,8 @@ apps/web/e2e/
|
||||
|---|---|
|
||||
| Sign up as the first user and become the team owner | `tests/auth/signup.spec.ts` |
|
||||
| Log in with existing credentials | `tests/auth/login.spec.ts` |
|
||||
| Show error when accessing reset-password page without token | `tests/auth/reset-password.spec.ts` |
|
||||
| Reset password with valid token and allow logging in with new password | `tests/auth/reset-password.spec.ts` |
|
||||
|
||||
### team
|
||||
| Test | File |
|
||||
@@ -91,6 +93,7 @@ apps/web/e2e/
|
||||
| Owner saves a search result as a collection | `tests/project/save-search-collection.spec.ts` |
|
||||
| Image share with watermark + download disabled: no download buttons on public list/detail pages, watermarked proxy served, download-url rejected | `tests/project/share-watermark-no-download.spec.ts` |
|
||||
| Video share with watermark + download disabled: no download buttons on public list/detail pages, watermarked proxy served, download-url rejected | `tests/project/share-watermark-no-download.spec.ts` |
|
||||
| Owner views a file and it appears in recents | `tests/project/recents.spec.ts` |
|
||||
|
||||
### file
|
||||
| Test | File |
|
||||
|
||||
@@ -7,6 +7,7 @@ import { fileURLToPath } from 'url'
|
||||
const currentDir = path.dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
async function start() {
|
||||
process.env.TESTCONTAINERS_RYUK_DISABLED = 'true'
|
||||
console.log('Starting E2E test database container...')
|
||||
await globalTestSetup()
|
||||
|
||||
@@ -32,4 +33,7 @@ async function start() {
|
||||
await import('../src/index.ts')
|
||||
}
|
||||
|
||||
start().catch(console.error)
|
||||
start().catch((err) => {
|
||||
console.error('Failed to start E2E server:', err)
|
||||
process.exit(1)
|
||||
})
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
import { expect, test } from '../../fixtures'
|
||||
import { apiSignup, E2E_PASSWORD, uniqueEmail } from '../../helpers/auth'
|
||||
import { loginViaUi } from '../../helpers/ui'
|
||||
|
||||
test('should show error when accessing reset-password page without token', async ({ page }) => {
|
||||
await page.goto('/reset-password')
|
||||
await expect(page.getByText('Invalid or missing reset token.')).toBeVisible()
|
||||
await expect(page.getByRole('button', { name: 'Go to Login' })).toBeVisible()
|
||||
})
|
||||
|
||||
test('should reset password with valid token and allow logging in with new password', async ({
|
||||
page,
|
||||
request,
|
||||
prisma,
|
||||
}) => {
|
||||
const email = uniqueEmail('reset-pw')
|
||||
const oldPassword = E2E_PASSWORD
|
||||
const newPassword = 'newSecretPassword123'
|
||||
|
||||
// 1. Seed user
|
||||
await apiSignup(request, email, oldPassword)
|
||||
|
||||
// 2. Request password reset via API
|
||||
const resetRes = await request.post('/api/auth/request-password-reset', {
|
||||
data: {
|
||||
email,
|
||||
redirectTo: '/reset-password',
|
||||
},
|
||||
})
|
||||
expect(resetRes.ok()).toBe(true)
|
||||
|
||||
// Retrieve the generated verification token from DB
|
||||
const verification = await prisma.verification.findFirst({
|
||||
where: {
|
||||
identifier: { startsWith: 'reset-password:' },
|
||||
},
|
||||
orderBy: { createdAt: 'desc' },
|
||||
})
|
||||
expect(verification).not.toBeNull()
|
||||
const token = verification!.identifier.replace('reset-password:', '')
|
||||
|
||||
// 3. Open reset password page with token
|
||||
await page.goto(`/reset-password?token=${token}`)
|
||||
|
||||
// 4. Fill in new password and confirmation
|
||||
await page.locator('input#password').fill(newPassword)
|
||||
await page.locator('input#confirmPassword').fill(newPassword)
|
||||
|
||||
// 5. Submit form
|
||||
await page.getByRole('button', { name: 'Reset Password' }).click()
|
||||
|
||||
// 6. Verify success state
|
||||
await expect(page.getByText('Password reset successfully!')).toBeVisible()
|
||||
|
||||
// 7. Click Go to Login
|
||||
await page.getByRole('button', { name: 'Go to Login' }).click()
|
||||
await expect(page).toHaveURL('/login')
|
||||
|
||||
// 8. Log in with the new password
|
||||
await loginViaUi(page, email, newPassword)
|
||||
await expect(page).toHaveURL(/\/teams\/[^/]+/)
|
||||
await expect(page.getByRole('heading', { name: 'Projects' })).toBeVisible()
|
||||
})
|
||||
@@ -40,8 +40,8 @@ test('owner should create a project with a cover image', async ({ owner, prisma
|
||||
await expect(page).toHaveURL(/\/projects\/[^/]+/)
|
||||
await expect(page.locator(`text=${projectName}`).first()).toBeVisible()
|
||||
|
||||
// Back on the dashboard the new project card is visible with its cover
|
||||
await page.click('button[aria-label="Dashboard"]')
|
||||
// Back on the home page the new project card is visible with its cover
|
||||
await page.click('button[aria-label="Home"]')
|
||||
await expect(page).toHaveURL(/\/teams\/[^/]+/)
|
||||
await expect(page.locator(`img[alt="${projectName}"]`)).toBeVisible()
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
import { expect, test } from '../../fixtures'
|
||||
import { fileCard } from '../../helpers/files'
|
||||
|
||||
test('owner views a file and it appears in recents', async ({ file }) => {
|
||||
const { page, projectId, fileName, fileId } = file
|
||||
|
||||
// Open the file details page to record view
|
||||
await page.goto(`/projects/${projectId}/files/${fileId}`)
|
||||
await expect(page.getByText(fileName).first()).toBeVisible()
|
||||
|
||||
// Navigate to Recents page via sidebar or direct URL
|
||||
await page.goto(`/projects/${projectId}`)
|
||||
await page.getByText('Recently Viewed').first().click()
|
||||
await expect(page).toHaveURL(new RegExp(`/projects/${projectId}/recents`))
|
||||
|
||||
// The viewed file should be visible in recents
|
||||
const card = fileCard(page, fileName)
|
||||
await expect(card).toBeVisible()
|
||||
|
||||
// Toolbar should show hint text instead of action buttons
|
||||
await expect(
|
||||
page.getByText('This page displays the 100 most recent files you viewed in this project.'),
|
||||
).toBeVisible()
|
||||
await expect(page.getByRole('button', { name: 'Field' })).not.toBeVisible()
|
||||
await expect(page.getByRole('button', { name: 'Search' })).not.toBeVisible()
|
||||
await expect(page.getByText('AGENTS.md')).not.toBeVisible()
|
||||
|
||||
// Right-clicking the file should NOT show the context menu
|
||||
await card.click({ button: 'right' })
|
||||
await expect(page.getByRole('menuitem', { name: 'Delete' })).not.toBeVisible()
|
||||
await expect(page.getByRole('menuitem', { name: 'Download' })).not.toBeVisible()
|
||||
|
||||
// The per-item overflow menu must also be unavailable on the read-only Recents page.
|
||||
await expect(card.getByRole('button')).toHaveCount(0)
|
||||
})
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/web-app",
|
||||
"version": "0.3.9",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
|
||||
@@ -13,12 +13,37 @@ import { initTranscodeWorkflows } from '@shumai/transcode'
|
||||
import { workflowService } from '@shumai/workflow-core'
|
||||
|
||||
import { handleDaemonCommands } from '@shumai/core/src/utils/daemon'
|
||||
import { authService } from '@shumai/core/src/auth/auth'
|
||||
|
||||
if (process.argv.includes('--check')) {
|
||||
console.log('✅ Web app evaluated successfully!')
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
const cliArgs = process.argv.slice(2)
|
||||
const resetCmdIndex = cliArgs.findIndex(
|
||||
(arg) => arg === 'reset-password' || arg === 'reset-passowrd',
|
||||
)
|
||||
|
||||
if (resetCmdIndex !== -1) {
|
||||
const email = cliArgs[resetCmdIndex + 1]
|
||||
if (!email || email.startsWith('-')) {
|
||||
console.error('Error: Please provide a valid email address.')
|
||||
console.error('Usage: shumai reset-password <email>')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
try {
|
||||
const link = await authService.generatePasswordResetLink(email)
|
||||
console.log(link)
|
||||
process.exit(0)
|
||||
} catch (err: unknown) {
|
||||
const message = err instanceof Error ? err.message : 'Unknown error'
|
||||
console.error(`Error: ${message}`)
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
async function run() {
|
||||
// Initialize workflows and activities for local executor mode
|
||||
initAgentWorkflows()
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
# Code Quality Review: Quota Usage Dashboard
|
||||
|
||||
## Context
|
||||
|
||||
The change moves quota usage monitoring from the settings rule-card dialog to an owner-only dashboard section, adds collapsible rule/record display, and adds an audited manual record reset operation.
|
||||
|
||||
## Review
|
||||
|
||||
### Correctness
|
||||
|
||||
- The reset service validates team ownership, scope mode, membership, role filters, and selected-member membership.
|
||||
- Reset and first-use record creation are serialized with a quota-rule row lock.
|
||||
- Reset starts a new window at the current time and clears consumption.
|
||||
- API and service tests cover shared records, member records, invalid targets, cross-team access, request validation, and audit logging.
|
||||
- The application E2E test covers the settings/dashboard flow and verifies the persisted reset.
|
||||
|
||||
### Readability and architecture
|
||||
|
||||
- Business logic remains in `QuotaService`; the API only validates, authorizes, invokes the service, and maps the audit action.
|
||||
- The dashboard owns usage presentation, while quota formatting metadata is shared between dashboard and settings.
|
||||
- The removed usage dialog and obsolete translation messages are not referenced after the refactor.
|
||||
|
||||
### Security
|
||||
|
||||
- The reset endpoint retains owner-level team authorization.
|
||||
- Request input is validated with Zod.
|
||||
- SQL uses Prisma tagged-template parameters and does not interpolate raw user input.
|
||||
|
||||
### Performance
|
||||
|
||||
- Usage records are queried only after a rule is expanded.
|
||||
- Expanded rules refresh every ten seconds, matching the previous usage dialog behavior.
|
||||
- Quota rules retain the existing bounded list endpoint and descending ID ordering.
|
||||
|
||||
## Verification
|
||||
|
||||
- `bun run lint` passed.
|
||||
- `bun run format` passed.
|
||||
- `bun run typecheck` passed.
|
||||
- `bun run test` passed: 124 files, 1190 tests.
|
||||
- Quota API/core tests passed: 2 files, 30 tests.
|
||||
- Quota application E2E passed.
|
||||
- WebUI harness E2E passed: 9 tests.
|
||||
- Workflow E2E passed: 14 files, 58 tests.
|
||||
- `git diff --check` passed.
|
||||
|
||||
## Verdict
|
||||
|
||||
Approve. No critical or required findings remain.
|
||||
+5
-1
@@ -52,7 +52,11 @@
|
||||
},
|
||||
{
|
||||
"group": "Team Settings",
|
||||
"pages": ["using-shumai/transcode-settings", "using-shumai/quotas-settings"]
|
||||
"pages": [
|
||||
"using-shumai/transcode-settings",
|
||||
"using-shumai/quotas-settings",
|
||||
"using-shumai/password-reset"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Configuration",
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 309 KiB After Width: | Height: | Size: 131 KiB |
@@ -0,0 +1,60 @@
|
||||
---
|
||||
title: Password Reset
|
||||
description: How administrators generate secure password reset links for team members.
|
||||
---
|
||||
|
||||
Because Shumai does not require an external email delivery service (SMTP) to be configured for standard self-hosted deployments, password resets are initiated securely by an administrator using the Shumai CLI.
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
When a user forgets their password, an administrator can generate a one-time password reset link directly from the command line.
|
||||
|
||||
- **Link Expiration**: The generated password reset link is valid for **1 hour** (`3600 seconds`).
|
||||
- **One-Time Use**: Once used, the token is permanently invalidated.
|
||||
- **Session Revocation**: When a user resets their password, all existing active sessions for that account are automatically revoked across all devices.
|
||||
- **Latest Link Validity**: Generating a new reset link for a user immediately supersedes any previously generated pending links.
|
||||
|
||||
---
|
||||
|
||||
## Generating a Password Reset Link
|
||||
|
||||
### Running on Local Host / Server
|
||||
|
||||
Run the `reset-password` subcommand from your Shumai installation directory:
|
||||
|
||||
```bash
|
||||
shumai reset-password <user-email>
|
||||
```
|
||||
|
||||
_(Alternatively, `bun apps/web/src/index.ts reset-password <user-email>`)_
|
||||
|
||||
**Example Output:**
|
||||
|
||||
```text
|
||||
http://localhost:3000/reset-password?token=bb3xg4uO3cwN0FQv4cgUK6Hh
|
||||
```
|
||||
|
||||
### Running inside Docker
|
||||
|
||||
If Shumai is running inside a Docker container, execute the command using `docker exec`:
|
||||
|
||||
```bash
|
||||
docker exec -it <container-name-or-id> shumai reset-password <user-email>
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
> Both `shumai` and the common alias `shuami` (e.g. `shuami reset-password <user-email>`) are supported.
|
||||
|
||||
> [!NOTE]
|
||||
> For remote servers or production deployments, ensure `BETTER_AUTH_URL` is set in your environment (e.g., `BETTER_AUTH_URL=https://shumai.example.com`) so the CLI generates the reset link with your public domain instead of `localhost`.
|
||||
|
||||
---
|
||||
|
||||
## Member Reset Experience
|
||||
|
||||
1. The administrator sends the generated URL to the team member via their preferred secure communication channel.
|
||||
2. The user opens the link in their browser.
|
||||
3. The user inputs their **New Password** and **Confirm Password** (minimum 3 characters).
|
||||
4. Upon clicking **Reset Password**, the password is securely updated, all previous active sessions are invalidated, and the user is redirected to `/login` to sign in.
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "shumai",
|
||||
"version": "0.3.9",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/agent",
|
||||
"version": "0.3.9",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/api",
|
||||
"version": "0.3.9",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
|
||||
@@ -188,6 +188,46 @@ describe('folder api', () => {
|
||||
type: ResourceType.Asset,
|
||||
id: 'test-id',
|
||||
})
|
||||
expect(assetService.listChildren).toHaveBeenCalledWith({
|
||||
assetId: 'test-id',
|
||||
assetType: 'folder',
|
||||
})
|
||||
})
|
||||
|
||||
it('GET /folders/:folderId/children forwards pagination parameters', async () => {
|
||||
vi.mocked(assetService.listChildren).mockResolvedValue({
|
||||
data: [
|
||||
{
|
||||
id: 'child-id-2',
|
||||
name: 'child-folder-2',
|
||||
sizeByte: 0,
|
||||
fileCount: 0,
|
||||
type: 'folder',
|
||||
status: 'active',
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
},
|
||||
],
|
||||
pageInfo: { total: 30, cursor: 'cursorNextToken' },
|
||||
})
|
||||
|
||||
const app = new Hono().use('*', authMiddleware).route('/', folderRoute)
|
||||
const res = await app.request(
|
||||
'/folders/test-id/children?assetType=folder&first=20&after=cursorToken123&prefix=sub',
|
||||
)
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.data).toHaveLength(1)
|
||||
expect(json.pageInfo.cursor).toBe('cursorNextToken')
|
||||
|
||||
expect(assetService.listChildren).toHaveBeenCalledWith({
|
||||
assetId: 'test-id',
|
||||
assetType: 'folder',
|
||||
first: 20,
|
||||
after: 'cursorToken123',
|
||||
prefix: 'sub',
|
||||
})
|
||||
})
|
||||
|
||||
it('DELETE /folders', async () => {
|
||||
|
||||
@@ -120,12 +120,8 @@ const route = new Hono<{ Variables: { user: User } }>()
|
||||
})
|
||||
|
||||
const resp = await assetService.listChildren({
|
||||
...req,
|
||||
assetId: folderId,
|
||||
assetType: req.assetType,
|
||||
projectId: req.projectId,
|
||||
showDeleted: req.showDeleted,
|
||||
sort: req.sort,
|
||||
order: req.order,
|
||||
})
|
||||
return c.json(resp)
|
||||
})
|
||||
|
||||
@@ -25,6 +25,7 @@ import quotaRoute from './quota'
|
||||
import teamRoute from './team'
|
||||
import uploadRoute, { localUploadRoute } from './upload'
|
||||
import versionStackRoute from './versionStack'
|
||||
import kanbanRoute from './kanban'
|
||||
|
||||
type User = Prisma.UserGetPayload<Record<string, never>>
|
||||
|
||||
@@ -67,6 +68,7 @@ const apiRoute = new Hono<{ Variables: { user: User } }>()
|
||||
.route('/', mcpRoute)
|
||||
.route('/', watermarkTemplateRoute)
|
||||
.route('/', quotaRoute)
|
||||
.route('/', kanbanRoute)
|
||||
|
||||
app.route('/files', s3Route)
|
||||
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
import { zValidator } from '@hono/zod-validator'
|
||||
import { Hono } from 'hono'
|
||||
import { kanbanService } from '@shumai/core/src/kanban/kanban'
|
||||
import { notificationService } from '@shumai/core/src/notification/notification'
|
||||
import { auditLogService } from '@shumai/core/src/auditLog/auditLog'
|
||||
import {
|
||||
authzService,
|
||||
Permission,
|
||||
ResourceType,
|
||||
resolveEffectiveRole,
|
||||
} from '@shumai/core/src/authz/authz'
|
||||
import { createKanbanCommentSchema, postAttachmentRequestSchema, AuditAction } from '@shumai/dtos'
|
||||
import type { Prisma } from '@shumai/db'
|
||||
|
||||
type User = Prisma.UserGetPayload<Record<string, never>>
|
||||
|
||||
const route = new Hono<{ Variables: { user: User } }>()
|
||||
.post(
|
||||
'/teams/:teamId/kanban/attachments',
|
||||
zValidator('json', postAttachmentRequestSchema),
|
||||
async (c) => {
|
||||
const { teamId } = c.req.param()
|
||||
const req = c.req.valid('json')
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Read,
|
||||
type: ResourceType.Team,
|
||||
id: teamId,
|
||||
})
|
||||
|
||||
const attachment = await kanbanService.createAttachment(teamId, req)
|
||||
return c.json(attachment)
|
||||
},
|
||||
)
|
||||
.post(
|
||||
'/teams/:teamId/kanban/tasks/:taskId/comments',
|
||||
zValidator('json', createKanbanCommentSchema),
|
||||
async (c) => {
|
||||
const { teamId, taskId } = c.req.param()
|
||||
const req = c.req.valid('json')
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Read,
|
||||
type: ResourceType.KanbanTask,
|
||||
id: taskId,
|
||||
})
|
||||
|
||||
const comment = await kanbanService.addComment(taskId, user.id, req.body, req.attachments)
|
||||
const task = await kanbanService.getTask(taskId)
|
||||
|
||||
await auditLogService.logAction({
|
||||
action: AuditAction.kanban_comment_create,
|
||||
teamId,
|
||||
userId: user.id,
|
||||
projectId: task.projectId ?? undefined,
|
||||
itemId: comment.id,
|
||||
})
|
||||
|
||||
notificationService.notifyKanbanTaskEvent({
|
||||
type: 'kanban_task_comment_created',
|
||||
teamId,
|
||||
projectId: task.projectId,
|
||||
creatorId: user.id,
|
||||
kanbanTaskId: taskId,
|
||||
stakeholderIds: [task.creator?.id, task.assignee?.id, task.reporter?.id],
|
||||
commentMessage: req.body,
|
||||
})
|
||||
|
||||
return c.json(comment)
|
||||
},
|
||||
)
|
||||
.get('/teams/:teamId/kanban/tasks/:taskId/comments', async (c) => {
|
||||
const { taskId } = c.req.param()
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Read,
|
||||
type: ResourceType.KanbanTask,
|
||||
id: taskId,
|
||||
})
|
||||
|
||||
const comments = await kanbanService.listComments(taskId)
|
||||
return c.json({ data: comments })
|
||||
})
|
||||
.delete('/teams/:teamId/kanban/tasks/:taskId/comments/:commentId', async (c) => {
|
||||
const { teamId, taskId, commentId } = c.req.param()
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Read,
|
||||
type: ResourceType.KanbanTask,
|
||||
id: taskId,
|
||||
})
|
||||
|
||||
const userRole = await resolveEffectiveRole(teamId, undefined, user.id)
|
||||
const task = await kanbanService.getTask(taskId)
|
||||
await kanbanService.deleteComment(taskId, commentId, user.id, userRole)
|
||||
|
||||
await auditLogService.logAction({
|
||||
action: AuditAction.kanban_comment_delete,
|
||||
teamId,
|
||||
userId: user.id,
|
||||
projectId: task.projectId ?? undefined,
|
||||
itemId: commentId,
|
||||
})
|
||||
|
||||
return c.json({ success: true })
|
||||
})
|
||||
.get('/teams/:teamId/kanban/tasks/:taskId/events', async (c) => {
|
||||
const { taskId } = c.req.param()
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Read,
|
||||
type: ResourceType.KanbanTask,
|
||||
id: taskId,
|
||||
})
|
||||
|
||||
const events = await kanbanService.listEvents(taskId)
|
||||
return c.json({ data: events })
|
||||
})
|
||||
|
||||
export default route
|
||||
@@ -0,0 +1,131 @@
|
||||
import { zValidator } from '@hono/zod-validator'
|
||||
import { Hono } from 'hono'
|
||||
import { kanbanService } from '@shumai/core/src/kanban/kanban'
|
||||
import { auditLogService } from '@shumai/core/src/auditLog/auditLog'
|
||||
import {
|
||||
authzService,
|
||||
Permission,
|
||||
ResourceType,
|
||||
resolveEffectiveRole,
|
||||
} from '@shumai/core/src/authz/authz'
|
||||
import {
|
||||
createKanbanGoalSchema,
|
||||
updateKanbanGoalSchema,
|
||||
listKanbanGoalsRequestSchema,
|
||||
AuditAction,
|
||||
} from '@shumai/dtos'
|
||||
import type { Prisma } from '@shumai/db'
|
||||
|
||||
type User = Prisma.UserGetPayload<Record<string, never>>
|
||||
|
||||
const route = new Hono<{ Variables: { user: User } }>()
|
||||
.post('/teams/:teamId/kanban/goals', zValidator('json', createKanbanGoalSchema), async (c) => {
|
||||
const { teamId } = c.req.param()
|
||||
const req = c.req.valid('json')
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Admin,
|
||||
type: ResourceType.Team,
|
||||
id: teamId,
|
||||
})
|
||||
|
||||
const role = await resolveEffectiveRole(teamId, undefined, user.id)
|
||||
const goal = await kanbanService.createGoal(teamId, req, user.id, role)
|
||||
|
||||
await auditLogService.logAction({
|
||||
action: AuditAction.kanban_goal_create,
|
||||
teamId,
|
||||
userId: user.id,
|
||||
itemId: goal.id,
|
||||
})
|
||||
|
||||
return c.json(goal)
|
||||
})
|
||||
.get(
|
||||
'/teams/:teamId/kanban/goals',
|
||||
zValidator('query', listKanbanGoalsRequestSchema),
|
||||
async (c) => {
|
||||
const { teamId } = c.req.param()
|
||||
const req = c.req.valid('query')
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Read,
|
||||
type: ResourceType.Team,
|
||||
id: teamId,
|
||||
})
|
||||
|
||||
const goals = await kanbanService.listGoals(teamId, req)
|
||||
return c.json({ data: goals })
|
||||
},
|
||||
)
|
||||
.get('/teams/:teamId/kanban/goals/:goalId', async (c) => {
|
||||
const { goalId } = c.req.param()
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Read,
|
||||
type: ResourceType.KanbanGoal,
|
||||
id: goalId,
|
||||
})
|
||||
|
||||
const goal = await kanbanService.getGoal(goalId)
|
||||
return c.json(goal)
|
||||
})
|
||||
.patch(
|
||||
'/teams/:teamId/kanban/goals/:goalId',
|
||||
zValidator('json', updateKanbanGoalSchema),
|
||||
async (c) => {
|
||||
const { teamId, goalId } = c.req.param()
|
||||
const req = c.req.valid('json')
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Admin,
|
||||
type: ResourceType.KanbanGoal,
|
||||
id: goalId,
|
||||
})
|
||||
|
||||
const role = await resolveEffectiveRole(teamId, undefined, user.id)
|
||||
const goal = await kanbanService.updateGoal(goalId, req, role)
|
||||
|
||||
await auditLogService.logAction({
|
||||
action: AuditAction.kanban_goal_update,
|
||||
teamId,
|
||||
userId: user.id,
|
||||
itemId: goalId,
|
||||
})
|
||||
|
||||
return c.json(goal)
|
||||
},
|
||||
)
|
||||
.delete('/teams/:teamId/kanban/goals/:goalId', async (c) => {
|
||||
const { teamId, goalId } = c.req.param()
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Admin,
|
||||
type: ResourceType.KanbanGoal,
|
||||
id: goalId,
|
||||
})
|
||||
|
||||
const role = await resolveEffectiveRole(teamId, undefined, user.id)
|
||||
await kanbanService.deleteGoal(goalId, role)
|
||||
|
||||
await auditLogService.logAction({
|
||||
action: AuditAction.kanban_goal_delete,
|
||||
teamId,
|
||||
userId: user.id,
|
||||
itemId: goalId,
|
||||
})
|
||||
|
||||
return c.json({ ok: true })
|
||||
})
|
||||
|
||||
export default route
|
||||
@@ -0,0 +1,14 @@
|
||||
import { Hono } from 'hono'
|
||||
import type { Prisma } from '@shumai/db'
|
||||
import goalsRoute from './goals'
|
||||
import tasksRoute from './tasks'
|
||||
import commentsRoute from './comments'
|
||||
|
||||
type User = Prisma.UserGetPayload<Record<string, never>>
|
||||
|
||||
const kanbanRoute = new Hono<{ Variables: { user: User } }>()
|
||||
.route('/', goalsRoute)
|
||||
.route('/', tasksRoute)
|
||||
.route('/', commentsRoute)
|
||||
|
||||
export default kanbanRoute
|
||||
@@ -0,0 +1,689 @@
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest'
|
||||
import { Hono, type Context, type Next } from 'hono'
|
||||
import { kanbanService } from '@shumai/core/src/kanban/kanban'
|
||||
import { auditLogService } from '@shumai/core/src/auditLog/auditLog'
|
||||
import { notificationService } from '@shumai/core/src/notification/notification'
|
||||
import { KanbanTaskStatus, KanbanTaskPriority } from '@shumai/db/enums'
|
||||
import kanbanRoute from './index'
|
||||
|
||||
vi.mock('@shumai/core/src/authz/authz', () => ({
|
||||
authzService: {
|
||||
hasPermission: vi.fn().mockResolvedValue(undefined),
|
||||
},
|
||||
resolveEffectiveRole: vi.fn().mockResolvedValue('owner'),
|
||||
Permission: {
|
||||
Read: 'Read',
|
||||
Edit: 'Edit',
|
||||
Admin: 'Admin',
|
||||
},
|
||||
ResourceType: {
|
||||
Team: 'team',
|
||||
Project: 'project',
|
||||
KanbanGoal: 'kanbanGoal',
|
||||
KanbanTask: 'kanbanTask',
|
||||
},
|
||||
}))
|
||||
|
||||
vi.mock('@shumai/core/src/auditLog/auditLog', () => ({
|
||||
auditLogService: {
|
||||
logAction: vi.fn().mockResolvedValue({}),
|
||||
},
|
||||
}))
|
||||
|
||||
vi.mock('@shumai/core/src/notification/notification', () => ({
|
||||
notificationService: {
|
||||
notifyKanbanTaskEvent: vi.fn().mockResolvedValue(undefined),
|
||||
create: vi.fn().mockResolvedValue(undefined),
|
||||
},
|
||||
}))
|
||||
|
||||
describe('Kanban API Routes', () => {
|
||||
const teamId = 'team-1'
|
||||
const taskId = 'task-1'
|
||||
const goalId = 'goal-1'
|
||||
|
||||
const authMiddleware = async (c: Context, next: Next) => {
|
||||
c.set('user', { id: 'user-1', name: 'Test User' })
|
||||
await next()
|
||||
}
|
||||
|
||||
let app: Hono
|
||||
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks()
|
||||
vi.mocked(auditLogService.logAction).mockResolvedValue({} as any) // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
vi.mocked(notificationService.notifyKanbanTaskEvent).mockResolvedValue(undefined as any) // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
app = new Hono()
|
||||
app.use('*', authMiddleware)
|
||||
app.route('/', kanbanRoute)
|
||||
})
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Goals Endpoints
|
||||
// --------------------------------------------------------------------------
|
||||
describe('Goals Endpoints', () => {
|
||||
it('POST /teams/:teamId/kanban/goals', async () => {
|
||||
const mockCreate = vi.spyOn(kanbanService, 'createGoal').mockResolvedValue({
|
||||
id: goalId,
|
||||
title: 'New Goal',
|
||||
description: 'Goal description',
|
||||
teamId,
|
||||
creatorId: 'user-1',
|
||||
taskCount: 0,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
})
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/goals`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ title: 'New Goal', description: 'Goal description' }),
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.id).toBe(goalId)
|
||||
expect(mockCreate).toHaveBeenCalledWith(
|
||||
teamId,
|
||||
{ title: 'New Goal', description: 'Goal description' },
|
||||
'user-1',
|
||||
'owner',
|
||||
)
|
||||
})
|
||||
|
||||
it('GET /teams/:teamId/kanban/goals', async () => {
|
||||
const mockList = vi.spyOn(kanbanService, 'listGoals').mockResolvedValue([
|
||||
{
|
||||
id: goalId,
|
||||
title: 'Goal 1',
|
||||
teamId,
|
||||
creatorId: 'user-1',
|
||||
taskCount: 0,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
},
|
||||
])
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/goals`)
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.data).toHaveLength(1)
|
||||
expect(mockList).toHaveBeenCalledWith(teamId, expect.any(Object))
|
||||
})
|
||||
|
||||
it('PATCH /teams/:teamId/kanban/goals/:goalId', async () => {
|
||||
const mockUpdate = vi.spyOn(kanbanService, 'updateGoal').mockResolvedValue({
|
||||
id: goalId,
|
||||
title: 'Updated Goal',
|
||||
teamId,
|
||||
creatorId: 'user-1',
|
||||
taskCount: 0,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
})
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/goals/${goalId}`, {
|
||||
method: 'PATCH',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ title: 'Updated Goal' }),
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.title).toBe('Updated Goal')
|
||||
expect(mockUpdate).toHaveBeenCalledWith(goalId, { title: 'Updated Goal' }, 'owner')
|
||||
})
|
||||
|
||||
it('DELETE /teams/:teamId/kanban/goals/:goalId', async () => {
|
||||
const mockDelete = vi.spyOn(kanbanService, 'deleteGoal').mockResolvedValue(undefined)
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/goals/${goalId}`, {
|
||||
method: 'DELETE',
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.ok).toBe(true)
|
||||
expect(mockDelete).toHaveBeenCalledWith(goalId, 'owner')
|
||||
})
|
||||
})
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Tasks Endpoints
|
||||
// --------------------------------------------------------------------------
|
||||
describe('Tasks Endpoints', () => {
|
||||
it('POST /teams/:teamId/kanban/tasks', async () => {
|
||||
const mockCreate = vi.spyOn(kanbanService, 'createTask').mockResolvedValue({
|
||||
id: taskId,
|
||||
title: 'New Task',
|
||||
isAgentTask: false,
|
||||
status: KanbanTaskStatus.READY,
|
||||
priority: KanbanTaskPriority.MEDIUM,
|
||||
teamId,
|
||||
creator: { id: 'user-1', name: 'User 1' },
|
||||
commentCount: 0,
|
||||
dependencyCount: 0,
|
||||
dependentCount: 0,
|
||||
assetCount: 0,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
})
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/tasks`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ title: 'New Task', isAgentTask: false }),
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.id).toBe(taskId)
|
||||
expect(mockCreate).toHaveBeenCalledWith(teamId, expect.any(Object), 'user-1', 'owner')
|
||||
})
|
||||
|
||||
it('GET /teams/:teamId/kanban/tasks (with isAgentTask and goal filters)', async () => {
|
||||
const mockList = vi.spyOn(kanbanService, 'listTasks').mockResolvedValue({
|
||||
data: [
|
||||
{
|
||||
id: taskId,
|
||||
title: 'Task 1',
|
||||
isAgentTask: false,
|
||||
status: KanbanTaskStatus.READY,
|
||||
priority: KanbanTaskPriority.MEDIUM,
|
||||
teamId,
|
||||
creator: { id: 'user-1', name: 'User 1' },
|
||||
commentCount: 0,
|
||||
dependencyCount: 0,
|
||||
dependentCount: 0,
|
||||
assetCount: 0,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
},
|
||||
],
|
||||
pageInfo: { total: 1 },
|
||||
})
|
||||
|
||||
const res = await app.request(
|
||||
`/teams/${teamId}/kanban/tasks?isAgentTask=false&status=READY&goalId=goal-1`,
|
||||
)
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.data).toHaveLength(1)
|
||||
expect(mockList).toHaveBeenCalledWith(
|
||||
teamId,
|
||||
expect.objectContaining({
|
||||
isAgentTask: false,
|
||||
status: 'READY',
|
||||
goalId: 'goal-1',
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
||||
it('GET /teams/:teamId/kanban/tasks/:taskId', async () => {
|
||||
const mockGet = vi.spyOn(kanbanService, 'getTask').mockResolvedValue({
|
||||
id: taskId,
|
||||
title: 'Task 1',
|
||||
isAgentTask: false,
|
||||
status: KanbanTaskStatus.READY,
|
||||
priority: KanbanTaskPriority.MEDIUM,
|
||||
teamId,
|
||||
creator: { id: 'user-1', name: 'User 1' },
|
||||
dependencies: [],
|
||||
dependents: [],
|
||||
assets: [],
|
||||
comments: [],
|
||||
events: [],
|
||||
commentCount: 0,
|
||||
dependencyCount: 0,
|
||||
dependentCount: 0,
|
||||
assetCount: 0,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
})
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/tasks/${taskId}`)
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.id).toBe(taskId)
|
||||
expect(mockGet).toHaveBeenCalledWith(taskId)
|
||||
})
|
||||
|
||||
it('PATCH /teams/:teamId/kanban/tasks/:taskId', async () => {
|
||||
vi.spyOn(kanbanService, 'getTask').mockResolvedValue({
|
||||
id: taskId,
|
||||
title: 'Old Task Title',
|
||||
isAgentTask: false,
|
||||
status: KanbanTaskStatus.READY,
|
||||
priority: KanbanTaskPriority.MEDIUM,
|
||||
teamId,
|
||||
creator: { id: 'user-1', name: 'User 1' },
|
||||
dependencies: [],
|
||||
dependents: [],
|
||||
assets: [],
|
||||
comments: [],
|
||||
events: [],
|
||||
commentCount: 0,
|
||||
dependencyCount: 0,
|
||||
dependentCount: 0,
|
||||
assetCount: 0,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
})
|
||||
const mockUpdate = vi.spyOn(kanbanService, 'updateTask').mockResolvedValue({
|
||||
id: taskId,
|
||||
title: 'Updated Task Title',
|
||||
isAgentTask: false,
|
||||
status: KanbanTaskStatus.READY,
|
||||
priority: KanbanTaskPriority.HIGH,
|
||||
teamId,
|
||||
creator: { id: 'user-1', name: 'User 1' },
|
||||
commentCount: 0,
|
||||
dependencyCount: 0,
|
||||
dependentCount: 0,
|
||||
assetCount: 0,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
})
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/tasks/${taskId}`, {
|
||||
method: 'PATCH',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ priority: 'HIGH', status: 'DONE', reason: 'All done' }),
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
expect(mockUpdate).toHaveBeenCalledWith(
|
||||
taskId,
|
||||
{ priority: 'HIGH', status: 'DONE', reason: 'All done' },
|
||||
'user-1',
|
||||
'owner',
|
||||
)
|
||||
})
|
||||
|
||||
it('PATCH /teams/:teamId/kanban/tasks/:taskId with beforeIndex and afterIndex', async () => {
|
||||
vi.spyOn(kanbanService, 'getTask').mockResolvedValue({
|
||||
id: taskId,
|
||||
title: 'Task 1',
|
||||
isAgentTask: false,
|
||||
status: KanbanTaskStatus.READY,
|
||||
priority: KanbanTaskPriority.MEDIUM,
|
||||
sortIndex: 'a0V',
|
||||
teamId,
|
||||
creator: { id: 'user-1', name: 'User 1' },
|
||||
dependencies: [],
|
||||
dependents: [],
|
||||
assets: [],
|
||||
comments: [],
|
||||
events: [],
|
||||
commentCount: 0,
|
||||
dependencyCount: 0,
|
||||
dependentCount: 0,
|
||||
assetCount: 0,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
})
|
||||
const mockUpdate = vi.spyOn(kanbanService, 'updateTask').mockResolvedValue({
|
||||
id: taskId,
|
||||
title: 'Task 1',
|
||||
isAgentTask: false,
|
||||
status: KanbanTaskStatus.READY,
|
||||
priority: KanbanTaskPriority.MEDIUM,
|
||||
sortIndex: 'a0V',
|
||||
teamId,
|
||||
creator: { id: 'user-1', name: 'User 1' },
|
||||
commentCount: 0,
|
||||
dependencyCount: 0,
|
||||
dependentCount: 0,
|
||||
assetCount: 0,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
})
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/tasks/${taskId}`, {
|
||||
method: 'PATCH',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ status: 'READY', beforeIndex: 'a1', afterIndex: 'a0' }),
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
expect(mockUpdate).toHaveBeenCalledWith(
|
||||
taskId,
|
||||
{ status: 'READY', beforeIndex: 'a1', afterIndex: 'a0' },
|
||||
'user-1',
|
||||
'owner',
|
||||
)
|
||||
})
|
||||
|
||||
it('PATCH /teams/:teamId/kanban/tasks/:taskId with fromStatus for CAS', async () => {
|
||||
vi.spyOn(kanbanService, 'getTask').mockResolvedValue({
|
||||
id: taskId,
|
||||
title: 'Task 1',
|
||||
isAgentTask: false,
|
||||
status: KanbanTaskStatus.TODO,
|
||||
priority: KanbanTaskPriority.MEDIUM,
|
||||
teamId,
|
||||
creator: { id: 'user-1', name: 'User 1' },
|
||||
dependencies: [],
|
||||
dependents: [],
|
||||
assets: [],
|
||||
comments: [],
|
||||
events: [],
|
||||
commentCount: 0,
|
||||
dependencyCount: 0,
|
||||
dependentCount: 0,
|
||||
assetCount: 0,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
})
|
||||
const mockUpdate = vi.spyOn(kanbanService, 'updateTask').mockResolvedValue({
|
||||
id: taskId,
|
||||
title: 'Task 1',
|
||||
isAgentTask: false,
|
||||
status: KanbanTaskStatus.IN_PROGRESS,
|
||||
priority: KanbanTaskPriority.MEDIUM,
|
||||
teamId,
|
||||
creator: { id: 'user-1', name: 'User 1' },
|
||||
commentCount: 0,
|
||||
dependencyCount: 0,
|
||||
dependentCount: 0,
|
||||
assetCount: 0,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
})
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/tasks/${taskId}`, {
|
||||
method: 'PATCH',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ fromStatus: 'TODO', status: 'IN_PROGRESS' }),
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
expect(mockUpdate).toHaveBeenCalledWith(
|
||||
taskId,
|
||||
{ fromStatus: 'TODO', status: 'IN_PROGRESS' },
|
||||
'user-1',
|
||||
'owner',
|
||||
)
|
||||
})
|
||||
|
||||
it('DELETE /teams/:teamId/kanban/tasks/:taskId', async () => {
|
||||
vi.spyOn(kanbanService, 'getTask').mockResolvedValue({
|
||||
id: taskId,
|
||||
title: 'Task to delete',
|
||||
isAgentTask: false,
|
||||
status: KanbanTaskStatus.READY,
|
||||
priority: KanbanTaskPriority.MEDIUM,
|
||||
teamId,
|
||||
creator: { id: 'user-1', name: 'User 1' },
|
||||
dependencies: [],
|
||||
dependents: [],
|
||||
assets: [],
|
||||
comments: [],
|
||||
events: [],
|
||||
commentCount: 0,
|
||||
dependencyCount: 0,
|
||||
dependentCount: 0,
|
||||
assetCount: 0,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
})
|
||||
const mockDelete = vi.spyOn(kanbanService, 'deleteTask').mockResolvedValue({
|
||||
id: taskId,
|
||||
title: 'Task to delete',
|
||||
isAgentTask: false,
|
||||
status: KanbanTaskStatus.READY,
|
||||
priority: KanbanTaskPriority.MEDIUM,
|
||||
teamId,
|
||||
creator: { id: 'user-1', name: 'User 1' },
|
||||
commentCount: 0,
|
||||
dependencyCount: 0,
|
||||
dependentCount: 0,
|
||||
assetCount: 0,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
})
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/tasks/${taskId}`, {
|
||||
method: 'DELETE',
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.success).toBe(true)
|
||||
expect(mockDelete).toHaveBeenCalledWith(taskId, 'user-1', 'owner')
|
||||
})
|
||||
|
||||
it('GET /teams/:teamId/kanban/tasks/:taskId/assets', async () => {
|
||||
const mockListTaskAssets = vi.spyOn(kanbanService, 'listTaskAssets').mockResolvedValue([
|
||||
{
|
||||
id: 'asset-1',
|
||||
name: 'Video.mp4',
|
||||
type: 'file',
|
||||
proxyType: 'video',
|
||||
thumbnailUrl: 'http://example.com/thumb.jpg',
|
||||
path: '/Project/Video.mp4',
|
||||
creator: { id: 'user-1', name: 'User 1' },
|
||||
createdAt: new Date().toISOString(),
|
||||
},
|
||||
])
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/tasks/${taskId}/assets`)
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json).toHaveLength(1)
|
||||
expect(json[0].name).toBe('Video.mp4')
|
||||
expect(mockListTaskAssets).toHaveBeenCalledWith(taskId)
|
||||
})
|
||||
|
||||
it('POST /teams/:teamId/kanban/tasks/:taskId/assets', async () => {
|
||||
const mockLinkAssets = vi.spyOn(kanbanService, 'linkAssets').mockResolvedValue(undefined)
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/tasks/${taskId}/assets`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ assetIds: ['asset-1', 'asset-2'] }),
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.success).toBe(true)
|
||||
expect(mockLinkAssets).toHaveBeenCalledWith(teamId, taskId, ['asset-1', 'asset-2'])
|
||||
})
|
||||
|
||||
it('DELETE /teams/:teamId/kanban/tasks/:taskId/assets/:assetId', async () => {
|
||||
const mockUnlinkAsset = vi.spyOn(kanbanService, 'unlinkAsset').mockResolvedValue(undefined)
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/tasks/${taskId}/assets/asset-1`, {
|
||||
method: 'DELETE',
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.success).toBe(true)
|
||||
expect(mockUnlinkAsset).toHaveBeenCalledWith(teamId, taskId, 'asset-1')
|
||||
})
|
||||
|
||||
it('GET /teams/:teamId/kanban/assets/:assetId/tasks', async () => {
|
||||
const mockListTasksForAsset = vi.spyOn(kanbanService, 'listTasksForAsset').mockResolvedValue([
|
||||
{
|
||||
id: taskId,
|
||||
title: 'Task linked to asset',
|
||||
isAgentTask: false,
|
||||
status: KanbanTaskStatus.READY,
|
||||
priority: KanbanTaskPriority.MEDIUM,
|
||||
teamId,
|
||||
creator: { id: 'user-1', name: 'User 1' },
|
||||
commentCount: 0,
|
||||
dependencyCount: 0,
|
||||
dependentCount: 0,
|
||||
assetCount: 1,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
},
|
||||
])
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/assets/asset-1/tasks`)
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.total).toBe(1)
|
||||
expect(json.data).toHaveLength(1)
|
||||
expect(mockListTasksForAsset).toHaveBeenCalledWith(teamId, 'asset-1')
|
||||
})
|
||||
|
||||
it('POST /teams/:teamId/kanban/assets/:assetId/tasks', async () => {
|
||||
const mockLinkAsset = vi.spyOn(kanbanService, 'linkAsset').mockResolvedValue(undefined)
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/assets/asset-1/tasks`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ taskId }),
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.success).toBe(true)
|
||||
expect(mockLinkAsset).toHaveBeenCalledWith(teamId, taskId, 'asset-1')
|
||||
})
|
||||
|
||||
it('DELETE /teams/:teamId/kanban/assets/:assetId/tasks/:taskId', async () => {
|
||||
const mockUnlinkAsset = vi.spyOn(kanbanService, 'unlinkAsset').mockResolvedValue(undefined)
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/assets/asset-1/tasks/${taskId}`, {
|
||||
method: 'DELETE',
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.success).toBe(true)
|
||||
expect(mockUnlinkAsset).toHaveBeenCalledWith(teamId, taskId, 'asset-1')
|
||||
})
|
||||
})
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Comments, Attachments & Events
|
||||
// --------------------------------------------------------------------------
|
||||
describe('Comments, Attachments and Events Endpoints', () => {
|
||||
it('POST /teams/:teamId/kanban/attachments', async () => {
|
||||
const mockAttachment = vi.spyOn(kanbanService, 'createAttachment').mockResolvedValue({
|
||||
id: 'att-1',
|
||||
name: 'test.png',
|
||||
key: 'kanban/attachments/test.png',
|
||||
sizeByte: 1024,
|
||||
uploadUrl: 'http://s3/upload',
|
||||
proxyType: 'image',
|
||||
})
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/attachments`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ fileName: 'test.png', size: 1024, contentType: 'image/png' }),
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.id).toBe('att-1')
|
||||
expect(mockAttachment).toHaveBeenCalledWith(teamId, {
|
||||
fileName: 'test.png',
|
||||
size: 1024,
|
||||
contentType: 'image/png',
|
||||
})
|
||||
})
|
||||
|
||||
it('POST /teams/:teamId/kanban/tasks/:taskId/comments', async () => {
|
||||
const mockAdd = vi.spyOn(kanbanService, 'addComment').mockResolvedValue({
|
||||
id: 'c-1',
|
||||
taskId,
|
||||
author: { id: 'user-1', name: 'User 1' },
|
||||
body: 'Here is a note',
|
||||
attachments: [],
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
})
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/tasks/${taskId}/comments`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
body: 'Here is a note',
|
||||
attachments: [
|
||||
{
|
||||
id: 'att-1',
|
||||
name: 'test.png',
|
||||
key: 'key-1',
|
||||
sizeByte: 1024,
|
||||
proxyType: 'image',
|
||||
},
|
||||
],
|
||||
}),
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
expect(mockAdd).toHaveBeenCalledWith(taskId, 'user-1', 'Here is a note', [
|
||||
{
|
||||
id: 'att-1',
|
||||
name: 'test.png',
|
||||
key: 'key-1',
|
||||
sizeByte: 1024,
|
||||
proxyType: 'image',
|
||||
},
|
||||
])
|
||||
})
|
||||
|
||||
it('DELETE /teams/:teamId/kanban/tasks/:taskId/comments/:commentId', async () => {
|
||||
const mockDelete = vi.spyOn(kanbanService, 'deleteComment').mockResolvedValue()
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/tasks/${taskId}/comments/c-1`, {
|
||||
method: 'DELETE',
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.success).toBe(true)
|
||||
expect(mockDelete).toHaveBeenCalledWith(taskId, 'c-1', 'user-1', 'owner')
|
||||
})
|
||||
|
||||
it('GET /teams/:teamId/kanban/tasks/:taskId/comments', async () => {
|
||||
const mockList = vi.spyOn(kanbanService, 'listComments').mockResolvedValue([
|
||||
{
|
||||
id: 'c-1',
|
||||
taskId,
|
||||
author: { id: 'user-1', name: 'User 1' },
|
||||
body: 'Note',
|
||||
attachments: [],
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
},
|
||||
])
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/tasks/${taskId}/comments`)
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.data).toHaveLength(1)
|
||||
expect(mockList).toHaveBeenCalledWith(taskId)
|
||||
})
|
||||
|
||||
it('GET /teams/:teamId/kanban/tasks/:taskId/events', async () => {
|
||||
const mockEvents = vi.spyOn(kanbanService, 'listEvents').mockResolvedValue([
|
||||
{
|
||||
id: 'e-1',
|
||||
taskId,
|
||||
actor: { id: 'user-1', name: 'User 1' },
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
type: 'CREATED' as any,
|
||||
createdAt: new Date().toISOString(),
|
||||
},
|
||||
])
|
||||
|
||||
const res = await app.request(`/teams/${teamId}/kanban/tasks/${taskId}/events`)
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.data).toHaveLength(1)
|
||||
expect(mockEvents).toHaveBeenCalledWith(taskId)
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,331 @@
|
||||
import { zValidator } from '@hono/zod-validator'
|
||||
import { Hono } from 'hono'
|
||||
import { kanbanService } from '@shumai/core/src/kanban/kanban'
|
||||
import { notificationService } from '@shumai/core/src/notification/notification'
|
||||
import { auditLogService } from '@shumai/core/src/auditLog/auditLog'
|
||||
import {
|
||||
authzService,
|
||||
Permission,
|
||||
ResourceType,
|
||||
resolveEffectiveRole,
|
||||
} from '@shumai/core/src/authz/authz'
|
||||
import {
|
||||
createKanbanTaskSchema,
|
||||
updateKanbanTaskSchema,
|
||||
listKanbanTasksRequestSchema,
|
||||
linkTaskAssetsSchema,
|
||||
linkAssetToTaskSchema,
|
||||
AuditAction,
|
||||
} from '@shumai/dtos'
|
||||
import type { Prisma } from '@shumai/db'
|
||||
import { HTTPException } from 'hono/http-exception'
|
||||
|
||||
type User = Prisma.UserGetPayload<Record<string, never>>
|
||||
|
||||
const route = new Hono<{ Variables: { user: User } }>()
|
||||
.post('/teams/:teamId/kanban/tasks', zValidator('json', createKanbanTaskSchema), async (c) => {
|
||||
const { teamId } = c.req.param()
|
||||
const req = c.req.valid('json')
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Read,
|
||||
type: ResourceType.Team,
|
||||
id: teamId,
|
||||
})
|
||||
|
||||
const role = await resolveEffectiveRole(teamId, undefined, user.id)
|
||||
if (!role) {
|
||||
throw new HTTPException(403, { message: 'User is not a member of the team' })
|
||||
}
|
||||
|
||||
const task = await kanbanService.createTask(teamId, req, user.id, role)
|
||||
|
||||
await auditLogService.logAction({
|
||||
action: AuditAction.kanban_task_create,
|
||||
teamId,
|
||||
userId: user.id,
|
||||
projectId: task.projectId ?? undefined,
|
||||
itemId: task.id,
|
||||
})
|
||||
|
||||
if (req.assigneeId && req.assigneeId !== user.id) {
|
||||
notificationService.notifyKanbanTaskEvent({
|
||||
type: 'kanban_task_assigned',
|
||||
teamId,
|
||||
projectId: task.projectId,
|
||||
creatorId: user.id,
|
||||
kanbanTaskId: task.id,
|
||||
targetUserId: req.assigneeId,
|
||||
})
|
||||
}
|
||||
|
||||
if (req.reporterId && req.reporterId !== user.id && req.reporterId !== req.assigneeId) {
|
||||
notificationService.notifyKanbanTaskEvent({
|
||||
type: 'kanban_task_created',
|
||||
teamId,
|
||||
projectId: task.projectId,
|
||||
creatorId: user.id,
|
||||
kanbanTaskId: task.id,
|
||||
targetUserId: req.reporterId,
|
||||
})
|
||||
}
|
||||
|
||||
return c.json(task)
|
||||
})
|
||||
.get(
|
||||
'/teams/:teamId/kanban/tasks',
|
||||
zValidator('query', listKanbanTasksRequestSchema),
|
||||
async (c) => {
|
||||
const { teamId } = c.req.param()
|
||||
const req = c.req.valid('query')
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Read,
|
||||
type: ResourceType.Team,
|
||||
id: teamId,
|
||||
})
|
||||
|
||||
const result = await kanbanService.listTasks(teamId, req)
|
||||
return c.json(result)
|
||||
},
|
||||
)
|
||||
.get('/teams/:teamId/kanban/tasks/:taskId', async (c) => {
|
||||
const { taskId } = c.req.param()
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Read,
|
||||
type: ResourceType.KanbanTask,
|
||||
id: taskId,
|
||||
})
|
||||
|
||||
const task = await kanbanService.getTask(taskId)
|
||||
return c.json(task)
|
||||
})
|
||||
.patch(
|
||||
'/teams/:teamId/kanban/tasks/:taskId',
|
||||
zValidator('json', updateKanbanTaskSchema),
|
||||
async (c) => {
|
||||
const { teamId, taskId } = c.req.param()
|
||||
const req = c.req.valid('json')
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Edit,
|
||||
type: ResourceType.KanbanTask,
|
||||
id: taskId,
|
||||
})
|
||||
|
||||
const existing = await kanbanService.getTask(taskId)
|
||||
const role = await resolveEffectiveRole(teamId, existing.projectId ?? undefined, user.id)
|
||||
const task = await kanbanService.updateTask(taskId, req, user.id, role)
|
||||
|
||||
const hasMeaningfulChanges =
|
||||
req.title !== undefined ||
|
||||
req.description !== undefined ||
|
||||
req.priority !== undefined ||
|
||||
req.startDate !== undefined ||
|
||||
req.dueDate !== undefined ||
|
||||
req.goalId !== undefined ||
|
||||
req.assigneeId !== undefined ||
|
||||
req.reporterId !== undefined ||
|
||||
req.targetFolderId !== undefined ||
|
||||
(req.status !== undefined && req.status !== existing.status)
|
||||
|
||||
if (hasMeaningfulChanges) {
|
||||
await auditLogService.logAction({
|
||||
action: AuditAction.kanban_task_update,
|
||||
teamId,
|
||||
userId: user.id,
|
||||
projectId: task.projectId ?? undefined,
|
||||
itemId: task.id,
|
||||
})
|
||||
}
|
||||
|
||||
if (req.status !== undefined && req.status !== existing.status) {
|
||||
notificationService.notifyKanbanTaskEvent({
|
||||
type: 'kanban_task_status_updated',
|
||||
teamId,
|
||||
projectId: task.projectId,
|
||||
creatorId: user.id,
|
||||
kanbanTaskId: task.id,
|
||||
stakeholderIds: [task.creator?.id, task.assignee?.id, task.reporter?.id],
|
||||
})
|
||||
}
|
||||
|
||||
if (
|
||||
req.assigneeId !== undefined &&
|
||||
req.assigneeId !== existing.assignee?.id &&
|
||||
req.assigneeId !== null &&
|
||||
req.assigneeId !== user.id
|
||||
) {
|
||||
notificationService.notifyKanbanTaskEvent({
|
||||
type: 'kanban_task_assigned',
|
||||
teamId,
|
||||
projectId: task.projectId,
|
||||
creatorId: user.id,
|
||||
kanbanTaskId: task.id,
|
||||
targetUserId: req.assigneeId,
|
||||
})
|
||||
}
|
||||
|
||||
const hasOtherDetailsChanged =
|
||||
req.title !== undefined ||
|
||||
req.description !== undefined ||
|
||||
req.priority !== undefined ||
|
||||
req.startDate !== undefined ||
|
||||
req.dueDate !== undefined ||
|
||||
req.goalId !== undefined ||
|
||||
req.reporterId !== undefined ||
|
||||
req.targetFolderId !== undefined
|
||||
|
||||
if (hasOtherDetailsChanged && req.status === undefined) {
|
||||
notificationService.notifyKanbanTaskEvent({
|
||||
type: 'kanban_task_updated',
|
||||
teamId,
|
||||
projectId: task.projectId,
|
||||
creatorId: user.id,
|
||||
kanbanTaskId: task.id,
|
||||
stakeholderIds: [task.creator?.id, task.assignee?.id, task.reporter?.id],
|
||||
})
|
||||
}
|
||||
|
||||
return c.json(task)
|
||||
},
|
||||
)
|
||||
.delete('/teams/:teamId/kanban/tasks/:taskId', async (c) => {
|
||||
const { teamId, taskId } = c.req.param()
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Edit,
|
||||
type: ResourceType.KanbanTask,
|
||||
id: taskId,
|
||||
})
|
||||
|
||||
const existing = await kanbanService.getTask(taskId)
|
||||
const role = await resolveEffectiveRole(teamId, existing.projectId ?? undefined, user.id)
|
||||
|
||||
notificationService.notifyKanbanTaskEvent({
|
||||
type: 'kanban_task_deleted',
|
||||
teamId,
|
||||
projectId: existing.projectId,
|
||||
creatorId: user.id,
|
||||
kanbanTaskId: taskId,
|
||||
stakeholderIds: [existing.creator?.id, existing.assignee?.id, existing.reporter?.id],
|
||||
})
|
||||
|
||||
await auditLogService.logAction({
|
||||
action: AuditAction.kanban_task_delete,
|
||||
teamId,
|
||||
userId: user.id,
|
||||
projectId: existing.projectId ?? undefined,
|
||||
itemId: taskId,
|
||||
})
|
||||
|
||||
await kanbanService.deleteTask(taskId, user.id, role)
|
||||
return c.json({ success: true })
|
||||
})
|
||||
.get('/teams/:teamId/kanban/tasks/:taskId/assets', async (c) => {
|
||||
const { taskId } = c.req.param()
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Read,
|
||||
type: ResourceType.KanbanTask,
|
||||
id: taskId,
|
||||
})
|
||||
|
||||
const assets = await kanbanService.listTaskAssets(taskId)
|
||||
return c.json(assets)
|
||||
})
|
||||
.post(
|
||||
'/teams/:teamId/kanban/tasks/:taskId/assets',
|
||||
zValidator('json', linkTaskAssetsSchema),
|
||||
async (c) => {
|
||||
const { teamId, taskId } = c.req.param()
|
||||
const req = c.req.valid('json')
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Edit,
|
||||
type: ResourceType.KanbanTask,
|
||||
id: taskId,
|
||||
})
|
||||
|
||||
await kanbanService.linkAssets(teamId, taskId, req.assetIds)
|
||||
return c.json({ success: true })
|
||||
},
|
||||
)
|
||||
.delete('/teams/:teamId/kanban/tasks/:taskId/assets/:assetId', async (c) => {
|
||||
const { teamId, taskId, assetId } = c.req.param()
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Edit,
|
||||
type: ResourceType.KanbanTask,
|
||||
id: taskId,
|
||||
})
|
||||
|
||||
await kanbanService.unlinkAsset(teamId, taskId, assetId)
|
||||
return c.json({ success: true })
|
||||
})
|
||||
.get('/teams/:teamId/kanban/assets/:assetId/tasks', async (c) => {
|
||||
const { teamId, assetId } = c.req.param()
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Read,
|
||||
type: ResourceType.Team,
|
||||
id: teamId,
|
||||
})
|
||||
|
||||
const tasks = await kanbanService.listTasksForAsset(teamId, assetId)
|
||||
return c.json({ data: tasks, total: tasks.length })
|
||||
})
|
||||
.post(
|
||||
'/teams/:teamId/kanban/assets/:assetId/tasks',
|
||||
zValidator('json', linkAssetToTaskSchema),
|
||||
async (c) => {
|
||||
const { teamId, assetId } = c.req.param()
|
||||
const req = c.req.valid('json')
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Edit,
|
||||
type: ResourceType.KanbanTask,
|
||||
id: req.taskId,
|
||||
})
|
||||
|
||||
await kanbanService.linkAsset(teamId, req.taskId, assetId)
|
||||
return c.json({ success: true })
|
||||
},
|
||||
)
|
||||
.delete('/teams/:teamId/kanban/assets/:assetId/tasks/:taskId', async (c) => {
|
||||
const { teamId, assetId, taskId } = c.req.param()
|
||||
const user = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Edit,
|
||||
type: ResourceType.KanbanTask,
|
||||
id: taskId,
|
||||
})
|
||||
|
||||
await kanbanService.unlinkAsset(teamId, taskId, assetId)
|
||||
return c.json({ success: true })
|
||||
})
|
||||
|
||||
export default route
|
||||
@@ -31,6 +31,7 @@ describe('authMiddleware', () => {
|
||||
.get('/test', (c) => c.text('ok'))
|
||||
.post('/test', (c) => c.text('ok'))
|
||||
.post('/test/search', (c) => c.text('ok'))
|
||||
.post('/test/recents/view', (c) => c.text('ok'))
|
||||
|
||||
beforeEach(() => {
|
||||
vi.resetAllMocks()
|
||||
@@ -81,6 +82,17 @@ describe('authMiddleware', () => {
|
||||
expect(await res.json()).toEqual({ error: 'System is in read-only mode' })
|
||||
})
|
||||
|
||||
it('allows POST /recents/view for reviewer', async () => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
vi.mocked(auth.api.getSession).mockResolvedValue({ user: { id: 'user1' } } as any)
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
vi.mocked(userService.getUserById).mockResolvedValue({ id: 'user1' } as any)
|
||||
vi.mocked(teamService.hasWritableRoleInAnyTeam).mockResolvedValue(false)
|
||||
|
||||
const res = await app.request('/test/recents/view', { method: 'POST' })
|
||||
expect(res.status).toBe(200)
|
||||
})
|
||||
|
||||
it('allows POST /search for reviewer', async () => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
vi.mocked(auth.api.getSession).mockResolvedValue({ user: { id: 'user1' } } as any)
|
||||
|
||||
@@ -36,7 +36,9 @@ export const authMiddleware = createMiddleware<{
|
||||
if (process.env.SHUMAI_DEMO_MODE === '1') {
|
||||
const method = c.req.method.toUpperCase()
|
||||
const path = c.req.path
|
||||
if (['POST', 'PUT', 'PATCH', 'DELETE'].includes(method) && !path.endsWith('/search')) {
|
||||
const isAllowedDemoWrite =
|
||||
method === 'POST' && (path.endsWith('/search') || path.endsWith('/recents/view'))
|
||||
if (['POST', 'PUT', 'PATCH', 'DELETE'].includes(method) && !isAllowedDemoWrite) {
|
||||
const hasWritable = await teamService.hasWritableRoleInAnyTeam(user.id)
|
||||
|
||||
if (!hasWritable) {
|
||||
|
||||
@@ -150,6 +150,8 @@ describe('notification api', () => {
|
||||
yourUploads: true,
|
||||
otherUploads: false,
|
||||
statusUpdates: true,
|
||||
kanbanTasks: true,
|
||||
kanbanComments: true,
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
@@ -35,6 +35,7 @@ vi.mock('@shumai/core/src/project/project', () => ({
|
||||
},
|
||||
}))
|
||||
vi.mock('@shumai/core/src/asset/asset')
|
||||
|
||||
vi.mock('@shumai/core/src/auditLog/auditLog', () => ({
|
||||
auditLogService: {
|
||||
logAction: vi.fn().mockResolvedValue({}),
|
||||
@@ -410,4 +411,46 @@ describe('project api', () => {
|
||||
})
|
||||
expect(projectService.getUserProjects).toHaveBeenCalledWith('user1', 10)
|
||||
})
|
||||
|
||||
it('GET /projects/:projectId/recents', async () => {
|
||||
vi.mocked(assetService.listRecents).mockResolvedValue({
|
||||
data: [{ id: 'file1', name: 'video.mp4', type: 'file' }] as any, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
pageInfo: { total: 1 },
|
||||
})
|
||||
|
||||
const res = await app.request('/projects/p1/recents?first=20')
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.data).toHaveLength(1)
|
||||
expect(json.data[0].id).toBe('file1')
|
||||
expect(authzService.hasPermission).toHaveBeenCalledWith({
|
||||
user: expect.anything(),
|
||||
permission: Permission.Read,
|
||||
type: ResourceType.Project,
|
||||
id: 'p1',
|
||||
})
|
||||
expect(assetService.listRecents).toHaveBeenCalledWith('user1', 'p1', { first: 20 })
|
||||
})
|
||||
|
||||
it('POST /projects/:projectId/recents/view', async () => {
|
||||
vi.mocked(assetService.recordRecentView).mockResolvedValue(undefined)
|
||||
|
||||
const res = await app.request('/projects/p1/recents/view', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ assetId: 'file1' }),
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const json = await res.json()
|
||||
expect(json.success).toBe(true)
|
||||
expect(authzService.hasPermission).toHaveBeenCalledWith({
|
||||
user: expect.anything(),
|
||||
permission: Permission.Read,
|
||||
type: ResourceType.Project,
|
||||
id: 'p1',
|
||||
})
|
||||
expect(assetService.recordRecentView).toHaveBeenCalledWith('user1', 'p1', 'file1')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -11,6 +11,8 @@ import {
|
||||
recentlyDeletedRequestSchema,
|
||||
updateProjectMemberRoleRequestSchema,
|
||||
addProjectMemberRequestSchema,
|
||||
listRecentsRequestSchema,
|
||||
recordRecentViewRequestSchema,
|
||||
} from '@shumai/dtos'
|
||||
import { listMembersQuerySchema, paginationParamsSchema, AuditAction } from '@shumai/dtos'
|
||||
import type { Prisma } from '@shumai/db'
|
||||
@@ -118,6 +120,40 @@ const route = new Hono<{ Variables: { user: User } }>()
|
||||
return c.json(resp)
|
||||
},
|
||||
)
|
||||
.get('/projects/:projectId/recents', zValidator('query', listRecentsRequestSchema), async (c) => {
|
||||
const projectId = c.req.param('projectId')
|
||||
const user = c.get('user')
|
||||
const req = c.req.valid('query')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Read,
|
||||
type: ResourceType.Project,
|
||||
id: projectId,
|
||||
})
|
||||
|
||||
const resp = await assetService.listRecents(user.id, projectId, req)
|
||||
return c.json(resp)
|
||||
})
|
||||
.post(
|
||||
'/projects/:projectId/recents/view',
|
||||
zValidator('json', recordRecentViewRequestSchema),
|
||||
async (c) => {
|
||||
const projectId = c.req.param('projectId')
|
||||
const user = c.get('user')
|
||||
const req = c.req.valid('json')
|
||||
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Read,
|
||||
type: ResourceType.Project,
|
||||
id: projectId,
|
||||
})
|
||||
|
||||
await assetService.recordRecentView(user.id, projectId, req.assetId)
|
||||
return c.json({ success: true })
|
||||
},
|
||||
)
|
||||
.post('/projects/:projectId/empty-trash', async (c) => {
|
||||
const projectId = c.req.param('projectId')
|
||||
const user = c.get('user')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/core",
|
||||
"version": "0.3.9",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
|
||||
@@ -1998,7 +1998,7 @@ describe('AssetService', () => {
|
||||
expect(await prisma.asset.findUnique({ where: { id: folderA.id } })).toBeNull()
|
||||
const remainingChildren = await prisma.asset.count({ where: { parentId: folderA.id } })
|
||||
expect(remainingChildren).toBe(0)
|
||||
})
|
||||
}, 20000)
|
||||
|
||||
it('should delete the entire directory prefix for assets with complex keys (e.g., files/ULID/raw)', async () => {
|
||||
const { project } = await setupBasicAssets()
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
UpdateAssetNameRequest,
|
||||
UpdateAssetOrderRequest,
|
||||
AssetUserInfo,
|
||||
ListRecentsRequest,
|
||||
} from '@shumai/dtos'
|
||||
import { type Asset, AssetStatus, AssetType, Prisma, type StorageKey } from '@shumai/db'
|
||||
import { HTTPException } from 'hono/http-exception'
|
||||
@@ -29,25 +30,27 @@ import { getAvatarUrl } from '@shumai/core/src/user/avatar'
|
||||
import { getAgentRequiredLevel, getRoleLevel } from '@shumai/core/src/agent/permissions'
|
||||
import { resolveEffectiveRole } from '@shumai/core/src/authz/authz'
|
||||
|
||||
type AssetWithIncludes = Prisma.AssetGetPayload<{
|
||||
include: {
|
||||
creator: true
|
||||
metadataValues: true
|
||||
storageKey: true
|
||||
target: {
|
||||
include: {
|
||||
creator: true
|
||||
metadataValues: true
|
||||
storageKey: true
|
||||
children: {
|
||||
include: { creator: true; metadataValues: true; storageKey: true }
|
||||
}
|
||||
}
|
||||
}
|
||||
children: {
|
||||
include: { creator: true; metadataValues: true; storageKey: true }
|
||||
}
|
||||
}
|
||||
export const assetInclude = {
|
||||
creator: true,
|
||||
metadataValues: true,
|
||||
storageKey: true,
|
||||
target: {
|
||||
include: {
|
||||
creator: true,
|
||||
metadataValues: true,
|
||||
storageKey: true,
|
||||
children: {
|
||||
include: { creator: true, metadataValues: true, storageKey: true },
|
||||
},
|
||||
},
|
||||
},
|
||||
children: {
|
||||
include: { creator: true, metadataValues: true, storageKey: true },
|
||||
},
|
||||
} as const
|
||||
|
||||
export type AssetWithIncludes = Prisma.AssetGetPayload<{
|
||||
include: typeof assetInclude
|
||||
}>
|
||||
|
||||
type CommentWithIncludes = Prisma.AssetCommentGetPayload<{
|
||||
@@ -1623,7 +1626,7 @@ export class AssetService {
|
||||
return { data: infos, pageInfo }
|
||||
}
|
||||
|
||||
private async toAssetInfos(assets: AssetWithIncludes[]): Promise<AssetInfo[]> {
|
||||
async toAssetInfos(assets: AssetWithIncludes[]): Promise<AssetInfo[]> {
|
||||
const stackIds = new Set<string>()
|
||||
|
||||
for (const a of assets) {
|
||||
@@ -2131,7 +2134,7 @@ export class AssetService {
|
||||
)
|
||||
}
|
||||
|
||||
private async toPreviewInfo(asset: Asset | AssetWithIncludes): Promise<PreviewInfo | null> {
|
||||
async toPreviewInfo(asset: Asset | AssetWithIncludes): Promise<PreviewInfo | null> {
|
||||
if (!asset.media) return null
|
||||
|
||||
const proxyType = (asset.media?.proxyType || null) as 'image' | 'video' | 'audio' | 'pdf' | null
|
||||
@@ -2360,6 +2363,141 @@ export class AssetService {
|
||||
|
||||
return results
|
||||
}
|
||||
|
||||
/**
|
||||
* Record a file view by user in project.
|
||||
* If the asset is a child file in a version stack, resolves to the version stack.
|
||||
* Enforces a maximum cap of 100 recent file items per (userId, projectId).
|
||||
*/
|
||||
async recordRecentView(userId: string, projectId: string, assetId: string): Promise<void> {
|
||||
const asset = await this.prismaClient.asset.findFirst({
|
||||
where: { id: assetId, projectId },
|
||||
select: {
|
||||
id: true,
|
||||
type: true,
|
||||
parentId: true,
|
||||
isDeleted: true,
|
||||
target: { select: { type: true, projectId: true, isDeleted: true } },
|
||||
},
|
||||
})
|
||||
|
||||
if (!asset || asset.isDeleted) return
|
||||
|
||||
const isFileAsset =
|
||||
asset.type === AssetType.file ||
|
||||
asset.type === AssetType.version_stack ||
|
||||
(asset.type === AssetType.symlink &&
|
||||
asset.target !== null &&
|
||||
(asset.target.type === AssetType.file || asset.target.type === AssetType.version_stack) &&
|
||||
asset.target.projectId === projectId &&
|
||||
!asset.target.isDeleted)
|
||||
if (!isFileAsset) return
|
||||
|
||||
let targetAssetId = asset.id
|
||||
|
||||
// If it's a file inside a version stack, record the version stack instead
|
||||
if (asset.type === AssetType.file && asset.parentId) {
|
||||
const parent = await this.prismaClient.asset.findFirst({
|
||||
where: { id: asset.parentId, projectId, type: AssetType.version_stack, isDeleted: false },
|
||||
select: { id: true },
|
||||
})
|
||||
if (parent) {
|
||||
targetAssetId = parent.id
|
||||
}
|
||||
}
|
||||
|
||||
const now = new Date()
|
||||
|
||||
// Upsert into recent_file_items
|
||||
await this.prismaClient.recentFileItem.upsert({
|
||||
where: {
|
||||
userIdProjectIdAssetId: {
|
||||
userId,
|
||||
projectId,
|
||||
assetId: targetAssetId,
|
||||
},
|
||||
},
|
||||
update: {
|
||||
viewedAt: now,
|
||||
},
|
||||
create: {
|
||||
userId,
|
||||
projectId,
|
||||
assetId: targetAssetId,
|
||||
viewedAt: now,
|
||||
},
|
||||
})
|
||||
|
||||
// Prune if more than 100 items for this (userId, projectId)
|
||||
const count = await this.prismaClient.recentFileItem.count({
|
||||
where: { userId, projectId },
|
||||
})
|
||||
|
||||
if (count > 100) {
|
||||
const itemsToKeep = await this.prismaClient.recentFileItem.findMany({
|
||||
where: { userId, projectId },
|
||||
orderBy: [{ viewedAt: 'desc' }, { id: 'desc' }],
|
||||
take: 100,
|
||||
select: { id: true },
|
||||
})
|
||||
const keepIds = itemsToKeep.map((item) => item.id)
|
||||
|
||||
await this.prismaClient.recentFileItem.deleteMany({
|
||||
where: {
|
||||
userId,
|
||||
projectId,
|
||||
id: { notIn: keepIds },
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* List recent files for user in project, paginated up to 100 total items.
|
||||
*/
|
||||
async listRecents(
|
||||
userId: string,
|
||||
projectId: string,
|
||||
req: ListRecentsRequest,
|
||||
): Promise<PaginatedData<AssetInfo[]>> {
|
||||
const where = {
|
||||
userId,
|
||||
projectId,
|
||||
asset: {
|
||||
isDeleted: false,
|
||||
projectId,
|
||||
},
|
||||
}
|
||||
|
||||
return paginateQuery(
|
||||
async (skip, take) => {
|
||||
if (skip >= 100) return []
|
||||
const effectiveTake = Math.min(take, 100 - skip)
|
||||
if (effectiveTake <= 0) return []
|
||||
|
||||
const recents = await this.prismaClient.recentFileItem.findMany({
|
||||
where,
|
||||
orderBy: [{ viewedAt: 'desc' }, { id: 'desc' }],
|
||||
skip,
|
||||
take: effectiveTake,
|
||||
include: {
|
||||
asset: {
|
||||
include: assetInclude,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
const assets = recents.map((r) => r.asset).filter((a): a is AssetWithIncludes => !!a)
|
||||
|
||||
return await this.toAssetInfos(assets)
|
||||
},
|
||||
async () => {
|
||||
const total = await this.prismaClient.recentFileItem.count({ where })
|
||||
return Math.min(total, 100)
|
||||
},
|
||||
req,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export const assetService = new AssetService()
|
||||
|
||||
@@ -0,0 +1,278 @@
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import { prisma, AssetType, AssetStatus } from '@shumai/db'
|
||||
import { setupTestDbHooks } from '@shumai/db/test'
|
||||
import { assetService } from './asset'
|
||||
import { projectService } from '../project/project'
|
||||
|
||||
describe('AssetService - Recently Viewed', () => {
|
||||
setupTestDbHooks()
|
||||
|
||||
async function setupProject() {
|
||||
const user1 = await prisma.user.create({
|
||||
data: { name: 'User 1', email: 'user1@example.com' },
|
||||
})
|
||||
const user2 = await prisma.user.create({
|
||||
data: { name: 'User 2', email: 'user2@example.com' },
|
||||
})
|
||||
const team = await prisma.team.create({
|
||||
data: {
|
||||
name: 'Test Team',
|
||||
settings: {
|
||||
transcode: { videoStrategy: 'best_match' },
|
||||
},
|
||||
sandbox: { create: {} },
|
||||
},
|
||||
})
|
||||
await prisma.teamMember.create({
|
||||
data: {
|
||||
teamId: team.id,
|
||||
userId: user1.id,
|
||||
role: 'owner',
|
||||
scope: 'team',
|
||||
},
|
||||
})
|
||||
await prisma.teamMember.create({
|
||||
data: {
|
||||
teamId: team.id,
|
||||
userId: user2.id,
|
||||
role: 'editor',
|
||||
scope: 'team',
|
||||
},
|
||||
})
|
||||
|
||||
const project = await projectService.createProject(user1, {
|
||||
name: 'Test Project',
|
||||
teamId: team.id,
|
||||
})
|
||||
|
||||
return { user1, user2, team, project }
|
||||
}
|
||||
|
||||
it('records recent file view and returns it in descending order', async () => {
|
||||
const { user1, project } = await setupProject()
|
||||
|
||||
const file1 = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'file1.mp4',
|
||||
type: AssetType.file,
|
||||
status: 'processed',
|
||||
projectId: project.id,
|
||||
parentId: project.rootFolder!,
|
||||
},
|
||||
})
|
||||
const file2 = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'file2.mp4',
|
||||
type: AssetType.file,
|
||||
status: 'processed',
|
||||
projectId: project.id,
|
||||
parentId: project.rootFolder!,
|
||||
},
|
||||
})
|
||||
|
||||
await assetService.recordRecentView(user1.id, project.id, file1.id)
|
||||
await assetService.recordRecentView(user1.id, project.id, file2.id)
|
||||
|
||||
const list = await assetService.listRecents(user1.id, project.id, {})
|
||||
expect(list.data.length).toBe(2)
|
||||
expect(list.data[0].id).toBe(file2.id)
|
||||
expect(list.data[1].id).toBe(file1.id)
|
||||
expect(list.pageInfo.total).toBe(2)
|
||||
})
|
||||
|
||||
it('updates viewedAt when viewing the same file again', async () => {
|
||||
const { user1, project } = await setupProject()
|
||||
|
||||
const file1 = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'file1.mp4',
|
||||
type: AssetType.file,
|
||||
status: 'processed',
|
||||
projectId: project.id,
|
||||
parentId: project.rootFolder!,
|
||||
},
|
||||
})
|
||||
const file2 = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'file2.mp4',
|
||||
type: AssetType.file,
|
||||
status: 'processed',
|
||||
projectId: project.id,
|
||||
parentId: project.rootFolder!,
|
||||
},
|
||||
})
|
||||
|
||||
await assetService.recordRecentView(user1.id, project.id, file1.id)
|
||||
await assetService.recordRecentView(user1.id, project.id, file2.id)
|
||||
// View file1 again
|
||||
await assetService.recordRecentView(user1.id, project.id, file1.id)
|
||||
|
||||
const list = await assetService.listRecents(user1.id, project.id, {})
|
||||
expect(list.data.length).toBe(2)
|
||||
expect(list.data[0].id).toBe(file1.id)
|
||||
expect(list.data[1].id).toBe(file2.id)
|
||||
})
|
||||
|
||||
it('records version stack when viewing a child version file', async () => {
|
||||
const { user1, project } = await setupProject()
|
||||
|
||||
const stack = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'version_stack',
|
||||
type: AssetType.version_stack,
|
||||
status: 'processed',
|
||||
projectId: project.id,
|
||||
parentId: project.rootFolder!,
|
||||
},
|
||||
})
|
||||
|
||||
const version1 = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'v1.mp4',
|
||||
type: AssetType.file,
|
||||
status: 'processed',
|
||||
projectId: project.id,
|
||||
parentId: stack.id,
|
||||
},
|
||||
})
|
||||
|
||||
await assetService.recordRecentView(user1.id, project.id, version1.id)
|
||||
|
||||
const list = await assetService.listRecents(user1.id, project.id, {})
|
||||
expect(list.data.length).toBe(1)
|
||||
expect(list.data[0].id).toBe(stack.id)
|
||||
expect(list.data[0].type).toBe(AssetType.version_stack)
|
||||
})
|
||||
|
||||
it('isolates recents per user', async () => {
|
||||
const { user1, user2, project } = await setupProject()
|
||||
|
||||
const file1 = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'file1.mp4',
|
||||
type: AssetType.file,
|
||||
status: 'processed',
|
||||
projectId: project.id,
|
||||
parentId: project.rootFolder!,
|
||||
},
|
||||
})
|
||||
|
||||
await assetService.recordRecentView(user1.id, project.id, file1.id)
|
||||
|
||||
const user1List = await assetService.listRecents(user1.id, project.id, {})
|
||||
const user2List = await assetService.listRecents(user2.id, project.id, {})
|
||||
|
||||
expect(user1List.data.length).toBe(1)
|
||||
expect(user2List.data.length).toBe(0)
|
||||
})
|
||||
|
||||
it('does not record assets from another project', async () => {
|
||||
const { user1, team, project } = await setupProject()
|
||||
const otherProject = await projectService.createProject(user1, {
|
||||
name: 'Other Project',
|
||||
teamId: team.id,
|
||||
})
|
||||
const foreignFile = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'foreign-file.mp4',
|
||||
type: AssetType.file,
|
||||
status: AssetStatus.processed,
|
||||
projectId: otherProject.id,
|
||||
parentId: otherProject.rootFolder!,
|
||||
},
|
||||
})
|
||||
|
||||
await assetService.recordRecentView(user1.id, project.id, foreignFile.id)
|
||||
|
||||
const list = await assetService.listRecents(user1.id, project.id, {})
|
||||
expect(list.data).toHaveLength(0)
|
||||
})
|
||||
|
||||
it('does not record non-file assets', async () => {
|
||||
const { user1, project } = await setupProject()
|
||||
const folder = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'folder',
|
||||
type: AssetType.folder,
|
||||
status: AssetStatus.processed,
|
||||
projectId: project.id,
|
||||
parentId: project.rootFolder!,
|
||||
},
|
||||
})
|
||||
|
||||
await assetService.recordRecentView(user1.id, project.id, folder.id)
|
||||
|
||||
const list = await assetService.listRecents(user1.id, project.id, {})
|
||||
expect(list.data).toHaveLength(0)
|
||||
})
|
||||
|
||||
it('does not return soft-deleted files in recents', async () => {
|
||||
const { user1, project } = await setupProject()
|
||||
|
||||
const file1 = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'file1.mp4',
|
||||
type: AssetType.file,
|
||||
status: 'processed',
|
||||
projectId: project.id,
|
||||
parentId: project.rootFolder!,
|
||||
},
|
||||
})
|
||||
|
||||
await assetService.recordRecentView(user1.id, project.id, file1.id)
|
||||
|
||||
// Soft delete file1
|
||||
await prisma.asset.update({
|
||||
where: { id: file1.id },
|
||||
data: { isDeleted: true, status: 'trashed' },
|
||||
})
|
||||
|
||||
const list = await assetService.listRecents(user1.id, project.id, {})
|
||||
expect(list.data.length).toBe(0)
|
||||
})
|
||||
|
||||
it('caps recents at 100 items per user/project', async () => {
|
||||
const { user1, project } = await setupProject()
|
||||
|
||||
// Batch create 105 assets
|
||||
const assetsData = Array.from({ length: 105 }, (_, i) => ({
|
||||
name: `file_${i}.mp4`,
|
||||
type: AssetType.file,
|
||||
status: AssetStatus.processed,
|
||||
projectId: project.id,
|
||||
parentId: project.rootFolder!,
|
||||
}))
|
||||
await prisma.asset.createMany({ data: assetsData })
|
||||
const allAssets = await prisma.asset.findMany({
|
||||
where: { projectId: project.id, parentId: project.rootFolder! },
|
||||
orderBy: { id: 'asc' },
|
||||
})
|
||||
|
||||
// Seed 100 items in recentFileItem
|
||||
const baseDate = new Date('2026-01-01T00:00:00Z')
|
||||
await prisma.recentFileItem.createMany({
|
||||
data: allAssets.slice(0, 100).map((a, i) => ({
|
||||
userId: user1.id,
|
||||
projectId: project.id,
|
||||
assetId: a.id,
|
||||
viewedAt: new Date(baseDate.getTime() + i * 1000),
|
||||
})),
|
||||
})
|
||||
|
||||
// Now record view for the 101st asset to trigger pruning
|
||||
const newAsset = allAssets[100]
|
||||
await assetService.recordRecentView(user1.id, project.id, newAsset.id)
|
||||
|
||||
const count = await prisma.recentFileItem.count({
|
||||
where: { userId: user1.id, projectId: project.id },
|
||||
})
|
||||
expect(count).toBe(100)
|
||||
|
||||
const list = await assetService.listRecents(user1.id, project.id, { first: 100 })
|
||||
expect(list.data.length).toBe(100)
|
||||
// The most recently viewed file should be newAsset
|
||||
expect(list.data[0].id).toBe(newAsset.id)
|
||||
// The oldest file (allAssets[0]) should have been pruned
|
||||
expect(list.data.some((d) => d.id === allAssets[0].id)).toBe(false)
|
||||
}, 15000)
|
||||
})
|
||||
@@ -84,4 +84,36 @@ describe('AuditLogService', () => {
|
||||
|
||||
expect(result).toBeNull()
|
||||
})
|
||||
|
||||
it('records kanban actions accurately', async () => {
|
||||
const user = await prisma.user.create({
|
||||
data: { name: 'Kanban User', email: 'kanban_user@example.com', password: 'password' },
|
||||
})
|
||||
const team = await prisma.team.create({
|
||||
data: { name: 'Kanban Audit Team' },
|
||||
})
|
||||
|
||||
await auditLogService.logAction({
|
||||
action: AuditAction.kanban_task_create,
|
||||
teamId: team.id,
|
||||
userId: user.id,
|
||||
itemId: 'task-123',
|
||||
})
|
||||
|
||||
await auditLogService.logAction({
|
||||
action: AuditAction.kanban_goal_create,
|
||||
teamId: team.id,
|
||||
userId: user.id,
|
||||
itemId: 'goal-123',
|
||||
})
|
||||
|
||||
const result = await auditLogService.listAuditLogs({
|
||||
teamId: team.id,
|
||||
actions: [AuditAction.kanban_task_create, AuditAction.kanban_goal_create],
|
||||
})
|
||||
|
||||
expect(result.total).toBe(2)
|
||||
expect(result.nodes.map((n) => n.action)).toContain(AuditAction.kanban_task_create)
|
||||
expect(result.nodes.map((n) => n.action)).toContain(AuditAction.kanban_goal_create)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, expect, it, vi, beforeEach, afterEach } from 'vitest'
|
||||
import { prisma } from '@shumai/db'
|
||||
import { setupTestDbHooks } from '@shumai/db/test'
|
||||
import { auth } from './auth'
|
||||
import { auth, authService } from './auth'
|
||||
import { userMetadataService } from '../user-metadata/user-metadata'
|
||||
import { teamService } from '@shumai/core/src/team/team'
|
||||
|
||||
@@ -93,3 +93,214 @@ describe('Auth Signup Locale Hook', () => {
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
describe('AuthService Password Reset', () => {
|
||||
setupTestDbHooks()
|
||||
|
||||
beforeEach(() => {
|
||||
vi.spyOn(teamService, 'getSignupInfo').mockResolvedValue({
|
||||
initialized: false,
|
||||
demoMode: false,
|
||||
userCount: 1,
|
||||
})
|
||||
})
|
||||
|
||||
it('should throw error when generating reset link for non-existent user', async () => {
|
||||
await expect(authService.generatePasswordResetLink('nonexistent@example.com')).rejects.toThrow(
|
||||
'User with email "nonexistent@example.com" not found',
|
||||
)
|
||||
})
|
||||
|
||||
it('should generate a valid reset link and invalidate previous pending tokens', async () => {
|
||||
const email = `reset-user-${Date.now()}@example.com`
|
||||
const signUpRes = await auth.api.signUpEmail({
|
||||
headers: new Headers(),
|
||||
body: {
|
||||
email,
|
||||
password: 'initialPassword123',
|
||||
name: 'Reset User',
|
||||
},
|
||||
})
|
||||
const userId = signUpRes.user.id
|
||||
|
||||
const firstLink = await authService.generatePasswordResetLink(email)
|
||||
expect(firstLink).toContain('/reset-password?token=')
|
||||
|
||||
const firstToken = new URL(firstLink).searchParams.get('token')!
|
||||
expect(firstToken).toBeTruthy()
|
||||
|
||||
// Check that verification record exists with identifier: reset-password:<token> and value: userId
|
||||
const firstVerification = await prisma.verification.findFirst({
|
||||
where: { identifier: `reset-password:${firstToken}` },
|
||||
})
|
||||
expect(firstVerification).not.toBeNull()
|
||||
expect(firstVerification?.value).toBe(userId)
|
||||
|
||||
// Generating a second link should produce a new token and invalidate the first token
|
||||
const secondLink = await authService.generatePasswordResetLink(email)
|
||||
const secondToken = new URL(secondLink).searchParams.get('token')!
|
||||
expect(secondToken).not.toBe(firstToken)
|
||||
|
||||
const newVerification = await prisma.verification.findFirst({
|
||||
where: { identifier: `reset-password:${secondToken}` },
|
||||
})
|
||||
expect(newVerification).not.toBeNull()
|
||||
expect(newVerification?.value).toBe(userId)
|
||||
|
||||
// The first token's verification record must have been deleted
|
||||
const oldVerification = await prisma.verification.findFirst({
|
||||
where: { identifier: `reset-password:${firstToken}` },
|
||||
})
|
||||
expect(oldVerification).toBeNull()
|
||||
|
||||
// First token must fail to reset password
|
||||
await expect(
|
||||
authService.resetPassword(firstToken, 'newPasswordFromFirstToken'),
|
||||
).rejects.toThrow()
|
||||
|
||||
// Second token must succeed
|
||||
const resetRes = await authService.resetPassword(secondToken, 'newPasswordFromSecondToken')
|
||||
expect(resetRes.success).toBe(true)
|
||||
})
|
||||
|
||||
it('should reset password with valid token and revoke active sessions', async () => {
|
||||
const email = `reset-valid-${Date.now()}@example.com`
|
||||
const signUpRes = await auth.api.signUpEmail({
|
||||
headers: new Headers(),
|
||||
body: {
|
||||
email,
|
||||
password: 'oldPassword123',
|
||||
name: 'Valid Reset User',
|
||||
},
|
||||
})
|
||||
|
||||
const userId = signUpRes.user.id
|
||||
|
||||
// Create an active session
|
||||
await prisma.session.create({
|
||||
data: {
|
||||
userId,
|
||||
token: `session-${Date.now()}`,
|
||||
expiresAt: new Date(Date.now() + 86400 * 1000),
|
||||
},
|
||||
})
|
||||
|
||||
const activeSessionsBefore = await prisma.session.findMany({
|
||||
where: { userId },
|
||||
})
|
||||
expect(activeSessionsBefore.length).toBeGreaterThan(0)
|
||||
|
||||
// Generate reset link
|
||||
const link = await authService.generatePasswordResetLink(email)
|
||||
const token = new URL(link).searchParams.get('token')!
|
||||
|
||||
// Reset password
|
||||
const result = await authService.resetPassword(token, 'newPassword456')
|
||||
expect(result.success).toBe(true)
|
||||
|
||||
// Verify active sessions are revoked
|
||||
const activeSessionsAfter = await prisma.session.findMany({
|
||||
where: { userId },
|
||||
})
|
||||
expect(activeSessionsAfter.length).toBe(0)
|
||||
|
||||
// Verify token was deleted
|
||||
const usedToken = await prisma.verification.findFirst({
|
||||
where: { identifier: `reset-password:${token}` },
|
||||
})
|
||||
expect(usedToken).toBeNull()
|
||||
|
||||
// Verify user password was updated to new password
|
||||
const account = await prisma.account.findFirst({
|
||||
where: { userId, providerId: 'credential' },
|
||||
})
|
||||
expect(account).toBeDefined()
|
||||
expect(account?.password).toBeTruthy()
|
||||
|
||||
const { verifyPassword } = await import('better-auth/crypto')
|
||||
const isNewValid = await verifyPassword({
|
||||
hash: account!.password!,
|
||||
password: 'newPassword456',
|
||||
})
|
||||
expect(isNewValid).toBe(true)
|
||||
|
||||
const isOldValid = await verifyPassword({
|
||||
hash: account!.password!,
|
||||
password: 'oldPassword123',
|
||||
})
|
||||
expect(isOldValid).toBe(false)
|
||||
})
|
||||
|
||||
it('should reject expired or invalid token', async () => {
|
||||
const email = `reset-expired-${Date.now()}@example.com`
|
||||
const user = await prisma.user.create({
|
||||
data: {
|
||||
email,
|
||||
name: 'Expired User',
|
||||
},
|
||||
})
|
||||
|
||||
// Create expired token fixture with identifier: reset-password:<token> and value: userId
|
||||
const token = 'expired-token-123'
|
||||
await prisma.verification.create({
|
||||
data: {
|
||||
identifier: `reset-password:${token}`,
|
||||
value: user.id,
|
||||
expiresAt: new Date(Date.now() - 1000), // Expired 1 second ago
|
||||
},
|
||||
})
|
||||
|
||||
await expect(authService.resetPassword(token, 'newPassword123')).rejects.toThrow()
|
||||
|
||||
// Non-existent token
|
||||
await expect(
|
||||
authService.resetPassword('non-existent-token', 'newPassword123'),
|
||||
).rejects.toThrow()
|
||||
})
|
||||
|
||||
it('should handle concurrent link generation for different users without crosstalk', async () => {
|
||||
const emailA = `concurrent-a-${Date.now()}@example.com`
|
||||
const emailB = `concurrent-b-${Date.now()}@example.com`
|
||||
|
||||
const [resA, resB] = await Promise.all([
|
||||
auth.api.signUpEmail({
|
||||
headers: new Headers(),
|
||||
body: { email: emailA, password: 'passwordA123', name: 'User A' },
|
||||
}),
|
||||
auth.api.signUpEmail({
|
||||
headers: new Headers(),
|
||||
body: { email: emailB, password: 'passwordB123', name: 'User B' },
|
||||
}),
|
||||
])
|
||||
|
||||
const [linkA, linkB] = await Promise.all([
|
||||
authService.generatePasswordResetLink(emailA),
|
||||
authService.generatePasswordResetLink(emailB),
|
||||
])
|
||||
|
||||
const tokenA = new URL(linkA).searchParams.get('token')!
|
||||
const tokenB = new URL(linkB).searchParams.get('token')!
|
||||
expect(tokenA).toBeTruthy()
|
||||
expect(tokenB).toBeTruthy()
|
||||
expect(tokenA).not.toBe(tokenB)
|
||||
|
||||
const verificationA = await prisma.verification.findFirst({
|
||||
where: { identifier: `reset-password:${tokenA}` },
|
||||
})
|
||||
const verificationB = await prisma.verification.findFirst({
|
||||
where: { identifier: `reset-password:${tokenB}` },
|
||||
})
|
||||
|
||||
expect(verificationA?.value).toBe(resA.user.id)
|
||||
expect(verificationB?.value).toBe(resB.user.id)
|
||||
|
||||
// Reset both passwords concurrently
|
||||
const [resetResA, resetResB] = await Promise.all([
|
||||
authService.resetPassword(tokenA, 'newPasswordA123'),
|
||||
authService.resetPassword(tokenB, 'newPasswordB123'),
|
||||
])
|
||||
|
||||
expect(resetResA.success).toBe(true)
|
||||
expect(resetResB.success).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { AsyncLocalStorage } from 'node:async_hooks'
|
||||
import { betterAuth } from 'better-auth'
|
||||
import { prismaAdapter } from 'better-auth/adapters/prisma'
|
||||
import { prisma } from '@shumai/db'
|
||||
@@ -6,6 +7,13 @@ import { inviteService } from '@shumai/core/src/invite/invite'
|
||||
import { createAuthMiddleware } from 'better-auth/api'
|
||||
import { userMetadataService } from '@shumai/core/src/user-metadata/user-metadata'
|
||||
|
||||
interface GeneratedResetLink {
|
||||
url: string
|
||||
token: string
|
||||
}
|
||||
|
||||
const resetLinkStorage = new AsyncLocalStorage<GeneratedResetLink>()
|
||||
|
||||
export const auth = betterAuth({
|
||||
database: prismaAdapter(prisma, {
|
||||
provider: 'postgresql',
|
||||
@@ -13,6 +21,15 @@ export const auth = betterAuth({
|
||||
emailAndPassword: {
|
||||
enabled: true,
|
||||
minPasswordLength: 3,
|
||||
revokeSessionsOnPasswordReset: true,
|
||||
resetPasswordTokenExpiresIn: 3600,
|
||||
sendResetPassword: async ({ url, token }) => {
|
||||
const store = resetLinkStorage.getStore()
|
||||
if (store) {
|
||||
store.url = url
|
||||
store.token = token
|
||||
}
|
||||
},
|
||||
},
|
||||
secret: process.env.BETTER_AUTH_SECRET,
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
@@ -122,3 +139,82 @@ export const auth = betterAuth({
|
||||
}),
|
||||
},
|
||||
})
|
||||
|
||||
export class AuthService {
|
||||
constructor(private readonly prismaClient: typeof prisma = prisma) {}
|
||||
|
||||
async generatePasswordResetLink(email: string): Promise<string> {
|
||||
const user = await this.prismaClient.user.findUnique({
|
||||
where: { email },
|
||||
})
|
||||
|
||||
if (!user) {
|
||||
throw new Error(`User with email "${email}" not found`)
|
||||
}
|
||||
|
||||
const context: GeneratedResetLink = { url: '', token: '' }
|
||||
await resetLinkStorage.run(context, async () => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const res = await (auth.api.requestPasswordReset as any)({
|
||||
headers: new Headers(),
|
||||
body: {
|
||||
email,
|
||||
redirectTo: '/reset-password',
|
||||
},
|
||||
})
|
||||
|
||||
if (res?.error) {
|
||||
throw new Error(res.error.message || 'Failed to generate reset link')
|
||||
}
|
||||
})
|
||||
|
||||
if (context.token) {
|
||||
// Invalidate any other pending reset tokens for this user
|
||||
await this.prismaClient.verification.deleteMany({
|
||||
where: {
|
||||
value: user.id,
|
||||
identifier: {
|
||||
startsWith: 'reset-password:',
|
||||
not: `reset-password:${context.token}`,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
const rawBaseUrl =
|
||||
process.env.BETTER_AUTH_URL ||
|
||||
`http://localhost:${process.env.SHUMAI_SERVER_PORT || '3000'}`
|
||||
const baseUrl = rawBaseUrl.replace(/\/$/, '')
|
||||
return `${baseUrl}/reset-password?token=${context.token}`
|
||||
}
|
||||
|
||||
throw new Error('Failed to generate reset link')
|
||||
}
|
||||
|
||||
async resetPassword(token: string, newPassword: string): Promise<{ success: boolean }> {
|
||||
if (!token || !token.trim()) {
|
||||
throw new Error('Token is required')
|
||||
}
|
||||
|
||||
if (!newPassword || newPassword.length < 3) {
|
||||
throw new Error('Password must be at least 3 characters')
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const res = await (auth.api.resetPassword as any)({
|
||||
headers: new Headers(),
|
||||
body: {
|
||||
token,
|
||||
newPassword,
|
||||
password: newPassword,
|
||||
},
|
||||
})
|
||||
|
||||
if (res?.error) {
|
||||
throw new Error(res.error.message || 'Failed to reset password')
|
||||
}
|
||||
|
||||
return { success: true }
|
||||
}
|
||||
}
|
||||
|
||||
export const authService = new AuthService()
|
||||
|
||||
@@ -502,5 +502,98 @@ describe('AuthzService', () => {
|
||||
}),
|
||||
).rejects.toThrow('User has only project scope')
|
||||
})
|
||||
|
||||
it('allows project-scoped and reviewer participants to edit team-level Kanban tasks', async () => {
|
||||
const creator = await prisma.user.create({
|
||||
data: { name: 'Owner User', email: 'owner-kanban@example.com', password: 'pass' },
|
||||
})
|
||||
const projectScopedUser = await prisma.user.create({
|
||||
data: { name: 'Proj Member', email: 'proj-kanban@example.com', password: 'pass' },
|
||||
})
|
||||
const reviewerUser = await prisma.user.create({
|
||||
data: { name: 'Reviewer User', email: 'rev-kanban@example.com', password: 'pass' },
|
||||
})
|
||||
const unassignedUser = await prisma.user.create({
|
||||
data: { name: 'Unassigned User', email: 'unassigned-kanban@example.com', password: 'pass' },
|
||||
})
|
||||
|
||||
const team = await prisma.team.create({ data: { name: 'Kanban Team' } })
|
||||
const project = await prisma.project.create({ data: { name: 'Project K', teamId: team.id } })
|
||||
|
||||
await prisma.teamMember.create({
|
||||
data: { teamId: team.id, userId: creator.id, role: 'owner', scope: 'team' },
|
||||
})
|
||||
const tmProj = await prisma.teamMember.create({
|
||||
data: { teamId: team.id, userId: projectScopedUser.id, role: 'reviewer', scope: 'project' },
|
||||
})
|
||||
await prisma.projectMember.create({
|
||||
data: { projectId: project.id, teamMemberId: tmProj.id, role: 'editor' },
|
||||
})
|
||||
await prisma.teamMember.create({
|
||||
data: { teamId: team.id, userId: reviewerUser.id, role: 'reviewer', scope: 'team' },
|
||||
})
|
||||
await prisma.teamMember.create({
|
||||
data: { teamId: team.id, userId: unassignedUser.id, role: 'reviewer', scope: 'project' },
|
||||
})
|
||||
|
||||
// Team-level task (no projectId)
|
||||
const teamTask = await prisma.kanbanTask.create({
|
||||
data: {
|
||||
teamId: team.id,
|
||||
title: 'Team Task for Project Member',
|
||||
creatorId: creator.id,
|
||||
reporterId: creator.id,
|
||||
assigneeId: projectScopedUser.id,
|
||||
},
|
||||
})
|
||||
|
||||
// 1. Project-scoped assignee on team task CAN edit
|
||||
await expect(
|
||||
authzService.hasPermission({
|
||||
type: ResourceType.KanbanTask,
|
||||
id: teamTask.id,
|
||||
user: projectScopedUser,
|
||||
permission: Permission.Edit,
|
||||
}),
|
||||
).resolves.toBeUndefined()
|
||||
|
||||
// 2. Reviewer who is reporter CAN edit
|
||||
const reviewerReportedTask = await prisma.kanbanTask.create({
|
||||
data: {
|
||||
teamId: team.id,
|
||||
title: 'Task Reported by Reviewer',
|
||||
creatorId: creator.id,
|
||||
reporterId: reviewerUser.id,
|
||||
},
|
||||
})
|
||||
await expect(
|
||||
authzService.hasPermission({
|
||||
type: ResourceType.KanbanTask,
|
||||
id: reviewerReportedTask.id,
|
||||
user: reviewerUser,
|
||||
permission: Permission.Edit,
|
||||
}),
|
||||
).resolves.toBeUndefined()
|
||||
|
||||
// 3. Unassigned project-scoped user CANNOT edit team task
|
||||
await expect(
|
||||
authzService.hasPermission({
|
||||
type: ResourceType.KanbanTask,
|
||||
id: teamTask.id,
|
||||
user: unassignedUser,
|
||||
permission: Permission.Edit,
|
||||
}),
|
||||
).rejects.toThrow('User has only project scope')
|
||||
|
||||
// 4. Unassigned reviewer CANNOT edit team task
|
||||
await expect(
|
||||
authzService.hasPermission({
|
||||
type: ResourceType.KanbanTask,
|
||||
id: teamTask.id,
|
||||
user: reviewerUser,
|
||||
permission: Permission.Edit,
|
||||
}),
|
||||
).rejects.toThrow('Permission denied')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -25,6 +25,8 @@ export enum ResourceType {
|
||||
Comment = 'comment',
|
||||
AgentSession = 'agentSession',
|
||||
QuotaRule = 'quotaRule',
|
||||
KanbanGoal = 'kanbanGoal',
|
||||
KanbanTask = 'kanbanTask',
|
||||
}
|
||||
|
||||
export interface AuthzRequest {
|
||||
@@ -93,7 +95,18 @@ export class AuthzService {
|
||||
// (project override -> team role for team-scoped members -> restricted).
|
||||
const role = await resolveEffectiveRole(teamId, projectId, req.user.id)
|
||||
if (role) {
|
||||
return this.checkRole(role, req.permission)
|
||||
try {
|
||||
return this.checkRole(role, req.permission)
|
||||
} catch (err) {
|
||||
// If role check failed (e.g. reviewer requesting Permission.Edit on a KanbanTask where they are assignee/reporter/creator), allow it.
|
||||
if (req.type === ResourceType.KanbanTask && req.permission === Permission.Edit) {
|
||||
const isParticipant = await this.isKanbanTaskParticipant(req.id, req.user.id)
|
||||
if (isParticipant) {
|
||||
return
|
||||
}
|
||||
}
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
// No effective role: either not a team member, or a project-scoped member
|
||||
@@ -108,6 +121,19 @@ export class AuthzService {
|
||||
})
|
||||
if (!member) throw new HTTPException(403, { message: 'User is not a member of the team' })
|
||||
|
||||
// If this is a KanbanTask and user is a team member, check if they are the assignee, reporter, or creator
|
||||
if (req.type === ResourceType.KanbanTask) {
|
||||
if (req.permission === Permission.Read) {
|
||||
return
|
||||
}
|
||||
if (req.permission === Permission.Edit) {
|
||||
const isParticipant = await this.isKanbanTaskParticipant(req.id, req.user.id)
|
||||
if (isParticipant) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Project-scoped member on a team-level resource (no project context):
|
||||
// allow Read (e.g. listing), deny Edit/Admin.
|
||||
if (!projectId && req.permission === Permission.Read) {
|
||||
@@ -116,6 +142,15 @@ export class AuthzService {
|
||||
throw new HTTPException(403, { message: 'User has only project scope' })
|
||||
}
|
||||
|
||||
private async isKanbanTaskParticipant(taskId: string, userId: string): Promise<boolean> {
|
||||
const task = await prisma.kanbanTask.findUnique({
|
||||
where: { id: taskId },
|
||||
select: { creatorId: true, reporterId: true, assigneeId: true },
|
||||
})
|
||||
if (!task) return false
|
||||
return task.creatorId === userId || task.reporterId === userId || task.assigneeId === userId
|
||||
}
|
||||
|
||||
private async resolveContext(
|
||||
type: ResourceType,
|
||||
id: string,
|
||||
@@ -269,6 +304,24 @@ export class AuthzService {
|
||||
return { teamId: rule.teamId }
|
||||
}
|
||||
|
||||
case ResourceType.KanbanGoal: {
|
||||
const goal = await prisma.kanbanGoal.findUnique({
|
||||
where: { id },
|
||||
select: { teamId: true },
|
||||
})
|
||||
if (!goal) throw new HTTPException(404, { message: 'Kanban goal not found' })
|
||||
return { teamId: goal.teamId }
|
||||
}
|
||||
|
||||
case ResourceType.KanbanTask: {
|
||||
const task = await prisma.kanbanTask.findUnique({
|
||||
where: { id },
|
||||
select: { teamId: true, projectId: true },
|
||||
})
|
||||
if (!task) throw new HTTPException(404, { message: 'Kanban task not found' })
|
||||
return { teamId: task.teamId, projectId: task.projectId ?? undefined }
|
||||
}
|
||||
|
||||
default:
|
||||
throw new HTTPException(403, { message: `Unsupported resource type: ${type}` })
|
||||
}
|
||||
|
||||
@@ -27,3 +27,4 @@ export * from './watermark/watermark'
|
||||
export * from './gotenberg/gotenberg'
|
||||
export * from './mcp/mcp-service'
|
||||
export * from './quota/quota-service'
|
||||
export * from './kanban/kanban'
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -419,7 +419,14 @@ describe('NotificationService', () => {
|
||||
const info = await svc['toNotificationInfo'](
|
||||
await prisma.notification.findUniqueOrThrow({
|
||||
where: { id: n.id },
|
||||
include: { creator: true, team: true, project: true, asset: true, user: true },
|
||||
include: {
|
||||
creator: true,
|
||||
team: true,
|
||||
project: true,
|
||||
asset: true,
|
||||
user: true,
|
||||
kanbanTask: true,
|
||||
},
|
||||
}),
|
||||
null,
|
||||
)
|
||||
@@ -430,4 +437,103 @@ describe('NotificationService', () => {
|
||||
expect(info.asset?.originalWidth).toBe(1280)
|
||||
expect(info.asset?.originalHeight).toBe(720)
|
||||
})
|
||||
|
||||
it('notifyKanbanTaskEvent broadcasts to stakeholders excluding actor and parses mentions', async () => {
|
||||
const tm = await prisma.team.create({ data: { name: 'Team Kanban' } })
|
||||
const u1 = await prisma.user.create({
|
||||
data: { name: 'Actor', email: `actor-${Date.now()}@example.com`, password: 'p' },
|
||||
})
|
||||
const u2 = await prisma.user.create({
|
||||
data: { name: 'Assignee', email: `assignee-${Date.now()}@example.com`, password: 'p' },
|
||||
})
|
||||
const u3 = await prisma.user.create({
|
||||
data: { name: 'Mentioned', email: `mentioned-${Date.now()}@example.com`, password: 'p' },
|
||||
})
|
||||
const task = await prisma.kanbanTask.create({
|
||||
data: {
|
||||
teamId: tm.id,
|
||||
creatorId: u1.id,
|
||||
title: 'Important task',
|
||||
},
|
||||
})
|
||||
|
||||
const svc = notificationService
|
||||
await svc.notifyKanbanTaskEvent({
|
||||
type: NotificationType.kanban_task_comment_created,
|
||||
teamId: tm.id,
|
||||
creatorId: u1.id,
|
||||
kanbanTaskId: task.id,
|
||||
stakeholderIds: [u1.id, u2.id],
|
||||
commentMessage: `Hey <@${u3.id}> please check this`,
|
||||
})
|
||||
|
||||
const notifications = await prisma.notification.findMany({
|
||||
where: { kanbanTaskId: task.id },
|
||||
orderBy: { id: 'asc' },
|
||||
})
|
||||
|
||||
// u1 is actor, should not get notification.
|
||||
// u2 is stakeholder, gets kanban_task_comment_created.
|
||||
// u3 is mentioned, gets mention.
|
||||
expect(notifications).toHaveLength(2)
|
||||
|
||||
const commentNotif = notifications.find(
|
||||
(n) => n.type === NotificationType.kanban_task_comment_created,
|
||||
)
|
||||
expect(commentNotif?.userId).toBe(u2.id)
|
||||
|
||||
const mentionNotif = notifications.find((n) => n.type === NotificationType.mention)
|
||||
expect(mentionNotif?.userId).toBe(u3.id)
|
||||
})
|
||||
|
||||
it('filters kanban notifications based on user preferences', async () => {
|
||||
const tm = await prisma.team.create({ data: { name: 'Team Settings' } })
|
||||
const u1 = await prisma.user.create({
|
||||
data: { name: 'U1', email: `u1-set-${Date.now()}@example.com`, password: 'p' },
|
||||
})
|
||||
await prisma.teamMember.create({
|
||||
data: { teamId: tm.id, userId: u1.id, role: 'owner' },
|
||||
})
|
||||
const task = await prisma.kanbanTask.create({
|
||||
data: { teamId: tm.id, creatorId: u1.id, title: 'Task' },
|
||||
})
|
||||
|
||||
await prisma.notification.create({
|
||||
data: {
|
||||
teamId: tm.id,
|
||||
type: NotificationType.kanban_task_created,
|
||||
userId: u1.id,
|
||||
kanbanTaskId: task.id,
|
||||
},
|
||||
})
|
||||
await prisma.notification.create({
|
||||
data: {
|
||||
teamId: tm.id,
|
||||
type: NotificationType.kanban_task_comment_created,
|
||||
userId: u1.id,
|
||||
kanbanTaskId: task.id,
|
||||
},
|
||||
})
|
||||
|
||||
const svc = notificationService
|
||||
// By default both are enabled
|
||||
const listDefault = await svc.list(tm.id, u1.id, {})
|
||||
expect(listDefault.data).toHaveLength(2)
|
||||
|
||||
// Disable kanbanTasks
|
||||
await userMetadataService.upsertMetadata(u1.id, tm.id, 'notification_settings', {
|
||||
comments: true,
|
||||
replies: true,
|
||||
mentions: true,
|
||||
yourUploads: false,
|
||||
otherUploads: true,
|
||||
statusUpdates: true,
|
||||
kanbanTasks: false,
|
||||
kanbanComments: true,
|
||||
})
|
||||
|
||||
const listWithoutTasks = await svc.list(tm.id, u1.id, {})
|
||||
expect(listWithoutTasks.data).toHaveLength(1)
|
||||
expect(listWithoutTasks.data[0].type).toBe(NotificationType.kanban_task_comment_created)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -15,6 +15,74 @@ import { userMetadataService } from '@shumai/core/src/user-metadata/user-metadat
|
||||
const mentionRegex = /<@([^>]+)>/g
|
||||
|
||||
export class NotificationService {
|
||||
async notifyKanbanTaskEvent(params: {
|
||||
type: NotificationType
|
||||
teamId: string
|
||||
projectId?: string | null
|
||||
creatorId: string
|
||||
kanbanTaskId?: string
|
||||
stakeholderIds?: (string | null | undefined)[]
|
||||
targetUserId?: string
|
||||
commentMessage?: string
|
||||
}) {
|
||||
const recipients = new Set<string>()
|
||||
if (params.targetUserId) {
|
||||
recipients.add(params.targetUserId)
|
||||
}
|
||||
if (params.stakeholderIds) {
|
||||
for (const id of params.stakeholderIds) {
|
||||
if (id) recipients.add(id)
|
||||
}
|
||||
}
|
||||
recipients.delete(params.creatorId)
|
||||
|
||||
const promises: Promise<void>[] = []
|
||||
for (const recipientId of recipients) {
|
||||
promises.push(
|
||||
this.createAsync({
|
||||
type: params.type,
|
||||
teamId: params.teamId,
|
||||
projectId: params.projectId ?? undefined,
|
||||
creatorId: params.creatorId,
|
||||
kanbanTaskId: params.kanbanTaskId,
|
||||
userId: recipientId,
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
if (params.commentMessage) {
|
||||
const matches = [...params.commentMessage.matchAll(mentionRegex)]
|
||||
const mentionedIds = new Set<string>()
|
||||
|
||||
for (const match of matches) {
|
||||
if (match.length > 1) {
|
||||
const userId = match[1]
|
||||
if (mentionedIds.has(userId)) {
|
||||
continue
|
||||
}
|
||||
mentionedIds.add(userId)
|
||||
|
||||
if (params.creatorId === userId) {
|
||||
continue
|
||||
}
|
||||
|
||||
promises.push(
|
||||
this.createAsync({
|
||||
type: NotificationType.mention,
|
||||
teamId: params.teamId,
|
||||
projectId: params.projectId ?? undefined,
|
||||
creatorId: params.creatorId,
|
||||
kanbanTaskId: params.kanbanTaskId,
|
||||
userId: userId,
|
||||
}),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await Promise.all(promises)
|
||||
}
|
||||
|
||||
async create(req: CreateNotificationRequest) {
|
||||
// Note: Do not await this, we fire and forget similarly to Go
|
||||
this.createAsync(req).catch((err) => {
|
||||
@@ -36,6 +104,16 @@ export class NotificationService {
|
||||
}
|
||||
}
|
||||
|
||||
// Resolve ProjectID from KanbanTaskId if missing
|
||||
if (!projectId && req.kanbanTaskId) {
|
||||
const task = await prisma.kanbanTask.findUnique({
|
||||
where: { id: req.kanbanTaskId },
|
||||
})
|
||||
if (task?.projectId) {
|
||||
projectId = task.projectId
|
||||
}
|
||||
}
|
||||
|
||||
// Check project notification settings
|
||||
if (projectId) {
|
||||
const project = await prisma.project.findUnique({
|
||||
@@ -57,6 +135,7 @@ export class NotificationService {
|
||||
creatorId: req.creatorId,
|
||||
assetId: req.assetId,
|
||||
taskId: req.taskId,
|
||||
kanbanTaskId: req.kanbanTaskId,
|
||||
userId: targetUserId,
|
||||
},
|
||||
})
|
||||
@@ -71,7 +150,8 @@ export class NotificationService {
|
||||
// 2. Handle Mentions for Comment/Reply types
|
||||
if (
|
||||
(req.type === NotificationType.comment_created ||
|
||||
req.type === NotificationType.reply_created) &&
|
||||
req.type === NotificationType.reply_created ||
|
||||
req.type === NotificationType.kanban_task_comment_created) &&
|
||||
req.commentMessage
|
||||
) {
|
||||
const matches = [...req.commentMessage.matchAll(mentionRegex)]
|
||||
@@ -128,23 +208,25 @@ export class NotificationService {
|
||||
yourUploads: false,
|
||||
otherUploads: true,
|
||||
statusUpdates: true,
|
||||
kanbanTasks: true,
|
||||
kanbanComments: true,
|
||||
}
|
||||
|
||||
const typeConditions: Prisma.NotificationWhereInput[] = []
|
||||
|
||||
// 1. Comments
|
||||
if (settings.comments) {
|
||||
if (settings.comments ?? true) {
|
||||
typeConditions.push({ type: NotificationType.comment_created, userId: null })
|
||||
}
|
||||
|
||||
// 2. Replies
|
||||
if (settings.replies) {
|
||||
if (settings.replies ?? true) {
|
||||
typeConditions.push({ type: NotificationType.reply_created, userId: userId })
|
||||
typeConditions.push({ type: NotificationType.reply_created, userId: null })
|
||||
}
|
||||
|
||||
// 3. Mentions
|
||||
if (settings.mentions) {
|
||||
if (settings.mentions ?? true) {
|
||||
typeConditions.push({ type: NotificationType.mention, userId: userId })
|
||||
}
|
||||
|
||||
@@ -161,11 +243,35 @@ export class NotificationService {
|
||||
}
|
||||
|
||||
// 5. Status Updates
|
||||
if (settings.statusUpdates) {
|
||||
if (settings.statusUpdates ?? true) {
|
||||
typeConditions.push({ type: NotificationType.metadata_field_updated_status })
|
||||
}
|
||||
|
||||
// 6. Always include team/project join notifications
|
||||
// 6. Kanban Tasks
|
||||
if (settings.kanbanTasks ?? true) {
|
||||
typeConditions.push({
|
||||
type: {
|
||||
in: [
|
||||
NotificationType.kanban_task_created,
|
||||
NotificationType.kanban_task_assigned,
|
||||
NotificationType.kanban_task_status_updated,
|
||||
NotificationType.kanban_task_updated,
|
||||
NotificationType.kanban_task_deleted,
|
||||
],
|
||||
},
|
||||
userId: userId,
|
||||
})
|
||||
}
|
||||
|
||||
// 7. Kanban Comments
|
||||
if (settings.kanbanComments ?? true) {
|
||||
typeConditions.push({
|
||||
type: NotificationType.kanban_task_comment_created,
|
||||
userId: userId,
|
||||
})
|
||||
}
|
||||
|
||||
// 8. Always include team/project join notifications
|
||||
typeConditions.push({ type: NotificationType.new_user_join_team })
|
||||
typeConditions.push({ type: NotificationType.new_user_join_project })
|
||||
|
||||
@@ -193,6 +299,7 @@ export class NotificationService {
|
||||
{
|
||||
OR: [
|
||||
{ type: NotificationType.mention }, // Always allow mentions (targeted)
|
||||
{ userId: userId }, // Direct targeted notifications (e.g. assigned, stakeholder)
|
||||
{ projectId: { in: projectFilter } }, // Only show notifications for projects user is member of
|
||||
],
|
||||
},
|
||||
@@ -270,6 +377,7 @@ export class NotificationService {
|
||||
project: true,
|
||||
asset: true,
|
||||
user: true,
|
||||
kanbanTask: true,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -329,7 +437,14 @@ export class NotificationService {
|
||||
|
||||
private async toNotificationInfo(
|
||||
n: Prisma.NotificationGetPayload<{
|
||||
include: { creator: true; team: true; project: true; asset: true; user: true }
|
||||
include: {
|
||||
creator: true
|
||||
team: true
|
||||
project: true
|
||||
asset: true
|
||||
user: true
|
||||
kanbanTask: true
|
||||
}
|
||||
}>,
|
||||
lastRead: Prisma.NotificationGetPayload<Record<string, never>> | null,
|
||||
): Promise<NotificationInfo> {
|
||||
@@ -368,6 +483,14 @@ export class NotificationService {
|
||||
}
|
||||
}
|
||||
|
||||
if (n.kanbanTask) {
|
||||
info.kanbanTask = {
|
||||
id: n.kanbanTask.id,
|
||||
title: n.kanbanTask.title,
|
||||
status: n.kanbanTask.status,
|
||||
}
|
||||
}
|
||||
|
||||
if (n.asset) {
|
||||
const a = n.asset
|
||||
let previewUrl = ''
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/db",
|
||||
"version": "0.3.9",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
-- CreateEnum
|
||||
CREATE TYPE "KanbanTaskStatus" AS ENUM ('TODO', 'READY', 'IN_PROGRESS', 'BLOCKED', 'IN_REVIEW', 'DONE', 'CANCELLED');
|
||||
|
||||
-- CreateEnum
|
||||
CREATE TYPE "KanbanTaskPriority" AS ENUM ('LOW', 'MEDIUM', 'HIGH', 'URGENT');
|
||||
|
||||
-- CreateEnum
|
||||
CREATE TYPE "KanbanTaskEventType" AS ENUM ('CREATED', 'STATUS_CHANGED', 'ASSIGNED', 'UNASSIGNED', 'COMMENTED', 'CHANGES_REQUESTED', 'BLOCKED', 'UNBLOCKED', 'PRIORITY_CHANGED', 'GOAL_CHANGED', 'DEPENDENCY_ADDED', 'DEPENDENCY_REMOVED', 'CANCELLED');
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "kanban_goals" (
|
||||
"id" TEXT NOT NULL,
|
||||
"title" TEXT NOT NULL,
|
||||
"description" TEXT,
|
||||
"team_id" TEXT NOT NULL,
|
||||
"creator_id" TEXT,
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updated_at" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "kanban_goals_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "kanban_tasks" (
|
||||
"id" TEXT NOT NULL,
|
||||
"title" TEXT NOT NULL,
|
||||
"description" TEXT,
|
||||
"is_agent_task" BOOLEAN NOT NULL DEFAULT false,
|
||||
"status" "KanbanTaskStatus" NOT NULL DEFAULT 'TODO',
|
||||
"priority" "KanbanTaskPriority" NOT NULL DEFAULT 'MEDIUM',
|
||||
"start_date" TIMESTAMP(3),
|
||||
"due_date" TIMESTAMP(3),
|
||||
"started_at" TIMESTAMP(3),
|
||||
"completed_at" TIMESTAMP(3),
|
||||
"goal_id" TEXT,
|
||||
"team_id" TEXT NOT NULL,
|
||||
"project_id" TEXT,
|
||||
"creator_id" TEXT NOT NULL,
|
||||
"reporter_id" TEXT,
|
||||
"assignee_id" TEXT,
|
||||
"target_folder_id" TEXT,
|
||||
"sort_index" TEXT,
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updated_at" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "kanban_tasks_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "kanban_task_links" (
|
||||
"parent_id" TEXT NOT NULL,
|
||||
"child_id" TEXT NOT NULL,
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CONSTRAINT "kanban_task_links_pkey" PRIMARY KEY ("parent_id","child_id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "kanban_task_comments" (
|
||||
"id" TEXT NOT NULL,
|
||||
"task_id" TEXT NOT NULL,
|
||||
"author_id" TEXT NOT NULL,
|
||||
"body" TEXT NOT NULL,
|
||||
"attachments" JSONB,
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updated_at" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "kanban_task_comments_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "kanban_task_events" (
|
||||
"id" TEXT NOT NULL,
|
||||
"task_id" TEXT NOT NULL,
|
||||
"actor_id" TEXT,
|
||||
"type" "KanbanTaskEventType" NOT NULL,
|
||||
"from_status" "KanbanTaskStatus",
|
||||
"to_status" "KanbanTaskStatus",
|
||||
"data" JSONB,
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CONSTRAINT "kanban_task_events_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "kanban_goals_team_id_idx" ON "kanban_goals"("team_id");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "kanban_tasks_team_id_status_idx" ON "kanban_tasks"("team_id", "status");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "kanban_tasks_team_id_status_sort_index_idx" ON "kanban_tasks"("team_id", "status", "sort_index");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "kanban_tasks_team_id_is_agent_task_status_idx" ON "kanban_tasks"("team_id", "is_agent_task", "status");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "kanban_tasks_team_id_goal_id_status_idx" ON "kanban_tasks"("team_id", "goal_id", "status");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "kanban_tasks_team_id_assignee_id_status_idx" ON "kanban_tasks"("team_id", "assignee_id", "status");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "kanban_tasks_project_id_status_idx" ON "kanban_tasks"("project_id", "status");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "kanban_tasks_sort_index_idx" ON "kanban_tasks"("sort_index");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "kanban_task_links_child_id_idx" ON "kanban_task_links"("child_id");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "kanban_task_comments_task_id_created_at_idx" ON "kanban_task_comments"("task_id", "created_at");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "kanban_task_events_task_id_created_at_idx" ON "kanban_task_events"("task_id", "created_at");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "kanban_task_events_actor_id_created_at_idx" ON "kanban_task_events"("actor_id", "created_at");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "kanban_goals" ADD CONSTRAINT "kanban_goals_team_id_fkey" FOREIGN KEY ("team_id") REFERENCES "teams"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "kanban_goals" ADD CONSTRAINT "kanban_goals_creator_id_fkey" FOREIGN KEY ("creator_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "kanban_tasks" ADD CONSTRAINT "kanban_tasks_goal_id_fkey" FOREIGN KEY ("goal_id") REFERENCES "kanban_goals"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "kanban_tasks" ADD CONSTRAINT "kanban_tasks_team_id_fkey" FOREIGN KEY ("team_id") REFERENCES "teams"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "kanban_tasks" ADD CONSTRAINT "kanban_tasks_project_id_fkey" FOREIGN KEY ("project_id") REFERENCES "projects"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "kanban_tasks" ADD CONSTRAINT "kanban_tasks_creator_id_fkey" FOREIGN KEY ("creator_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "kanban_tasks" ADD CONSTRAINT "kanban_tasks_reporter_id_fkey" FOREIGN KEY ("reporter_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "kanban_tasks" ADD CONSTRAINT "kanban_tasks_assignee_id_fkey" FOREIGN KEY ("assignee_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "kanban_tasks" ADD CONSTRAINT "kanban_tasks_target_folder_id_fkey" FOREIGN KEY ("target_folder_id") REFERENCES "assets"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "kanban_task_links" ADD CONSTRAINT "kanban_task_links_parent_id_fkey" FOREIGN KEY ("parent_id") REFERENCES "kanban_tasks"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "kanban_task_links" ADD CONSTRAINT "kanban_task_links_child_id_fkey" FOREIGN KEY ("child_id") REFERENCES "kanban_tasks"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "kanban_task_comments" ADD CONSTRAINT "kanban_task_comments_task_id_fkey" FOREIGN KEY ("task_id") REFERENCES "kanban_tasks"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "kanban_task_comments" ADD CONSTRAINT "kanban_task_comments_author_id_fkey" FOREIGN KEY ("author_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "kanban_task_events" ADD CONSTRAINT "kanban_task_events_task_id_fkey" FOREIGN KEY ("task_id") REFERENCES "kanban_tasks"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "kanban_task_events" ADD CONSTRAINT "kanban_task_events_actor_id_fkey" FOREIGN KEY ("actor_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
@@ -0,0 +1,26 @@
|
||||
-- AlterEnum
|
||||
-- This migration adds more than one value to an enum.
|
||||
-- With PostgreSQL versions 11 and earlier, this is not possible
|
||||
-- in a single migration. This can be worked around by creating
|
||||
-- multiple migrations, each migration adding only one value to
|
||||
-- the enum.
|
||||
|
||||
|
||||
ALTER TYPE "NotificationType" ADD VALUE 'kanban_task_created';
|
||||
ALTER TYPE "NotificationType" ADD VALUE 'kanban_task_assigned';
|
||||
ALTER TYPE "NotificationType" ADD VALUE 'kanban_task_status_updated';
|
||||
ALTER TYPE "NotificationType" ADD VALUE 'kanban_task_updated';
|
||||
ALTER TYPE "NotificationType" ADD VALUE 'kanban_task_deleted';
|
||||
ALTER TYPE "NotificationType" ADD VALUE 'kanban_task_comment_created';
|
||||
|
||||
-- AlterEnum
|
||||
ALTER TYPE "WorkflowTaskType" ADD VALUE 'kanban_agent_run';
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "notifications" ADD COLUMN "kanban_task_id" TEXT;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "notifications_kanban_task_id_idx" ON "notifications"("kanban_task_id");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "notifications" ADD CONSTRAINT "notifications_kanban_task_id_fkey" FOREIGN KEY ("kanban_task_id") REFERENCES "kanban_tasks"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
-- AlterTable: Change sort_index column collation to "C" on kanban_tasks
|
||||
ALTER TABLE "kanban_tasks" ALTER COLUMN "sort_index" TYPE TEXT COLLATE "C";
|
||||
|
||||
-- Recreate index on sort_index with "C" collation
|
||||
DROP INDEX IF EXISTS "kanban_tasks_sort_index_idx";
|
||||
CREATE INDEX "kanban_tasks_sort_index_idx" ON "kanban_tasks" ("sort_index" COLLATE "C");
|
||||
|
||||
-- Recreate compound index with "C" collation
|
||||
DROP INDEX IF EXISTS "kanban_tasks_team_id_status_sort_index_idx";
|
||||
CREATE INDEX "kanban_tasks_team_id_status_sort_index_idx" ON "kanban_tasks" ("team_id", "status", "sort_index" COLLATE "C");
|
||||
@@ -0,0 +1,17 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "kanban_task_assets" (
|
||||
"task_id" TEXT NOT NULL,
|
||||
"asset_id" TEXT NOT NULL,
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CONSTRAINT "kanban_task_assets_pkey" PRIMARY KEY ("task_id","asset_id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "kanban_task_assets_asset_id_idx" ON "kanban_task_assets"("asset_id");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "kanban_task_assets" ADD CONSTRAINT "kanban_task_assets_task_id_fkey" FOREIGN KEY ("task_id") REFERENCES "kanban_tasks"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "kanban_task_assets" ADD CONSTRAINT "kanban_task_assets_asset_id_fkey" FOREIGN KEY ("asset_id") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- The values [CANCELLED] on the enum `KanbanTaskEventType` will be removed. If these variants are still used in the database, this will fail.
|
||||
- The values [CANCELLED] on the enum `KanbanTaskStatus` will be removed. If these variants are still used in the database, this will fail.
|
||||
|
||||
*/
|
||||
-- AlterEnum
|
||||
BEGIN;
|
||||
CREATE TYPE "KanbanTaskEventType_new" AS ENUM ('CREATED', 'STATUS_CHANGED', 'ASSIGNED', 'UNASSIGNED', 'COMMENTED', 'CHANGES_REQUESTED', 'BLOCKED', 'UNBLOCKED', 'PRIORITY_CHANGED', 'GOAL_CHANGED', 'DEPENDENCY_ADDED', 'DEPENDENCY_REMOVED');
|
||||
ALTER TABLE "kanban_task_events" ALTER COLUMN "type" TYPE "KanbanTaskEventType_new" USING ("type"::text::"KanbanTaskEventType_new");
|
||||
ALTER TYPE "KanbanTaskEventType" RENAME TO "KanbanTaskEventType_old";
|
||||
ALTER TYPE "KanbanTaskEventType_new" RENAME TO "KanbanTaskEventType";
|
||||
DROP TYPE "public"."KanbanTaskEventType_old";
|
||||
COMMIT;
|
||||
|
||||
-- AlterEnum
|
||||
BEGIN;
|
||||
CREATE TYPE "KanbanTaskStatus_new" AS ENUM ('TODO', 'READY', 'IN_PROGRESS', 'BLOCKED', 'IN_REVIEW', 'DONE');
|
||||
ALTER TABLE "public"."kanban_tasks" ALTER COLUMN "status" DROP DEFAULT;
|
||||
ALTER TABLE "kanban_tasks" ALTER COLUMN "status" TYPE "KanbanTaskStatus_new" USING ("status"::text::"KanbanTaskStatus_new");
|
||||
ALTER TABLE "kanban_task_events" ALTER COLUMN "from_status" TYPE "KanbanTaskStatus_new" USING ("from_status"::text::"KanbanTaskStatus_new");
|
||||
ALTER TABLE "kanban_task_events" ALTER COLUMN "to_status" TYPE "KanbanTaskStatus_new" USING ("to_status"::text::"KanbanTaskStatus_new");
|
||||
ALTER TYPE "KanbanTaskStatus" RENAME TO "KanbanTaskStatus_old";
|
||||
ALTER TYPE "KanbanTaskStatus_new" RENAME TO "KanbanTaskStatus";
|
||||
DROP TYPE "public"."KanbanTaskStatus_old";
|
||||
ALTER TABLE "kanban_tasks" ALTER COLUMN "status" SET DEFAULT 'TODO';
|
||||
COMMIT;
|
||||
@@ -0,0 +1,28 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "recent_file_items" (
|
||||
"id" TEXT NOT NULL,
|
||||
"user_id" TEXT NOT NULL,
|
||||
"project_id" TEXT NOT NULL,
|
||||
"asset_id" TEXT NOT NULL,
|
||||
"viewed_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CONSTRAINT "recent_file_items_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "recent_file_items_user_id_project_id_viewed_at_idx" ON "recent_file_items"("user_id", "project_id", "viewed_at" DESC);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "recent_file_items_asset_id_idx" ON "recent_file_items"("asset_id");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "recent_file_items_user_id_project_id_asset_id_key" ON "recent_file_items"("user_id", "project_id", "asset_id");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "recent_file_items" ADD CONSTRAINT "recent_file_items_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "recent_file_items" ADD CONSTRAINT "recent_file_items_project_id_fkey" FOREIGN KEY ("project_id") REFERENCES "projects"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "recent_file_items" ADD CONSTRAINT "recent_file_items_asset_id_fkey" FOREIGN KEY ("asset_id") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
@@ -68,6 +68,12 @@ enum NotificationType {
|
||||
metadata_field_updated_status
|
||||
new_user_join_team
|
||||
new_user_join_project
|
||||
kanban_task_created
|
||||
kanban_task_assigned
|
||||
kanban_task_status_updated
|
||||
kanban_task_updated
|
||||
kanban_task_deleted
|
||||
kanban_task_comment_created
|
||||
}
|
||||
|
||||
enum ProjectMemberRole {
|
||||
@@ -112,6 +118,7 @@ enum WorkflowTaskType {
|
||||
ai_embedding
|
||||
query_embedding_for_search
|
||||
agent_tool_call
|
||||
kanban_agent_run
|
||||
}
|
||||
|
||||
enum WorkflowTaskStatus {
|
||||
@@ -156,6 +163,37 @@ enum QuotaResourceType {
|
||||
agent_tool_call_count
|
||||
}
|
||||
|
||||
enum KanbanTaskStatus {
|
||||
TODO
|
||||
READY
|
||||
IN_PROGRESS
|
||||
BLOCKED
|
||||
IN_REVIEW
|
||||
DONE
|
||||
}
|
||||
|
||||
enum KanbanTaskPriority {
|
||||
LOW
|
||||
MEDIUM
|
||||
HIGH
|
||||
URGENT
|
||||
}
|
||||
|
||||
enum KanbanTaskEventType {
|
||||
CREATED
|
||||
STATUS_CHANGED
|
||||
ASSIGNED
|
||||
UNASSIGNED
|
||||
COMMENTED
|
||||
CHANGES_REQUESTED
|
||||
BLOCKED
|
||||
UNBLOCKED
|
||||
PRIORITY_CHANGED
|
||||
GOAL_CHANGED
|
||||
DEPENDENCY_ADDED
|
||||
DEPENDENCY_REMOVED
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Models
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -194,6 +232,13 @@ model User {
|
||||
aiUsages AiUsage[] @relation("UserToAiUsage")
|
||||
auditLogs AuditLog[] @relation("UserToAuditLog")
|
||||
quotaRecords QuotaRecord[] @relation("UserToQuotaRecord")
|
||||
kanbanTasksCreated KanbanTask[] @relation("KanbanTaskCreator")
|
||||
kanbanTasksReported KanbanTask[] @relation("KanbanTaskReporter")
|
||||
kanbanTasksAssigned KanbanTask[] @relation("KanbanTaskAssignee")
|
||||
kanbanGoalsCreated KanbanGoal[] @relation("UserToKanbanGoal")
|
||||
kanbanTaskComments KanbanTaskComment[]
|
||||
kanbanTaskEvents KanbanTaskEvent[]
|
||||
recentFiles RecentFileItem[]
|
||||
|
||||
@@map("users")
|
||||
}
|
||||
@@ -282,6 +327,8 @@ model Team {
|
||||
watermarkTemplates WatermarkTemplate[] @relation("TeamToWatermarkTemplate")
|
||||
quotaRules QuotaRule[] @relation("TeamToQuotaRule")
|
||||
quotaRecords QuotaRecord[] @relation("TeamToQuotaRecord")
|
||||
kanbanGoals KanbanGoal[] @relation("TeamToKanbanGoal")
|
||||
kanbanTasks KanbanTask[] @relation("TeamToKanbanTask")
|
||||
|
||||
@@map("teams")
|
||||
}
|
||||
@@ -367,6 +414,8 @@ model Project {
|
||||
shareLinks ShareLink[] @relation("ProjectToShareLink")
|
||||
collections Collection[] @relation("ProjectToCollection")
|
||||
auditLogs AuditLog[] @relation("ProjectToAuditLog")
|
||||
kanbanTasks KanbanTask[] @relation("ProjectToKanbanTask")
|
||||
recentFiles RecentFileItem[]
|
||||
|
||||
@@map("projects")
|
||||
@@index([createdAt])
|
||||
@@ -515,6 +564,9 @@ model Asset {
|
||||
agentSessions AgentSession[] @relation("AssetToAgentSession")
|
||||
watermarkFiles WatermarkFile[] @relation("AssetToWatermarkFile")
|
||||
agentMd AssetAgentMd? @relation("AssetToAgentMd")
|
||||
kanbanTargetTasks KanbanTask[] @relation("KanbanTaskTargetFolder")
|
||||
kanbanTasks KanbanTaskAsset[]
|
||||
recentFiles RecentFileItem[]
|
||||
|
||||
@@map("assets")
|
||||
@@index([type])
|
||||
@@ -691,11 +743,15 @@ model Notification {
|
||||
taskId String? @map("task_id")
|
||||
task Task? @relation("TaskToNotification", fields: [taskId], references: [id])
|
||||
|
||||
kanbanTaskId String? @map("kanban_task_id")
|
||||
kanbanTask KanbanTask? @relation("KanbanTaskToNotification", fields: [kanbanTaskId], references: [id], onDelete: Cascade)
|
||||
|
||||
userId String? @map("user_id")
|
||||
user User? @relation("UserToNotification", fields: [userId], references: [id])
|
||||
|
||||
readByMembers TeamMember? @relation("TeamMemberToLastReadNotification")
|
||||
|
||||
@@index([kanbanTaskId])
|
||||
@@map("notifications")
|
||||
}
|
||||
|
||||
@@ -1087,4 +1143,155 @@ model QuotaRecord {
|
||||
@@map("quota_records")
|
||||
}
|
||||
|
||||
model KanbanGoal {
|
||||
id String @id @default(ulid())
|
||||
title String
|
||||
description String? @db.Text
|
||||
teamId String @map("team_id")
|
||||
team Team @relation("TeamToKanbanGoal", fields: [teamId], references: [id], onDelete: Cascade)
|
||||
creatorId String? @map("creator_id")
|
||||
creator User? @relation("UserToKanbanGoal", fields: [creatorId], references: [id], onDelete: SetNull)
|
||||
tasks KanbanTask[]
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@index([teamId])
|
||||
@@map("kanban_goals")
|
||||
}
|
||||
|
||||
model KanbanTask {
|
||||
id String @id @default(ulid())
|
||||
title String
|
||||
description String? @db.Text
|
||||
isAgentTask Boolean @default(false) @map("is_agent_task")
|
||||
status KanbanTaskStatus @default(TODO)
|
||||
priority KanbanTaskPriority @default(MEDIUM)
|
||||
|
||||
startDate DateTime? @map("start_date")
|
||||
dueDate DateTime? @map("due_date")
|
||||
startedAt DateTime? @map("started_at")
|
||||
completedAt DateTime? @map("completed_at")
|
||||
|
||||
goalId String? @map("goal_id")
|
||||
goal KanbanGoal? @relation(fields: [goalId], references: [id], onDelete: SetNull)
|
||||
|
||||
teamId String @map("team_id")
|
||||
team Team @relation("TeamToKanbanTask", fields: [teamId], references: [id], onDelete: Cascade)
|
||||
projectId String? @map("project_id")
|
||||
project Project? @relation("ProjectToKanbanTask", fields: [projectId], references: [id], onDelete: Cascade)
|
||||
|
||||
creatorId String @map("creator_id")
|
||||
creator User @relation("KanbanTaskCreator", fields: [creatorId], references: [id])
|
||||
reporterId String? @map("reporter_id")
|
||||
reporter User? @relation("KanbanTaskReporter", fields: [reporterId], references: [id])
|
||||
assigneeId String? @map("assignee_id")
|
||||
assignee User? @relation("KanbanTaskAssignee", fields: [assigneeId], references: [id])
|
||||
|
||||
targetFolderId String? @map("target_folder_id")
|
||||
targetFolder Asset? @relation("KanbanTaskTargetFolder", fields: [targetFolderId], references: [id], onDelete: SetNull)
|
||||
|
||||
dependencies KanbanTaskLink[] @relation("ChildLinks")
|
||||
dependents KanbanTaskLink[] @relation("ParentLinks")
|
||||
assets KanbanTaskAsset[]
|
||||
|
||||
comments KanbanTaskComment[]
|
||||
events KanbanTaskEvent[]
|
||||
notifications Notification[] @relation("KanbanTaskToNotification")
|
||||
|
||||
sortIndex String? @map("sort_index")
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@index([teamId, status])
|
||||
@@index([teamId, status, sortIndex])
|
||||
@@index([teamId, isAgentTask, status])
|
||||
@@index([teamId, goalId, status])
|
||||
@@index([teamId, assigneeId, status])
|
||||
@@index([projectId, status])
|
||||
@@index([sortIndex])
|
||||
@@map("kanban_tasks")
|
||||
}
|
||||
|
||||
model KanbanTaskLink {
|
||||
parentId String @map("parent_id")
|
||||
childId String @map("child_id")
|
||||
parent KanbanTask @relation("ParentLinks", fields: [parentId], references: [id], onDelete: Cascade)
|
||||
child KanbanTask @relation("ChildLinks", fields: [childId], references: [id], onDelete: Cascade)
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
@@id([parentId, childId])
|
||||
@@index([childId])
|
||||
@@map("kanban_task_links")
|
||||
}
|
||||
|
||||
model KanbanTaskAsset {
|
||||
taskId String @map("task_id")
|
||||
assetId String @map("asset_id")
|
||||
task KanbanTask @relation(fields: [taskId], references: [id], onDelete: Cascade)
|
||||
asset Asset @relation(fields: [assetId], references: [id], onDelete: Cascade)
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
@@id([taskId, assetId])
|
||||
@@index([assetId])
|
||||
@@map("kanban_task_assets")
|
||||
}
|
||||
|
||||
model KanbanTaskComment {
|
||||
id String @id @default(ulid())
|
||||
taskId String @map("task_id")
|
||||
task KanbanTask @relation(fields: [taskId], references: [id], onDelete: Cascade)
|
||||
authorId String @map("author_id")
|
||||
author User @relation(fields: [authorId], references: [id])
|
||||
body String @db.Text
|
||||
/// [KanbanCommentAttachmentList]
|
||||
attachments Json?
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@index([taskId, createdAt])
|
||||
@@map("kanban_task_comments")
|
||||
}
|
||||
|
||||
model KanbanTaskEvent {
|
||||
id String @id @default(ulid())
|
||||
taskId String @map("task_id")
|
||||
task KanbanTask @relation(fields: [taskId], references: [id], onDelete: Cascade)
|
||||
actorId String? @map("actor_id")
|
||||
actor User? @relation(fields: [actorId], references: [id])
|
||||
type KanbanTaskEventType
|
||||
fromStatus KanbanTaskStatus? @map("from_status")
|
||||
toStatus KanbanTaskStatus? @map("to_status")
|
||||
/// [KanbanEventPayload]
|
||||
data Json?
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
@@index([taskId, createdAt])
|
||||
@@index([actorId, createdAt])
|
||||
@@map("kanban_task_events")
|
||||
}
|
||||
|
||||
model RecentFileItem {
|
||||
id String @id @default(ulid())
|
||||
userId String @map("user_id")
|
||||
projectId String @map("project_id")
|
||||
assetId String @map("asset_id")
|
||||
viewedAt DateTime @default(now()) @map("viewed_at")
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
project Project @relation(fields: [projectId], references: [id], onDelete: Cascade)
|
||||
asset Asset @relation(fields: [assetId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([userId, projectId, assetId], name: "userIdProjectIdAssetId")
|
||||
@@index([userId, projectId, viewedAt(sort: Desc)])
|
||||
@@index([assetId])
|
||||
@@map("recent_file_items")
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+35
@@ -237,3 +237,38 @@ export type QuotaRule = Prisma.QuotaRuleModel
|
||||
*
|
||||
*/
|
||||
export type QuotaRecord = Prisma.QuotaRecordModel
|
||||
/**
|
||||
* Model KanbanGoal
|
||||
*
|
||||
*/
|
||||
export type KanbanGoal = Prisma.KanbanGoalModel
|
||||
/**
|
||||
* Model KanbanTask
|
||||
*
|
||||
*/
|
||||
export type KanbanTask = Prisma.KanbanTaskModel
|
||||
/**
|
||||
* Model KanbanTaskLink
|
||||
*
|
||||
*/
|
||||
export type KanbanTaskLink = Prisma.KanbanTaskLinkModel
|
||||
/**
|
||||
* Model KanbanTaskAsset
|
||||
*
|
||||
*/
|
||||
export type KanbanTaskAsset = Prisma.KanbanTaskAssetModel
|
||||
/**
|
||||
* Model KanbanTaskComment
|
||||
*
|
||||
*/
|
||||
export type KanbanTaskComment = Prisma.KanbanTaskCommentModel
|
||||
/**
|
||||
* Model KanbanTaskEvent
|
||||
*
|
||||
*/
|
||||
export type KanbanTaskEvent = Prisma.KanbanTaskEventModel
|
||||
/**
|
||||
* Model RecentFileItem
|
||||
*
|
||||
*/
|
||||
export type RecentFileItem = Prisma.RecentFileItemModel
|
||||
|
||||
+35
@@ -261,3 +261,38 @@ export type QuotaRule = Prisma.QuotaRuleModel
|
||||
*
|
||||
*/
|
||||
export type QuotaRecord = Prisma.QuotaRecordModel
|
||||
/**
|
||||
* Model KanbanGoal
|
||||
*
|
||||
*/
|
||||
export type KanbanGoal = Prisma.KanbanGoalModel
|
||||
/**
|
||||
* Model KanbanTask
|
||||
*
|
||||
*/
|
||||
export type KanbanTask = Prisma.KanbanTaskModel
|
||||
/**
|
||||
* Model KanbanTaskLink
|
||||
*
|
||||
*/
|
||||
export type KanbanTaskLink = Prisma.KanbanTaskLinkModel
|
||||
/**
|
||||
* Model KanbanTaskAsset
|
||||
*
|
||||
*/
|
||||
export type KanbanTaskAsset = Prisma.KanbanTaskAssetModel
|
||||
/**
|
||||
* Model KanbanTaskComment
|
||||
*
|
||||
*/
|
||||
export type KanbanTaskComment = Prisma.KanbanTaskCommentModel
|
||||
/**
|
||||
* Model KanbanTaskEvent
|
||||
*
|
||||
*/
|
||||
export type KanbanTaskEvent = Prisma.KanbanTaskEventModel
|
||||
/**
|
||||
* Model RecentFileItem
|
||||
*
|
||||
*/
|
||||
export type RecentFileItem = Prisma.RecentFileItemModel
|
||||
|
||||
+136
@@ -816,6 +816,74 @@ export type EnumQuotaPeriodWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedEnumQuotaPeriodFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumKanbanTaskStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.KanbanTaskStatus | Prisma.EnumKanbanTaskStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.KanbanTaskStatus[] | Prisma.ListEnumKanbanTaskStatusFieldRefInput<$PrismaModel>
|
||||
notIn?: $Enums.KanbanTaskStatus[] | Prisma.ListEnumKanbanTaskStatusFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedEnumKanbanTaskStatusFilter<$PrismaModel> | $Enums.KanbanTaskStatus
|
||||
}
|
||||
|
||||
export type EnumKanbanTaskPriorityFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.KanbanTaskPriority | Prisma.EnumKanbanTaskPriorityFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.KanbanTaskPriority[] | Prisma.ListEnumKanbanTaskPriorityFieldRefInput<$PrismaModel>
|
||||
notIn?: $Enums.KanbanTaskPriority[] | Prisma.ListEnumKanbanTaskPriorityFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedEnumKanbanTaskPriorityFilter<$PrismaModel> | $Enums.KanbanTaskPriority
|
||||
}
|
||||
|
||||
export type EnumKanbanTaskStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.KanbanTaskStatus | Prisma.EnumKanbanTaskStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.KanbanTaskStatus[] | Prisma.ListEnumKanbanTaskStatusFieldRefInput<$PrismaModel>
|
||||
notIn?: $Enums.KanbanTaskStatus[] | Prisma.ListEnumKanbanTaskStatusFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedEnumKanbanTaskStatusWithAggregatesFilter<$PrismaModel> | $Enums.KanbanTaskStatus
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumKanbanTaskStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumKanbanTaskStatusFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumKanbanTaskPriorityWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.KanbanTaskPriority | Prisma.EnumKanbanTaskPriorityFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.KanbanTaskPriority[] | Prisma.ListEnumKanbanTaskPriorityFieldRefInput<$PrismaModel>
|
||||
notIn?: $Enums.KanbanTaskPriority[] | Prisma.ListEnumKanbanTaskPriorityFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedEnumKanbanTaskPriorityWithAggregatesFilter<$PrismaModel> | $Enums.KanbanTaskPriority
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumKanbanTaskPriorityFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumKanbanTaskPriorityFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumKanbanTaskEventTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.KanbanTaskEventType | Prisma.EnumKanbanTaskEventTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.KanbanTaskEventType[] | Prisma.ListEnumKanbanTaskEventTypeFieldRefInput<$PrismaModel>
|
||||
notIn?: $Enums.KanbanTaskEventType[] | Prisma.ListEnumKanbanTaskEventTypeFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedEnumKanbanTaskEventTypeFilter<$PrismaModel> | $Enums.KanbanTaskEventType
|
||||
}
|
||||
|
||||
export type EnumKanbanTaskStatusNullableFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.KanbanTaskStatus | Prisma.EnumKanbanTaskStatusFieldRefInput<$PrismaModel> | null
|
||||
in?: $Enums.KanbanTaskStatus[] | Prisma.ListEnumKanbanTaskStatusFieldRefInput<$PrismaModel> | null
|
||||
notIn?: $Enums.KanbanTaskStatus[] | Prisma.ListEnumKanbanTaskStatusFieldRefInput<$PrismaModel> | null
|
||||
not?: Prisma.NestedEnumKanbanTaskStatusNullableFilter<$PrismaModel> | $Enums.KanbanTaskStatus | null
|
||||
}
|
||||
|
||||
export type EnumKanbanTaskEventTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.KanbanTaskEventType | Prisma.EnumKanbanTaskEventTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.KanbanTaskEventType[] | Prisma.ListEnumKanbanTaskEventTypeFieldRefInput<$PrismaModel>
|
||||
notIn?: $Enums.KanbanTaskEventType[] | Prisma.ListEnumKanbanTaskEventTypeFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedEnumKanbanTaskEventTypeWithAggregatesFilter<$PrismaModel> | $Enums.KanbanTaskEventType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumKanbanTaskEventTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumKanbanTaskEventTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumKanbanTaskStatusNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.KanbanTaskStatus | Prisma.EnumKanbanTaskStatusFieldRefInput<$PrismaModel> | null
|
||||
in?: $Enums.KanbanTaskStatus[] | Prisma.ListEnumKanbanTaskStatusFieldRefInput<$PrismaModel> | null
|
||||
notIn?: $Enums.KanbanTaskStatus[] | Prisma.ListEnumKanbanTaskStatusFieldRefInput<$PrismaModel> | null
|
||||
not?: Prisma.NestedEnumKanbanTaskStatusNullableWithAggregatesFilter<$PrismaModel> | $Enums.KanbanTaskStatus | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumKanbanTaskStatusNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumKanbanTaskStatusNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedStringFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
@@ -1553,4 +1621,72 @@ export type NestedEnumQuotaPeriodWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedEnumQuotaPeriodFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumKanbanTaskStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.KanbanTaskStatus | Prisma.EnumKanbanTaskStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.KanbanTaskStatus[] | Prisma.ListEnumKanbanTaskStatusFieldRefInput<$PrismaModel>
|
||||
notIn?: $Enums.KanbanTaskStatus[] | Prisma.ListEnumKanbanTaskStatusFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedEnumKanbanTaskStatusFilter<$PrismaModel> | $Enums.KanbanTaskStatus
|
||||
}
|
||||
|
||||
export type NestedEnumKanbanTaskPriorityFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.KanbanTaskPriority | Prisma.EnumKanbanTaskPriorityFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.KanbanTaskPriority[] | Prisma.ListEnumKanbanTaskPriorityFieldRefInput<$PrismaModel>
|
||||
notIn?: $Enums.KanbanTaskPriority[] | Prisma.ListEnumKanbanTaskPriorityFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedEnumKanbanTaskPriorityFilter<$PrismaModel> | $Enums.KanbanTaskPriority
|
||||
}
|
||||
|
||||
export type NestedEnumKanbanTaskStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.KanbanTaskStatus | Prisma.EnumKanbanTaskStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.KanbanTaskStatus[] | Prisma.ListEnumKanbanTaskStatusFieldRefInput<$PrismaModel>
|
||||
notIn?: $Enums.KanbanTaskStatus[] | Prisma.ListEnumKanbanTaskStatusFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedEnumKanbanTaskStatusWithAggregatesFilter<$PrismaModel> | $Enums.KanbanTaskStatus
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumKanbanTaskStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumKanbanTaskStatusFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumKanbanTaskPriorityWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.KanbanTaskPriority | Prisma.EnumKanbanTaskPriorityFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.KanbanTaskPriority[] | Prisma.ListEnumKanbanTaskPriorityFieldRefInput<$PrismaModel>
|
||||
notIn?: $Enums.KanbanTaskPriority[] | Prisma.ListEnumKanbanTaskPriorityFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedEnumKanbanTaskPriorityWithAggregatesFilter<$PrismaModel> | $Enums.KanbanTaskPriority
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumKanbanTaskPriorityFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumKanbanTaskPriorityFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumKanbanTaskEventTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.KanbanTaskEventType | Prisma.EnumKanbanTaskEventTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.KanbanTaskEventType[] | Prisma.ListEnumKanbanTaskEventTypeFieldRefInput<$PrismaModel>
|
||||
notIn?: $Enums.KanbanTaskEventType[] | Prisma.ListEnumKanbanTaskEventTypeFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedEnumKanbanTaskEventTypeFilter<$PrismaModel> | $Enums.KanbanTaskEventType
|
||||
}
|
||||
|
||||
export type NestedEnumKanbanTaskStatusNullableFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.KanbanTaskStatus | Prisma.EnumKanbanTaskStatusFieldRefInput<$PrismaModel> | null
|
||||
in?: $Enums.KanbanTaskStatus[] | Prisma.ListEnumKanbanTaskStatusFieldRefInput<$PrismaModel> | null
|
||||
notIn?: $Enums.KanbanTaskStatus[] | Prisma.ListEnumKanbanTaskStatusFieldRefInput<$PrismaModel> | null
|
||||
not?: Prisma.NestedEnumKanbanTaskStatusNullableFilter<$PrismaModel> | $Enums.KanbanTaskStatus | null
|
||||
}
|
||||
|
||||
export type NestedEnumKanbanTaskEventTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.KanbanTaskEventType | Prisma.EnumKanbanTaskEventTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.KanbanTaskEventType[] | Prisma.ListEnumKanbanTaskEventTypeFieldRefInput<$PrismaModel>
|
||||
notIn?: $Enums.KanbanTaskEventType[] | Prisma.ListEnumKanbanTaskEventTypeFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedEnumKanbanTaskEventTypeWithAggregatesFilter<$PrismaModel> | $Enums.KanbanTaskEventType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumKanbanTaskEventTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumKanbanTaskEventTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumKanbanTaskStatusNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.KanbanTaskStatus | Prisma.EnumKanbanTaskStatusFieldRefInput<$PrismaModel> | null
|
||||
in?: $Enums.KanbanTaskStatus[] | Prisma.ListEnumKanbanTaskStatusFieldRefInput<$PrismaModel> | null
|
||||
notIn?: $Enums.KanbanTaskStatus[] | Prisma.ListEnumKanbanTaskStatusFieldRefInput<$PrismaModel> | null
|
||||
not?: Prisma.NestedEnumKanbanTaskStatusNullableWithAggregatesFilter<$PrismaModel> | $Enums.KanbanTaskStatus | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumKanbanTaskStatusNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumKanbanTaskStatusNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
|
||||
|
||||
+49
-2
@@ -75,7 +75,13 @@ export const NotificationType = {
|
||||
successful_file_uploaded: 'successful_file_uploaded',
|
||||
metadata_field_updated_status: 'metadata_field_updated_status',
|
||||
new_user_join_team: 'new_user_join_team',
|
||||
new_user_join_project: 'new_user_join_project'
|
||||
new_user_join_project: 'new_user_join_project',
|
||||
kanban_task_created: 'kanban_task_created',
|
||||
kanban_task_assigned: 'kanban_task_assigned',
|
||||
kanban_task_status_updated: 'kanban_task_status_updated',
|
||||
kanban_task_updated: 'kanban_task_updated',
|
||||
kanban_task_deleted: 'kanban_task_deleted',
|
||||
kanban_task_comment_created: 'kanban_task_comment_created'
|
||||
} as const
|
||||
|
||||
export type NotificationType = (typeof NotificationType)[keyof typeof NotificationType]
|
||||
@@ -137,7 +143,8 @@ export const WorkflowTaskType = {
|
||||
chat: 'chat',
|
||||
ai_embedding: 'ai_embedding',
|
||||
query_embedding_for_search: 'query_embedding_for_search',
|
||||
agent_tool_call: 'agent_tool_call'
|
||||
agent_tool_call: 'agent_tool_call',
|
||||
kanban_agent_run: 'kanban_agent_run'
|
||||
} as const
|
||||
|
||||
export type WorkflowTaskType = (typeof WorkflowTaskType)[keyof typeof WorkflowTaskType]
|
||||
@@ -203,6 +210,46 @@ export const QuotaResourceType = {
|
||||
export type QuotaResourceType = (typeof QuotaResourceType)[keyof typeof QuotaResourceType]
|
||||
|
||||
|
||||
export const KanbanTaskStatus = {
|
||||
TODO: 'TODO',
|
||||
READY: 'READY',
|
||||
IN_PROGRESS: 'IN_PROGRESS',
|
||||
BLOCKED: 'BLOCKED',
|
||||
IN_REVIEW: 'IN_REVIEW',
|
||||
DONE: 'DONE'
|
||||
} as const
|
||||
|
||||
export type KanbanTaskStatus = (typeof KanbanTaskStatus)[keyof typeof KanbanTaskStatus]
|
||||
|
||||
|
||||
export const KanbanTaskPriority = {
|
||||
LOW: 'LOW',
|
||||
MEDIUM: 'MEDIUM',
|
||||
HIGH: 'HIGH',
|
||||
URGENT: 'URGENT'
|
||||
} as const
|
||||
|
||||
export type KanbanTaskPriority = (typeof KanbanTaskPriority)[keyof typeof KanbanTaskPriority]
|
||||
|
||||
|
||||
export const KanbanTaskEventType = {
|
||||
CREATED: 'CREATED',
|
||||
STATUS_CHANGED: 'STATUS_CHANGED',
|
||||
ASSIGNED: 'ASSIGNED',
|
||||
UNASSIGNED: 'UNASSIGNED',
|
||||
COMMENTED: 'COMMENTED',
|
||||
CHANGES_REQUESTED: 'CHANGES_REQUESTED',
|
||||
BLOCKED: 'BLOCKED',
|
||||
UNBLOCKED: 'UNBLOCKED',
|
||||
PRIORITY_CHANGED: 'PRIORITY_CHANGED',
|
||||
GOAL_CHANGED: 'GOAL_CHANGED',
|
||||
DEPENDENCY_ADDED: 'DEPENDENCY_ADDED',
|
||||
DEPENDENCY_REMOVED: 'DEPENDENCY_REMOVED'
|
||||
} as const
|
||||
|
||||
export type KanbanTaskEventType = (typeof KanbanTaskEventType)[keyof typeof KanbanTaskEventType]
|
||||
|
||||
|
||||
export const AgentType = {
|
||||
chat: 'chat',
|
||||
autofill: 'autofill',
|
||||
|
||||
+74
-4
File diff suppressed because one or more lines are too long
+672
-2
@@ -427,7 +427,14 @@ export const ModelName = {
|
||||
AiUsage: 'AiUsage',
|
||||
AuditLog: 'AuditLog',
|
||||
QuotaRule: 'QuotaRule',
|
||||
QuotaRecord: 'QuotaRecord'
|
||||
QuotaRecord: 'QuotaRecord',
|
||||
KanbanGoal: 'KanbanGoal',
|
||||
KanbanTask: 'KanbanTask',
|
||||
KanbanTaskLink: 'KanbanTaskLink',
|
||||
KanbanTaskAsset: 'KanbanTaskAsset',
|
||||
KanbanTaskComment: 'KanbanTaskComment',
|
||||
KanbanTaskEvent: 'KanbanTaskEvent',
|
||||
RecentFileItem: 'RecentFileItem'
|
||||
} as const
|
||||
|
||||
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
||||
@@ -443,7 +450,7 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
omit: GlobalOmitOptions
|
||||
}
|
||||
meta: {
|
||||
modelProps: "user" | "session" | "account" | "verification" | "authToken" | "team" | "sandbox" | "skill" | "teamMember" | "project" | "projectMember" | "shareLink" | "watermarkConfig" | "watermarkTemplate" | "watermarkFile" | "asset" | "storageKey" | "assetMetadataValue" | "assetAgentMd" | "assetComment" | "assetCommentAttachment" | "assetEmbedding" | "invite" | "metadataField" | "notification" | "systemSettings" | "task" | "workflowTask" | "agent" | "agentSkill" | "mcpServer" | "agentMcpServer" | "mcpServerCredential" | "agentSession" | "agentSessionEntry" | "userMetadata" | "model" | "provider" | "collection" | "apiToken" | "aiUsage" | "auditLog" | "quotaRule" | "quotaRecord"
|
||||
modelProps: "user" | "session" | "account" | "verification" | "authToken" | "team" | "sandbox" | "skill" | "teamMember" | "project" | "projectMember" | "shareLink" | "watermarkConfig" | "watermarkTemplate" | "watermarkFile" | "asset" | "storageKey" | "assetMetadataValue" | "assetAgentMd" | "assetComment" | "assetCommentAttachment" | "assetEmbedding" | "invite" | "metadataField" | "notification" | "systemSettings" | "task" | "workflowTask" | "agent" | "agentSkill" | "mcpServer" | "agentMcpServer" | "mcpServerCredential" | "agentSession" | "agentSessionEntry" | "userMetadata" | "model" | "provider" | "collection" | "apiToken" | "aiUsage" | "auditLog" | "quotaRule" | "quotaRecord" | "kanbanGoal" | "kanbanTask" | "kanbanTaskLink" | "kanbanTaskAsset" | "kanbanTaskComment" | "kanbanTaskEvent" | "recentFileItem"
|
||||
txIsolationLevel: TransactionIsolationLevel
|
||||
}
|
||||
model: {
|
||||
@@ -3703,6 +3710,524 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
}
|
||||
}
|
||||
}
|
||||
KanbanGoal: {
|
||||
payload: Prisma.$KanbanGoalPayload<ExtArgs>
|
||||
fields: Prisma.KanbanGoalFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.KanbanGoalFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanGoalPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.KanbanGoalFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanGoalPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.KanbanGoalFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanGoalPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.KanbanGoalFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanGoalPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.KanbanGoalFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanGoalPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.KanbanGoalCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanGoalPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.KanbanGoalCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.KanbanGoalCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanGoalPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.KanbanGoalDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanGoalPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.KanbanGoalUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanGoalPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.KanbanGoalDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.KanbanGoalUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.KanbanGoalUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanGoalPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.KanbanGoalUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanGoalPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.KanbanGoalAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateKanbanGoal>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.KanbanGoalGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.KanbanGoalGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.KanbanGoalCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.KanbanGoalCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
KanbanTask: {
|
||||
payload: Prisma.$KanbanTaskPayload<ExtArgs>
|
||||
fields: Prisma.KanbanTaskFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.KanbanTaskFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.KanbanTaskFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.KanbanTaskFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.KanbanTaskFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.KanbanTaskFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.KanbanTaskCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.KanbanTaskCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.KanbanTaskCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.KanbanTaskDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.KanbanTaskUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.KanbanTaskDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.KanbanTaskUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.KanbanTaskUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.KanbanTaskUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.KanbanTaskAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateKanbanTask>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.KanbanTaskGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.KanbanTaskGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.KanbanTaskCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.KanbanTaskCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
KanbanTaskLink: {
|
||||
payload: Prisma.$KanbanTaskLinkPayload<ExtArgs>
|
||||
fields: Prisma.KanbanTaskLinkFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.KanbanTaskLinkFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskLinkPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.KanbanTaskLinkFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskLinkPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.KanbanTaskLinkFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskLinkPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.KanbanTaskLinkFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskLinkPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.KanbanTaskLinkFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskLinkPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.KanbanTaskLinkCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskLinkPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.KanbanTaskLinkCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.KanbanTaskLinkCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskLinkPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.KanbanTaskLinkDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskLinkPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.KanbanTaskLinkUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskLinkPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.KanbanTaskLinkDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.KanbanTaskLinkUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.KanbanTaskLinkUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskLinkPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.KanbanTaskLinkUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskLinkPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.KanbanTaskLinkAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateKanbanTaskLink>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.KanbanTaskLinkGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.KanbanTaskLinkGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.KanbanTaskLinkCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.KanbanTaskLinkCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
KanbanTaskAsset: {
|
||||
payload: Prisma.$KanbanTaskAssetPayload<ExtArgs>
|
||||
fields: Prisma.KanbanTaskAssetFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.KanbanTaskAssetFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskAssetPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.KanbanTaskAssetFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskAssetPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.KanbanTaskAssetFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskAssetPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.KanbanTaskAssetFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskAssetPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.KanbanTaskAssetFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskAssetPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.KanbanTaskAssetCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskAssetPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.KanbanTaskAssetCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.KanbanTaskAssetCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskAssetPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.KanbanTaskAssetDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskAssetPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.KanbanTaskAssetUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskAssetPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.KanbanTaskAssetDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.KanbanTaskAssetUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.KanbanTaskAssetUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskAssetPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.KanbanTaskAssetUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskAssetPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.KanbanTaskAssetAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateKanbanTaskAsset>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.KanbanTaskAssetGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.KanbanTaskAssetGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.KanbanTaskAssetCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.KanbanTaskAssetCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
KanbanTaskComment: {
|
||||
payload: Prisma.$KanbanTaskCommentPayload<ExtArgs>
|
||||
fields: Prisma.KanbanTaskCommentFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.KanbanTaskCommentFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskCommentPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.KanbanTaskCommentFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskCommentPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.KanbanTaskCommentFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskCommentPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.KanbanTaskCommentFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskCommentPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.KanbanTaskCommentFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskCommentPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.KanbanTaskCommentCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskCommentPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.KanbanTaskCommentCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.KanbanTaskCommentCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskCommentPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.KanbanTaskCommentDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskCommentPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.KanbanTaskCommentUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskCommentPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.KanbanTaskCommentDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.KanbanTaskCommentUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.KanbanTaskCommentUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskCommentPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.KanbanTaskCommentUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskCommentPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.KanbanTaskCommentAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateKanbanTaskComment>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.KanbanTaskCommentGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.KanbanTaskCommentGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.KanbanTaskCommentCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.KanbanTaskCommentCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
KanbanTaskEvent: {
|
||||
payload: Prisma.$KanbanTaskEventPayload<ExtArgs>
|
||||
fields: Prisma.KanbanTaskEventFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.KanbanTaskEventFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskEventPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.KanbanTaskEventFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskEventPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.KanbanTaskEventFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskEventPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.KanbanTaskEventFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskEventPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.KanbanTaskEventFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskEventPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.KanbanTaskEventCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskEventPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.KanbanTaskEventCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.KanbanTaskEventCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskEventPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.KanbanTaskEventDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskEventPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.KanbanTaskEventUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskEventPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.KanbanTaskEventDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.KanbanTaskEventUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.KanbanTaskEventUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskEventPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.KanbanTaskEventUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$KanbanTaskEventPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.KanbanTaskEventAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateKanbanTaskEvent>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.KanbanTaskEventGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.KanbanTaskEventGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.KanbanTaskEventCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.KanbanTaskEventCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
RecentFileItem: {
|
||||
payload: Prisma.$RecentFileItemPayload<ExtArgs>
|
||||
fields: Prisma.RecentFileItemFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.RecentFileItemFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RecentFileItemPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.RecentFileItemFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RecentFileItemPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.RecentFileItemFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RecentFileItemPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.RecentFileItemFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RecentFileItemPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.RecentFileItemFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RecentFileItemPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.RecentFileItemCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RecentFileItemPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.RecentFileItemCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.RecentFileItemCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RecentFileItemPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.RecentFileItemDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RecentFileItemPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.RecentFileItemUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RecentFileItemPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.RecentFileItemDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.RecentFileItemUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.RecentFileItemUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RecentFileItemPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.RecentFileItemUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RecentFileItemPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.RecentFileItemAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateRecentFileItem>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.RecentFileItemGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.RecentFileItemGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.RecentFileItemCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.RecentFileItemCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} & {
|
||||
other: {
|
||||
@@ -4095,6 +4620,7 @@ export const NotificationScalarFieldEnum = {
|
||||
creatorId: 'creatorId',
|
||||
assetId: 'assetId',
|
||||
taskId: 'taskId',
|
||||
kanbanTaskId: 'kanbanTaskId',
|
||||
userId: 'userId'
|
||||
} as const
|
||||
|
||||
@@ -4383,6 +4909,101 @@ export const QuotaRecordScalarFieldEnum = {
|
||||
export type QuotaRecordScalarFieldEnum = (typeof QuotaRecordScalarFieldEnum)[keyof typeof QuotaRecordScalarFieldEnum]
|
||||
|
||||
|
||||
export const KanbanGoalScalarFieldEnum = {
|
||||
id: 'id',
|
||||
title: 'title',
|
||||
description: 'description',
|
||||
teamId: 'teamId',
|
||||
creatorId: 'creatorId',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type KanbanGoalScalarFieldEnum = (typeof KanbanGoalScalarFieldEnum)[keyof typeof KanbanGoalScalarFieldEnum]
|
||||
|
||||
|
||||
export const KanbanTaskScalarFieldEnum = {
|
||||
id: 'id',
|
||||
title: 'title',
|
||||
description: 'description',
|
||||
isAgentTask: 'isAgentTask',
|
||||
status: 'status',
|
||||
priority: 'priority',
|
||||
startDate: 'startDate',
|
||||
dueDate: 'dueDate',
|
||||
startedAt: 'startedAt',
|
||||
completedAt: 'completedAt',
|
||||
goalId: 'goalId',
|
||||
teamId: 'teamId',
|
||||
projectId: 'projectId',
|
||||
creatorId: 'creatorId',
|
||||
reporterId: 'reporterId',
|
||||
assigneeId: 'assigneeId',
|
||||
targetFolderId: 'targetFolderId',
|
||||
sortIndex: 'sortIndex',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type KanbanTaskScalarFieldEnum = (typeof KanbanTaskScalarFieldEnum)[keyof typeof KanbanTaskScalarFieldEnum]
|
||||
|
||||
|
||||
export const KanbanTaskLinkScalarFieldEnum = {
|
||||
parentId: 'parentId',
|
||||
childId: 'childId',
|
||||
createdAt: 'createdAt'
|
||||
} as const
|
||||
|
||||
export type KanbanTaskLinkScalarFieldEnum = (typeof KanbanTaskLinkScalarFieldEnum)[keyof typeof KanbanTaskLinkScalarFieldEnum]
|
||||
|
||||
|
||||
export const KanbanTaskAssetScalarFieldEnum = {
|
||||
taskId: 'taskId',
|
||||
assetId: 'assetId',
|
||||
createdAt: 'createdAt'
|
||||
} as const
|
||||
|
||||
export type KanbanTaskAssetScalarFieldEnum = (typeof KanbanTaskAssetScalarFieldEnum)[keyof typeof KanbanTaskAssetScalarFieldEnum]
|
||||
|
||||
|
||||
export const KanbanTaskCommentScalarFieldEnum = {
|
||||
id: 'id',
|
||||
taskId: 'taskId',
|
||||
authorId: 'authorId',
|
||||
body: 'body',
|
||||
attachments: 'attachments',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type KanbanTaskCommentScalarFieldEnum = (typeof KanbanTaskCommentScalarFieldEnum)[keyof typeof KanbanTaskCommentScalarFieldEnum]
|
||||
|
||||
|
||||
export const KanbanTaskEventScalarFieldEnum = {
|
||||
id: 'id',
|
||||
taskId: 'taskId',
|
||||
actorId: 'actorId',
|
||||
type: 'type',
|
||||
fromStatus: 'fromStatus',
|
||||
toStatus: 'toStatus',
|
||||
data: 'data',
|
||||
createdAt: 'createdAt'
|
||||
} as const
|
||||
|
||||
export type KanbanTaskEventScalarFieldEnum = (typeof KanbanTaskEventScalarFieldEnum)[keyof typeof KanbanTaskEventScalarFieldEnum]
|
||||
|
||||
|
||||
export const RecentFileItemScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
projectId: 'projectId',
|
||||
assetId: 'assetId',
|
||||
viewedAt: 'viewedAt'
|
||||
} as const
|
||||
|
||||
export type RecentFileItemScalarFieldEnum = (typeof RecentFileItemScalarFieldEnum)[keyof typeof RecentFileItemScalarFieldEnum]
|
||||
|
||||
|
||||
export const SortOrder = {
|
||||
asc: 'asc',
|
||||
desc: 'desc'
|
||||
@@ -4835,6 +5456,48 @@ export type EnumQuotaPeriodFieldRefInput<$PrismaModel> = FieldRefInputType<$Pris
|
||||
export type ListEnumQuotaPeriodFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'QuotaPeriod[]'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'KanbanTaskStatus'
|
||||
*/
|
||||
export type EnumKanbanTaskStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'KanbanTaskStatus'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'KanbanTaskStatus[]'
|
||||
*/
|
||||
export type ListEnumKanbanTaskStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'KanbanTaskStatus[]'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'KanbanTaskPriority'
|
||||
*/
|
||||
export type EnumKanbanTaskPriorityFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'KanbanTaskPriority'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'KanbanTaskPriority[]'
|
||||
*/
|
||||
export type ListEnumKanbanTaskPriorityFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'KanbanTaskPriority[]'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'KanbanTaskEventType'
|
||||
*/
|
||||
export type EnumKanbanTaskEventTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'KanbanTaskEventType'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'KanbanTaskEventType[]'
|
||||
*/
|
||||
export type ListEnumKanbanTaskEventTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'KanbanTaskEventType[]'>
|
||||
|
||||
|
||||
/**
|
||||
* Batch Payload for updateMany & deleteMany & createMany
|
||||
*/
|
||||
@@ -4989,6 +5652,13 @@ export type GlobalOmitConfig = {
|
||||
auditLog?: Prisma.AuditLogOmit
|
||||
quotaRule?: Prisma.QuotaRuleOmit
|
||||
quotaRecord?: Prisma.QuotaRecordOmit
|
||||
kanbanGoal?: Prisma.KanbanGoalOmit
|
||||
kanbanTask?: Prisma.KanbanTaskOmit
|
||||
kanbanTaskLink?: Prisma.KanbanTaskLinkOmit
|
||||
kanbanTaskAsset?: Prisma.KanbanTaskAssetOmit
|
||||
kanbanTaskComment?: Prisma.KanbanTaskCommentOmit
|
||||
kanbanTaskEvent?: Prisma.KanbanTaskEventOmit
|
||||
recentFileItem?: Prisma.RecentFileItemOmit
|
||||
}
|
||||
|
||||
/* Types for Logging */
|
||||
|
||||
+104
-1
@@ -94,7 +94,14 @@ export const ModelName = {
|
||||
AiUsage: 'AiUsage',
|
||||
AuditLog: 'AuditLog',
|
||||
QuotaRule: 'QuotaRule',
|
||||
QuotaRecord: 'QuotaRecord'
|
||||
QuotaRecord: 'QuotaRecord',
|
||||
KanbanGoal: 'KanbanGoal',
|
||||
KanbanTask: 'KanbanTask',
|
||||
KanbanTaskLink: 'KanbanTaskLink',
|
||||
KanbanTaskAsset: 'KanbanTaskAsset',
|
||||
KanbanTaskComment: 'KanbanTaskComment',
|
||||
KanbanTaskEvent: 'KanbanTaskEvent',
|
||||
RecentFileItem: 'RecentFileItem'
|
||||
} as const
|
||||
|
||||
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
||||
@@ -466,6 +473,7 @@ export const NotificationScalarFieldEnum = {
|
||||
creatorId: 'creatorId',
|
||||
assetId: 'assetId',
|
||||
taskId: 'taskId',
|
||||
kanbanTaskId: 'kanbanTaskId',
|
||||
userId: 'userId'
|
||||
} as const
|
||||
|
||||
@@ -754,6 +762,101 @@ export const QuotaRecordScalarFieldEnum = {
|
||||
export type QuotaRecordScalarFieldEnum = (typeof QuotaRecordScalarFieldEnum)[keyof typeof QuotaRecordScalarFieldEnum]
|
||||
|
||||
|
||||
export const KanbanGoalScalarFieldEnum = {
|
||||
id: 'id',
|
||||
title: 'title',
|
||||
description: 'description',
|
||||
teamId: 'teamId',
|
||||
creatorId: 'creatorId',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type KanbanGoalScalarFieldEnum = (typeof KanbanGoalScalarFieldEnum)[keyof typeof KanbanGoalScalarFieldEnum]
|
||||
|
||||
|
||||
export const KanbanTaskScalarFieldEnum = {
|
||||
id: 'id',
|
||||
title: 'title',
|
||||
description: 'description',
|
||||
isAgentTask: 'isAgentTask',
|
||||
status: 'status',
|
||||
priority: 'priority',
|
||||
startDate: 'startDate',
|
||||
dueDate: 'dueDate',
|
||||
startedAt: 'startedAt',
|
||||
completedAt: 'completedAt',
|
||||
goalId: 'goalId',
|
||||
teamId: 'teamId',
|
||||
projectId: 'projectId',
|
||||
creatorId: 'creatorId',
|
||||
reporterId: 'reporterId',
|
||||
assigneeId: 'assigneeId',
|
||||
targetFolderId: 'targetFolderId',
|
||||
sortIndex: 'sortIndex',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type KanbanTaskScalarFieldEnum = (typeof KanbanTaskScalarFieldEnum)[keyof typeof KanbanTaskScalarFieldEnum]
|
||||
|
||||
|
||||
export const KanbanTaskLinkScalarFieldEnum = {
|
||||
parentId: 'parentId',
|
||||
childId: 'childId',
|
||||
createdAt: 'createdAt'
|
||||
} as const
|
||||
|
||||
export type KanbanTaskLinkScalarFieldEnum = (typeof KanbanTaskLinkScalarFieldEnum)[keyof typeof KanbanTaskLinkScalarFieldEnum]
|
||||
|
||||
|
||||
export const KanbanTaskAssetScalarFieldEnum = {
|
||||
taskId: 'taskId',
|
||||
assetId: 'assetId',
|
||||
createdAt: 'createdAt'
|
||||
} as const
|
||||
|
||||
export type KanbanTaskAssetScalarFieldEnum = (typeof KanbanTaskAssetScalarFieldEnum)[keyof typeof KanbanTaskAssetScalarFieldEnum]
|
||||
|
||||
|
||||
export const KanbanTaskCommentScalarFieldEnum = {
|
||||
id: 'id',
|
||||
taskId: 'taskId',
|
||||
authorId: 'authorId',
|
||||
body: 'body',
|
||||
attachments: 'attachments',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type KanbanTaskCommentScalarFieldEnum = (typeof KanbanTaskCommentScalarFieldEnum)[keyof typeof KanbanTaskCommentScalarFieldEnum]
|
||||
|
||||
|
||||
export const KanbanTaskEventScalarFieldEnum = {
|
||||
id: 'id',
|
||||
taskId: 'taskId',
|
||||
actorId: 'actorId',
|
||||
type: 'type',
|
||||
fromStatus: 'fromStatus',
|
||||
toStatus: 'toStatus',
|
||||
data: 'data',
|
||||
createdAt: 'createdAt'
|
||||
} as const
|
||||
|
||||
export type KanbanTaskEventScalarFieldEnum = (typeof KanbanTaskEventScalarFieldEnum)[keyof typeof KanbanTaskEventScalarFieldEnum]
|
||||
|
||||
|
||||
export const RecentFileItemScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
projectId: 'projectId',
|
||||
assetId: 'assetId',
|
||||
viewedAt: 'viewedAt'
|
||||
} as const
|
||||
|
||||
export type RecentFileItemScalarFieldEnum = (typeof RecentFileItemScalarFieldEnum)[keyof typeof RecentFileItemScalarFieldEnum]
|
||||
|
||||
|
||||
export const SortOrder = {
|
||||
asc: 'asc',
|
||||
desc: 'desc'
|
||||
|
||||
+7
@@ -52,4 +52,11 @@ export type * from './models/AiUsage.ts'
|
||||
export type * from './models/AuditLog.ts'
|
||||
export type * from './models/QuotaRule.ts'
|
||||
export type * from './models/QuotaRecord.ts'
|
||||
export type * from './models/KanbanGoal.ts'
|
||||
export type * from './models/KanbanTask.ts'
|
||||
export type * from './models/KanbanTaskLink.ts'
|
||||
export type * from './models/KanbanTaskAsset.ts'
|
||||
export type * from './models/KanbanTaskComment.ts'
|
||||
export type * from './models/KanbanTaskEvent.ts'
|
||||
export type * from './models/RecentFileItem.ts'
|
||||
export type * from './commonInputTypes.ts'
|
||||
+944
File diff suppressed because it is too large
Load Diff
+1719
File diff suppressed because it is too large
Load Diff
+4553
File diff suppressed because it is too large
Load Diff
+1391
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+1614
File diff suppressed because it is too large
Load Diff
+1391
File diff suppressed because it is too large
Load Diff
+249
-1
@@ -36,6 +36,7 @@ export type NotificationMinAggregateOutputType = {
|
||||
creatorId: string | null
|
||||
assetId: string | null
|
||||
taskId: string | null
|
||||
kanbanTaskId: string | null
|
||||
userId: string | null
|
||||
}
|
||||
|
||||
@@ -49,6 +50,7 @@ export type NotificationMaxAggregateOutputType = {
|
||||
creatorId: string | null
|
||||
assetId: string | null
|
||||
taskId: string | null
|
||||
kanbanTaskId: string | null
|
||||
userId: string | null
|
||||
}
|
||||
|
||||
@@ -62,6 +64,7 @@ export type NotificationCountAggregateOutputType = {
|
||||
creatorId: number
|
||||
assetId: number
|
||||
taskId: number
|
||||
kanbanTaskId: number
|
||||
userId: number
|
||||
_all: number
|
||||
}
|
||||
@@ -77,6 +80,7 @@ export type NotificationMinAggregateInputType = {
|
||||
creatorId?: true
|
||||
assetId?: true
|
||||
taskId?: true
|
||||
kanbanTaskId?: true
|
||||
userId?: true
|
||||
}
|
||||
|
||||
@@ -90,6 +94,7 @@ export type NotificationMaxAggregateInputType = {
|
||||
creatorId?: true
|
||||
assetId?: true
|
||||
taskId?: true
|
||||
kanbanTaskId?: true
|
||||
userId?: true
|
||||
}
|
||||
|
||||
@@ -103,6 +108,7 @@ export type NotificationCountAggregateInputType = {
|
||||
creatorId?: true
|
||||
assetId?: true
|
||||
taskId?: true
|
||||
kanbanTaskId?: true
|
||||
userId?: true
|
||||
_all?: true
|
||||
}
|
||||
@@ -189,6 +195,7 @@ export type NotificationGroupByOutputType = {
|
||||
creatorId: string | null
|
||||
assetId: string | null
|
||||
taskId: string | null
|
||||
kanbanTaskId: string | null
|
||||
userId: string | null
|
||||
_count: NotificationCountAggregateOutputType | null
|
||||
_min: NotificationMinAggregateOutputType | null
|
||||
@@ -223,12 +230,14 @@ export type NotificationWhereInput = {
|
||||
creatorId?: Prisma.StringNullableFilter<"Notification"> | string | null
|
||||
assetId?: Prisma.StringNullableFilter<"Notification"> | string | null
|
||||
taskId?: Prisma.StringNullableFilter<"Notification"> | string | null
|
||||
kanbanTaskId?: Prisma.StringNullableFilter<"Notification"> | string | null
|
||||
userId?: Prisma.StringNullableFilter<"Notification"> | string | null
|
||||
team?: Prisma.XOR<Prisma.TeamScalarRelationFilter, Prisma.TeamWhereInput>
|
||||
project?: Prisma.XOR<Prisma.ProjectNullableScalarRelationFilter, Prisma.ProjectWhereInput> | null
|
||||
creator?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
|
||||
asset?: Prisma.XOR<Prisma.AssetNullableScalarRelationFilter, Prisma.AssetWhereInput> | null
|
||||
task?: Prisma.XOR<Prisma.TaskNullableScalarRelationFilter, Prisma.TaskWhereInput> | null
|
||||
kanbanTask?: Prisma.XOR<Prisma.KanbanTaskNullableScalarRelationFilter, Prisma.KanbanTaskWhereInput> | null
|
||||
user?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
|
||||
readByMembers?: Prisma.XOR<Prisma.TeamMemberNullableScalarRelationFilter, Prisma.TeamMemberWhereInput> | null
|
||||
}
|
||||
@@ -243,12 +252,14 @@ export type NotificationOrderByWithRelationInput = {
|
||||
creatorId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
assetId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
taskId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
kanbanTaskId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
userId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
team?: Prisma.TeamOrderByWithRelationInput
|
||||
project?: Prisma.ProjectOrderByWithRelationInput
|
||||
creator?: Prisma.UserOrderByWithRelationInput
|
||||
asset?: Prisma.AssetOrderByWithRelationInput
|
||||
task?: Prisma.TaskOrderByWithRelationInput
|
||||
kanbanTask?: Prisma.KanbanTaskOrderByWithRelationInput
|
||||
user?: Prisma.UserOrderByWithRelationInput
|
||||
readByMembers?: Prisma.TeamMemberOrderByWithRelationInput
|
||||
}
|
||||
@@ -266,12 +277,14 @@ export type NotificationWhereUniqueInput = Prisma.AtLeast<{
|
||||
creatorId?: Prisma.StringNullableFilter<"Notification"> | string | null
|
||||
assetId?: Prisma.StringNullableFilter<"Notification"> | string | null
|
||||
taskId?: Prisma.StringNullableFilter<"Notification"> | string | null
|
||||
kanbanTaskId?: Prisma.StringNullableFilter<"Notification"> | string | null
|
||||
userId?: Prisma.StringNullableFilter<"Notification"> | string | null
|
||||
team?: Prisma.XOR<Prisma.TeamScalarRelationFilter, Prisma.TeamWhereInput>
|
||||
project?: Prisma.XOR<Prisma.ProjectNullableScalarRelationFilter, Prisma.ProjectWhereInput> | null
|
||||
creator?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
|
||||
asset?: Prisma.XOR<Prisma.AssetNullableScalarRelationFilter, Prisma.AssetWhereInput> | null
|
||||
task?: Prisma.XOR<Prisma.TaskNullableScalarRelationFilter, Prisma.TaskWhereInput> | null
|
||||
kanbanTask?: Prisma.XOR<Prisma.KanbanTaskNullableScalarRelationFilter, Prisma.KanbanTaskWhereInput> | null
|
||||
user?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
|
||||
readByMembers?: Prisma.XOR<Prisma.TeamMemberNullableScalarRelationFilter, Prisma.TeamMemberWhereInput> | null
|
||||
}, "id">
|
||||
@@ -286,6 +299,7 @@ export type NotificationOrderByWithAggregationInput = {
|
||||
creatorId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
assetId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
taskId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
kanbanTaskId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
userId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
_count?: Prisma.NotificationCountOrderByAggregateInput
|
||||
_max?: Prisma.NotificationMaxOrderByAggregateInput
|
||||
@@ -305,6 +319,7 @@ export type NotificationScalarWhereWithAggregatesInput = {
|
||||
creatorId?: Prisma.StringNullableWithAggregatesFilter<"Notification"> | string | null
|
||||
assetId?: Prisma.StringNullableWithAggregatesFilter<"Notification"> | string | null
|
||||
taskId?: Prisma.StringNullableWithAggregatesFilter<"Notification"> | string | null
|
||||
kanbanTaskId?: Prisma.StringNullableWithAggregatesFilter<"Notification"> | string | null
|
||||
userId?: Prisma.StringNullableWithAggregatesFilter<"Notification"> | string | null
|
||||
}
|
||||
|
||||
@@ -318,6 +333,7 @@ export type NotificationCreateInput = {
|
||||
creator?: Prisma.UserCreateNestedOneWithoutCreatedNotificationsInput
|
||||
asset?: Prisma.AssetCreateNestedOneWithoutNotificationsInput
|
||||
task?: Prisma.TaskCreateNestedOneWithoutNotificationsInput
|
||||
kanbanTask?: Prisma.KanbanTaskCreateNestedOneWithoutNotificationsInput
|
||||
user?: Prisma.UserCreateNestedOneWithoutNotificationsInput
|
||||
readByMembers?: Prisma.TeamMemberCreateNestedOneWithoutLastReadNotificationInput
|
||||
}
|
||||
@@ -332,6 +348,7 @@ export type NotificationUncheckedCreateInput = {
|
||||
creatorId?: string | null
|
||||
assetId?: string | null
|
||||
taskId?: string | null
|
||||
kanbanTaskId?: string | null
|
||||
userId?: string | null
|
||||
readByMembers?: Prisma.TeamMemberUncheckedCreateNestedOneWithoutLastReadNotificationInput
|
||||
}
|
||||
@@ -346,6 +363,7 @@ export type NotificationUpdateInput = {
|
||||
creator?: Prisma.UserUpdateOneWithoutCreatedNotificationsNestedInput
|
||||
asset?: Prisma.AssetUpdateOneWithoutNotificationsNestedInput
|
||||
task?: Prisma.TaskUpdateOneWithoutNotificationsNestedInput
|
||||
kanbanTask?: Prisma.KanbanTaskUpdateOneWithoutNotificationsNestedInput
|
||||
user?: Prisma.UserUpdateOneWithoutNotificationsNestedInput
|
||||
readByMembers?: Prisma.TeamMemberUpdateOneWithoutLastReadNotificationNestedInput
|
||||
}
|
||||
@@ -360,6 +378,7 @@ export type NotificationUncheckedUpdateInput = {
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
assetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
taskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
kanbanTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
readByMembers?: Prisma.TeamMemberUncheckedUpdateOneWithoutLastReadNotificationNestedInput
|
||||
}
|
||||
@@ -374,6 +393,7 @@ export type NotificationCreateManyInput = {
|
||||
creatorId?: string | null
|
||||
assetId?: string | null
|
||||
taskId?: string | null
|
||||
kanbanTaskId?: string | null
|
||||
userId?: string | null
|
||||
}
|
||||
|
||||
@@ -394,6 +414,7 @@ export type NotificationUncheckedUpdateManyInput = {
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
assetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
taskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
kanbanTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
@@ -422,6 +443,7 @@ export type NotificationCountOrderByAggregateInput = {
|
||||
creatorId?: Prisma.SortOrder
|
||||
assetId?: Prisma.SortOrder
|
||||
taskId?: Prisma.SortOrder
|
||||
kanbanTaskId?: Prisma.SortOrder
|
||||
userId?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
@@ -435,6 +457,7 @@ export type NotificationMaxOrderByAggregateInput = {
|
||||
creatorId?: Prisma.SortOrder
|
||||
assetId?: Prisma.SortOrder
|
||||
taskId?: Prisma.SortOrder
|
||||
kanbanTaskId?: Prisma.SortOrder
|
||||
userId?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
@@ -448,6 +471,7 @@ export type NotificationMinOrderByAggregateInput = {
|
||||
creatorId?: Prisma.SortOrder
|
||||
assetId?: Prisma.SortOrder
|
||||
taskId?: Prisma.SortOrder
|
||||
kanbanTaskId?: Prisma.SortOrder
|
||||
userId?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
@@ -723,6 +747,48 @@ export type NotificationUncheckedUpdateManyWithoutTaskNestedInput = {
|
||||
deleteMany?: Prisma.NotificationScalarWhereInput | Prisma.NotificationScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type NotificationCreateNestedManyWithoutKanbanTaskInput = {
|
||||
create?: Prisma.XOR<Prisma.NotificationCreateWithoutKanbanTaskInput, Prisma.NotificationUncheckedCreateWithoutKanbanTaskInput> | Prisma.NotificationCreateWithoutKanbanTaskInput[] | Prisma.NotificationUncheckedCreateWithoutKanbanTaskInput[]
|
||||
connectOrCreate?: Prisma.NotificationCreateOrConnectWithoutKanbanTaskInput | Prisma.NotificationCreateOrConnectWithoutKanbanTaskInput[]
|
||||
createMany?: Prisma.NotificationCreateManyKanbanTaskInputEnvelope
|
||||
connect?: Prisma.NotificationWhereUniqueInput | Prisma.NotificationWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type NotificationUncheckedCreateNestedManyWithoutKanbanTaskInput = {
|
||||
create?: Prisma.XOR<Prisma.NotificationCreateWithoutKanbanTaskInput, Prisma.NotificationUncheckedCreateWithoutKanbanTaskInput> | Prisma.NotificationCreateWithoutKanbanTaskInput[] | Prisma.NotificationUncheckedCreateWithoutKanbanTaskInput[]
|
||||
connectOrCreate?: Prisma.NotificationCreateOrConnectWithoutKanbanTaskInput | Prisma.NotificationCreateOrConnectWithoutKanbanTaskInput[]
|
||||
createMany?: Prisma.NotificationCreateManyKanbanTaskInputEnvelope
|
||||
connect?: Prisma.NotificationWhereUniqueInput | Prisma.NotificationWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type NotificationUpdateManyWithoutKanbanTaskNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.NotificationCreateWithoutKanbanTaskInput, Prisma.NotificationUncheckedCreateWithoutKanbanTaskInput> | Prisma.NotificationCreateWithoutKanbanTaskInput[] | Prisma.NotificationUncheckedCreateWithoutKanbanTaskInput[]
|
||||
connectOrCreate?: Prisma.NotificationCreateOrConnectWithoutKanbanTaskInput | Prisma.NotificationCreateOrConnectWithoutKanbanTaskInput[]
|
||||
upsert?: Prisma.NotificationUpsertWithWhereUniqueWithoutKanbanTaskInput | Prisma.NotificationUpsertWithWhereUniqueWithoutKanbanTaskInput[]
|
||||
createMany?: Prisma.NotificationCreateManyKanbanTaskInputEnvelope
|
||||
set?: Prisma.NotificationWhereUniqueInput | Prisma.NotificationWhereUniqueInput[]
|
||||
disconnect?: Prisma.NotificationWhereUniqueInput | Prisma.NotificationWhereUniqueInput[]
|
||||
delete?: Prisma.NotificationWhereUniqueInput | Prisma.NotificationWhereUniqueInput[]
|
||||
connect?: Prisma.NotificationWhereUniqueInput | Prisma.NotificationWhereUniqueInput[]
|
||||
update?: Prisma.NotificationUpdateWithWhereUniqueWithoutKanbanTaskInput | Prisma.NotificationUpdateWithWhereUniqueWithoutKanbanTaskInput[]
|
||||
updateMany?: Prisma.NotificationUpdateManyWithWhereWithoutKanbanTaskInput | Prisma.NotificationUpdateManyWithWhereWithoutKanbanTaskInput[]
|
||||
deleteMany?: Prisma.NotificationScalarWhereInput | Prisma.NotificationScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type NotificationUncheckedUpdateManyWithoutKanbanTaskNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.NotificationCreateWithoutKanbanTaskInput, Prisma.NotificationUncheckedCreateWithoutKanbanTaskInput> | Prisma.NotificationCreateWithoutKanbanTaskInput[] | Prisma.NotificationUncheckedCreateWithoutKanbanTaskInput[]
|
||||
connectOrCreate?: Prisma.NotificationCreateOrConnectWithoutKanbanTaskInput | Prisma.NotificationCreateOrConnectWithoutKanbanTaskInput[]
|
||||
upsert?: Prisma.NotificationUpsertWithWhereUniqueWithoutKanbanTaskInput | Prisma.NotificationUpsertWithWhereUniqueWithoutKanbanTaskInput[]
|
||||
createMany?: Prisma.NotificationCreateManyKanbanTaskInputEnvelope
|
||||
set?: Prisma.NotificationWhereUniqueInput | Prisma.NotificationWhereUniqueInput[]
|
||||
disconnect?: Prisma.NotificationWhereUniqueInput | Prisma.NotificationWhereUniqueInput[]
|
||||
delete?: Prisma.NotificationWhereUniqueInput | Prisma.NotificationWhereUniqueInput[]
|
||||
connect?: Prisma.NotificationWhereUniqueInput | Prisma.NotificationWhereUniqueInput[]
|
||||
update?: Prisma.NotificationUpdateWithWhereUniqueWithoutKanbanTaskInput | Prisma.NotificationUpdateWithWhereUniqueWithoutKanbanTaskInput[]
|
||||
updateMany?: Prisma.NotificationUpdateManyWithWhereWithoutKanbanTaskInput | Prisma.NotificationUpdateManyWithWhereWithoutKanbanTaskInput[]
|
||||
deleteMany?: Prisma.NotificationScalarWhereInput | Prisma.NotificationScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type NotificationCreateWithoutCreatorInput = {
|
||||
id?: string
|
||||
type?: $Enums.NotificationType | null
|
||||
@@ -732,6 +798,7 @@ export type NotificationCreateWithoutCreatorInput = {
|
||||
project?: Prisma.ProjectCreateNestedOneWithoutNotificationsInput
|
||||
asset?: Prisma.AssetCreateNestedOneWithoutNotificationsInput
|
||||
task?: Prisma.TaskCreateNestedOneWithoutNotificationsInput
|
||||
kanbanTask?: Prisma.KanbanTaskCreateNestedOneWithoutNotificationsInput
|
||||
user?: Prisma.UserCreateNestedOneWithoutNotificationsInput
|
||||
readByMembers?: Prisma.TeamMemberCreateNestedOneWithoutLastReadNotificationInput
|
||||
}
|
||||
@@ -745,6 +812,7 @@ export type NotificationUncheckedCreateWithoutCreatorInput = {
|
||||
projectId?: string | null
|
||||
assetId?: string | null
|
||||
taskId?: string | null
|
||||
kanbanTaskId?: string | null
|
||||
userId?: string | null
|
||||
readByMembers?: Prisma.TeamMemberUncheckedCreateNestedOneWithoutLastReadNotificationInput
|
||||
}
|
||||
@@ -769,6 +837,7 @@ export type NotificationCreateWithoutUserInput = {
|
||||
creator?: Prisma.UserCreateNestedOneWithoutCreatedNotificationsInput
|
||||
asset?: Prisma.AssetCreateNestedOneWithoutNotificationsInput
|
||||
task?: Prisma.TaskCreateNestedOneWithoutNotificationsInput
|
||||
kanbanTask?: Prisma.KanbanTaskCreateNestedOneWithoutNotificationsInput
|
||||
readByMembers?: Prisma.TeamMemberCreateNestedOneWithoutLastReadNotificationInput
|
||||
}
|
||||
|
||||
@@ -782,6 +851,7 @@ export type NotificationUncheckedCreateWithoutUserInput = {
|
||||
creatorId?: string | null
|
||||
assetId?: string | null
|
||||
taskId?: string | null
|
||||
kanbanTaskId?: string | null
|
||||
readByMembers?: Prisma.TeamMemberUncheckedCreateNestedOneWithoutLastReadNotificationInput
|
||||
}
|
||||
|
||||
@@ -824,6 +894,7 @@ export type NotificationScalarWhereInput = {
|
||||
creatorId?: Prisma.StringNullableFilter<"Notification"> | string | null
|
||||
assetId?: Prisma.StringNullableFilter<"Notification"> | string | null
|
||||
taskId?: Prisma.StringNullableFilter<"Notification"> | string | null
|
||||
kanbanTaskId?: Prisma.StringNullableFilter<"Notification"> | string | null
|
||||
userId?: Prisma.StringNullableFilter<"Notification"> | string | null
|
||||
}
|
||||
|
||||
@@ -852,6 +923,7 @@ export type NotificationCreateWithoutTeamInput = {
|
||||
creator?: Prisma.UserCreateNestedOneWithoutCreatedNotificationsInput
|
||||
asset?: Prisma.AssetCreateNestedOneWithoutNotificationsInput
|
||||
task?: Prisma.TaskCreateNestedOneWithoutNotificationsInput
|
||||
kanbanTask?: Prisma.KanbanTaskCreateNestedOneWithoutNotificationsInput
|
||||
user?: Prisma.UserCreateNestedOneWithoutNotificationsInput
|
||||
readByMembers?: Prisma.TeamMemberCreateNestedOneWithoutLastReadNotificationInput
|
||||
}
|
||||
@@ -865,6 +937,7 @@ export type NotificationUncheckedCreateWithoutTeamInput = {
|
||||
creatorId?: string | null
|
||||
assetId?: string | null
|
||||
taskId?: string | null
|
||||
kanbanTaskId?: string | null
|
||||
userId?: string | null
|
||||
readByMembers?: Prisma.TeamMemberUncheckedCreateNestedOneWithoutLastReadNotificationInput
|
||||
}
|
||||
@@ -905,6 +978,7 @@ export type NotificationCreateWithoutReadByMembersInput = {
|
||||
creator?: Prisma.UserCreateNestedOneWithoutCreatedNotificationsInput
|
||||
asset?: Prisma.AssetCreateNestedOneWithoutNotificationsInput
|
||||
task?: Prisma.TaskCreateNestedOneWithoutNotificationsInput
|
||||
kanbanTask?: Prisma.KanbanTaskCreateNestedOneWithoutNotificationsInput
|
||||
user?: Prisma.UserCreateNestedOneWithoutNotificationsInput
|
||||
}
|
||||
|
||||
@@ -918,6 +992,7 @@ export type NotificationUncheckedCreateWithoutReadByMembersInput = {
|
||||
creatorId?: string | null
|
||||
assetId?: string | null
|
||||
taskId?: string | null
|
||||
kanbanTaskId?: string | null
|
||||
userId?: string | null
|
||||
}
|
||||
|
||||
@@ -947,6 +1022,7 @@ export type NotificationUpdateWithoutReadByMembersInput = {
|
||||
creator?: Prisma.UserUpdateOneWithoutCreatedNotificationsNestedInput
|
||||
asset?: Prisma.AssetUpdateOneWithoutNotificationsNestedInput
|
||||
task?: Prisma.TaskUpdateOneWithoutNotificationsNestedInput
|
||||
kanbanTask?: Prisma.KanbanTaskUpdateOneWithoutNotificationsNestedInput
|
||||
user?: Prisma.UserUpdateOneWithoutNotificationsNestedInput
|
||||
}
|
||||
|
||||
@@ -960,6 +1036,7 @@ export type NotificationUncheckedUpdateWithoutReadByMembersInput = {
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
assetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
taskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
kanbanTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
@@ -972,6 +1049,7 @@ export type NotificationCreateWithoutProjectInput = {
|
||||
creator?: Prisma.UserCreateNestedOneWithoutCreatedNotificationsInput
|
||||
asset?: Prisma.AssetCreateNestedOneWithoutNotificationsInput
|
||||
task?: Prisma.TaskCreateNestedOneWithoutNotificationsInput
|
||||
kanbanTask?: Prisma.KanbanTaskCreateNestedOneWithoutNotificationsInput
|
||||
user?: Prisma.UserCreateNestedOneWithoutNotificationsInput
|
||||
readByMembers?: Prisma.TeamMemberCreateNestedOneWithoutLastReadNotificationInput
|
||||
}
|
||||
@@ -985,6 +1063,7 @@ export type NotificationUncheckedCreateWithoutProjectInput = {
|
||||
creatorId?: string | null
|
||||
assetId?: string | null
|
||||
taskId?: string | null
|
||||
kanbanTaskId?: string | null
|
||||
userId?: string | null
|
||||
readByMembers?: Prisma.TeamMemberUncheckedCreateNestedOneWithoutLastReadNotificationInput
|
||||
}
|
||||
@@ -1024,6 +1103,7 @@ export type NotificationCreateWithoutAssetInput = {
|
||||
project?: Prisma.ProjectCreateNestedOneWithoutNotificationsInput
|
||||
creator?: Prisma.UserCreateNestedOneWithoutCreatedNotificationsInput
|
||||
task?: Prisma.TaskCreateNestedOneWithoutNotificationsInput
|
||||
kanbanTask?: Prisma.KanbanTaskCreateNestedOneWithoutNotificationsInput
|
||||
user?: Prisma.UserCreateNestedOneWithoutNotificationsInput
|
||||
readByMembers?: Prisma.TeamMemberCreateNestedOneWithoutLastReadNotificationInput
|
||||
}
|
||||
@@ -1037,6 +1117,7 @@ export type NotificationUncheckedCreateWithoutAssetInput = {
|
||||
projectId?: string | null
|
||||
creatorId?: string | null
|
||||
taskId?: string | null
|
||||
kanbanTaskId?: string | null
|
||||
userId?: string | null
|
||||
readByMembers?: Prisma.TeamMemberUncheckedCreateNestedOneWithoutLastReadNotificationInput
|
||||
}
|
||||
@@ -1076,6 +1157,7 @@ export type NotificationCreateWithoutTaskInput = {
|
||||
project?: Prisma.ProjectCreateNestedOneWithoutNotificationsInput
|
||||
creator?: Prisma.UserCreateNestedOneWithoutCreatedNotificationsInput
|
||||
asset?: Prisma.AssetCreateNestedOneWithoutNotificationsInput
|
||||
kanbanTask?: Prisma.KanbanTaskCreateNestedOneWithoutNotificationsInput
|
||||
user?: Prisma.UserCreateNestedOneWithoutNotificationsInput
|
||||
readByMembers?: Prisma.TeamMemberCreateNestedOneWithoutLastReadNotificationInput
|
||||
}
|
||||
@@ -1089,6 +1171,7 @@ export type NotificationUncheckedCreateWithoutTaskInput = {
|
||||
projectId?: string | null
|
||||
creatorId?: string | null
|
||||
assetId?: string | null
|
||||
kanbanTaskId?: string | null
|
||||
userId?: string | null
|
||||
readByMembers?: Prisma.TeamMemberUncheckedCreateNestedOneWithoutLastReadNotificationInput
|
||||
}
|
||||
@@ -1119,6 +1202,60 @@ export type NotificationUpdateManyWithWhereWithoutTaskInput = {
|
||||
data: Prisma.XOR<Prisma.NotificationUpdateManyMutationInput, Prisma.NotificationUncheckedUpdateManyWithoutTaskInput>
|
||||
}
|
||||
|
||||
export type NotificationCreateWithoutKanbanTaskInput = {
|
||||
id?: string
|
||||
type?: $Enums.NotificationType | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
team: Prisma.TeamCreateNestedOneWithoutNotificationsInput
|
||||
project?: Prisma.ProjectCreateNestedOneWithoutNotificationsInput
|
||||
creator?: Prisma.UserCreateNestedOneWithoutCreatedNotificationsInput
|
||||
asset?: Prisma.AssetCreateNestedOneWithoutNotificationsInput
|
||||
task?: Prisma.TaskCreateNestedOneWithoutNotificationsInput
|
||||
user?: Prisma.UserCreateNestedOneWithoutNotificationsInput
|
||||
readByMembers?: Prisma.TeamMemberCreateNestedOneWithoutLastReadNotificationInput
|
||||
}
|
||||
|
||||
export type NotificationUncheckedCreateWithoutKanbanTaskInput = {
|
||||
id?: string
|
||||
type?: $Enums.NotificationType | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
teamId: string
|
||||
projectId?: string | null
|
||||
creatorId?: string | null
|
||||
assetId?: string | null
|
||||
taskId?: string | null
|
||||
userId?: string | null
|
||||
readByMembers?: Prisma.TeamMemberUncheckedCreateNestedOneWithoutLastReadNotificationInput
|
||||
}
|
||||
|
||||
export type NotificationCreateOrConnectWithoutKanbanTaskInput = {
|
||||
where: Prisma.NotificationWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.NotificationCreateWithoutKanbanTaskInput, Prisma.NotificationUncheckedCreateWithoutKanbanTaskInput>
|
||||
}
|
||||
|
||||
export type NotificationCreateManyKanbanTaskInputEnvelope = {
|
||||
data: Prisma.NotificationCreateManyKanbanTaskInput | Prisma.NotificationCreateManyKanbanTaskInput[]
|
||||
skipDuplicates?: boolean
|
||||
}
|
||||
|
||||
export type NotificationUpsertWithWhereUniqueWithoutKanbanTaskInput = {
|
||||
where: Prisma.NotificationWhereUniqueInput
|
||||
update: Prisma.XOR<Prisma.NotificationUpdateWithoutKanbanTaskInput, Prisma.NotificationUncheckedUpdateWithoutKanbanTaskInput>
|
||||
create: Prisma.XOR<Prisma.NotificationCreateWithoutKanbanTaskInput, Prisma.NotificationUncheckedCreateWithoutKanbanTaskInput>
|
||||
}
|
||||
|
||||
export type NotificationUpdateWithWhereUniqueWithoutKanbanTaskInput = {
|
||||
where: Prisma.NotificationWhereUniqueInput
|
||||
data: Prisma.XOR<Prisma.NotificationUpdateWithoutKanbanTaskInput, Prisma.NotificationUncheckedUpdateWithoutKanbanTaskInput>
|
||||
}
|
||||
|
||||
export type NotificationUpdateManyWithWhereWithoutKanbanTaskInput = {
|
||||
where: Prisma.NotificationScalarWhereInput
|
||||
data: Prisma.XOR<Prisma.NotificationUpdateManyMutationInput, Prisma.NotificationUncheckedUpdateManyWithoutKanbanTaskInput>
|
||||
}
|
||||
|
||||
export type NotificationCreateManyCreatorInput = {
|
||||
id?: string
|
||||
type?: $Enums.NotificationType | null
|
||||
@@ -1128,6 +1265,7 @@ export type NotificationCreateManyCreatorInput = {
|
||||
projectId?: string | null
|
||||
assetId?: string | null
|
||||
taskId?: string | null
|
||||
kanbanTaskId?: string | null
|
||||
userId?: string | null
|
||||
}
|
||||
|
||||
@@ -1141,6 +1279,7 @@ export type NotificationCreateManyUserInput = {
|
||||
creatorId?: string | null
|
||||
assetId?: string | null
|
||||
taskId?: string | null
|
||||
kanbanTaskId?: string | null
|
||||
}
|
||||
|
||||
export type NotificationUpdateWithoutCreatorInput = {
|
||||
@@ -1152,6 +1291,7 @@ export type NotificationUpdateWithoutCreatorInput = {
|
||||
project?: Prisma.ProjectUpdateOneWithoutNotificationsNestedInput
|
||||
asset?: Prisma.AssetUpdateOneWithoutNotificationsNestedInput
|
||||
task?: Prisma.TaskUpdateOneWithoutNotificationsNestedInput
|
||||
kanbanTask?: Prisma.KanbanTaskUpdateOneWithoutNotificationsNestedInput
|
||||
user?: Prisma.UserUpdateOneWithoutNotificationsNestedInput
|
||||
readByMembers?: Prisma.TeamMemberUpdateOneWithoutLastReadNotificationNestedInput
|
||||
}
|
||||
@@ -1165,6 +1305,7 @@ export type NotificationUncheckedUpdateWithoutCreatorInput = {
|
||||
projectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
assetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
taskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
kanbanTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
readByMembers?: Prisma.TeamMemberUncheckedUpdateOneWithoutLastReadNotificationNestedInput
|
||||
}
|
||||
@@ -1178,6 +1319,7 @@ export type NotificationUncheckedUpdateManyWithoutCreatorInput = {
|
||||
projectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
assetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
taskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
kanbanTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
@@ -1191,6 +1333,7 @@ export type NotificationUpdateWithoutUserInput = {
|
||||
creator?: Prisma.UserUpdateOneWithoutCreatedNotificationsNestedInput
|
||||
asset?: Prisma.AssetUpdateOneWithoutNotificationsNestedInput
|
||||
task?: Prisma.TaskUpdateOneWithoutNotificationsNestedInput
|
||||
kanbanTask?: Prisma.KanbanTaskUpdateOneWithoutNotificationsNestedInput
|
||||
readByMembers?: Prisma.TeamMemberUpdateOneWithoutLastReadNotificationNestedInput
|
||||
}
|
||||
|
||||
@@ -1204,6 +1347,7 @@ export type NotificationUncheckedUpdateWithoutUserInput = {
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
assetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
taskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
kanbanTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
readByMembers?: Prisma.TeamMemberUncheckedUpdateOneWithoutLastReadNotificationNestedInput
|
||||
}
|
||||
|
||||
@@ -1217,6 +1361,7 @@ export type NotificationUncheckedUpdateManyWithoutUserInput = {
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
assetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
taskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
kanbanTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
export type NotificationCreateManyTeamInput = {
|
||||
@@ -1228,6 +1373,7 @@ export type NotificationCreateManyTeamInput = {
|
||||
creatorId?: string | null
|
||||
assetId?: string | null
|
||||
taskId?: string | null
|
||||
kanbanTaskId?: string | null
|
||||
userId?: string | null
|
||||
}
|
||||
|
||||
@@ -1240,6 +1386,7 @@ export type NotificationUpdateWithoutTeamInput = {
|
||||
creator?: Prisma.UserUpdateOneWithoutCreatedNotificationsNestedInput
|
||||
asset?: Prisma.AssetUpdateOneWithoutNotificationsNestedInput
|
||||
task?: Prisma.TaskUpdateOneWithoutNotificationsNestedInput
|
||||
kanbanTask?: Prisma.KanbanTaskUpdateOneWithoutNotificationsNestedInput
|
||||
user?: Prisma.UserUpdateOneWithoutNotificationsNestedInput
|
||||
readByMembers?: Prisma.TeamMemberUpdateOneWithoutLastReadNotificationNestedInput
|
||||
}
|
||||
@@ -1253,6 +1400,7 @@ export type NotificationUncheckedUpdateWithoutTeamInput = {
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
assetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
taskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
kanbanTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
readByMembers?: Prisma.TeamMemberUncheckedUpdateOneWithoutLastReadNotificationNestedInput
|
||||
}
|
||||
@@ -1266,6 +1414,7 @@ export type NotificationUncheckedUpdateManyWithoutTeamInput = {
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
assetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
taskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
kanbanTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
@@ -1278,6 +1427,7 @@ export type NotificationCreateManyProjectInput = {
|
||||
creatorId?: string | null
|
||||
assetId?: string | null
|
||||
taskId?: string | null
|
||||
kanbanTaskId?: string | null
|
||||
userId?: string | null
|
||||
}
|
||||
|
||||
@@ -1290,6 +1440,7 @@ export type NotificationUpdateWithoutProjectInput = {
|
||||
creator?: Prisma.UserUpdateOneWithoutCreatedNotificationsNestedInput
|
||||
asset?: Prisma.AssetUpdateOneWithoutNotificationsNestedInput
|
||||
task?: Prisma.TaskUpdateOneWithoutNotificationsNestedInput
|
||||
kanbanTask?: Prisma.KanbanTaskUpdateOneWithoutNotificationsNestedInput
|
||||
user?: Prisma.UserUpdateOneWithoutNotificationsNestedInput
|
||||
readByMembers?: Prisma.TeamMemberUpdateOneWithoutLastReadNotificationNestedInput
|
||||
}
|
||||
@@ -1303,6 +1454,7 @@ export type NotificationUncheckedUpdateWithoutProjectInput = {
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
assetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
taskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
kanbanTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
readByMembers?: Prisma.TeamMemberUncheckedUpdateOneWithoutLastReadNotificationNestedInput
|
||||
}
|
||||
@@ -1316,6 +1468,7 @@ export type NotificationUncheckedUpdateManyWithoutProjectInput = {
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
assetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
taskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
kanbanTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
@@ -1328,6 +1481,7 @@ export type NotificationCreateManyAssetInput = {
|
||||
projectId?: string | null
|
||||
creatorId?: string | null
|
||||
taskId?: string | null
|
||||
kanbanTaskId?: string | null
|
||||
userId?: string | null
|
||||
}
|
||||
|
||||
@@ -1340,6 +1494,7 @@ export type NotificationUpdateWithoutAssetInput = {
|
||||
project?: Prisma.ProjectUpdateOneWithoutNotificationsNestedInput
|
||||
creator?: Prisma.UserUpdateOneWithoutCreatedNotificationsNestedInput
|
||||
task?: Prisma.TaskUpdateOneWithoutNotificationsNestedInput
|
||||
kanbanTask?: Prisma.KanbanTaskUpdateOneWithoutNotificationsNestedInput
|
||||
user?: Prisma.UserUpdateOneWithoutNotificationsNestedInput
|
||||
readByMembers?: Prisma.TeamMemberUpdateOneWithoutLastReadNotificationNestedInput
|
||||
}
|
||||
@@ -1353,6 +1508,7 @@ export type NotificationUncheckedUpdateWithoutAssetInput = {
|
||||
projectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
taskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
kanbanTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
readByMembers?: Prisma.TeamMemberUncheckedUpdateOneWithoutLastReadNotificationNestedInput
|
||||
}
|
||||
@@ -1366,6 +1522,7 @@ export type NotificationUncheckedUpdateManyWithoutAssetInput = {
|
||||
projectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
taskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
kanbanTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
@@ -1378,6 +1535,7 @@ export type NotificationCreateManyTaskInput = {
|
||||
projectId?: string | null
|
||||
creatorId?: string | null
|
||||
assetId?: string | null
|
||||
kanbanTaskId?: string | null
|
||||
userId?: string | null
|
||||
}
|
||||
|
||||
@@ -1390,6 +1548,7 @@ export type NotificationUpdateWithoutTaskInput = {
|
||||
project?: Prisma.ProjectUpdateOneWithoutNotificationsNestedInput
|
||||
creator?: Prisma.UserUpdateOneWithoutCreatedNotificationsNestedInput
|
||||
asset?: Prisma.AssetUpdateOneWithoutNotificationsNestedInput
|
||||
kanbanTask?: Prisma.KanbanTaskUpdateOneWithoutNotificationsNestedInput
|
||||
user?: Prisma.UserUpdateOneWithoutNotificationsNestedInput
|
||||
readByMembers?: Prisma.TeamMemberUpdateOneWithoutLastReadNotificationNestedInput
|
||||
}
|
||||
@@ -1403,6 +1562,7 @@ export type NotificationUncheckedUpdateWithoutTaskInput = {
|
||||
projectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
assetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
kanbanTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
readByMembers?: Prisma.TeamMemberUncheckedUpdateOneWithoutLastReadNotificationNestedInput
|
||||
}
|
||||
@@ -1416,6 +1576,61 @@ export type NotificationUncheckedUpdateManyWithoutTaskInput = {
|
||||
projectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
assetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
kanbanTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
export type NotificationCreateManyKanbanTaskInput = {
|
||||
id?: string
|
||||
type?: $Enums.NotificationType | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
teamId: string
|
||||
projectId?: string | null
|
||||
creatorId?: string | null
|
||||
assetId?: string | null
|
||||
taskId?: string | null
|
||||
userId?: string | null
|
||||
}
|
||||
|
||||
export type NotificationUpdateWithoutKanbanTaskInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
type?: Prisma.NullableEnumNotificationTypeFieldUpdateOperationsInput | $Enums.NotificationType | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
team?: Prisma.TeamUpdateOneRequiredWithoutNotificationsNestedInput
|
||||
project?: Prisma.ProjectUpdateOneWithoutNotificationsNestedInput
|
||||
creator?: Prisma.UserUpdateOneWithoutCreatedNotificationsNestedInput
|
||||
asset?: Prisma.AssetUpdateOneWithoutNotificationsNestedInput
|
||||
task?: Prisma.TaskUpdateOneWithoutNotificationsNestedInput
|
||||
user?: Prisma.UserUpdateOneWithoutNotificationsNestedInput
|
||||
readByMembers?: Prisma.TeamMemberUpdateOneWithoutLastReadNotificationNestedInput
|
||||
}
|
||||
|
||||
export type NotificationUncheckedUpdateWithoutKanbanTaskInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
type?: Prisma.NullableEnumNotificationTypeFieldUpdateOperationsInput | $Enums.NotificationType | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
teamId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
projectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
assetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
taskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
readByMembers?: Prisma.TeamMemberUncheckedUpdateOneWithoutLastReadNotificationNestedInput
|
||||
}
|
||||
|
||||
export type NotificationUncheckedUpdateManyWithoutKanbanTaskInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
type?: Prisma.NullableEnumNotificationTypeFieldUpdateOperationsInput | $Enums.NotificationType | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
teamId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
projectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
assetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
taskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
@@ -1431,12 +1646,14 @@ export type NotificationSelect<ExtArgs extends runtime.Types.Extensions.Internal
|
||||
creatorId?: boolean
|
||||
assetId?: boolean
|
||||
taskId?: boolean
|
||||
kanbanTaskId?: boolean
|
||||
userId?: boolean
|
||||
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
|
||||
project?: boolean | Prisma.Notification$projectArgs<ExtArgs>
|
||||
creator?: boolean | Prisma.Notification$creatorArgs<ExtArgs>
|
||||
asset?: boolean | Prisma.Notification$assetArgs<ExtArgs>
|
||||
task?: boolean | Prisma.Notification$taskArgs<ExtArgs>
|
||||
kanbanTask?: boolean | Prisma.Notification$kanbanTaskArgs<ExtArgs>
|
||||
user?: boolean | Prisma.Notification$userArgs<ExtArgs>
|
||||
readByMembers?: boolean | Prisma.Notification$readByMembersArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["notification"]>
|
||||
@@ -1451,12 +1668,14 @@ export type NotificationSelectCreateManyAndReturn<ExtArgs extends runtime.Types.
|
||||
creatorId?: boolean
|
||||
assetId?: boolean
|
||||
taskId?: boolean
|
||||
kanbanTaskId?: boolean
|
||||
userId?: boolean
|
||||
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
|
||||
project?: boolean | Prisma.Notification$projectArgs<ExtArgs>
|
||||
creator?: boolean | Prisma.Notification$creatorArgs<ExtArgs>
|
||||
asset?: boolean | Prisma.Notification$assetArgs<ExtArgs>
|
||||
task?: boolean | Prisma.Notification$taskArgs<ExtArgs>
|
||||
kanbanTask?: boolean | Prisma.Notification$kanbanTaskArgs<ExtArgs>
|
||||
user?: boolean | Prisma.Notification$userArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["notification"]>
|
||||
|
||||
@@ -1470,12 +1689,14 @@ export type NotificationSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.
|
||||
creatorId?: boolean
|
||||
assetId?: boolean
|
||||
taskId?: boolean
|
||||
kanbanTaskId?: boolean
|
||||
userId?: boolean
|
||||
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
|
||||
project?: boolean | Prisma.Notification$projectArgs<ExtArgs>
|
||||
creator?: boolean | Prisma.Notification$creatorArgs<ExtArgs>
|
||||
asset?: boolean | Prisma.Notification$assetArgs<ExtArgs>
|
||||
task?: boolean | Prisma.Notification$taskArgs<ExtArgs>
|
||||
kanbanTask?: boolean | Prisma.Notification$kanbanTaskArgs<ExtArgs>
|
||||
user?: boolean | Prisma.Notification$userArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["notification"]>
|
||||
|
||||
@@ -1489,16 +1710,18 @@ export type NotificationSelectScalar = {
|
||||
creatorId?: boolean
|
||||
assetId?: boolean
|
||||
taskId?: boolean
|
||||
kanbanTaskId?: boolean
|
||||
userId?: boolean
|
||||
}
|
||||
|
||||
export type NotificationOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "type" | "createdAt" | "updatedAt" | "teamId" | "projectId" | "creatorId" | "assetId" | "taskId" | "userId", ExtArgs["result"]["notification"]>
|
||||
export type NotificationOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "type" | "createdAt" | "updatedAt" | "teamId" | "projectId" | "creatorId" | "assetId" | "taskId" | "kanbanTaskId" | "userId", ExtArgs["result"]["notification"]>
|
||||
export type NotificationInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
|
||||
project?: boolean | Prisma.Notification$projectArgs<ExtArgs>
|
||||
creator?: boolean | Prisma.Notification$creatorArgs<ExtArgs>
|
||||
asset?: boolean | Prisma.Notification$assetArgs<ExtArgs>
|
||||
task?: boolean | Prisma.Notification$taskArgs<ExtArgs>
|
||||
kanbanTask?: boolean | Prisma.Notification$kanbanTaskArgs<ExtArgs>
|
||||
user?: boolean | Prisma.Notification$userArgs<ExtArgs>
|
||||
readByMembers?: boolean | Prisma.Notification$readByMembersArgs<ExtArgs>
|
||||
}
|
||||
@@ -1508,6 +1731,7 @@ export type NotificationIncludeCreateManyAndReturn<ExtArgs extends runtime.Types
|
||||
creator?: boolean | Prisma.Notification$creatorArgs<ExtArgs>
|
||||
asset?: boolean | Prisma.Notification$assetArgs<ExtArgs>
|
||||
task?: boolean | Prisma.Notification$taskArgs<ExtArgs>
|
||||
kanbanTask?: boolean | Prisma.Notification$kanbanTaskArgs<ExtArgs>
|
||||
user?: boolean | Prisma.Notification$userArgs<ExtArgs>
|
||||
}
|
||||
export type NotificationIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
@@ -1516,6 +1740,7 @@ export type NotificationIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types
|
||||
creator?: boolean | Prisma.Notification$creatorArgs<ExtArgs>
|
||||
asset?: boolean | Prisma.Notification$assetArgs<ExtArgs>
|
||||
task?: boolean | Prisma.Notification$taskArgs<ExtArgs>
|
||||
kanbanTask?: boolean | Prisma.Notification$kanbanTaskArgs<ExtArgs>
|
||||
user?: boolean | Prisma.Notification$userArgs<ExtArgs>
|
||||
}
|
||||
|
||||
@@ -1527,6 +1752,7 @@ export type $NotificationPayload<ExtArgs extends runtime.Types.Extensions.Intern
|
||||
creator: Prisma.$UserPayload<ExtArgs> | null
|
||||
asset: Prisma.$AssetPayload<ExtArgs> | null
|
||||
task: Prisma.$TaskPayload<ExtArgs> | null
|
||||
kanbanTask: Prisma.$KanbanTaskPayload<ExtArgs> | null
|
||||
user: Prisma.$UserPayload<ExtArgs> | null
|
||||
readByMembers: Prisma.$TeamMemberPayload<ExtArgs> | null
|
||||
}
|
||||
@@ -1540,6 +1766,7 @@ export type $NotificationPayload<ExtArgs extends runtime.Types.Extensions.Intern
|
||||
creatorId: string | null
|
||||
assetId: string | null
|
||||
taskId: string | null
|
||||
kanbanTaskId: string | null
|
||||
userId: string | null
|
||||
}, ExtArgs["result"]["notification"]>
|
||||
composites: {}
|
||||
@@ -1940,6 +2167,7 @@ export interface Prisma__NotificationClient<T, Null = never, ExtArgs extends run
|
||||
creator<T extends Prisma.Notification$creatorArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Notification$creatorArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
asset<T extends Prisma.Notification$assetArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Notification$assetArgs<ExtArgs>>): Prisma.Prisma__AssetClient<runtime.Types.Result.GetResult<Prisma.$AssetPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
task<T extends Prisma.Notification$taskArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Notification$taskArgs<ExtArgs>>): Prisma.Prisma__TaskClient<runtime.Types.Result.GetResult<Prisma.$TaskPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
kanbanTask<T extends Prisma.Notification$kanbanTaskArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Notification$kanbanTaskArgs<ExtArgs>>): Prisma.Prisma__KanbanTaskClient<runtime.Types.Result.GetResult<Prisma.$KanbanTaskPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
user<T extends Prisma.Notification$userArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Notification$userArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
readByMembers<T extends Prisma.Notification$readByMembersArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Notification$readByMembersArgs<ExtArgs>>): Prisma.Prisma__TeamMemberClient<runtime.Types.Result.GetResult<Prisma.$TeamMemberPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
/**
|
||||
@@ -1980,6 +2208,7 @@ export interface NotificationFieldRefs {
|
||||
readonly creatorId: Prisma.FieldRef<"Notification", 'String'>
|
||||
readonly assetId: Prisma.FieldRef<"Notification", 'String'>
|
||||
readonly taskId: Prisma.FieldRef<"Notification", 'String'>
|
||||
readonly kanbanTaskId: Prisma.FieldRef<"Notification", 'String'>
|
||||
readonly userId: Prisma.FieldRef<"Notification", 'String'>
|
||||
}
|
||||
|
||||
@@ -2457,6 +2686,25 @@ export type Notification$taskArgs<ExtArgs extends runtime.Types.Extensions.Inter
|
||||
where?: Prisma.TaskWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* Notification.kanbanTask
|
||||
*/
|
||||
export type Notification$kanbanTaskArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the KanbanTask
|
||||
*/
|
||||
select?: Prisma.KanbanTaskSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the KanbanTask
|
||||
*/
|
||||
omit?: Prisma.KanbanTaskOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.KanbanTaskInclude<ExtArgs> | null
|
||||
where?: Prisma.KanbanTaskWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* Notification.user
|
||||
*/
|
||||
|
||||
+414
@@ -231,6 +231,8 @@ export type ProjectWhereInput = {
|
||||
shareLinks?: Prisma.ShareLinkListRelationFilter
|
||||
collections?: Prisma.CollectionListRelationFilter
|
||||
auditLogs?: Prisma.AuditLogListRelationFilter
|
||||
kanbanTasks?: Prisma.KanbanTaskListRelationFilter
|
||||
recentFiles?: Prisma.RecentFileItemListRelationFilter
|
||||
}
|
||||
|
||||
export type ProjectOrderByWithRelationInput = {
|
||||
@@ -255,6 +257,8 @@ export type ProjectOrderByWithRelationInput = {
|
||||
shareLinks?: Prisma.ShareLinkOrderByRelationAggregateInput
|
||||
collections?: Prisma.CollectionOrderByRelationAggregateInput
|
||||
auditLogs?: Prisma.AuditLogOrderByRelationAggregateInput
|
||||
kanbanTasks?: Prisma.KanbanTaskOrderByRelationAggregateInput
|
||||
recentFiles?: Prisma.RecentFileItemOrderByRelationAggregateInput
|
||||
}
|
||||
|
||||
export type ProjectWhereUniqueInput = Prisma.AtLeast<{
|
||||
@@ -282,6 +286,8 @@ export type ProjectWhereUniqueInput = Prisma.AtLeast<{
|
||||
shareLinks?: Prisma.ShareLinkListRelationFilter
|
||||
collections?: Prisma.CollectionListRelationFilter
|
||||
auditLogs?: Prisma.AuditLogListRelationFilter
|
||||
kanbanTasks?: Prisma.KanbanTaskListRelationFilter
|
||||
recentFiles?: Prisma.RecentFileItemListRelationFilter
|
||||
}, "id" | "rootFolderId" | "shareRootId">
|
||||
|
||||
export type ProjectOrderByWithAggregationInput = {
|
||||
@@ -335,6 +341,8 @@ export type ProjectCreateInput = {
|
||||
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateInput = {
|
||||
@@ -356,6 +364,8 @@ export type ProjectUncheckedCreateInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUpdateInput = {
|
||||
@@ -377,6 +387,8 @@ export type ProjectUpdateInput = {
|
||||
shareLinks?: Prisma.ShareLinkUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateInput = {
|
||||
@@ -398,6 +410,8 @@ export type ProjectUncheckedUpdateInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateManyInput = {
|
||||
@@ -721,6 +735,36 @@ export type ProjectUpdateOneWithoutAuditLogsNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ProjectUpdateToOneWithWhereWithoutAuditLogsInput, Prisma.ProjectUpdateWithoutAuditLogsInput>, Prisma.ProjectUncheckedUpdateWithoutAuditLogsInput>
|
||||
}
|
||||
|
||||
export type ProjectCreateNestedOneWithoutKanbanTasksInput = {
|
||||
create?: Prisma.XOR<Prisma.ProjectCreateWithoutKanbanTasksInput, Prisma.ProjectUncheckedCreateWithoutKanbanTasksInput>
|
||||
connectOrCreate?: Prisma.ProjectCreateOrConnectWithoutKanbanTasksInput
|
||||
connect?: Prisma.ProjectWhereUniqueInput
|
||||
}
|
||||
|
||||
export type ProjectUpdateOneWithoutKanbanTasksNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.ProjectCreateWithoutKanbanTasksInput, Prisma.ProjectUncheckedCreateWithoutKanbanTasksInput>
|
||||
connectOrCreate?: Prisma.ProjectCreateOrConnectWithoutKanbanTasksInput
|
||||
upsert?: Prisma.ProjectUpsertWithoutKanbanTasksInput
|
||||
disconnect?: Prisma.ProjectWhereInput | boolean
|
||||
delete?: Prisma.ProjectWhereInput | boolean
|
||||
connect?: Prisma.ProjectWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ProjectUpdateToOneWithWhereWithoutKanbanTasksInput, Prisma.ProjectUpdateWithoutKanbanTasksInput>, Prisma.ProjectUncheckedUpdateWithoutKanbanTasksInput>
|
||||
}
|
||||
|
||||
export type ProjectCreateNestedOneWithoutRecentFilesInput = {
|
||||
create?: Prisma.XOR<Prisma.ProjectCreateWithoutRecentFilesInput, Prisma.ProjectUncheckedCreateWithoutRecentFilesInput>
|
||||
connectOrCreate?: Prisma.ProjectCreateOrConnectWithoutRecentFilesInput
|
||||
connect?: Prisma.ProjectWhereUniqueInput
|
||||
}
|
||||
|
||||
export type ProjectUpdateOneRequiredWithoutRecentFilesNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.ProjectCreateWithoutRecentFilesInput, Prisma.ProjectUncheckedCreateWithoutRecentFilesInput>
|
||||
connectOrCreate?: Prisma.ProjectCreateOrConnectWithoutRecentFilesInput
|
||||
upsert?: Prisma.ProjectUpsertWithoutRecentFilesInput
|
||||
connect?: Prisma.ProjectWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ProjectUpdateToOneWithWhereWithoutRecentFilesInput, Prisma.ProjectUpdateWithoutRecentFilesInput>, Prisma.ProjectUncheckedUpdateWithoutRecentFilesInput>
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutTeamInput = {
|
||||
id?: string
|
||||
name: string
|
||||
@@ -739,6 +783,8 @@ export type ProjectCreateWithoutTeamInput = {
|
||||
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutTeamInput = {
|
||||
@@ -759,6 +805,8 @@ export type ProjectUncheckedCreateWithoutTeamInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutTeamInput = {
|
||||
@@ -821,6 +869,8 @@ export type ProjectCreateWithoutMembersInput = {
|
||||
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutMembersInput = {
|
||||
@@ -841,6 +891,8 @@ export type ProjectUncheckedCreateWithoutMembersInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutMembersInput = {
|
||||
@@ -877,6 +929,8 @@ export type ProjectUpdateWithoutMembersInput = {
|
||||
shareLinks?: Prisma.ShareLinkUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutMembersInput = {
|
||||
@@ -897,6 +951,8 @@ export type ProjectUncheckedUpdateWithoutMembersInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutShareLinksInput = {
|
||||
@@ -917,6 +973,8 @@ export type ProjectCreateWithoutShareLinksInput = {
|
||||
notifications?: Prisma.NotificationCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutShareLinksInput = {
|
||||
@@ -937,6 +995,8 @@ export type ProjectUncheckedCreateWithoutShareLinksInput = {
|
||||
notifications?: Prisma.NotificationUncheckedCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutShareLinksInput = {
|
||||
@@ -973,6 +1033,8 @@ export type ProjectUpdateWithoutShareLinksInput = {
|
||||
notifications?: Prisma.NotificationUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutShareLinksInput = {
|
||||
@@ -993,6 +1055,8 @@ export type ProjectUncheckedUpdateWithoutShareLinksInput = {
|
||||
notifications?: Prisma.NotificationUncheckedUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutAssetsInput = {
|
||||
@@ -1013,6 +1077,8 @@ export type ProjectCreateWithoutAssetsInput = {
|
||||
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutAssetsInput = {
|
||||
@@ -1033,6 +1099,8 @@ export type ProjectUncheckedCreateWithoutAssetsInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutAssetsInput = {
|
||||
@@ -1058,6 +1126,8 @@ export type ProjectCreateWithoutRootFolderInput = {
|
||||
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutRootFolderInput = {
|
||||
@@ -1078,6 +1148,8 @@ export type ProjectUncheckedCreateWithoutRootFolderInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutRootFolderInput = {
|
||||
@@ -1103,6 +1175,8 @@ export type ProjectCreateWithoutShareRootInput = {
|
||||
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutShareRootInput = {
|
||||
@@ -1123,6 +1197,8 @@ export type ProjectUncheckedCreateWithoutShareRootInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutShareRootInput = {
|
||||
@@ -1159,6 +1235,8 @@ export type ProjectUpdateWithoutAssetsInput = {
|
||||
shareLinks?: Prisma.ShareLinkUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutAssetsInput = {
|
||||
@@ -1179,6 +1257,8 @@ export type ProjectUncheckedUpdateWithoutAssetsInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUpsertWithoutRootFolderInput = {
|
||||
@@ -1210,6 +1290,8 @@ export type ProjectUpdateWithoutRootFolderInput = {
|
||||
shareLinks?: Prisma.ShareLinkUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutRootFolderInput = {
|
||||
@@ -1230,6 +1312,8 @@ export type ProjectUncheckedUpdateWithoutRootFolderInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUpsertWithoutShareRootInput = {
|
||||
@@ -1261,6 +1345,8 @@ export type ProjectUpdateWithoutShareRootInput = {
|
||||
shareLinks?: Prisma.ShareLinkUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutShareRootInput = {
|
||||
@@ -1281,6 +1367,8 @@ export type ProjectUncheckedUpdateWithoutShareRootInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutInvitesInput = {
|
||||
@@ -1301,6 +1389,8 @@ export type ProjectCreateWithoutInvitesInput = {
|
||||
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutInvitesInput = {
|
||||
@@ -1321,6 +1411,8 @@ export type ProjectUncheckedCreateWithoutInvitesInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutInvitesInput = {
|
||||
@@ -1357,6 +1449,8 @@ export type ProjectUpdateWithoutInvitesInput = {
|
||||
shareLinks?: Prisma.ShareLinkUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutInvitesInput = {
|
||||
@@ -1377,6 +1471,8 @@ export type ProjectUncheckedUpdateWithoutInvitesInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutMetadataFieldsInput = {
|
||||
@@ -1397,6 +1493,8 @@ export type ProjectCreateWithoutMetadataFieldsInput = {
|
||||
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutMetadataFieldsInput = {
|
||||
@@ -1417,6 +1515,8 @@ export type ProjectUncheckedCreateWithoutMetadataFieldsInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutMetadataFieldsInput = {
|
||||
@@ -1453,6 +1553,8 @@ export type ProjectUpdateWithoutMetadataFieldsInput = {
|
||||
shareLinks?: Prisma.ShareLinkUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutMetadataFieldsInput = {
|
||||
@@ -1473,6 +1575,8 @@ export type ProjectUncheckedUpdateWithoutMetadataFieldsInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutNotificationsInput = {
|
||||
@@ -1493,6 +1597,8 @@ export type ProjectCreateWithoutNotificationsInput = {
|
||||
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutNotificationsInput = {
|
||||
@@ -1513,6 +1619,8 @@ export type ProjectUncheckedCreateWithoutNotificationsInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutNotificationsInput = {
|
||||
@@ -1549,6 +1657,8 @@ export type ProjectUpdateWithoutNotificationsInput = {
|
||||
shareLinks?: Prisma.ShareLinkUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutNotificationsInput = {
|
||||
@@ -1569,6 +1679,8 @@ export type ProjectUncheckedUpdateWithoutNotificationsInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutCollectionsInput = {
|
||||
@@ -1589,6 +1701,8 @@ export type ProjectCreateWithoutCollectionsInput = {
|
||||
notifications?: Prisma.NotificationCreateNestedManyWithoutProjectInput
|
||||
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutCollectionsInput = {
|
||||
@@ -1609,6 +1723,8 @@ export type ProjectUncheckedCreateWithoutCollectionsInput = {
|
||||
notifications?: Prisma.NotificationUncheckedCreateNestedManyWithoutProjectInput
|
||||
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutCollectionsInput = {
|
||||
@@ -1645,6 +1761,8 @@ export type ProjectUpdateWithoutCollectionsInput = {
|
||||
notifications?: Prisma.NotificationUpdateManyWithoutProjectNestedInput
|
||||
shareLinks?: Prisma.ShareLinkUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutCollectionsInput = {
|
||||
@@ -1665,6 +1783,8 @@ export type ProjectUncheckedUpdateWithoutCollectionsInput = {
|
||||
notifications?: Prisma.NotificationUncheckedUpdateManyWithoutProjectNestedInput
|
||||
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutAuditLogsInput = {
|
||||
@@ -1685,6 +1805,8 @@ export type ProjectCreateWithoutAuditLogsInput = {
|
||||
notifications?: Prisma.NotificationCreateNestedManyWithoutProjectInput
|
||||
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutAuditLogsInput = {
|
||||
@@ -1705,6 +1827,8 @@ export type ProjectUncheckedCreateWithoutAuditLogsInput = {
|
||||
notifications?: Prisma.NotificationUncheckedCreateNestedManyWithoutProjectInput
|
||||
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutAuditLogsInput = {
|
||||
@@ -1741,6 +1865,8 @@ export type ProjectUpdateWithoutAuditLogsInput = {
|
||||
notifications?: Prisma.NotificationUpdateManyWithoutProjectNestedInput
|
||||
shareLinks?: Prisma.ShareLinkUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutAuditLogsInput = {
|
||||
@@ -1761,6 +1887,216 @@ export type ProjectUncheckedUpdateWithoutAuditLogsInput = {
|
||||
notifications?: Prisma.NotificationUncheckedUpdateManyWithoutProjectNestedInput
|
||||
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutKanbanTasksInput = {
|
||||
id?: string
|
||||
name: string
|
||||
coverImageKey?: string | null
|
||||
metadataOverrides?:PrismaJson.MetadataOverrides | Prisma.NullableJsonNullValueInput
|
||||
enableNotification?: boolean
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
team: Prisma.TeamCreateNestedOneWithoutProjectsInput
|
||||
rootFolder?: Prisma.AssetCreateNestedOneWithoutProjectRootFolderInput
|
||||
shareRoot?: Prisma.AssetCreateNestedOneWithoutProjectShareRootInput
|
||||
members?: Prisma.ProjectMemberCreateNestedManyWithoutProjectInput
|
||||
assets?: Prisma.AssetCreateNestedManyWithoutProjectInput
|
||||
metadataFields?: Prisma.MetadataFieldCreateNestedManyWithoutProjectInput
|
||||
invites?: Prisma.InviteCreateNestedManyWithoutProjectInput
|
||||
notifications?: Prisma.NotificationCreateNestedManyWithoutProjectInput
|
||||
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutKanbanTasksInput = {
|
||||
id?: string
|
||||
name: string
|
||||
coverImageKey?: string | null
|
||||
metadataOverrides?:PrismaJson.MetadataOverrides | Prisma.NullableJsonNullValueInput
|
||||
enableNotification?: boolean
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
teamId: string
|
||||
rootFolderId?: string | null
|
||||
shareRootId?: string | null
|
||||
members?: Prisma.ProjectMemberUncheckedCreateNestedManyWithoutProjectInput
|
||||
assets?: Prisma.AssetUncheckedCreateNestedManyWithoutProjectInput
|
||||
metadataFields?: Prisma.MetadataFieldUncheckedCreateNestedManyWithoutProjectInput
|
||||
invites?: Prisma.InviteUncheckedCreateNestedManyWithoutProjectInput
|
||||
notifications?: Prisma.NotificationUncheckedCreateNestedManyWithoutProjectInput
|
||||
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutKanbanTasksInput = {
|
||||
where: Prisma.ProjectWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.ProjectCreateWithoutKanbanTasksInput, Prisma.ProjectUncheckedCreateWithoutKanbanTasksInput>
|
||||
}
|
||||
|
||||
export type ProjectUpsertWithoutKanbanTasksInput = {
|
||||
update: Prisma.XOR<Prisma.ProjectUpdateWithoutKanbanTasksInput, Prisma.ProjectUncheckedUpdateWithoutKanbanTasksInput>
|
||||
create: Prisma.XOR<Prisma.ProjectCreateWithoutKanbanTasksInput, Prisma.ProjectUncheckedCreateWithoutKanbanTasksInput>
|
||||
where?: Prisma.ProjectWhereInput
|
||||
}
|
||||
|
||||
export type ProjectUpdateToOneWithWhereWithoutKanbanTasksInput = {
|
||||
where?: Prisma.ProjectWhereInput
|
||||
data: Prisma.XOR<Prisma.ProjectUpdateWithoutKanbanTasksInput, Prisma.ProjectUncheckedUpdateWithoutKanbanTasksInput>
|
||||
}
|
||||
|
||||
export type ProjectUpdateWithoutKanbanTasksInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
coverImageKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
metadataOverrides?:PrismaJson.MetadataOverrides | Prisma.NullableJsonNullValueInput
|
||||
enableNotification?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
team?: Prisma.TeamUpdateOneRequiredWithoutProjectsNestedInput
|
||||
rootFolder?: Prisma.AssetUpdateOneWithoutProjectRootFolderNestedInput
|
||||
shareRoot?: Prisma.AssetUpdateOneWithoutProjectShareRootNestedInput
|
||||
members?: Prisma.ProjectMemberUpdateManyWithoutProjectNestedInput
|
||||
assets?: Prisma.AssetUpdateManyWithoutProjectNestedInput
|
||||
metadataFields?: Prisma.MetadataFieldUpdateManyWithoutProjectNestedInput
|
||||
invites?: Prisma.InviteUpdateManyWithoutProjectNestedInput
|
||||
notifications?: Prisma.NotificationUpdateManyWithoutProjectNestedInput
|
||||
shareLinks?: Prisma.ShareLinkUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutKanbanTasksInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
coverImageKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
metadataOverrides?:PrismaJson.MetadataOverrides | Prisma.NullableJsonNullValueInput
|
||||
enableNotification?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
teamId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
rootFolderId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
shareRootId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
members?: Prisma.ProjectMemberUncheckedUpdateManyWithoutProjectNestedInput
|
||||
assets?: Prisma.AssetUncheckedUpdateManyWithoutProjectNestedInput
|
||||
metadataFields?: Prisma.MetadataFieldUncheckedUpdateManyWithoutProjectNestedInput
|
||||
invites?: Prisma.InviteUncheckedUpdateManyWithoutProjectNestedInput
|
||||
notifications?: Prisma.NotificationUncheckedUpdateManyWithoutProjectNestedInput
|
||||
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutRecentFilesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
coverImageKey?: string | null
|
||||
metadataOverrides?:PrismaJson.MetadataOverrides | Prisma.NullableJsonNullValueInput
|
||||
enableNotification?: boolean
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
team: Prisma.TeamCreateNestedOneWithoutProjectsInput
|
||||
rootFolder?: Prisma.AssetCreateNestedOneWithoutProjectRootFolderInput
|
||||
shareRoot?: Prisma.AssetCreateNestedOneWithoutProjectShareRootInput
|
||||
members?: Prisma.ProjectMemberCreateNestedManyWithoutProjectInput
|
||||
assets?: Prisma.AssetCreateNestedManyWithoutProjectInput
|
||||
metadataFields?: Prisma.MetadataFieldCreateNestedManyWithoutProjectInput
|
||||
invites?: Prisma.InviteCreateNestedManyWithoutProjectInput
|
||||
notifications?: Prisma.NotificationCreateNestedManyWithoutProjectInput
|
||||
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutRecentFilesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
coverImageKey?: string | null
|
||||
metadataOverrides?:PrismaJson.MetadataOverrides | Prisma.NullableJsonNullValueInput
|
||||
enableNotification?: boolean
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
teamId: string
|
||||
rootFolderId?: string | null
|
||||
shareRootId?: string | null
|
||||
members?: Prisma.ProjectMemberUncheckedCreateNestedManyWithoutProjectInput
|
||||
assets?: Prisma.AssetUncheckedCreateNestedManyWithoutProjectInput
|
||||
metadataFields?: Prisma.MetadataFieldUncheckedCreateNestedManyWithoutProjectInput
|
||||
invites?: Prisma.InviteUncheckedCreateNestedManyWithoutProjectInput
|
||||
notifications?: Prisma.NotificationUncheckedCreateNestedManyWithoutProjectInput
|
||||
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutRecentFilesInput = {
|
||||
where: Prisma.ProjectWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.ProjectCreateWithoutRecentFilesInput, Prisma.ProjectUncheckedCreateWithoutRecentFilesInput>
|
||||
}
|
||||
|
||||
export type ProjectUpsertWithoutRecentFilesInput = {
|
||||
update: Prisma.XOR<Prisma.ProjectUpdateWithoutRecentFilesInput, Prisma.ProjectUncheckedUpdateWithoutRecentFilesInput>
|
||||
create: Prisma.XOR<Prisma.ProjectCreateWithoutRecentFilesInput, Prisma.ProjectUncheckedCreateWithoutRecentFilesInput>
|
||||
where?: Prisma.ProjectWhereInput
|
||||
}
|
||||
|
||||
export type ProjectUpdateToOneWithWhereWithoutRecentFilesInput = {
|
||||
where?: Prisma.ProjectWhereInput
|
||||
data: Prisma.XOR<Prisma.ProjectUpdateWithoutRecentFilesInput, Prisma.ProjectUncheckedUpdateWithoutRecentFilesInput>
|
||||
}
|
||||
|
||||
export type ProjectUpdateWithoutRecentFilesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
coverImageKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
metadataOverrides?:PrismaJson.MetadataOverrides | Prisma.NullableJsonNullValueInput
|
||||
enableNotification?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
team?: Prisma.TeamUpdateOneRequiredWithoutProjectsNestedInput
|
||||
rootFolder?: Prisma.AssetUpdateOneWithoutProjectRootFolderNestedInput
|
||||
shareRoot?: Prisma.AssetUpdateOneWithoutProjectShareRootNestedInput
|
||||
members?: Prisma.ProjectMemberUpdateManyWithoutProjectNestedInput
|
||||
assets?: Prisma.AssetUpdateManyWithoutProjectNestedInput
|
||||
metadataFields?: Prisma.MetadataFieldUpdateManyWithoutProjectNestedInput
|
||||
invites?: Prisma.InviteUpdateManyWithoutProjectNestedInput
|
||||
notifications?: Prisma.NotificationUpdateManyWithoutProjectNestedInput
|
||||
shareLinks?: Prisma.ShareLinkUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutRecentFilesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
coverImageKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
metadataOverrides?:PrismaJson.MetadataOverrides | Prisma.NullableJsonNullValueInput
|
||||
enableNotification?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
teamId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
rootFolderId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
shareRootId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
members?: Prisma.ProjectMemberUncheckedUpdateManyWithoutProjectNestedInput
|
||||
assets?: Prisma.AssetUncheckedUpdateManyWithoutProjectNestedInput
|
||||
metadataFields?: Prisma.MetadataFieldUncheckedUpdateManyWithoutProjectNestedInput
|
||||
invites?: Prisma.InviteUncheckedUpdateManyWithoutProjectNestedInput
|
||||
notifications?: Prisma.NotificationUncheckedUpdateManyWithoutProjectNestedInput
|
||||
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateManyTeamInput = {
|
||||
@@ -1793,6 +2129,8 @@ export type ProjectUpdateWithoutTeamInput = {
|
||||
shareLinks?: Prisma.ShareLinkUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutTeamInput = {
|
||||
@@ -1813,6 +2151,8 @@ export type ProjectUncheckedUpdateWithoutTeamInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateManyWithoutTeamInput = {
|
||||
@@ -1841,6 +2181,8 @@ export type ProjectCountOutputType = {
|
||||
shareLinks: number
|
||||
collections: number
|
||||
auditLogs: number
|
||||
kanbanTasks: number
|
||||
recentFiles: number
|
||||
}
|
||||
|
||||
export type ProjectCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
@@ -1852,6 +2194,8 @@ export type ProjectCountOutputTypeSelect<ExtArgs extends runtime.Types.Extension
|
||||
shareLinks?: boolean | ProjectCountOutputTypeCountShareLinksArgs
|
||||
collections?: boolean | ProjectCountOutputTypeCountCollectionsArgs
|
||||
auditLogs?: boolean | ProjectCountOutputTypeCountAuditLogsArgs
|
||||
kanbanTasks?: boolean | ProjectCountOutputTypeCountKanbanTasksArgs
|
||||
recentFiles?: boolean | ProjectCountOutputTypeCountRecentFilesArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1920,6 +2264,20 @@ export type ProjectCountOutputTypeCountAuditLogsArgs<ExtArgs extends runtime.Typ
|
||||
where?: Prisma.AuditLogWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* ProjectCountOutputType without action
|
||||
*/
|
||||
export type ProjectCountOutputTypeCountKanbanTasksArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.KanbanTaskWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* ProjectCountOutputType without action
|
||||
*/
|
||||
export type ProjectCountOutputTypeCountRecentFilesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.RecentFileItemWhereInput
|
||||
}
|
||||
|
||||
|
||||
export type ProjectSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
@@ -1943,6 +2301,8 @@ export type ProjectSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
shareLinks?: boolean | Prisma.Project$shareLinksArgs<ExtArgs>
|
||||
collections?: boolean | Prisma.Project$collectionsArgs<ExtArgs>
|
||||
auditLogs?: boolean | Prisma.Project$auditLogsArgs<ExtArgs>
|
||||
kanbanTasks?: boolean | Prisma.Project$kanbanTasksArgs<ExtArgs>
|
||||
recentFiles?: boolean | Prisma.Project$recentFilesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ProjectCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["project"]>
|
||||
|
||||
@@ -2004,6 +2364,8 @@ export type ProjectInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
shareLinks?: boolean | Prisma.Project$shareLinksArgs<ExtArgs>
|
||||
collections?: boolean | Prisma.Project$collectionsArgs<ExtArgs>
|
||||
auditLogs?: boolean | Prisma.Project$auditLogsArgs<ExtArgs>
|
||||
kanbanTasks?: boolean | Prisma.Project$kanbanTasksArgs<ExtArgs>
|
||||
recentFiles?: boolean | Prisma.Project$recentFilesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ProjectCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
export type ProjectIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
@@ -2031,6 +2393,8 @@ export type $ProjectPayload<ExtArgs extends runtime.Types.Extensions.InternalArg
|
||||
shareLinks: Prisma.$ShareLinkPayload<ExtArgs>[]
|
||||
collections: Prisma.$CollectionPayload<ExtArgs>[]
|
||||
auditLogs: Prisma.$AuditLogPayload<ExtArgs>[]
|
||||
kanbanTasks: Prisma.$KanbanTaskPayload<ExtArgs>[]
|
||||
recentFiles: Prisma.$RecentFileItemPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -2451,6 +2815,8 @@ export interface Prisma__ProjectClient<T, Null = never, ExtArgs extends runtime.
|
||||
shareLinks<T extends Prisma.Project$shareLinksArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Project$shareLinksArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ShareLinkPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
collections<T extends Prisma.Project$collectionsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Project$collectionsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CollectionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
auditLogs<T extends Prisma.Project$auditLogsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Project$auditLogsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AuditLogPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
kanbanTasks<T extends Prisma.Project$kanbanTasksArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Project$kanbanTasksArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$KanbanTaskPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
recentFiles<T extends Prisma.Project$recentFilesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Project$recentFilesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$RecentFileItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -3120,6 +3486,54 @@ export type Project$auditLogsArgs<ExtArgs extends runtime.Types.Extensions.Inter
|
||||
distinct?: Prisma.AuditLogScalarFieldEnum | Prisma.AuditLogScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Project.kanbanTasks
|
||||
*/
|
||||
export type Project$kanbanTasksArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the KanbanTask
|
||||
*/
|
||||
select?: Prisma.KanbanTaskSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the KanbanTask
|
||||
*/
|
||||
omit?: Prisma.KanbanTaskOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.KanbanTaskInclude<ExtArgs> | null
|
||||
where?: Prisma.KanbanTaskWhereInput
|
||||
orderBy?: Prisma.KanbanTaskOrderByWithRelationInput | Prisma.KanbanTaskOrderByWithRelationInput[]
|
||||
cursor?: Prisma.KanbanTaskWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.KanbanTaskScalarFieldEnum | Prisma.KanbanTaskScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Project.recentFiles
|
||||
*/
|
||||
export type Project$recentFilesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the RecentFileItem
|
||||
*/
|
||||
select?: Prisma.RecentFileItemSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the RecentFileItem
|
||||
*/
|
||||
omit?: Prisma.RecentFileItemOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.RecentFileItemInclude<ExtArgs> | null
|
||||
where?: Prisma.RecentFileItemWhereInput
|
||||
orderBy?: Prisma.RecentFileItemOrderByWithRelationInput | Prisma.RecentFileItemOrderByWithRelationInput[]
|
||||
cursor?: Prisma.RecentFileItemWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.RecentFileItemScalarFieldEnum | Prisma.RecentFileItemScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Project without action
|
||||
*/
|
||||
|
||||
+1594
File diff suppressed because it is too large
Load Diff
+492
@@ -205,6 +205,8 @@ export type TeamWhereInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateListRelationFilter
|
||||
quotaRules?: Prisma.QuotaRuleListRelationFilter
|
||||
quotaRecords?: Prisma.QuotaRecordListRelationFilter
|
||||
kanbanGoals?: Prisma.KanbanGoalListRelationFilter
|
||||
kanbanTasks?: Prisma.KanbanTaskListRelationFilter
|
||||
}
|
||||
|
||||
export type TeamOrderByWithRelationInput = {
|
||||
@@ -231,6 +233,8 @@ export type TeamOrderByWithRelationInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateOrderByRelationAggregateInput
|
||||
quotaRules?: Prisma.QuotaRuleOrderByRelationAggregateInput
|
||||
quotaRecords?: Prisma.QuotaRecordOrderByRelationAggregateInput
|
||||
kanbanGoals?: Prisma.KanbanGoalOrderByRelationAggregateInput
|
||||
kanbanTasks?: Prisma.KanbanTaskOrderByRelationAggregateInput
|
||||
}
|
||||
|
||||
export type TeamWhereUniqueInput = Prisma.AtLeast<{
|
||||
@@ -260,6 +264,8 @@ export type TeamWhereUniqueInput = Prisma.AtLeast<{
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateListRelationFilter
|
||||
quotaRules?: Prisma.QuotaRuleListRelationFilter
|
||||
quotaRecords?: Prisma.QuotaRecordListRelationFilter
|
||||
kanbanGoals?: Prisma.KanbanGoalListRelationFilter
|
||||
kanbanTasks?: Prisma.KanbanTaskListRelationFilter
|
||||
}, "id" | "rootFolderId">
|
||||
|
||||
export type TeamOrderByWithAggregationInput = {
|
||||
@@ -309,6 +315,8 @@ export type TeamCreateInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateInput = {
|
||||
@@ -334,6 +342,8 @@ export type TeamUncheckedCreateInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUpdateInput = {
|
||||
@@ -359,6 +369,8 @@ export type TeamUpdateInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateInput = {
|
||||
@@ -384,6 +396,8 @@ export type TeamUncheckedUpdateInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateManyInput = {
|
||||
@@ -707,6 +721,34 @@ export type TeamUpdateOneRequiredWithoutQuotaRecordsNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.TeamUpdateToOneWithWhereWithoutQuotaRecordsInput, Prisma.TeamUpdateWithoutQuotaRecordsInput>, Prisma.TeamUncheckedUpdateWithoutQuotaRecordsInput>
|
||||
}
|
||||
|
||||
export type TeamCreateNestedOneWithoutKanbanGoalsInput = {
|
||||
create?: Prisma.XOR<Prisma.TeamCreateWithoutKanbanGoalsInput, Prisma.TeamUncheckedCreateWithoutKanbanGoalsInput>
|
||||
connectOrCreate?: Prisma.TeamCreateOrConnectWithoutKanbanGoalsInput
|
||||
connect?: Prisma.TeamWhereUniqueInput
|
||||
}
|
||||
|
||||
export type TeamUpdateOneRequiredWithoutKanbanGoalsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.TeamCreateWithoutKanbanGoalsInput, Prisma.TeamUncheckedCreateWithoutKanbanGoalsInput>
|
||||
connectOrCreate?: Prisma.TeamCreateOrConnectWithoutKanbanGoalsInput
|
||||
upsert?: Prisma.TeamUpsertWithoutKanbanGoalsInput
|
||||
connect?: Prisma.TeamWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.TeamUpdateToOneWithWhereWithoutKanbanGoalsInput, Prisma.TeamUpdateWithoutKanbanGoalsInput>, Prisma.TeamUncheckedUpdateWithoutKanbanGoalsInput>
|
||||
}
|
||||
|
||||
export type TeamCreateNestedOneWithoutKanbanTasksInput = {
|
||||
create?: Prisma.XOR<Prisma.TeamCreateWithoutKanbanTasksInput, Prisma.TeamUncheckedCreateWithoutKanbanTasksInput>
|
||||
connectOrCreate?: Prisma.TeamCreateOrConnectWithoutKanbanTasksInput
|
||||
connect?: Prisma.TeamWhereUniqueInput
|
||||
}
|
||||
|
||||
export type TeamUpdateOneRequiredWithoutKanbanTasksNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.TeamCreateWithoutKanbanTasksInput, Prisma.TeamUncheckedCreateWithoutKanbanTasksInput>
|
||||
connectOrCreate?: Prisma.TeamCreateOrConnectWithoutKanbanTasksInput
|
||||
upsert?: Prisma.TeamUpsertWithoutKanbanTasksInput
|
||||
connect?: Prisma.TeamWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.TeamUpdateToOneWithWhereWithoutKanbanTasksInput, Prisma.TeamUpdateWithoutKanbanTasksInput>, Prisma.TeamUncheckedUpdateWithoutKanbanTasksInput>
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutSandboxInput = {
|
||||
id?: string
|
||||
name: string
|
||||
@@ -729,6 +771,8 @@ export type TeamCreateWithoutSandboxInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutSandboxInput = {
|
||||
@@ -753,6 +797,8 @@ export type TeamUncheckedCreateWithoutSandboxInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutSandboxInput = {
|
||||
@@ -793,6 +839,8 @@ export type TeamUpdateWithoutSandboxInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutSandboxInput = {
|
||||
@@ -817,6 +865,8 @@ export type TeamUncheckedUpdateWithoutSandboxInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutSkillsInput = {
|
||||
@@ -841,6 +891,8 @@ export type TeamCreateWithoutSkillsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutSkillsInput = {
|
||||
@@ -865,6 +917,8 @@ export type TeamUncheckedCreateWithoutSkillsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutSkillsInput = {
|
||||
@@ -905,6 +959,8 @@ export type TeamUpdateWithoutSkillsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutSkillsInput = {
|
||||
@@ -929,6 +985,8 @@ export type TeamUncheckedUpdateWithoutSkillsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutMembersInput = {
|
||||
@@ -953,6 +1011,8 @@ export type TeamCreateWithoutMembersInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutMembersInput = {
|
||||
@@ -977,6 +1037,8 @@ export type TeamUncheckedCreateWithoutMembersInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutMembersInput = {
|
||||
@@ -1017,6 +1079,8 @@ export type TeamUpdateWithoutMembersInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutMembersInput = {
|
||||
@@ -1041,6 +1105,8 @@ export type TeamUncheckedUpdateWithoutMembersInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutProjectsInput = {
|
||||
@@ -1065,6 +1131,8 @@ export type TeamCreateWithoutProjectsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutProjectsInput = {
|
||||
@@ -1089,6 +1157,8 @@ export type TeamUncheckedCreateWithoutProjectsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutProjectsInput = {
|
||||
@@ -1129,6 +1199,8 @@ export type TeamUpdateWithoutProjectsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutProjectsInput = {
|
||||
@@ -1153,6 +1225,8 @@ export type TeamUncheckedUpdateWithoutProjectsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutWatermarkTemplatesInput = {
|
||||
@@ -1177,6 +1251,8 @@ export type TeamCreateWithoutWatermarkTemplatesInput = {
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutWatermarkTemplatesInput = {
|
||||
@@ -1201,6 +1277,8 @@ export type TeamUncheckedCreateWithoutWatermarkTemplatesInput = {
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutWatermarkTemplatesInput = {
|
||||
@@ -1241,6 +1319,8 @@ export type TeamUpdateWithoutWatermarkTemplatesInput = {
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutWatermarkTemplatesInput = {
|
||||
@@ -1265,6 +1345,8 @@ export type TeamUncheckedUpdateWithoutWatermarkTemplatesInput = {
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutRootFolderInput = {
|
||||
@@ -1289,6 +1371,8 @@ export type TeamCreateWithoutRootFolderInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutRootFolderInput = {
|
||||
@@ -1313,6 +1397,8 @@ export type TeamUncheckedCreateWithoutRootFolderInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutRootFolderInput = {
|
||||
@@ -1353,6 +1439,8 @@ export type TeamUpdateWithoutRootFolderInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutRootFolderInput = {
|
||||
@@ -1377,6 +1465,8 @@ export type TeamUncheckedUpdateWithoutRootFolderInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutInvitesInput = {
|
||||
@@ -1401,6 +1491,8 @@ export type TeamCreateWithoutInvitesInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutInvitesInput = {
|
||||
@@ -1425,6 +1517,8 @@ export type TeamUncheckedCreateWithoutInvitesInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutInvitesInput = {
|
||||
@@ -1465,6 +1559,8 @@ export type TeamUpdateWithoutInvitesInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutInvitesInput = {
|
||||
@@ -1489,6 +1585,8 @@ export type TeamUncheckedUpdateWithoutInvitesInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutMetadataFieldsInput = {
|
||||
@@ -1513,6 +1611,8 @@ export type TeamCreateWithoutMetadataFieldsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutMetadataFieldsInput = {
|
||||
@@ -1537,6 +1637,8 @@ export type TeamUncheckedCreateWithoutMetadataFieldsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutMetadataFieldsInput = {
|
||||
@@ -1577,6 +1679,8 @@ export type TeamUpdateWithoutMetadataFieldsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutMetadataFieldsInput = {
|
||||
@@ -1601,6 +1705,8 @@ export type TeamUncheckedUpdateWithoutMetadataFieldsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutNotificationsInput = {
|
||||
@@ -1625,6 +1731,8 @@ export type TeamCreateWithoutNotificationsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutNotificationsInput = {
|
||||
@@ -1649,6 +1757,8 @@ export type TeamUncheckedCreateWithoutNotificationsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutNotificationsInput = {
|
||||
@@ -1689,6 +1799,8 @@ export type TeamUpdateWithoutNotificationsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutNotificationsInput = {
|
||||
@@ -1713,6 +1825,8 @@ export type TeamUncheckedUpdateWithoutNotificationsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutAgentsInput = {
|
||||
@@ -1737,6 +1851,8 @@ export type TeamCreateWithoutAgentsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutAgentsInput = {
|
||||
@@ -1761,6 +1877,8 @@ export type TeamUncheckedCreateWithoutAgentsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutAgentsInput = {
|
||||
@@ -1801,6 +1919,8 @@ export type TeamUpdateWithoutAgentsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutAgentsInput = {
|
||||
@@ -1825,6 +1945,8 @@ export type TeamUncheckedUpdateWithoutAgentsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutMcpServersInput = {
|
||||
@@ -1849,6 +1971,8 @@ export type TeamCreateWithoutMcpServersInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutMcpServersInput = {
|
||||
@@ -1873,6 +1997,8 @@ export type TeamUncheckedCreateWithoutMcpServersInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutMcpServersInput = {
|
||||
@@ -1913,6 +2039,8 @@ export type TeamUpdateWithoutMcpServersInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutMcpServersInput = {
|
||||
@@ -1937,6 +2065,8 @@ export type TeamUncheckedUpdateWithoutMcpServersInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutUserMetadataInput = {
|
||||
@@ -1961,6 +2091,8 @@ export type TeamCreateWithoutUserMetadataInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutUserMetadataInput = {
|
||||
@@ -1985,6 +2117,8 @@ export type TeamUncheckedCreateWithoutUserMetadataInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutUserMetadataInput = {
|
||||
@@ -2025,6 +2159,8 @@ export type TeamUpdateWithoutUserMetadataInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutUserMetadataInput = {
|
||||
@@ -2049,6 +2185,8 @@ export type TeamUncheckedUpdateWithoutUserMetadataInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutProvidersInput = {
|
||||
@@ -2073,6 +2211,8 @@ export type TeamCreateWithoutProvidersInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutProvidersInput = {
|
||||
@@ -2097,6 +2237,8 @@ export type TeamUncheckedCreateWithoutProvidersInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutProvidersInput = {
|
||||
@@ -2137,6 +2279,8 @@ export type TeamUpdateWithoutProvidersInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutProvidersInput = {
|
||||
@@ -2161,6 +2305,8 @@ export type TeamUncheckedUpdateWithoutProvidersInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutAiUsagesInput = {
|
||||
@@ -2185,6 +2331,8 @@ export type TeamCreateWithoutAiUsagesInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutAiUsagesInput = {
|
||||
@@ -2209,6 +2357,8 @@ export type TeamUncheckedCreateWithoutAiUsagesInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutAiUsagesInput = {
|
||||
@@ -2249,6 +2399,8 @@ export type TeamUpdateWithoutAiUsagesInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutAiUsagesInput = {
|
||||
@@ -2273,6 +2425,8 @@ export type TeamUncheckedUpdateWithoutAiUsagesInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutAuditLogsInput = {
|
||||
@@ -2297,6 +2451,8 @@ export type TeamCreateWithoutAuditLogsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutAuditLogsInput = {
|
||||
@@ -2321,6 +2477,8 @@ export type TeamUncheckedCreateWithoutAuditLogsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutAuditLogsInput = {
|
||||
@@ -2361,6 +2519,8 @@ export type TeamUpdateWithoutAuditLogsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutAuditLogsInput = {
|
||||
@@ -2385,6 +2545,8 @@ export type TeamUncheckedUpdateWithoutAuditLogsInput = {
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutQuotaRulesInput = {
|
||||
@@ -2409,6 +2571,8 @@ export type TeamCreateWithoutQuotaRulesInput = {
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutTeamInput
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutQuotaRulesInput = {
|
||||
@@ -2433,6 +2597,8 @@ export type TeamUncheckedCreateWithoutQuotaRulesInput = {
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutTeamInput
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutQuotaRulesInput = {
|
||||
@@ -2473,6 +2639,8 @@ export type TeamUpdateWithoutQuotaRulesInput = {
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutTeamNestedInput
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutQuotaRulesInput = {
|
||||
@@ -2497,6 +2665,8 @@ export type TeamUncheckedUpdateWithoutQuotaRulesInput = {
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutTeamNestedInput
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutQuotaRecordsInput = {
|
||||
@@ -2521,6 +2691,8 @@ export type TeamCreateWithoutQuotaRecordsInput = {
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutTeamInput
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutQuotaRecordsInput = {
|
||||
@@ -2545,6 +2717,8 @@ export type TeamUncheckedCreateWithoutQuotaRecordsInput = {
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutTeamInput
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutQuotaRecordsInput = {
|
||||
@@ -2585,6 +2759,8 @@ export type TeamUpdateWithoutQuotaRecordsInput = {
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutTeamNestedInput
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutQuotaRecordsInput = {
|
||||
@@ -2609,6 +2785,248 @@ export type TeamUncheckedUpdateWithoutQuotaRecordsInput = {
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutTeamNestedInput
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutKanbanGoalsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
rootFolder?: Prisma.AssetCreateNestedOneWithoutTeamRootFolderInput
|
||||
members?: Prisma.TeamMemberCreateNestedManyWithoutTeamInput
|
||||
projects?: Prisma.ProjectCreateNestedManyWithoutTeamInput
|
||||
metadataFields?: Prisma.MetadataFieldCreateNestedManyWithoutTeamInput
|
||||
invites?: Prisma.InviteCreateNestedManyWithoutTeamInput
|
||||
notifications?: Prisma.NotificationCreateNestedManyWithoutTeamInput
|
||||
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutTeamInput
|
||||
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
|
||||
mcpServers?: Prisma.McpServerCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
|
||||
aiUsages?: Prisma.AiUsageCreateNestedManyWithoutTeamInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutTeamInput
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutKanbanGoalsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
rootFolderId?: string | null
|
||||
members?: Prisma.TeamMemberUncheckedCreateNestedManyWithoutTeamInput
|
||||
projects?: Prisma.ProjectUncheckedCreateNestedManyWithoutTeamInput
|
||||
metadataFields?: Prisma.MetadataFieldUncheckedCreateNestedManyWithoutTeamInput
|
||||
invites?: Prisma.InviteUncheckedCreateNestedManyWithoutTeamInput
|
||||
notifications?: Prisma.NotificationUncheckedCreateNestedManyWithoutTeamInput
|
||||
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutTeamInput
|
||||
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
|
||||
mcpServers?: Prisma.McpServerUncheckedCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
|
||||
aiUsages?: Prisma.AiUsageUncheckedCreateNestedManyWithoutTeamInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutTeamInput
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutKanbanGoalsInput = {
|
||||
where: Prisma.TeamWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.TeamCreateWithoutKanbanGoalsInput, Prisma.TeamUncheckedCreateWithoutKanbanGoalsInput>
|
||||
}
|
||||
|
||||
export type TeamUpsertWithoutKanbanGoalsInput = {
|
||||
update: Prisma.XOR<Prisma.TeamUpdateWithoutKanbanGoalsInput, Prisma.TeamUncheckedUpdateWithoutKanbanGoalsInput>
|
||||
create: Prisma.XOR<Prisma.TeamCreateWithoutKanbanGoalsInput, Prisma.TeamUncheckedCreateWithoutKanbanGoalsInput>
|
||||
where?: Prisma.TeamWhereInput
|
||||
}
|
||||
|
||||
export type TeamUpdateToOneWithWhereWithoutKanbanGoalsInput = {
|
||||
where?: Prisma.TeamWhereInput
|
||||
data: Prisma.XOR<Prisma.TeamUpdateWithoutKanbanGoalsInput, Prisma.TeamUncheckedUpdateWithoutKanbanGoalsInput>
|
||||
}
|
||||
|
||||
export type TeamUpdateWithoutKanbanGoalsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
rootFolder?: Prisma.AssetUpdateOneWithoutTeamRootFolderNestedInput
|
||||
members?: Prisma.TeamMemberUpdateManyWithoutTeamNestedInput
|
||||
projects?: Prisma.ProjectUpdateManyWithoutTeamNestedInput
|
||||
metadataFields?: Prisma.MetadataFieldUpdateManyWithoutTeamNestedInput
|
||||
invites?: Prisma.InviteUpdateManyWithoutTeamNestedInput
|
||||
notifications?: Prisma.NotificationUpdateManyWithoutTeamNestedInput
|
||||
userMetadata?: Prisma.UserMetadataUpdateManyWithoutTeamNestedInput
|
||||
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
|
||||
mcpServers?: Prisma.McpServerUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
|
||||
aiUsages?: Prisma.AiUsageUpdateManyWithoutTeamNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutTeamNestedInput
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutKanbanGoalsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
rootFolderId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
members?: Prisma.TeamMemberUncheckedUpdateManyWithoutTeamNestedInput
|
||||
projects?: Prisma.ProjectUncheckedUpdateManyWithoutTeamNestedInput
|
||||
metadataFields?: Prisma.MetadataFieldUncheckedUpdateManyWithoutTeamNestedInput
|
||||
invites?: Prisma.InviteUncheckedUpdateManyWithoutTeamNestedInput
|
||||
notifications?: Prisma.NotificationUncheckedUpdateManyWithoutTeamNestedInput
|
||||
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutTeamNestedInput
|
||||
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
|
||||
mcpServers?: Prisma.McpServerUncheckedUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
|
||||
aiUsages?: Prisma.AiUsageUncheckedUpdateManyWithoutTeamNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutTeamNestedInput
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutKanbanTasksInput = {
|
||||
id?: string
|
||||
name: string
|
||||
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
rootFolder?: Prisma.AssetCreateNestedOneWithoutTeamRootFolderInput
|
||||
members?: Prisma.TeamMemberCreateNestedManyWithoutTeamInput
|
||||
projects?: Prisma.ProjectCreateNestedManyWithoutTeamInput
|
||||
metadataFields?: Prisma.MetadataFieldCreateNestedManyWithoutTeamInput
|
||||
invites?: Prisma.InviteCreateNestedManyWithoutTeamInput
|
||||
notifications?: Prisma.NotificationCreateNestedManyWithoutTeamInput
|
||||
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutTeamInput
|
||||
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
|
||||
mcpServers?: Prisma.McpServerCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
|
||||
aiUsages?: Prisma.AiUsageCreateNestedManyWithoutTeamInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutTeamInput
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutKanbanTasksInput = {
|
||||
id?: string
|
||||
name: string
|
||||
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
rootFolderId?: string | null
|
||||
members?: Prisma.TeamMemberUncheckedCreateNestedManyWithoutTeamInput
|
||||
projects?: Prisma.ProjectUncheckedCreateNestedManyWithoutTeamInput
|
||||
metadataFields?: Prisma.MetadataFieldUncheckedCreateNestedManyWithoutTeamInput
|
||||
invites?: Prisma.InviteUncheckedCreateNestedManyWithoutTeamInput
|
||||
notifications?: Prisma.NotificationUncheckedCreateNestedManyWithoutTeamInput
|
||||
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutTeamInput
|
||||
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
|
||||
mcpServers?: Prisma.McpServerUncheckedCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
|
||||
aiUsages?: Prisma.AiUsageUncheckedCreateNestedManyWithoutTeamInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutTeamInput
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedCreateNestedManyWithoutTeamInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedCreateNestedManyWithoutTeamInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutKanbanTasksInput = {
|
||||
where: Prisma.TeamWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.TeamCreateWithoutKanbanTasksInput, Prisma.TeamUncheckedCreateWithoutKanbanTasksInput>
|
||||
}
|
||||
|
||||
export type TeamUpsertWithoutKanbanTasksInput = {
|
||||
update: Prisma.XOR<Prisma.TeamUpdateWithoutKanbanTasksInput, Prisma.TeamUncheckedUpdateWithoutKanbanTasksInput>
|
||||
create: Prisma.XOR<Prisma.TeamCreateWithoutKanbanTasksInput, Prisma.TeamUncheckedCreateWithoutKanbanTasksInput>
|
||||
where?: Prisma.TeamWhereInput
|
||||
}
|
||||
|
||||
export type TeamUpdateToOneWithWhereWithoutKanbanTasksInput = {
|
||||
where?: Prisma.TeamWhereInput
|
||||
data: Prisma.XOR<Prisma.TeamUpdateWithoutKanbanTasksInput, Prisma.TeamUncheckedUpdateWithoutKanbanTasksInput>
|
||||
}
|
||||
|
||||
export type TeamUpdateWithoutKanbanTasksInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
rootFolder?: Prisma.AssetUpdateOneWithoutTeamRootFolderNestedInput
|
||||
members?: Prisma.TeamMemberUpdateManyWithoutTeamNestedInput
|
||||
projects?: Prisma.ProjectUpdateManyWithoutTeamNestedInput
|
||||
metadataFields?: Prisma.MetadataFieldUpdateManyWithoutTeamNestedInput
|
||||
invites?: Prisma.InviteUpdateManyWithoutTeamNestedInput
|
||||
notifications?: Prisma.NotificationUpdateManyWithoutTeamNestedInput
|
||||
userMetadata?: Prisma.UserMetadataUpdateManyWithoutTeamNestedInput
|
||||
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
|
||||
mcpServers?: Prisma.McpServerUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
|
||||
aiUsages?: Prisma.AiUsageUpdateManyWithoutTeamNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutTeamNestedInput
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutKanbanTasksInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
rootFolderId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
members?: Prisma.TeamMemberUncheckedUpdateManyWithoutTeamNestedInput
|
||||
projects?: Prisma.ProjectUncheckedUpdateManyWithoutTeamNestedInput
|
||||
metadataFields?: Prisma.MetadataFieldUncheckedUpdateManyWithoutTeamNestedInput
|
||||
invites?: Prisma.InviteUncheckedUpdateManyWithoutTeamNestedInput
|
||||
notifications?: Prisma.NotificationUncheckedUpdateManyWithoutTeamNestedInput
|
||||
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutTeamNestedInput
|
||||
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
|
||||
mcpServers?: Prisma.McpServerUncheckedUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
|
||||
aiUsages?: Prisma.AiUsageUncheckedUpdateManyWithoutTeamNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutTeamNestedInput
|
||||
watermarkTemplates?: Prisma.WatermarkTemplateUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRules?: Prisma.QuotaRuleUncheckedUpdateManyWithoutTeamNestedInput
|
||||
quotaRecords?: Prisma.QuotaRecordUncheckedUpdateManyWithoutTeamNestedInput
|
||||
kanbanGoals?: Prisma.KanbanGoalUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
|
||||
@@ -2632,6 +3050,8 @@ export type TeamCountOutputType = {
|
||||
watermarkTemplates: number
|
||||
quotaRules: number
|
||||
quotaRecords: number
|
||||
kanbanGoals: number
|
||||
kanbanTasks: number
|
||||
}
|
||||
|
||||
export type TeamCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
@@ -2650,6 +3070,8 @@ export type TeamCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.I
|
||||
watermarkTemplates?: boolean | TeamCountOutputTypeCountWatermarkTemplatesArgs
|
||||
quotaRules?: boolean | TeamCountOutputTypeCountQuotaRulesArgs
|
||||
quotaRecords?: boolean | TeamCountOutputTypeCountQuotaRecordsArgs
|
||||
kanbanGoals?: boolean | TeamCountOutputTypeCountKanbanGoalsArgs
|
||||
kanbanTasks?: boolean | TeamCountOutputTypeCountKanbanTasksArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2767,6 +3189,20 @@ export type TeamCountOutputTypeCountQuotaRecordsArgs<ExtArgs extends runtime.Typ
|
||||
where?: Prisma.QuotaRecordWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* TeamCountOutputType without action
|
||||
*/
|
||||
export type TeamCountOutputTypeCountKanbanGoalsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.KanbanGoalWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* TeamCountOutputType without action
|
||||
*/
|
||||
export type TeamCountOutputTypeCountKanbanTasksArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.KanbanTaskWhereInput
|
||||
}
|
||||
|
||||
|
||||
export type TeamSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
@@ -2792,6 +3228,8 @@ export type TeamSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = r
|
||||
watermarkTemplates?: boolean | Prisma.Team$watermarkTemplatesArgs<ExtArgs>
|
||||
quotaRules?: boolean | Prisma.Team$quotaRulesArgs<ExtArgs>
|
||||
quotaRecords?: boolean | Prisma.Team$quotaRecordsArgs<ExtArgs>
|
||||
kanbanGoals?: boolean | Prisma.Team$kanbanGoalsArgs<ExtArgs>
|
||||
kanbanTasks?: boolean | Prisma.Team$kanbanTasksArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.TeamCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["team"]>
|
||||
|
||||
@@ -2843,6 +3281,8 @@ export type TeamInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
||||
watermarkTemplates?: boolean | Prisma.Team$watermarkTemplatesArgs<ExtArgs>
|
||||
quotaRules?: boolean | Prisma.Team$quotaRulesArgs<ExtArgs>
|
||||
quotaRecords?: boolean | Prisma.Team$quotaRecordsArgs<ExtArgs>
|
||||
kanbanGoals?: boolean | Prisma.Team$kanbanGoalsArgs<ExtArgs>
|
||||
kanbanTasks?: boolean | Prisma.Team$kanbanTasksArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.TeamCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
export type TeamIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
@@ -2872,6 +3312,8 @@ export type $TeamPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
||||
watermarkTemplates: Prisma.$WatermarkTemplatePayload<ExtArgs>[]
|
||||
quotaRules: Prisma.$QuotaRulePayload<ExtArgs>[]
|
||||
quotaRecords: Prisma.$QuotaRecordPayload<ExtArgs>[]
|
||||
kanbanGoals: Prisma.$KanbanGoalPayload<ExtArgs>[]
|
||||
kanbanTasks: Prisma.$KanbanTaskPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -3294,6 +3736,8 @@ export interface Prisma__TeamClient<T, Null = never, ExtArgs extends runtime.Typ
|
||||
watermarkTemplates<T extends Prisma.Team$watermarkTemplatesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$watermarkTemplatesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$WatermarkTemplatePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
quotaRules<T extends Prisma.Team$quotaRulesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$quotaRulesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$QuotaRulePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
quotaRecords<T extends Prisma.Team$quotaRecordsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$quotaRecordsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$QuotaRecordPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
kanbanGoals<T extends Prisma.Team$kanbanGoalsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$kanbanGoalsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$KanbanGoalPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
kanbanTasks<T extends Prisma.Team$kanbanTasksArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$kanbanTasksArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$KanbanTaskPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -4127,6 +4571,54 @@ export type Team$quotaRecordsArgs<ExtArgs extends runtime.Types.Extensions.Inter
|
||||
distinct?: Prisma.QuotaRecordScalarFieldEnum | Prisma.QuotaRecordScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Team.kanbanGoals
|
||||
*/
|
||||
export type Team$kanbanGoalsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the KanbanGoal
|
||||
*/
|
||||
select?: Prisma.KanbanGoalSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the KanbanGoal
|
||||
*/
|
||||
omit?: Prisma.KanbanGoalOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.KanbanGoalInclude<ExtArgs> | null
|
||||
where?: Prisma.KanbanGoalWhereInput
|
||||
orderBy?: Prisma.KanbanGoalOrderByWithRelationInput | Prisma.KanbanGoalOrderByWithRelationInput[]
|
||||
cursor?: Prisma.KanbanGoalWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.KanbanGoalScalarFieldEnum | Prisma.KanbanGoalScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Team.kanbanTasks
|
||||
*/
|
||||
export type Team$kanbanTasksArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the KanbanTask
|
||||
*/
|
||||
select?: Prisma.KanbanTaskSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the KanbanTask
|
||||
*/
|
||||
omit?: Prisma.KanbanTaskOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.KanbanTaskInclude<ExtArgs> | null
|
||||
where?: Prisma.KanbanTaskWhereInput
|
||||
orderBy?: Prisma.KanbanTaskOrderByWithRelationInput | Prisma.KanbanTaskOrderByWithRelationInput[]
|
||||
cursor?: Prisma.KanbanTaskWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.KanbanTaskScalarFieldEnum | Prisma.KanbanTaskScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Team without action
|
||||
*/
|
||||
|
||||
+2206
File diff suppressed because it is too large
Load Diff
@@ -431,5 +431,36 @@ declare global {
|
||||
// ----------------------------------------------------------------------
|
||||
export type QuotaResourceData = Record<string, unknown>
|
||||
export type QuotaUserIds = string[]
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Kanban Types
|
||||
// ----------------------------------------------------------------------
|
||||
export type KanbanBlockReasonKind = 'NEEDS_INPUT' | 'CAPABILITY' | 'DEPENDENCY' | 'TRANSIENT'
|
||||
|
||||
export interface KanbanAssetSummary {
|
||||
id: string
|
||||
type?: string
|
||||
name?: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
export interface KanbanEventPayload {
|
||||
summary?: string
|
||||
blockReason?: string
|
||||
blockKind?: KanbanBlockReasonKind
|
||||
assets?: KanbanAssetSummary[]
|
||||
reason?: string
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
export interface KanbanCommentAttachment {
|
||||
id: string
|
||||
name: string
|
||||
key: string
|
||||
sizeByte: number
|
||||
contentType?: string | null
|
||||
proxyType?: 'image' | 'video' | 'audio' | 'pdf' | null
|
||||
}
|
||||
export type KanbanCommentAttachmentList = KanbanCommentAttachment[]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/dtos",
|
||||
"version": "0.3.9",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
|
||||
@@ -53,6 +53,16 @@ export enum AuditAction {
|
||||
quota_policy_create = 'quota_policy_create',
|
||||
quota_policy_update = 'quota_policy_update',
|
||||
quota_policy_delete = 'quota_policy_delete',
|
||||
kanban_goal_create = 'kanban_goal_create',
|
||||
kanban_goal_update = 'kanban_goal_update',
|
||||
kanban_goal_delete = 'kanban_goal_delete',
|
||||
kanban_task_create = 'kanban_task_create',
|
||||
kanban_task_update = 'kanban_task_update',
|
||||
kanban_task_delete = 'kanban_task_delete',
|
||||
kanban_comment_create = 'kanban_comment_create',
|
||||
kanban_comment_delete = 'kanban_comment_delete',
|
||||
kanban_dependency_add = 'kanban_dependency_add',
|
||||
kanban_dependency_remove = 'kanban_dependency_remove',
|
||||
}
|
||||
|
||||
export const auditLogSchema = z.object({
|
||||
|
||||
@@ -23,3 +23,5 @@ export * from './chat'
|
||||
export * from './auditLog'
|
||||
export * from './watermark'
|
||||
export * from './quota'
|
||||
export * from './kanban'
|
||||
export * from './recents'
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
import { z } from 'zod'
|
||||
import { kanbanUserInfoSchema } from './event'
|
||||
|
||||
export const kanbanAttachmentPayloadSchema = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
key: z.string(),
|
||||
sizeByte: z.number(),
|
||||
contentType: z.string().nullable().optional(),
|
||||
proxyType: z.enum(['image', 'video', 'audio', 'pdf']).nullable().optional(),
|
||||
})
|
||||
export type KanbanAttachmentPayload = z.infer<typeof kanbanAttachmentPayloadSchema>
|
||||
|
||||
export const kanbanAttachmentInfoSchema = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
sizeByte: z.number(),
|
||||
contentType: z.string().nullable().optional(),
|
||||
url: z.string(),
|
||||
proxyType: z.enum(['image', 'video', 'audio', 'pdf']).nullable().optional(),
|
||||
})
|
||||
export type KanbanAttachmentInfo = z.infer<typeof kanbanAttachmentInfoSchema>
|
||||
|
||||
export const postKanbanAttachmentResponseSchema = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
key: z.string(),
|
||||
sizeByte: z.number(),
|
||||
contentType: z.string().nullable().optional(),
|
||||
uploadUrl: z.string(),
|
||||
proxyType: z.enum(['image', 'video', 'audio', 'pdf']).nullable().optional(),
|
||||
})
|
||||
export type PostKanbanAttachmentResponse = z.infer<typeof postKanbanAttachmentResponseSchema>
|
||||
|
||||
export const createKanbanCommentSchema = z
|
||||
.object({
|
||||
body: z.string().default(''),
|
||||
attachments: z.array(kanbanAttachmentPayloadSchema).optional(),
|
||||
})
|
||||
.refine(
|
||||
(data) => data.body.trim().length > 0 || (data.attachments && data.attachments.length > 0),
|
||||
{
|
||||
message: 'Comment body or attachments required',
|
||||
},
|
||||
)
|
||||
export type CreateKanbanCommentRequest = z.infer<typeof createKanbanCommentSchema>
|
||||
|
||||
export const kanbanCommentInfoSchema = z.object({
|
||||
id: z.string(),
|
||||
taskId: z.string(),
|
||||
author: kanbanUserInfoSchema,
|
||||
body: z.string(),
|
||||
attachments: z.array(kanbanAttachmentInfoSchema).default([]),
|
||||
createdAt: z.union([z.string(), z.date()]),
|
||||
updatedAt: z.union([z.string(), z.date()]),
|
||||
})
|
||||
export type KanbanCommentInfo = z.infer<typeof kanbanCommentInfoSchema>
|
||||
|
||||
export const listKanbanCommentsResponseSchema = z.object({
|
||||
data: z.array(kanbanCommentInfoSchema),
|
||||
})
|
||||
export type ListKanbanCommentsResponse = z.infer<typeof listKanbanCommentsResponseSchema>
|
||||
@@ -0,0 +1,46 @@
|
||||
import { z } from 'zod'
|
||||
import { KanbanTaskEventType, KanbanTaskStatus } from '@shumai/db/enums'
|
||||
|
||||
export const kanbanUserInfoSchema = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
image: z.string().optional(),
|
||||
})
|
||||
export type KanbanUserInfo = z.infer<typeof kanbanUserInfoSchema>
|
||||
|
||||
export const kanbanEventPayloadSchema = z
|
||||
.object({
|
||||
summary: z.string().optional(),
|
||||
blockReason: z.string().optional(),
|
||||
blockKind: z.string().optional(),
|
||||
reason: z.string().optional(),
|
||||
assets: z
|
||||
.array(
|
||||
z.object({
|
||||
id: z.string(),
|
||||
type: z.string().optional(),
|
||||
name: z.string().optional(),
|
||||
description: z.string().optional(),
|
||||
}),
|
||||
)
|
||||
.optional(),
|
||||
})
|
||||
.passthrough()
|
||||
export type KanbanEventPayload = z.infer<typeof kanbanEventPayloadSchema>
|
||||
|
||||
export const kanbanEventInfoSchema = z.object({
|
||||
id: z.string(),
|
||||
taskId: z.string(),
|
||||
actor: kanbanUserInfoSchema.nullable().optional(),
|
||||
type: z.nativeEnum(KanbanTaskEventType),
|
||||
fromStatus: z.nativeEnum(KanbanTaskStatus).nullable().optional(),
|
||||
toStatus: z.nativeEnum(KanbanTaskStatus).nullable().optional(),
|
||||
data: kanbanEventPayloadSchema.nullable().optional(),
|
||||
createdAt: z.union([z.string(), z.date()]),
|
||||
})
|
||||
export type KanbanEventInfo = z.infer<typeof kanbanEventInfoSchema>
|
||||
|
||||
export const listKanbanEventsResponseSchema = z.object({
|
||||
data: z.array(kanbanEventInfoSchema),
|
||||
})
|
||||
export type ListKanbanEventsResponse = z.infer<typeof listKanbanEventsResponseSchema>
|
||||
@@ -0,0 +1,37 @@
|
||||
import { z } from 'zod'
|
||||
|
||||
export const UNASSIGNED_GOAL_ID = 'unassigned'
|
||||
|
||||
export const createKanbanGoalSchema = z.object({
|
||||
title: z.string().min(1),
|
||||
description: z.string().optional(),
|
||||
})
|
||||
export type CreateKanbanGoalRequest = z.infer<typeof createKanbanGoalSchema>
|
||||
|
||||
export const updateKanbanGoalSchema = z.object({
|
||||
title: z.string().min(1).optional(),
|
||||
description: z.string().nullable().optional(),
|
||||
})
|
||||
export type UpdateKanbanGoalRequest = z.infer<typeof updateKanbanGoalSchema>
|
||||
|
||||
export const kanbanGoalInfoSchema = z.object({
|
||||
id: z.string(),
|
||||
title: z.string(),
|
||||
description: z.string().nullable().optional(),
|
||||
teamId: z.string(),
|
||||
creatorId: z.string().nullable().optional(),
|
||||
taskCount: z.number().optional(),
|
||||
createdAt: z.union([z.string(), z.date()]),
|
||||
updatedAt: z.union([z.string(), z.date()]),
|
||||
})
|
||||
export type KanbanGoalInfo = z.infer<typeof kanbanGoalInfoSchema>
|
||||
|
||||
export const listKanbanGoalsRequestSchema = z.object({
|
||||
// Filter or search params can be added here
|
||||
})
|
||||
export type ListKanbanGoalsRequest = z.infer<typeof listKanbanGoalsRequestSchema>
|
||||
|
||||
export const listKanbanGoalsResponseSchema = z.object({
|
||||
data: z.array(kanbanGoalInfoSchema),
|
||||
})
|
||||
export type ListKanbanGoalsResponse = z.infer<typeof listKanbanGoalsResponseSchema>
|
||||
@@ -0,0 +1,4 @@
|
||||
export * from './goal'
|
||||
export * from './comment'
|
||||
export * from './event'
|
||||
export * from './task'
|
||||
@@ -0,0 +1,164 @@
|
||||
import { z } from 'zod'
|
||||
import { KanbanTaskStatus, KanbanTaskPriority, KanbanTaskEventType } from '@shumai/db/enums'
|
||||
import { paginationPageInfoSchema, paginationParamsSchema } from '../pagination'
|
||||
import { kanbanUserInfoSchema, kanbanEventInfoSchema } from './event'
|
||||
import { kanbanCommentInfoSchema } from './comment'
|
||||
|
||||
export { KanbanTaskStatus, KanbanTaskPriority, KanbanTaskEventType }
|
||||
|
||||
export const createKanbanTaskSchema = z.object({
|
||||
title: z.string().min(1),
|
||||
description: z.string().optional(),
|
||||
isAgentTask: z.boolean().optional(),
|
||||
priority: z.nativeEnum(KanbanTaskPriority).optional(),
|
||||
startDate: z.union([z.string(), z.date()]).optional(),
|
||||
dueDate: z.union([z.string(), z.date()]).optional(),
|
||||
goalId: z.string().optional(),
|
||||
projectId: z.string().optional(),
|
||||
reporterId: z.string().optional(),
|
||||
assigneeId: z.string().optional(),
|
||||
targetFolderId: z.string().optional(),
|
||||
parentIds: z.array(z.string()).optional(),
|
||||
assetIds: z.array(z.string()).optional(),
|
||||
})
|
||||
export type CreateKanbanTaskRequest = z.infer<typeof createKanbanTaskSchema>
|
||||
|
||||
export const updateKanbanTaskSchema = z.object({
|
||||
fromStatus: z.nativeEnum(KanbanTaskStatus).optional(),
|
||||
title: z.string().min(1).optional(),
|
||||
description: z.string().nullable().optional(),
|
||||
status: z.nativeEnum(KanbanTaskStatus).optional(),
|
||||
reason: z.string().optional(),
|
||||
priority: z.nativeEnum(KanbanTaskPriority).optional(),
|
||||
startDate: z.union([z.string(), z.date()]).nullable().optional(),
|
||||
dueDate: z.union([z.string(), z.date()]).nullable().optional(),
|
||||
goalId: z.string().nullable().optional(),
|
||||
projectId: z.string().nullable().optional(),
|
||||
reporterId: z.string().nullable().optional(),
|
||||
assigneeId: z.string().nullable().optional(),
|
||||
targetFolderId: z.string().nullable().optional(),
|
||||
beforeIndex: z.string().optional(),
|
||||
afterIndex: z.string().optional(),
|
||||
parentIds: z.array(z.string()).optional(),
|
||||
assetIds: z.array(z.string()).optional(),
|
||||
})
|
||||
export type UpdateKanbanTaskRequest = z.infer<typeof updateKanbanTaskSchema>
|
||||
|
||||
export const listKanbanTasksRequestSchema = z
|
||||
.object({
|
||||
status: z.nativeEnum(KanbanTaskStatus).optional(),
|
||||
isAgentTask: z
|
||||
.union([z.boolean(), z.string()])
|
||||
.transform((v) => v === true || v === 'true')
|
||||
.optional(),
|
||||
goalId: z.string().optional(),
|
||||
projectId: z.string().optional(),
|
||||
priority: z.nativeEnum(KanbanTaskPriority).optional(),
|
||||
assigneeId: z.string().optional(),
|
||||
reporterId: z.string().optional(),
|
||||
})
|
||||
.merge(paginationParamsSchema)
|
||||
export type ListKanbanTasksRequest = z.infer<typeof listKanbanTasksRequestSchema>
|
||||
|
||||
export const kanbanStatusEventInfoSchema = z.object({
|
||||
id: z.string(),
|
||||
type: z.nativeEnum(KanbanTaskEventType),
|
||||
actor: kanbanUserInfoSchema.nullable().optional(),
|
||||
summary: z.string().optional(),
|
||||
blockReason: z.string().optional(),
|
||||
blockKind: z.string().optional(),
|
||||
reason: z.string().optional(),
|
||||
createdAt: z.union([z.string(), z.date()]),
|
||||
})
|
||||
export type KanbanStatusEventInfo = z.infer<typeof kanbanStatusEventInfoSchema>
|
||||
|
||||
export const kanbanTaskGoalSummarySchema = z.object({
|
||||
id: z.string(),
|
||||
title: z.string(),
|
||||
})
|
||||
export type KanbanTaskGoalSummary = z.infer<typeof kanbanTaskGoalSummarySchema>
|
||||
|
||||
export const kanbanTaskSummarySchema = z.object({
|
||||
id: z.string(),
|
||||
title: z.string(),
|
||||
isAgentTask: z.boolean(),
|
||||
status: z.nativeEnum(KanbanTaskStatus),
|
||||
priority: z.nativeEnum(KanbanTaskPriority),
|
||||
sortIndex: z.string().nullable().optional(),
|
||||
})
|
||||
export type KanbanTaskSummary = z.infer<typeof kanbanTaskSummarySchema>
|
||||
|
||||
export const kanbanTaskAssetInfoSchema = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
type: z.string(),
|
||||
proxyType: z.enum(['image', 'video', 'audio', 'pdf']).nullable().optional(),
|
||||
thumbnailUrl: z.string().nullable().optional(),
|
||||
path: z.string(),
|
||||
creator: kanbanUserInfoSchema.nullable().optional(),
|
||||
sizeByte: z.number().optional(),
|
||||
fileCount: z.number().optional(),
|
||||
projectId: z.string().nullable().optional(),
|
||||
createdAt: z.union([z.string(), z.date()]),
|
||||
})
|
||||
export type KanbanTaskAssetInfo = z.infer<typeof kanbanTaskAssetInfoSchema>
|
||||
|
||||
export const kanbanTaskInfoSchema = z.object({
|
||||
id: z.string(),
|
||||
title: z.string(),
|
||||
description: z.string().nullable().optional(),
|
||||
isAgentTask: z.boolean(),
|
||||
status: z.nativeEnum(KanbanTaskStatus),
|
||||
priority: z.nativeEnum(KanbanTaskPriority),
|
||||
startDate: z.union([z.string(), z.date()]).nullable().optional(),
|
||||
dueDate: z.union([z.string(), z.date()]).nullable().optional(),
|
||||
startedAt: z.union([z.string(), z.date()]).nullable().optional(),
|
||||
completedAt: z.union([z.string(), z.date()]).nullable().optional(),
|
||||
teamId: z.string(),
|
||||
projectId: z.string().nullable().optional(),
|
||||
sortIndex: z.string().nullable().optional(),
|
||||
creator: kanbanUserInfoSchema,
|
||||
reporter: kanbanUserInfoSchema.nullable().optional(),
|
||||
assignee: kanbanUserInfoSchema.nullable().optional(),
|
||||
goal: kanbanTaskGoalSummarySchema.nullable().optional(),
|
||||
targetFolderId: z.string().nullable().optional(),
|
||||
latestStatusEvent: kanbanStatusEventInfoSchema.nullable().optional(),
|
||||
commentCount: z.number().default(0),
|
||||
dependencyCount: z.number().default(0),
|
||||
dependentCount: z.number().default(0),
|
||||
assetCount: z.number().default(0),
|
||||
createdAt: z.union([z.string(), z.date()]),
|
||||
updatedAt: z.union([z.string(), z.date()]),
|
||||
})
|
||||
export type KanbanTaskInfo = z.infer<typeof kanbanTaskInfoSchema>
|
||||
|
||||
export const kanbanTaskDetailSchema = kanbanTaskInfoSchema.extend({
|
||||
dependencies: z.array(kanbanTaskSummarySchema),
|
||||
dependents: z.array(kanbanTaskSummarySchema),
|
||||
assets: z.array(kanbanTaskAssetInfoSchema),
|
||||
comments: z.array(kanbanCommentInfoSchema),
|
||||
events: z.array(kanbanEventInfoSchema),
|
||||
})
|
||||
export type KanbanTaskDetail = z.infer<typeof kanbanTaskDetailSchema>
|
||||
|
||||
export const listKanbanTasksResponseSchema = z.object({
|
||||
data: z.array(kanbanTaskInfoSchema),
|
||||
pageInfo: paginationPageInfoSchema,
|
||||
})
|
||||
export type ListKanbanTasksResponse = z.infer<typeof listKanbanTasksResponseSchema>
|
||||
|
||||
export const linkAssetToTaskSchema = z.object({
|
||||
taskId: z.string(),
|
||||
})
|
||||
export type LinkAssetToTaskRequest = z.infer<typeof linkAssetToTaskSchema>
|
||||
|
||||
export const linkTaskAssetsSchema = z.object({
|
||||
assetIds: z.array(z.string()),
|
||||
})
|
||||
export type LinkTaskAssetsRequest = z.infer<typeof linkTaskAssetsSchema>
|
||||
|
||||
export const listAssetTasksResponseSchema = z.object({
|
||||
data: z.array(kanbanTaskInfoSchema),
|
||||
total: z.number(),
|
||||
})
|
||||
export type ListAssetTasksResponse = z.infer<typeof listAssetTasksResponseSchema>
|
||||
@@ -28,6 +28,14 @@ export const assetPreviewSchema = z.object({
|
||||
|
||||
export type AssetPreview = z.infer<typeof assetPreviewSchema>
|
||||
|
||||
export const kanbanTaskPreviewSchema = z.object({
|
||||
id: z.string().optional(),
|
||||
title: z.string().optional(),
|
||||
status: z.string().optional(),
|
||||
})
|
||||
|
||||
export type KanbanTaskPreview = z.infer<typeof kanbanTaskPreviewSchema>
|
||||
|
||||
export const notificationInfoSchema = z.object({
|
||||
id: z.string().optional(),
|
||||
creator: teamUserInfoSchema.optional(),
|
||||
@@ -35,6 +43,7 @@ export const notificationInfoSchema = z.object({
|
||||
team: entityInfoSchema.optional(),
|
||||
project: entityInfoSchema.optional(),
|
||||
asset: assetPreviewSchema.optional(),
|
||||
kanbanTask: kanbanTaskPreviewSchema.optional(),
|
||||
user: teamUserInfoSchema.optional(),
|
||||
createdAt: z.string().optional(),
|
||||
isRead: z.boolean().optional(),
|
||||
@@ -67,6 +76,7 @@ export interface CreateNotificationRequest {
|
||||
creatorId?: string
|
||||
assetId?: string
|
||||
taskId?: string
|
||||
kanbanTaskId?: string
|
||||
userId?: string
|
||||
commentMessage?: string // For parsing mentions
|
||||
}
|
||||
@@ -84,6 +94,8 @@ export const notificationSettingsSchema = z.object({
|
||||
yourUploads: z.boolean().default(false),
|
||||
otherUploads: z.boolean().default(true),
|
||||
statusUpdates: z.boolean().default(true),
|
||||
kanbanTasks: z.boolean().default(true),
|
||||
kanbanComments: z.boolean().default(true),
|
||||
})
|
||||
|
||||
export type NotificationSettings = z.infer<typeof notificationSettingsSchema>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import { z } from 'zod'
|
||||
import { paginationParamsSchema } from './pagination'
|
||||
|
||||
export const recordRecentViewRequestSchema = z.object({
|
||||
assetId: z.string(),
|
||||
})
|
||||
export type RecordRecentViewRequest = z.infer<typeof recordRecentViewRequestSchema>
|
||||
|
||||
export const listRecentsRequestSchema = paginationParamsSchema
|
||||
export type ListRecentsRequest = z.infer<typeof listRecentsRequestSchema>
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/e2e",
|
||||
"version": "0.3.9",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/tableprinter",
|
||||
"version": "0.3.9",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/transcode",
|
||||
"version": "0.3.9",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { hc } from 'hono/client'
|
||||
import type { AppType } from '@shumai/api'
|
||||
import { useAuthStore } from '@/ui/stores/auth'
|
||||
import { toast } from 'sonner'
|
||||
|
||||
const customFetch = async (input: RequestInfo | URL, init?: RequestInit) => {
|
||||
const response = await fetch(input, init)
|
||||
@@ -20,12 +19,6 @@ const customFetch = async (input: RequestInfo | URL, init?: RequestInit) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (response.status === 403) {
|
||||
toast.error('You do not have permission. Please contact the team admin.', {
|
||||
id: 'forbidden-error',
|
||||
})
|
||||
}
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
// @vitest-environment happy-dom
|
||||
import React from 'react'
|
||||
import { cleanup, render, screen } from '@testing-library/react'
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
||||
import { BreadcrumbNav } from './breadcrumb-nav'
|
||||
|
||||
// Mock tanstack router Link
|
||||
vi.mock('@tanstack/react-router', () => ({
|
||||
Link: ({ children, to, ...props }: { children: React.ReactNode; to: string }) => (
|
||||
<a href={to} {...props}>
|
||||
{children}
|
||||
</a>
|
||||
),
|
||||
useNavigate: () => vi.fn(),
|
||||
useMatch: () => false,
|
||||
}))
|
||||
|
||||
describe('BreadcrumbNav component', () => {
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
retry: false,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
cleanup()
|
||||
})
|
||||
|
||||
const baseProps = {
|
||||
teamId: 'team-1',
|
||||
projectId: 'proj-1',
|
||||
projectName: 'Demo Project',
|
||||
ancestorFolders: [],
|
||||
currentAsset: {
|
||||
id: 'asset-1',
|
||||
name: 'Folder A',
|
||||
type: 'folder' as const,
|
||||
},
|
||||
isRootFolder: false,
|
||||
isRightSidebarCollapsed: false,
|
||||
onRightSidebarToggle: vi.fn(),
|
||||
}
|
||||
|
||||
it('renders SquareKanban task link button for non-root folder', () => {
|
||||
render(
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<BreadcrumbNav {...baseProps} />
|
||||
</QueryClientProvider>,
|
||||
)
|
||||
|
||||
expect(screen.getByTitle(/Linked Tasks|关联任务/i)).toBeDefined()
|
||||
})
|
||||
|
||||
it('hides SquareKanban task link button on project root folder', () => {
|
||||
render(
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<BreadcrumbNav {...baseProps} isRootFolder={true} />
|
||||
</QueryClientProvider>,
|
||||
)
|
||||
|
||||
expect(screen.queryByTitle(/Linked Tasks|关联任务/i)).toBeNull()
|
||||
})
|
||||
|
||||
it('hides SquareKanban task link button for public share view', () => {
|
||||
render(
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<BreadcrumbNav {...baseProps} isPublic={true} />
|
||||
</QueryClientProvider>,
|
||||
)
|
||||
|
||||
expect(screen.queryByTitle(/Linked Tasks|关联任务/i)).toBeNull()
|
||||
})
|
||||
|
||||
it('hides SquareKanban task link button on Recently Deleted view', () => {
|
||||
render(
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<BreadcrumbNav {...baseProps} currentAsset={{ name: 'Recently Deleted', type: 'folder' }} />
|
||||
</QueryClientProvider>,
|
||||
)
|
||||
|
||||
expect(screen.queryByTitle(/Linked Tasks|关联任务/i)).toBeNull()
|
||||
})
|
||||
})
|
||||
@@ -1,5 +1,6 @@
|
||||
import { client } from '@/ui/api/client'
|
||||
import { Badge } from '@/ui/components/ui/badge'
|
||||
import { Button } from '@/ui/components/ui/button'
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
@@ -30,6 +31,7 @@ import { cn } from '@/ui/lib/utils'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
import type { AncestorFolder } from '@shumai/dtos'
|
||||
import { Link, useNavigate } from '@tanstack/react-router'
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import {
|
||||
Bot,
|
||||
Check,
|
||||
@@ -39,9 +41,11 @@ import {
|
||||
History,
|
||||
LayoutGrid,
|
||||
List,
|
||||
SquareKanban,
|
||||
} from 'lucide-react'
|
||||
import { useState } from 'react'
|
||||
import { ManageVersionsDialog } from './manage-versions-dialog'
|
||||
import { AssetLinkedTasksDialog } from './kanban/asset-linked-tasks-dialog'
|
||||
|
||||
interface BreadcrumbNavProps {
|
||||
teamId: string
|
||||
@@ -49,6 +53,7 @@ interface BreadcrumbNavProps {
|
||||
projectName: string
|
||||
ancestorFolders: AncestorFolder[]
|
||||
currentAsset: {
|
||||
id?: string
|
||||
name?: string
|
||||
type: 'file' | 'folder'
|
||||
version?: number
|
||||
@@ -123,6 +128,33 @@ export function BreadcrumbNav({
|
||||
const navigate = useNavigate()
|
||||
const { canEdit } = usePermissions(projectId)
|
||||
const [isManageVersionsOpen, setIsManageVersionsOpen] = useState(false)
|
||||
const [isLinkedTasksOpen, setIsLinkedTasksOpen] = useState(false)
|
||||
|
||||
const targetAssetId = fileId || currentAsset.id
|
||||
const isRecentlyDeleted = currentAsset.name === 'Recently Deleted'
|
||||
const isCollection = currentAsset.name === 'All Collections'
|
||||
const showKanbanLink =
|
||||
!isPublic &&
|
||||
!isRootFolder &&
|
||||
!isRecentlyDeleted &&
|
||||
!isCollection &&
|
||||
!compareMode &&
|
||||
!!targetAssetId
|
||||
|
||||
const { data: linkedTasksData } = useQuery({
|
||||
queryKey: ['teams', teamId, 'kanban', 'assets', targetAssetId, 'tasks'],
|
||||
queryFn: async () => {
|
||||
if (!teamId || !targetAssetId) return { data: [], total: 0 }
|
||||
const res = await client.api.teams[':teamId'].kanban.assets[':assetId'].tasks.$get({
|
||||
param: { teamId, assetId: targetAssetId },
|
||||
})
|
||||
if (!res.ok) return { data: [], total: 0 }
|
||||
return (await res.json()) as { data: Array<{ id: string }>; total: number }
|
||||
},
|
||||
enabled: !!teamId && !!targetAssetId && showKanbanLink,
|
||||
})
|
||||
|
||||
const linkedTaskCount = linkedTasksData?.total ?? linkedTasksData?.data?.length ?? 0
|
||||
|
||||
const isChatbotDisabled = false
|
||||
|
||||
@@ -399,6 +431,33 @@ export function BreadcrumbNav({
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{showKanbanLink && (
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="h-7 px-2 text-xs gap-1.5 text-muted-foreground hover:text-foreground hover:bg-muted ml-1 cursor-pointer"
|
||||
onClick={() => setIsLinkedTasksOpen(true)}
|
||||
title={m.linked_tasks()}
|
||||
>
|
||||
<SquareKanban className="w-4 h-4" />
|
||||
{linkedTaskCount > 0 && (
|
||||
<span className="inline-flex items-center justify-center px-1.5 py-0.2 text-[10px] font-semibold rounded-full bg-muted-foreground/15 text-foreground">
|
||||
{linkedTaskCount}
|
||||
</span>
|
||||
)}
|
||||
</Button>
|
||||
)}
|
||||
|
||||
{showKanbanLink && isLinkedTasksOpen && targetAssetId && (
|
||||
<AssetLinkedTasksDialog
|
||||
teamId={teamId}
|
||||
assetId={targetAssetId}
|
||||
assetName={currentAsset.name}
|
||||
isOpen={isLinkedTasksOpen}
|
||||
onClose={() => setIsLinkedTasksOpen(false)}
|
||||
/>
|
||||
)}
|
||||
|
||||
{fileId && versions && versions.length > 0 && (
|
||||
<ManageVersionsDialog
|
||||
open={isManageVersionsOpen}
|
||||
|
||||
@@ -10,6 +10,7 @@ interface DualSidebarItemProps {
|
||||
badge?: React.ReactNode
|
||||
children?: React.ReactNode
|
||||
onItemClick?: () => void
|
||||
active?: boolean
|
||||
}
|
||||
|
||||
// A declarative component that holds props for a sidebar item. It doesn't render anything itself.
|
||||
@@ -103,32 +104,35 @@ export const DualSidebar: React.FC<DualSidebarProps> = ({ children }) => {
|
||||
<div className="absolute bottom-0 w-full h-[70dvh] bg-linear-to-t from-sidebar-primary/10 to-transparent"></div>
|
||||
{/* Level 1: Icon Bar */}
|
||||
<nav className="w-16 bg-card border-r border-sidebar-border flex flex-col items-center pb-4 pt-0 space-y-2 flex-shrink-0">
|
||||
<div className="flex-1 w-full flex flex-col items-center space-y-5 pt-1">
|
||||
<div className="flex-1 w-full flex flex-col items-center gap-5 pt-1">
|
||||
<TooltipProvider>
|
||||
{sidebarItems.map((item, index) => (
|
||||
<Tooltip key={item.props.label}>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon-lg"
|
||||
onClick={() => handleItemClick(index)}
|
||||
aria-label={item.props.label}
|
||||
aria-expanded={activeItem === index}
|
||||
className={`relative w-12 h-12 [&_svg:not([class*='size-'])]:size-6 transition-all duration-200 ${
|
||||
activeItem === index
|
||||
? 'bg-sidebar-primary text-sidebar-primary-foreground shadow-lg hover:bg-sidebar-primary hover:text-sidebar-primary-foreground'
|
||||
: 'text-sidebar-foreground/60 hover:text-sidebar-foreground hover:bg-sidebar-accent'
|
||||
}`}
|
||||
>
|
||||
{item.props.icon}
|
||||
{item.props.badge}
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="right">
|
||||
<p>{item.props.label}</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
))}
|
||||
{sidebarItems.map((item, index) => {
|
||||
const isItemActive = Boolean(item.props.active || activeItem === index)
|
||||
return (
|
||||
<Tooltip key={item.props.label}>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon-lg"
|
||||
onClick={() => handleItemClick(index)}
|
||||
aria-label={item.props.label}
|
||||
aria-expanded={activeItem === index}
|
||||
className={`relative w-12 h-12 [&_svg:not([class*='size-'])]:size-6 transition-colors duration-200 ${
|
||||
isItemActive
|
||||
? 'text-sidebar-primary hover:bg-sidebar-accent hover:text-sidebar-primary'
|
||||
: 'text-sidebar-foreground/60 hover:text-sidebar-foreground hover:bg-sidebar-accent'
|
||||
}`}
|
||||
>
|
||||
{item.props.icon}
|
||||
{item.props.badge}
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="right">
|
||||
<p>{item.props.label}</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
)
|
||||
})}
|
||||
</TooltipProvider>
|
||||
</div>
|
||||
<div className="mt-auto w-full flex flex-col items-center pb-2">
|
||||
|
||||
@@ -41,6 +41,7 @@ interface FileBrowserContextMenuProps {
|
||||
folders: AssetInfo[]
|
||||
files: AssetInfo[]
|
||||
isRecentlyDeleted?: boolean
|
||||
isRecents?: boolean
|
||||
onOpenAgentsMd?: (item: AssetInfo | null) => void
|
||||
isShareView?: boolean
|
||||
onRemoveFromShare?: (items: AssetInfo[]) => void
|
||||
@@ -67,6 +68,7 @@ export function FileBrowserContextMenu({
|
||||
folders,
|
||||
files,
|
||||
isRecentlyDeleted,
|
||||
isRecents,
|
||||
onOpenAgentsMd,
|
||||
isShareView,
|
||||
onRemoveFromShare,
|
||||
@@ -112,6 +114,10 @@ export function FileBrowserContextMenu({
|
||||
onRestore(itemsToRestore)
|
||||
}
|
||||
|
||||
if (isRecents) {
|
||||
return null
|
||||
}
|
||||
|
||||
if (isShareView) {
|
||||
if (!item) return null
|
||||
return (
|
||||
@@ -152,7 +158,7 @@ export function FileBrowserContextMenu({
|
||||
}
|
||||
|
||||
if (!item) {
|
||||
if (!canEdit) return null
|
||||
if (!canEdit || isRecents) return null
|
||||
// Right-click on empty area
|
||||
return (
|
||||
<ContextMenuContent
|
||||
|
||||
@@ -18,7 +18,7 @@ import type {
|
||||
} from '@shumai/dtos'
|
||||
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
|
||||
import { useNavigate } from '@tanstack/react-router'
|
||||
import { AlertTriangle, Download, Loader2 } from 'lucide-react'
|
||||
import { AlertTriangle, Download, FolderClock, Loader2 } from 'lucide-react'
|
||||
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { toast } from 'sonner'
|
||||
import { ulid } from 'ulid'
|
||||
@@ -78,6 +78,7 @@ interface FileBrowserProps {
|
||||
hasNextFilesPage: boolean
|
||||
isFetchingNextFilesPage: boolean
|
||||
isRecentlyDeleted?: boolean
|
||||
isRecents?: boolean
|
||||
filterConditions?: SearchCondition[]
|
||||
onFilterChange?: (conditions: SearchCondition[]) => void
|
||||
sort?: SearchSort
|
||||
@@ -127,6 +128,7 @@ export function FileBrowser({
|
||||
hasNextFilesPage,
|
||||
isFetchingNextFilesPage,
|
||||
isRecentlyDeleted,
|
||||
isRecents,
|
||||
filterConditions,
|
||||
onFilterChange,
|
||||
sort,
|
||||
@@ -172,7 +174,8 @@ export function FileBrowser({
|
||||
}, [])
|
||||
|
||||
const handleGlobalDragEnter = (e: React.DragEvent) => {
|
||||
if (!canEdit || isRecentlyDeleted || isShareView || isPublic || !!collection) return
|
||||
if (!canEdit || isRecentlyDeleted || isRecents || isShareView || isPublic || !!collection)
|
||||
return
|
||||
e.preventDefault()
|
||||
if (e.dataTransfer.types.includes('Files')) {
|
||||
dragCounter.current++
|
||||
@@ -181,7 +184,8 @@ export function FileBrowser({
|
||||
}
|
||||
|
||||
const handleGlobalDragLeave = (e: React.DragEvent) => {
|
||||
if (!canEdit || isRecentlyDeleted || isShareView || isPublic || !!collection) return
|
||||
if (!canEdit || isRecentlyDeleted || isRecents || isShareView || isPublic || !!collection)
|
||||
return
|
||||
e.preventDefault()
|
||||
if (e.dataTransfer.types.includes('Files')) {
|
||||
dragCounter.current--
|
||||
@@ -194,12 +198,14 @@ export function FileBrowser({
|
||||
}
|
||||
|
||||
const handleGlobalDragOver = (e: React.DragEvent) => {
|
||||
if (!canEdit || isRecentlyDeleted || isShareView || isPublic || !!collection) return
|
||||
if (!canEdit || isRecentlyDeleted || isRecents || isShareView || isPublic || !!collection)
|
||||
return
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
const handleGlobalDrop = async (e: React.DragEvent) => {
|
||||
if (!canEdit || isRecentlyDeleted || isShareView || isPublic || !!collection) return
|
||||
if (!canEdit || isRecentlyDeleted || isRecents || isShareView || isPublic || !!collection)
|
||||
return
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
|
||||
@@ -681,6 +687,7 @@ export function FileBrowser({
|
||||
handleAction(action as 'rename' | 'delete' | 'download' | 'restore', item)
|
||||
},
|
||||
isRecentlyDeleted,
|
||||
isRecents,
|
||||
selectedCount: selectedIds.size,
|
||||
isShareView,
|
||||
allowDownload,
|
||||
@@ -984,10 +991,17 @@ export function FileBrowser({
|
||||
const renderContent = () => {
|
||||
return (
|
||||
<ContextMenu modal={false}>
|
||||
<ContextMenuTrigger asChild disabled={isShareView || isPublic || !!collection}>
|
||||
<ContextMenuTrigger asChild disabled={isShareView || isPublic || !!collection || isRecents}>
|
||||
<div
|
||||
className="flex-1 bg-background relative flex flex-col min-h-0 overflow-hidden"
|
||||
onContextMenu={(e) => onContextMenu(e)}
|
||||
onContextMenu={(e) => {
|
||||
if (isRecents) {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
return
|
||||
}
|
||||
onContextMenu(e)
|
||||
}}
|
||||
onDragEnter={handleGlobalDragEnter}
|
||||
onDragLeave={handleGlobalDragLeave}
|
||||
onDragOver={handleGlobalDragOver}
|
||||
@@ -1004,6 +1018,7 @@ export function FileBrowser({
|
||||
sort={sort}
|
||||
onSortChange={onSortChange}
|
||||
isRecentlyDeleted={isRecentlyDeleted}
|
||||
isRecents={isRecents}
|
||||
collection={collection}
|
||||
onUpdateCollection={onUpdateCollection}
|
||||
rootFolderId={rootFolderId}
|
||||
@@ -1113,7 +1128,17 @@ export function FileBrowser({
|
||||
!isFetchingNextFoldersPage &&
|
||||
!isFetchingNextFilesPage && (
|
||||
<div className="empty-area flex h-full items-center justify-center text-sm text-muted-foreground">
|
||||
This folder is empty
|
||||
{isRecents ? (
|
||||
<div className="flex flex-col items-center gap-2 p-8 text-center animate-in fade-in duration-300">
|
||||
<FolderClock className="h-10 w-10 text-muted-foreground/50 mb-1" />
|
||||
<p className="font-medium text-foreground">{m.no_recent_files()}</p>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{m.no_recent_files_description()}
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
<span>This folder is empty</span>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
@@ -1189,6 +1214,7 @@ export function FileBrowser({
|
||||
}}
|
||||
onRestore={handleRestore}
|
||||
isRecentlyDeleted={isRecentlyDeleted}
|
||||
isRecents={isRecents}
|
||||
shareLinks={shareLinksData?.data ?? []}
|
||||
onCreateShareLink={handleCreateShareLink}
|
||||
onAddToShareLink={handleAddToShareLink}
|
||||
|
||||
@@ -52,6 +52,7 @@ interface FileCardProps {
|
||||
item: AssetInfo,
|
||||
) => void
|
||||
isRecentlyDeleted?: boolean
|
||||
isRecents?: boolean
|
||||
selectedCount?: number
|
||||
fields: MetadataFieldInfo[]
|
||||
isShareView?: boolean
|
||||
@@ -80,6 +81,7 @@ export function FileCard({
|
||||
disabled,
|
||||
onAction,
|
||||
isRecentlyDeleted,
|
||||
isRecents,
|
||||
selectedCount,
|
||||
fields,
|
||||
isShareView,
|
||||
@@ -313,97 +315,99 @@ export function FileCard({
|
||||
})}
|
||||
</p>
|
||||
</div>
|
||||
<DropdownMenu modal={false}>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button
|
||||
size="icon-sm"
|
||||
variant="ghost"
|
||||
className="cursor-pointer"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<MoreHorizontal className="h-4 w-4 text-foreground" />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
{isShareView ? (
|
||||
<>
|
||||
{allowDownload && (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('download', item)
|
||||
}}
|
||||
>
|
||||
<Download className="mr-2 h-4 w-4" />
|
||||
<span>{m.download()}</span>
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
{canEdit && (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('remove-from-share', item)
|
||||
}}
|
||||
className="text-destructive"
|
||||
>
|
||||
<Trash2 className="mr-2 h-4 w-4" />
|
||||
<span>{m.remove_from_share()}</span>
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
</>
|
||||
) : isRecentlyDeleted ? (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('restore', item)
|
||||
}}
|
||||
{!isRecents && (
|
||||
<DropdownMenu modal={false}>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button
|
||||
size="icon-sm"
|
||||
variant="ghost"
|
||||
className="cursor-pointer"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<History className="mr-2 h-4 w-4" />
|
||||
<span>{m.restore()}</span>
|
||||
</DropdownMenuItem>
|
||||
) : (
|
||||
<>
|
||||
{canEdit && (!isChecked || (selectedCount || 0) <= 1) && (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('rename', item)
|
||||
}}
|
||||
>
|
||||
<Edit className="mr-2 h-4 w-4" />
|
||||
<span>{m.rename()}</span>
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
{allowDownload && (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('download', item)
|
||||
}}
|
||||
>
|
||||
<Download className="mr-2 h-4 w-4" />
|
||||
<span>{m.download()}</span>
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
{canEdit && (
|
||||
<>
|
||||
<DropdownMenuSeparator />
|
||||
<MoreHorizontal className="h-4 w-4 text-foreground" />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
{isShareView ? (
|
||||
<>
|
||||
{allowDownload && (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('delete', item)
|
||||
onAction?.('download', item)
|
||||
}}
|
||||
>
|
||||
<Download className="mr-2 h-4 w-4" />
|
||||
<span>{m.download()}</span>
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
{canEdit && (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('remove-from-share', item)
|
||||
}}
|
||||
className="text-destructive"
|
||||
>
|
||||
<Trash2 className="mr-2 h-4 w-4" />
|
||||
<span>{m.delete()}</span>
|
||||
<span>{m.remove_from_share()}</span>
|
||||
</DropdownMenuItem>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
)}
|
||||
</>
|
||||
) : isRecentlyDeleted ? (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('restore', item)
|
||||
}}
|
||||
>
|
||||
<History className="mr-2 h-4 w-4" />
|
||||
<span>{m.restore()}</span>
|
||||
</DropdownMenuItem>
|
||||
) : (
|
||||
<>
|
||||
{canEdit && (!isChecked || (selectedCount || 0) <= 1) && (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('rename', item)
|
||||
}}
|
||||
>
|
||||
<Edit className="mr-2 h-4 w-4" />
|
||||
<span>{m.rename()}</span>
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
{allowDownload && (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('download', item)
|
||||
}}
|
||||
>
|
||||
<Download className="mr-2 h-4 w-4" />
|
||||
<span>{m.download()}</span>
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
{canEdit && (
|
||||
<>
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('delete', item)
|
||||
}}
|
||||
className="text-destructive"
|
||||
>
|
||||
<Trash2 className="mr-2 h-4 w-4" />
|
||||
<span>{m.delete()}</span>
|
||||
</DropdownMenuItem>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
)}
|
||||
</div>
|
||||
{fields && fields.length > 0 && (
|
||||
<div className="space-y-2 border-t p-1 pt-3 mx-2">
|
||||
@@ -422,8 +426,10 @@ export function FileCard({
|
||||
fieldId={field.id}
|
||||
config={field.config}
|
||||
value={itemFieldValueMap[field.id!]?.value}
|
||||
onSave={canEdit ? (val) => onSaveField(field.id!, val) : undefined}
|
||||
readOnly={field.readOnly || !canEdit}
|
||||
onSave={
|
||||
canEdit && !isRecents ? (val) => onSaveField(field.id!, val) : undefined
|
||||
}
|
||||
readOnly={field.readOnly || !canEdit || !!isRecents}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,6 +37,7 @@ interface FileListItemProps {
|
||||
fields: MetadataFieldInfo[]
|
||||
columnSizing?: Record<string, number>
|
||||
canEdit?: boolean
|
||||
isRecents?: boolean
|
||||
}
|
||||
|
||||
export function FileListItem({
|
||||
@@ -60,6 +61,7 @@ export function FileListItem({
|
||||
fields,
|
||||
columnSizing,
|
||||
canEdit = true,
|
||||
isRecents,
|
||||
}: FileListItemProps) {
|
||||
const [name, setName] = useState(item.name)
|
||||
const inputRef = useRef<HTMLInputElement>(null)
|
||||
@@ -274,22 +276,24 @@ export function FileListItem({
|
||||
<span className="text-sm text-muted-foreground truncate">
|
||||
{formatDate(displayItem.updatedAt)}
|
||||
</span>
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
const rect = (e.target as HTMLElement).getBoundingClientRect()
|
||||
const contextEvent = new MouseEvent(e.nativeEvent.type, {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
clientX: rect.left,
|
||||
clientY: rect.bottom,
|
||||
}) as unknown as React.MouseEvent<Element, MouseEvent>
|
||||
onContextMenu(contextEvent, displayItem)
|
||||
}}
|
||||
className="opacity-0 shrink-0 transition-opacity group-hover:opacity-100 ml-2"
|
||||
>
|
||||
<MoreVertical className="h-4 w-4 text-muted-foreground hover:text-foreground" />
|
||||
</button>
|
||||
{!isRecents && (
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
const rect = (e.target as HTMLElement).getBoundingClientRect()
|
||||
const contextEvent = new MouseEvent(e.nativeEvent.type, {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
clientX: rect.left,
|
||||
clientY: rect.bottom,
|
||||
}) as unknown as React.MouseEvent<Element, MouseEvent>
|
||||
onContextMenu(contextEvent, displayItem)
|
||||
}}
|
||||
className="opacity-0 shrink-0 transition-opacity group-hover:opacity-100 ml-2"
|
||||
>
|
||||
<MoreVertical className="h-4 w-4 text-muted-foreground hover:text-foreground" />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{displayItem.type === 'file' &&
|
||||
@@ -306,8 +310,8 @@ export function FileListItem({
|
||||
fieldId={field.id}
|
||||
config={field.config}
|
||||
value={itemFieldValueMap[field.id!]?.value}
|
||||
onSave={canEdit ? (val) => onSaveField(field.id!, val) : undefined}
|
||||
readOnly={field.readOnly || !canEdit}
|
||||
onSave={canEdit && !isRecents ? (val) => onSaveField(field.id!, val) : undefined}
|
||||
readOnly={field.readOnly || !canEdit || !!isRecents}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
|
||||
@@ -37,6 +37,7 @@ interface FolderCardProps {
|
||||
item: AssetInfo,
|
||||
) => void
|
||||
isRecentlyDeleted?: boolean
|
||||
isRecents?: boolean
|
||||
selectedCount?: number
|
||||
canEdit?: boolean
|
||||
isShareView?: boolean
|
||||
@@ -120,6 +121,7 @@ export function FolderCard({
|
||||
disabled,
|
||||
onAction,
|
||||
isRecentlyDeleted,
|
||||
isRecents,
|
||||
selectedCount,
|
||||
canEdit = true,
|
||||
isShareView,
|
||||
@@ -352,95 +354,97 @@ export function FolderCard({
|
||||
? m.n_items_singular({ count: item.fileCount || 0 })
|
||||
: m.n_items_plural({ count: item.fileCount || 0 })}
|
||||
</span>
|
||||
<DropdownMenu modal={false}>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<button
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
className="p-1.5 -mr-2 rounded-full hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer"
|
||||
>
|
||||
<MoreHorizontal size={18} />
|
||||
</button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
{isShareView ? (
|
||||
<>
|
||||
{allowDownload && (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('download', item)
|
||||
}}
|
||||
>
|
||||
<Download className="mr-2 h-4 w-4" />
|
||||
<span>{m.download()}</span>
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
{canEdit && (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('remove-from-share', item)
|
||||
}}
|
||||
className="text-destructive"
|
||||
>
|
||||
<Trash2 className="mr-2 h-4 w-4" />
|
||||
<span>{m.remove_from_share()}</span>
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
</>
|
||||
) : isRecentlyDeleted ? (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('restore', item)
|
||||
}}
|
||||
{!isRecents && (
|
||||
<DropdownMenu modal={false}>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<button
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
className="p-1.5 -mr-2 rounded-full hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer"
|
||||
>
|
||||
<History className="mr-2 h-4 w-4" />
|
||||
<span>{m.restore()}</span>
|
||||
</DropdownMenuItem>
|
||||
) : (
|
||||
<>
|
||||
{canEdit && (!isChecked || (selectedCount || 0) <= 1) && (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('rename', item)
|
||||
}}
|
||||
>
|
||||
<Edit className="mr-2 h-4 w-4" />
|
||||
<span>{m.rename()}</span>
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
{allowDownload && (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('download', item)
|
||||
}}
|
||||
>
|
||||
<Download className="mr-2 h-4 w-4" />
|
||||
<span>{m.download()}</span>
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
{canEdit && (
|
||||
<>
|
||||
<DropdownMenuSeparator />
|
||||
<MoreHorizontal size={18} />
|
||||
</button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
{isShareView ? (
|
||||
<>
|
||||
{allowDownload && (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('delete', item)
|
||||
onAction?.('download', item)
|
||||
}}
|
||||
>
|
||||
<Download className="mr-2 h-4 w-4" />
|
||||
<span>{m.download()}</span>
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
{canEdit && (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('remove-from-share', item)
|
||||
}}
|
||||
className="text-destructive"
|
||||
>
|
||||
<Trash2 className="mr-2 h-4 w-4" />
|
||||
<span>{m.delete()}</span>
|
||||
<span>{m.remove_from_share()}</span>
|
||||
</DropdownMenuItem>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
)}
|
||||
</>
|
||||
) : isRecentlyDeleted ? (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('restore', item)
|
||||
}}
|
||||
>
|
||||
<History className="mr-2 h-4 w-4" />
|
||||
<span>{m.restore()}</span>
|
||||
</DropdownMenuItem>
|
||||
) : (
|
||||
<>
|
||||
{canEdit && (!isChecked || (selectedCount || 0) <= 1) && (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('rename', item)
|
||||
}}
|
||||
>
|
||||
<Edit className="mr-2 h-4 w-4" />
|
||||
<span>{m.rename()}</span>
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
{allowDownload && (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('download', item)
|
||||
}}
|
||||
>
|
||||
<Download className="mr-2 h-4 w-4" />
|
||||
<span>{m.download()}</span>
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
{canEdit && (
|
||||
<>
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onAction?.('delete', item)
|
||||
}}
|
||||
className="text-destructive"
|
||||
>
|
||||
<Trash2 className="mr-2 h-4 w-4" />
|
||||
<span>{m.delete()}</span>
|
||||
</DropdownMenuItem>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user