mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-20 10:57:40 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b1428bf51 | ||
|
|
d5b3b1868e | ||
|
|
49f3fc0be5 | ||
|
|
59e641ccb3 | ||
|
|
1d9268b224 | ||
|
|
470a4bd6f7 | ||
|
|
8801d59b2e |
@@ -11,6 +11,7 @@ data/
|
||||
*.db
|
||||
*.diff
|
||||
*.orig
|
||||
code_quality.md
|
||||
.agents
|
||||
|
||||
# Playwright
|
||||
|
||||
@@ -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.10",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"bin": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/cli",
|
||||
"version": "0.3.10",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"bin": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/transcode-app",
|
||||
"version": "0.3.10",
|
||||
"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 |
|
||||
|
||||
@@ -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()
|
||||
})
|
||||
@@ -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.10",
|
||||
"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",
|
||||
|
||||
@@ -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.10",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/agent",
|
||||
"version": "0.3.10",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/api",
|
||||
"version": "0.3.10",
|
||||
"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)
|
||||
})
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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.10",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
|
||||
@@ -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) {
|
||||
@@ -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)
|
||||
})
|
||||
@@ -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()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/db",
|
||||
"version": "0.3.10",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
|
||||
@@ -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;
|
||||
@@ -236,8 +236,9 @@ model User {
|
||||
kanbanTasksReported KanbanTask[] @relation("KanbanTaskReporter")
|
||||
kanbanTasksAssigned KanbanTask[] @relation("KanbanTaskAssignee")
|
||||
kanbanGoalsCreated KanbanGoal[] @relation("UserToKanbanGoal")
|
||||
kanbanTaskComments KanbanTaskComment[]
|
||||
kanbanTaskEvents KanbanTaskEvent[]
|
||||
kanbanTaskComments KanbanTaskComment[]
|
||||
kanbanTaskEvents KanbanTaskEvent[]
|
||||
recentFiles RecentFileItem[]
|
||||
|
||||
@@map("users")
|
||||
}
|
||||
@@ -414,6 +415,7 @@ model Project {
|
||||
collections Collection[] @relation("ProjectToCollection")
|
||||
auditLogs AuditLog[] @relation("ProjectToAuditLog")
|
||||
kanbanTasks KanbanTask[] @relation("ProjectToKanbanTask")
|
||||
recentFiles RecentFileItem[]
|
||||
|
||||
@@map("projects")
|
||||
@@index([createdAt])
|
||||
@@ -564,6 +566,7 @@ model Asset {
|
||||
agentMd AssetAgentMd? @relation("AssetToAgentMd")
|
||||
kanbanTargetTasks KanbanTask[] @relation("KanbanTaskTargetFolder")
|
||||
kanbanTasks KanbanTaskAsset[]
|
||||
recentFiles RecentFileItem[]
|
||||
|
||||
@@map("assets")
|
||||
@@index([type])
|
||||
@@ -1273,5 +1276,22 @@ model KanbanTaskEvent {
|
||||
@@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")
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+5
@@ -267,3 +267,8 @@ export type KanbanTaskComment = Prisma.KanbanTaskCommentModel
|
||||
*
|
||||
*/
|
||||
export type KanbanTaskEvent = Prisma.KanbanTaskEventModel
|
||||
/**
|
||||
* Model RecentFileItem
|
||||
*
|
||||
*/
|
||||
export type RecentFileItem = Prisma.RecentFileItemModel
|
||||
|
||||
+5
@@ -291,3 +291,8 @@ export type KanbanTaskComment = Prisma.KanbanTaskCommentModel
|
||||
*
|
||||
*/
|
||||
export type KanbanTaskEvent = Prisma.KanbanTaskEventModel
|
||||
/**
|
||||
* Model RecentFileItem
|
||||
*
|
||||
*/
|
||||
export type RecentFileItem = Prisma.RecentFileItemModel
|
||||
|
||||
+14
-4
File diff suppressed because one or more lines are too long
+89
-2
@@ -433,7 +433,8 @@ export const ModelName = {
|
||||
KanbanTaskLink: 'KanbanTaskLink',
|
||||
KanbanTaskAsset: 'KanbanTaskAsset',
|
||||
KanbanTaskComment: 'KanbanTaskComment',
|
||||
KanbanTaskEvent: 'KanbanTaskEvent'
|
||||
KanbanTaskEvent: 'KanbanTaskEvent',
|
||||
RecentFileItem: 'RecentFileItem'
|
||||
} as const
|
||||
|
||||
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
||||
@@ -449,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" | "kanbanGoal" | "kanbanTask" | "kanbanTaskLink" | "kanbanTaskAsset" | "kanbanTaskComment" | "kanbanTaskEvent"
|
||||
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: {
|
||||
@@ -4153,6 +4154,80 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
}
|
||||
}
|
||||
}
|
||||
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: {
|
||||
@@ -4918,6 +4993,17 @@ export const KanbanTaskEventScalarFieldEnum = {
|
||||
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'
|
||||
@@ -5572,6 +5658,7 @@ export type GlobalOmitConfig = {
|
||||
kanbanTaskAsset?: Prisma.KanbanTaskAssetOmit
|
||||
kanbanTaskComment?: Prisma.KanbanTaskCommentOmit
|
||||
kanbanTaskEvent?: Prisma.KanbanTaskEventOmit
|
||||
recentFileItem?: Prisma.RecentFileItemOmit
|
||||
}
|
||||
|
||||
/* Types for Logging */
|
||||
|
||||
@@ -100,7 +100,8 @@ export const ModelName = {
|
||||
KanbanTaskLink: 'KanbanTaskLink',
|
||||
KanbanTaskAsset: 'KanbanTaskAsset',
|
||||
KanbanTaskComment: 'KanbanTaskComment',
|
||||
KanbanTaskEvent: 'KanbanTaskEvent'
|
||||
KanbanTaskEvent: 'KanbanTaskEvent',
|
||||
RecentFileItem: 'RecentFileItem'
|
||||
} as const
|
||||
|
||||
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
||||
@@ -845,6 +846,17 @@ export const KanbanTaskEventScalarFieldEnum = {
|
||||
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'
|
||||
|
||||
+1
@@ -58,4 +58,5 @@ 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'
|
||||
+322
@@ -364,6 +364,7 @@ export type AssetWhereInput = {
|
||||
agentMd?: Prisma.XOR<Prisma.AssetAgentMdNullableScalarRelationFilter, Prisma.AssetAgentMdWhereInput> | null
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskListRelationFilter
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetListRelationFilter
|
||||
recentFiles?: Prisma.RecentFileItemListRelationFilter
|
||||
}
|
||||
|
||||
export type AssetOrderByWithRelationInput = {
|
||||
@@ -410,6 +411,7 @@ export type AssetOrderByWithRelationInput = {
|
||||
agentMd?: Prisma.AssetAgentMdOrderByWithRelationInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskOrderByRelationAggregateInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetOrderByRelationAggregateInput
|
||||
recentFiles?: Prisma.RecentFileItemOrderByRelationAggregateInput
|
||||
}
|
||||
|
||||
export type AssetWhereUniqueInput = Prisma.AtLeast<{
|
||||
@@ -460,6 +462,7 @@ export type AssetWhereUniqueInput = Prisma.AtLeast<{
|
||||
agentMd?: Prisma.XOR<Prisma.AssetAgentMdNullableScalarRelationFilter, Prisma.AssetAgentMdWhereInput> | null
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskListRelationFilter
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetListRelationFilter
|
||||
recentFiles?: Prisma.RecentFileItemListRelationFilter
|
||||
}, "id" | "parentIdTargetId">
|
||||
|
||||
export type AssetOrderByWithAggregationInput = {
|
||||
@@ -556,6 +559,7 @@ export type AssetCreateInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateInput = {
|
||||
@@ -596,6 +600,7 @@ export type AssetUncheckedCreateInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUpdateInput = {
|
||||
@@ -636,6 +641,7 @@ export type AssetUpdateInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateInput = {
|
||||
@@ -676,6 +682,7 @@ export type AssetUncheckedUpdateInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetCreateManyInput = {
|
||||
@@ -1372,6 +1379,20 @@ export type AssetUpdateOneRequiredWithoutKanbanTasksNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.AssetUpdateToOneWithWhereWithoutKanbanTasksInput, Prisma.AssetUpdateWithoutKanbanTasksInput>, Prisma.AssetUncheckedUpdateWithoutKanbanTasksInput>
|
||||
}
|
||||
|
||||
export type AssetCreateNestedOneWithoutRecentFilesInput = {
|
||||
create?: Prisma.XOR<Prisma.AssetCreateWithoutRecentFilesInput, Prisma.AssetUncheckedCreateWithoutRecentFilesInput>
|
||||
connectOrCreate?: Prisma.AssetCreateOrConnectWithoutRecentFilesInput
|
||||
connect?: Prisma.AssetWhereUniqueInput
|
||||
}
|
||||
|
||||
export type AssetUpdateOneRequiredWithoutRecentFilesNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.AssetCreateWithoutRecentFilesInput, Prisma.AssetUncheckedCreateWithoutRecentFilesInput>
|
||||
connectOrCreate?: Prisma.AssetCreateOrConnectWithoutRecentFilesInput
|
||||
upsert?: Prisma.AssetUpsertWithoutRecentFilesInput
|
||||
connect?: Prisma.AssetWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.AssetUpdateToOneWithWhereWithoutRecentFilesInput, Prisma.AssetUpdateWithoutRecentFilesInput>, Prisma.AssetUncheckedUpdateWithoutRecentFilesInput>
|
||||
}
|
||||
|
||||
export type AssetCreateWithoutCreatorInput = {
|
||||
id?: string
|
||||
name?: string
|
||||
@@ -1409,6 +1430,7 @@ export type AssetCreateWithoutCreatorInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutCreatorInput = {
|
||||
@@ -1448,6 +1470,7 @@ export type AssetUncheckedCreateWithoutCreatorInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutCreatorInput = {
|
||||
@@ -1540,6 +1563,7 @@ export type AssetCreateWithoutTeamRootFolderInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutTeamRootFolderInput = {
|
||||
@@ -1579,6 +1603,7 @@ export type AssetUncheckedCreateWithoutTeamRootFolderInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutTeamRootFolderInput = {
|
||||
@@ -1634,6 +1659,7 @@ export type AssetUpdateWithoutTeamRootFolderInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutTeamRootFolderInput = {
|
||||
@@ -1673,6 +1699,7 @@ export type AssetUncheckedUpdateWithoutTeamRootFolderInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetCreateWithoutProjectRootFolderInput = {
|
||||
@@ -1712,6 +1739,7 @@ export type AssetCreateWithoutProjectRootFolderInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutProjectRootFolderInput = {
|
||||
@@ -1751,6 +1779,7 @@ export type AssetUncheckedCreateWithoutProjectRootFolderInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutProjectRootFolderInput = {
|
||||
@@ -1795,6 +1824,7 @@ export type AssetCreateWithoutProjectShareRootInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutProjectShareRootInput = {
|
||||
@@ -1834,6 +1864,7 @@ export type AssetUncheckedCreateWithoutProjectShareRootInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutProjectShareRootInput = {
|
||||
@@ -1878,6 +1909,7 @@ export type AssetCreateWithoutProjectInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutProjectInput = {
|
||||
@@ -1917,6 +1949,7 @@ export type AssetUncheckedCreateWithoutProjectInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutProjectInput = {
|
||||
@@ -1977,6 +2010,7 @@ export type AssetUpdateWithoutProjectRootFolderInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutProjectRootFolderInput = {
|
||||
@@ -2016,6 +2050,7 @@ export type AssetUncheckedUpdateWithoutProjectRootFolderInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUpsertWithoutProjectShareRootInput = {
|
||||
@@ -2066,6 +2101,7 @@ export type AssetUpdateWithoutProjectShareRootInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutProjectShareRootInput = {
|
||||
@@ -2105,6 +2141,7 @@ export type AssetUncheckedUpdateWithoutProjectShareRootInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUpsertWithWhereUniqueWithoutProjectInput = {
|
||||
@@ -2160,6 +2197,7 @@ export type AssetCreateWithoutShareLinkRootFolderInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutShareLinkRootFolderInput = {
|
||||
@@ -2199,6 +2237,7 @@ export type AssetUncheckedCreateWithoutShareLinkRootFolderInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutShareLinkRootFolderInput = {
|
||||
@@ -2254,6 +2293,7 @@ export type AssetUpdateWithoutShareLinkRootFolderInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutShareLinkRootFolderInput = {
|
||||
@@ -2293,6 +2333,7 @@ export type AssetUncheckedUpdateWithoutShareLinkRootFolderInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetCreateWithoutWatermarkFilesInput = {
|
||||
@@ -2332,6 +2373,7 @@ export type AssetCreateWithoutWatermarkFilesInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutWatermarkFilesInput = {
|
||||
@@ -2371,6 +2413,7 @@ export type AssetUncheckedCreateWithoutWatermarkFilesInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutWatermarkFilesInput = {
|
||||
@@ -2426,6 +2469,7 @@ export type AssetUpdateWithoutWatermarkFilesInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutWatermarkFilesInput = {
|
||||
@@ -2465,6 +2509,7 @@ export type AssetUncheckedUpdateWithoutWatermarkFilesInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetCreateWithoutChildrenInput = {
|
||||
@@ -2504,6 +2549,7 @@ export type AssetCreateWithoutChildrenInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutChildrenInput = {
|
||||
@@ -2543,6 +2589,7 @@ export type AssetUncheckedCreateWithoutChildrenInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutChildrenInput = {
|
||||
@@ -2587,6 +2634,7 @@ export type AssetCreateWithoutParentInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutParentInput = {
|
||||
@@ -2626,6 +2674,7 @@ export type AssetUncheckedCreateWithoutParentInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutParentInput = {
|
||||
@@ -2675,6 +2724,7 @@ export type AssetCreateWithoutSymlinksInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutSymlinksInput = {
|
||||
@@ -2714,6 +2764,7 @@ export type AssetUncheckedCreateWithoutSymlinksInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutSymlinksInput = {
|
||||
@@ -2758,6 +2809,7 @@ export type AssetCreateWithoutTargetInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutTargetInput = {
|
||||
@@ -2797,6 +2849,7 @@ export type AssetUncheckedCreateWithoutTargetInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutTargetInput = {
|
||||
@@ -2857,6 +2910,7 @@ export type AssetUpdateWithoutChildrenInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutChildrenInput = {
|
||||
@@ -2896,6 +2950,7 @@ export type AssetUncheckedUpdateWithoutChildrenInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUpsertWithWhereUniqueWithoutParentInput = {
|
||||
@@ -2962,6 +3017,7 @@ export type AssetUpdateWithoutSymlinksInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutSymlinksInput = {
|
||||
@@ -3001,6 +3057,7 @@ export type AssetUncheckedUpdateWithoutSymlinksInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUpsertWithWhereUniqueWithoutTargetInput = {
|
||||
@@ -3056,6 +3113,7 @@ export type AssetCreateWithoutStorageKeyInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutStorageKeyInput = {
|
||||
@@ -3095,6 +3153,7 @@ export type AssetUncheckedCreateWithoutStorageKeyInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutStorageKeyInput = {
|
||||
@@ -3160,6 +3219,7 @@ export type AssetCreateWithoutMetadataValuesInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutMetadataValuesInput = {
|
||||
@@ -3199,6 +3259,7 @@ export type AssetUncheckedCreateWithoutMetadataValuesInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutMetadataValuesInput = {
|
||||
@@ -3254,6 +3315,7 @@ export type AssetUpdateWithoutMetadataValuesInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutMetadataValuesInput = {
|
||||
@@ -3293,6 +3355,7 @@ export type AssetUncheckedUpdateWithoutMetadataValuesInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetCreateWithoutAgentMdInput = {
|
||||
@@ -3332,6 +3395,7 @@ export type AssetCreateWithoutAgentMdInput = {
|
||||
watermarkFiles?: Prisma.WatermarkFileCreateNestedManyWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutAgentMdInput = {
|
||||
@@ -3371,6 +3435,7 @@ export type AssetUncheckedCreateWithoutAgentMdInput = {
|
||||
watermarkFiles?: Prisma.WatermarkFileUncheckedCreateNestedManyWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutAgentMdInput = {
|
||||
@@ -3426,6 +3491,7 @@ export type AssetUpdateWithoutAgentMdInput = {
|
||||
watermarkFiles?: Prisma.WatermarkFileUpdateManyWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutAgentMdInput = {
|
||||
@@ -3465,6 +3531,7 @@ export type AssetUncheckedUpdateWithoutAgentMdInput = {
|
||||
watermarkFiles?: Prisma.WatermarkFileUncheckedUpdateManyWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetCreateWithoutCommentsInput = {
|
||||
@@ -3504,6 +3571,7 @@ export type AssetCreateWithoutCommentsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutCommentsInput = {
|
||||
@@ -3543,6 +3611,7 @@ export type AssetUncheckedCreateWithoutCommentsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutCommentsInput = {
|
||||
@@ -3598,6 +3667,7 @@ export type AssetUpdateWithoutCommentsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutCommentsInput = {
|
||||
@@ -3637,6 +3707,7 @@ export type AssetUncheckedUpdateWithoutCommentsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetCreateWithoutCommentAttachmentsInput = {
|
||||
@@ -3676,6 +3747,7 @@ export type AssetCreateWithoutCommentAttachmentsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutCommentAttachmentsInput = {
|
||||
@@ -3715,6 +3787,7 @@ export type AssetUncheckedCreateWithoutCommentAttachmentsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutCommentAttachmentsInput = {
|
||||
@@ -3770,6 +3843,7 @@ export type AssetUpdateWithoutCommentAttachmentsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutCommentAttachmentsInput = {
|
||||
@@ -3809,6 +3883,7 @@ export type AssetUncheckedUpdateWithoutCommentAttachmentsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetCreateWithoutEmbeddingsInput = {
|
||||
@@ -3848,6 +3923,7 @@ export type AssetCreateWithoutEmbeddingsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutEmbeddingsInput = {
|
||||
@@ -3887,6 +3963,7 @@ export type AssetUncheckedCreateWithoutEmbeddingsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutEmbeddingsInput = {
|
||||
@@ -3942,6 +4019,7 @@ export type AssetUpdateWithoutEmbeddingsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutEmbeddingsInput = {
|
||||
@@ -3981,6 +4059,7 @@ export type AssetUncheckedUpdateWithoutEmbeddingsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetCreateWithoutNotificationsInput = {
|
||||
@@ -4020,6 +4099,7 @@ export type AssetCreateWithoutNotificationsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutNotificationsInput = {
|
||||
@@ -4059,6 +4139,7 @@ export type AssetUncheckedCreateWithoutNotificationsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutNotificationsInput = {
|
||||
@@ -4114,6 +4195,7 @@ export type AssetUpdateWithoutNotificationsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutNotificationsInput = {
|
||||
@@ -4153,6 +4235,7 @@ export type AssetUncheckedUpdateWithoutNotificationsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetCreateWithoutTaskInput = {
|
||||
@@ -4192,6 +4275,7 @@ export type AssetCreateWithoutTaskInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutTaskInput = {
|
||||
@@ -4231,6 +4315,7 @@ export type AssetUncheckedCreateWithoutTaskInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutTaskInput = {
|
||||
@@ -4296,6 +4381,7 @@ export type AssetCreateWithoutAgentSessionsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutAgentSessionsInput = {
|
||||
@@ -4335,6 +4421,7 @@ export type AssetUncheckedCreateWithoutAgentSessionsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutAgentSessionsInput = {
|
||||
@@ -4390,6 +4477,7 @@ export type AssetUpdateWithoutAgentSessionsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutAgentSessionsInput = {
|
||||
@@ -4429,6 +4517,7 @@ export type AssetUncheckedUpdateWithoutAgentSessionsInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetCreateWithoutKanbanTargetTasksInput = {
|
||||
@@ -4468,6 +4557,7 @@ export type AssetCreateWithoutKanbanTargetTasksInput = {
|
||||
watermarkFiles?: Prisma.WatermarkFileCreateNestedManyWithoutAssetInput
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutKanbanTargetTasksInput = {
|
||||
@@ -4507,6 +4597,7 @@ export type AssetUncheckedCreateWithoutKanbanTargetTasksInput = {
|
||||
watermarkFiles?: Prisma.WatermarkFileUncheckedCreateNestedManyWithoutAssetInput
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutKanbanTargetTasksInput = {
|
||||
@@ -4562,6 +4653,7 @@ export type AssetUpdateWithoutKanbanTargetTasksInput = {
|
||||
watermarkFiles?: Prisma.WatermarkFileUpdateManyWithoutAssetNestedInput
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutKanbanTargetTasksInput = {
|
||||
@@ -4601,6 +4693,7 @@ export type AssetUncheckedUpdateWithoutKanbanTargetTasksInput = {
|
||||
watermarkFiles?: Prisma.WatermarkFileUncheckedUpdateManyWithoutAssetNestedInput
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetCreateWithoutKanbanTasksInput = {
|
||||
@@ -4640,6 +4733,7 @@ export type AssetCreateWithoutKanbanTasksInput = {
|
||||
watermarkFiles?: Prisma.WatermarkFileCreateNestedManyWithoutAssetInput
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutKanbanTasksInput = {
|
||||
@@ -4679,6 +4773,7 @@ export type AssetUncheckedCreateWithoutKanbanTasksInput = {
|
||||
watermarkFiles?: Prisma.WatermarkFileUncheckedCreateNestedManyWithoutAssetInput
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutKanbanTasksInput = {
|
||||
@@ -4734,6 +4829,7 @@ export type AssetUpdateWithoutKanbanTasksInput = {
|
||||
watermarkFiles?: Prisma.WatermarkFileUpdateManyWithoutAssetNestedInput
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutKanbanTasksInput = {
|
||||
@@ -4773,6 +4869,183 @@ export type AssetUncheckedUpdateWithoutKanbanTasksInput = {
|
||||
watermarkFiles?: Prisma.WatermarkFileUncheckedUpdateManyWithoutAssetNestedInput
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetCreateWithoutRecentFilesInput = {
|
||||
id?: string
|
||||
name?: string
|
||||
nameNgram?: Prisma.AssetCreatenameNgramInput | string[]
|
||||
type: $Enums.AssetType
|
||||
mediaType?: string | null
|
||||
fileCount?: number
|
||||
sizeByte?: bigint | number
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
parent?: Prisma.AssetCreateNestedOneWithoutChildrenInput
|
||||
children?: Prisma.AssetCreateNestedManyWithoutParentInput
|
||||
target?: Prisma.AssetCreateNestedOneWithoutSymlinksInput
|
||||
symlinks?: Prisma.AssetCreateNestedManyWithoutTargetInput
|
||||
storageKey?: Prisma.StorageKeyCreateNestedOneWithoutAssetsInput
|
||||
metadataValues?: Prisma.AssetMetadataValueCreateNestedManyWithoutAssetInput
|
||||
creator?: Prisma.UserCreateNestedOneWithoutAssetsInput
|
||||
task?: Prisma.TaskCreateNestedOneWithoutAssetsInput
|
||||
project?: Prisma.ProjectCreateNestedOneWithoutAssetsInput
|
||||
comments?: Prisma.AssetCommentCreateNestedManyWithoutAssetInput
|
||||
commentAttachments?: Prisma.AssetCommentAttachmentCreateNestedManyWithoutAssetInput
|
||||
notifications?: Prisma.NotificationCreateNestedManyWithoutAssetInput
|
||||
embeddings?: Prisma.AssetEmbeddingCreateNestedManyWithoutAssetInput
|
||||
teamRootFolder?: Prisma.TeamCreateNestedOneWithoutRootFolderInput
|
||||
projectRootFolder?: Prisma.ProjectCreateNestedOneWithoutRootFolderInput
|
||||
projectShareRoot?: Prisma.ProjectCreateNestedOneWithoutShareRootInput
|
||||
shareLinkRootFolder?: Prisma.ShareLinkCreateNestedOneWithoutRootFolderInput
|
||||
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAssetInput
|
||||
watermarkFiles?: Prisma.WatermarkFileCreateNestedManyWithoutAssetInput
|
||||
agentMd?: Prisma.AssetAgentMdCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedCreateWithoutRecentFilesInput = {
|
||||
id?: string
|
||||
name?: string
|
||||
nameNgram?: Prisma.AssetCreatenameNgramInput | string[]
|
||||
type: $Enums.AssetType
|
||||
mediaType?: string | null
|
||||
fileCount?: number
|
||||
sizeByte?: bigint | number
|
||||
status: $Enums.AssetStatus
|
||||
transcodeTaskId?: string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
isDeleted?: boolean
|
||||
deletedAt?: Date | string | null
|
||||
sortIndex?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
parentId?: string | null
|
||||
targetId?: string | null
|
||||
storageKeyId?: string | null
|
||||
creatorId?: string | null
|
||||
taskId?: string | null
|
||||
projectId?: string | null
|
||||
children?: Prisma.AssetUncheckedCreateNestedManyWithoutParentInput
|
||||
symlinks?: Prisma.AssetUncheckedCreateNestedManyWithoutTargetInput
|
||||
metadataValues?: Prisma.AssetMetadataValueUncheckedCreateNestedManyWithoutAssetInput
|
||||
comments?: Prisma.AssetCommentUncheckedCreateNestedManyWithoutAssetInput
|
||||
commentAttachments?: Prisma.AssetCommentAttachmentUncheckedCreateNestedManyWithoutAssetInput
|
||||
notifications?: Prisma.NotificationUncheckedCreateNestedManyWithoutAssetInput
|
||||
embeddings?: Prisma.AssetEmbeddingUncheckedCreateNestedManyWithoutAssetInput
|
||||
teamRootFolder?: Prisma.TeamUncheckedCreateNestedOneWithoutRootFolderInput
|
||||
projectRootFolder?: Prisma.ProjectUncheckedCreateNestedOneWithoutRootFolderInput
|
||||
projectShareRoot?: Prisma.ProjectUncheckedCreateNestedOneWithoutShareRootInput
|
||||
shareLinkRootFolder?: Prisma.ShareLinkUncheckedCreateNestedOneWithoutRootFolderInput
|
||||
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutAssetInput
|
||||
watermarkFiles?: Prisma.WatermarkFileUncheckedCreateNestedManyWithoutAssetInput
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedCreateNestedOneWithoutAssetInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutTargetFolderInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedCreateNestedManyWithoutAssetInput
|
||||
}
|
||||
|
||||
export type AssetCreateOrConnectWithoutRecentFilesInput = {
|
||||
where: Prisma.AssetWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.AssetCreateWithoutRecentFilesInput, Prisma.AssetUncheckedCreateWithoutRecentFilesInput>
|
||||
}
|
||||
|
||||
export type AssetUpsertWithoutRecentFilesInput = {
|
||||
update: Prisma.XOR<Prisma.AssetUpdateWithoutRecentFilesInput, Prisma.AssetUncheckedUpdateWithoutRecentFilesInput>
|
||||
create: Prisma.XOR<Prisma.AssetCreateWithoutRecentFilesInput, Prisma.AssetUncheckedCreateWithoutRecentFilesInput>
|
||||
where?: Prisma.AssetWhereInput
|
||||
}
|
||||
|
||||
export type AssetUpdateToOneWithWhereWithoutRecentFilesInput = {
|
||||
where?: Prisma.AssetWhereInput
|
||||
data: Prisma.XOR<Prisma.AssetUpdateWithoutRecentFilesInput, Prisma.AssetUncheckedUpdateWithoutRecentFilesInput>
|
||||
}
|
||||
|
||||
export type AssetUpdateWithoutRecentFilesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
nameNgram?: Prisma.AssetUpdatenameNgramInput | string[]
|
||||
type?: Prisma.EnumAssetTypeFieldUpdateOperationsInput | $Enums.AssetType
|
||||
mediaType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fileCount?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
sizeByte?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
parent?: Prisma.AssetUpdateOneWithoutChildrenNestedInput
|
||||
children?: Prisma.AssetUpdateManyWithoutParentNestedInput
|
||||
target?: Prisma.AssetUpdateOneWithoutSymlinksNestedInput
|
||||
symlinks?: Prisma.AssetUpdateManyWithoutTargetNestedInput
|
||||
storageKey?: Prisma.StorageKeyUpdateOneWithoutAssetsNestedInput
|
||||
metadataValues?: Prisma.AssetMetadataValueUpdateManyWithoutAssetNestedInput
|
||||
creator?: Prisma.UserUpdateOneWithoutAssetsNestedInput
|
||||
task?: Prisma.TaskUpdateOneWithoutAssetsNestedInput
|
||||
project?: Prisma.ProjectUpdateOneWithoutAssetsNestedInput
|
||||
comments?: Prisma.AssetCommentUpdateManyWithoutAssetNestedInput
|
||||
commentAttachments?: Prisma.AssetCommentAttachmentUpdateManyWithoutAssetNestedInput
|
||||
notifications?: Prisma.NotificationUpdateManyWithoutAssetNestedInput
|
||||
embeddings?: Prisma.AssetEmbeddingUpdateManyWithoutAssetNestedInput
|
||||
teamRootFolder?: Prisma.TeamUpdateOneWithoutRootFolderNestedInput
|
||||
projectRootFolder?: Prisma.ProjectUpdateOneWithoutRootFolderNestedInput
|
||||
projectShareRoot?: Prisma.ProjectUpdateOneWithoutShareRootNestedInput
|
||||
shareLinkRootFolder?: Prisma.ShareLinkUpdateOneWithoutRootFolderNestedInput
|
||||
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAssetNestedInput
|
||||
watermarkFiles?: Prisma.WatermarkFileUpdateManyWithoutAssetNestedInput
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutRecentFilesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
nameNgram?: Prisma.AssetUpdatenameNgramInput | string[]
|
||||
type?: Prisma.EnumAssetTypeFieldUpdateOperationsInput | $Enums.AssetType
|
||||
mediaType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fileCount?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
sizeByte?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
||||
status?: Prisma.EnumAssetStatusFieldUpdateOperationsInput | $Enums.AssetStatus
|
||||
transcodeTaskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
media?:PrismaJson.MediaInfo | Prisma.NullableJsonNullValueInput
|
||||
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sortIndex?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
parentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
targetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
storageKeyId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
taskId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
projectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
children?: Prisma.AssetUncheckedUpdateManyWithoutParentNestedInput
|
||||
symlinks?: Prisma.AssetUncheckedUpdateManyWithoutTargetNestedInput
|
||||
metadataValues?: Prisma.AssetMetadataValueUncheckedUpdateManyWithoutAssetNestedInput
|
||||
comments?: Prisma.AssetCommentUncheckedUpdateManyWithoutAssetNestedInput
|
||||
commentAttachments?: Prisma.AssetCommentAttachmentUncheckedUpdateManyWithoutAssetNestedInput
|
||||
notifications?: Prisma.NotificationUncheckedUpdateManyWithoutAssetNestedInput
|
||||
embeddings?: Prisma.AssetEmbeddingUncheckedUpdateManyWithoutAssetNestedInput
|
||||
teamRootFolder?: Prisma.TeamUncheckedUpdateOneWithoutRootFolderNestedInput
|
||||
projectRootFolder?: Prisma.ProjectUncheckedUpdateOneWithoutRootFolderNestedInput
|
||||
projectShareRoot?: Prisma.ProjectUncheckedUpdateOneWithoutShareRootNestedInput
|
||||
shareLinkRootFolder?: Prisma.ShareLinkUncheckedUpdateOneWithoutRootFolderNestedInput
|
||||
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutAssetNestedInput
|
||||
watermarkFiles?: Prisma.WatermarkFileUncheckedUpdateManyWithoutAssetNestedInput
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetCreateManyCreatorInput = {
|
||||
@@ -4835,6 +5108,7 @@ export type AssetUpdateWithoutCreatorInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutCreatorInput = {
|
||||
@@ -4874,6 +5148,7 @@ export type AssetUncheckedUpdateWithoutCreatorInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateManyWithoutCreatorInput = {
|
||||
@@ -4959,6 +5234,7 @@ export type AssetUpdateWithoutProjectInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutProjectInput = {
|
||||
@@ -4998,6 +5274,7 @@ export type AssetUncheckedUpdateWithoutProjectInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateManyWithoutProjectInput = {
|
||||
@@ -5106,6 +5383,7 @@ export type AssetUpdateWithoutParentInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutParentInput = {
|
||||
@@ -5145,6 +5423,7 @@ export type AssetUncheckedUpdateWithoutParentInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateManyWithoutParentInput = {
|
||||
@@ -5207,6 +5486,7 @@ export type AssetUpdateWithoutTargetInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutTargetInput = {
|
||||
@@ -5246,6 +5526,7 @@ export type AssetUncheckedUpdateWithoutTargetInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateManyWithoutTargetInput = {
|
||||
@@ -5331,6 +5612,7 @@ export type AssetUpdateWithoutStorageKeyInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutStorageKeyInput = {
|
||||
@@ -5370,6 +5652,7 @@ export type AssetUncheckedUpdateWithoutStorageKeyInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateManyWithoutStorageKeyInput = {
|
||||
@@ -5455,6 +5738,7 @@ export type AssetUpdateWithoutTaskInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateWithoutTaskInput = {
|
||||
@@ -5494,6 +5778,7 @@ export type AssetUncheckedUpdateWithoutTaskInput = {
|
||||
agentMd?: Prisma.AssetAgentMdUncheckedUpdateOneWithoutAssetNestedInput
|
||||
kanbanTargetTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutTargetFolderNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskAssetUncheckedUpdateManyWithoutAssetNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutAssetNestedInput
|
||||
}
|
||||
|
||||
export type AssetUncheckedUpdateManyWithoutTaskInput = {
|
||||
@@ -5536,6 +5821,7 @@ export type AssetCountOutputType = {
|
||||
watermarkFiles: number
|
||||
kanbanTargetTasks: number
|
||||
kanbanTasks: number
|
||||
recentFiles: number
|
||||
}
|
||||
|
||||
export type AssetCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
@@ -5550,6 +5836,7 @@ export type AssetCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.
|
||||
watermarkFiles?: boolean | AssetCountOutputTypeCountWatermarkFilesArgs
|
||||
kanbanTargetTasks?: boolean | AssetCountOutputTypeCountKanbanTargetTasksArgs
|
||||
kanbanTasks?: boolean | AssetCountOutputTypeCountKanbanTasksArgs
|
||||
recentFiles?: boolean | AssetCountOutputTypeCountRecentFilesArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5639,6 +5926,13 @@ export type AssetCountOutputTypeCountKanbanTasksArgs<ExtArgs extends runtime.Typ
|
||||
where?: Prisma.KanbanTaskAssetWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* AssetCountOutputType without action
|
||||
*/
|
||||
export type AssetCountOutputTypeCountRecentFilesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.RecentFileItemWhereInput
|
||||
}
|
||||
|
||||
|
||||
export type AssetSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
@@ -5684,6 +5978,7 @@ export type AssetSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
||||
agentMd?: boolean | Prisma.Asset$agentMdArgs<ExtArgs>
|
||||
kanbanTargetTasks?: boolean | Prisma.Asset$kanbanTargetTasksArgs<ExtArgs>
|
||||
kanbanTasks?: boolean | Prisma.Asset$kanbanTasksArgs<ExtArgs>
|
||||
recentFiles?: boolean | Prisma.Asset$recentFilesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.AssetCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["asset"]>
|
||||
|
||||
@@ -5795,6 +6090,7 @@ export type AssetInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
||||
agentMd?: boolean | Prisma.Asset$agentMdArgs<ExtArgs>
|
||||
kanbanTargetTasks?: boolean | Prisma.Asset$kanbanTargetTasksArgs<ExtArgs>
|
||||
kanbanTasks?: boolean | Prisma.Asset$kanbanTasksArgs<ExtArgs>
|
||||
recentFiles?: boolean | Prisma.Asset$recentFilesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.AssetCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
export type AssetIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
@@ -5839,6 +6135,7 @@ export type $AssetPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
agentMd: Prisma.$AssetAgentMdPayload<ExtArgs> | null
|
||||
kanbanTargetTasks: Prisma.$KanbanTaskPayload<ExtArgs>[]
|
||||
kanbanTasks: Prisma.$KanbanTaskAssetPayload<ExtArgs>[]
|
||||
recentFiles: Prisma.$RecentFileItemPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -6281,6 +6578,7 @@ export interface Prisma__AssetClient<T, Null = never, ExtArgs extends runtime.Ty
|
||||
agentMd<T extends Prisma.Asset$agentMdArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Asset$agentMdArgs<ExtArgs>>): Prisma.Prisma__AssetAgentMdClient<runtime.Types.Result.GetResult<Prisma.$AssetAgentMdPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
kanbanTargetTasks<T extends Prisma.Asset$kanbanTargetTasksArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Asset$kanbanTargetTasksArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$KanbanTaskPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
kanbanTasks<T extends Prisma.Asset$kanbanTasksArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Asset$kanbanTasksArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$KanbanTaskAssetPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
recentFiles<T extends Prisma.Asset$recentFilesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Asset$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.
|
||||
@@ -7204,6 +7502,30 @@ export type Asset$kanbanTasksArgs<ExtArgs extends runtime.Types.Extensions.Inter
|
||||
distinct?: Prisma.KanbanTaskAssetScalarFieldEnum | Prisma.KanbanTaskAssetScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Asset.recentFiles
|
||||
*/
|
||||
export type Asset$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[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Asset without action
|
||||
*/
|
||||
|
||||
+210
@@ -232,6 +232,7 @@ export type ProjectWhereInput = {
|
||||
collections?: Prisma.CollectionListRelationFilter
|
||||
auditLogs?: Prisma.AuditLogListRelationFilter
|
||||
kanbanTasks?: Prisma.KanbanTaskListRelationFilter
|
||||
recentFiles?: Prisma.RecentFileItemListRelationFilter
|
||||
}
|
||||
|
||||
export type ProjectOrderByWithRelationInput = {
|
||||
@@ -257,6 +258,7 @@ export type ProjectOrderByWithRelationInput = {
|
||||
collections?: Prisma.CollectionOrderByRelationAggregateInput
|
||||
auditLogs?: Prisma.AuditLogOrderByRelationAggregateInput
|
||||
kanbanTasks?: Prisma.KanbanTaskOrderByRelationAggregateInput
|
||||
recentFiles?: Prisma.RecentFileItemOrderByRelationAggregateInput
|
||||
}
|
||||
|
||||
export type ProjectWhereUniqueInput = Prisma.AtLeast<{
|
||||
@@ -285,6 +287,7 @@ export type ProjectWhereUniqueInput = Prisma.AtLeast<{
|
||||
collections?: Prisma.CollectionListRelationFilter
|
||||
auditLogs?: Prisma.AuditLogListRelationFilter
|
||||
kanbanTasks?: Prisma.KanbanTaskListRelationFilter
|
||||
recentFiles?: Prisma.RecentFileItemListRelationFilter
|
||||
}, "id" | "rootFolderId" | "shareRootId">
|
||||
|
||||
export type ProjectOrderByWithAggregationInput = {
|
||||
@@ -339,6 +342,7 @@ export type ProjectCreateInput = {
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateInput = {
|
||||
@@ -361,6 +365,7 @@ export type ProjectUncheckedCreateInput = {
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUpdateInput = {
|
||||
@@ -383,6 +388,7 @@ export type ProjectUpdateInput = {
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateInput = {
|
||||
@@ -405,6 +411,7 @@ export type ProjectUncheckedUpdateInput = {
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateManyInput = {
|
||||
@@ -744,6 +751,20 @@ export type ProjectUpdateOneWithoutKanbanTasksNestedInput = {
|
||||
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
|
||||
@@ -763,6 +784,7 @@ export type ProjectCreateWithoutTeamInput = {
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutTeamInput = {
|
||||
@@ -784,6 +806,7 @@ export type ProjectUncheckedCreateWithoutTeamInput = {
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutTeamInput = {
|
||||
@@ -847,6 +870,7 @@ export type ProjectCreateWithoutMembersInput = {
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutMembersInput = {
|
||||
@@ -868,6 +892,7 @@ export type ProjectUncheckedCreateWithoutMembersInput = {
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutMembersInput = {
|
||||
@@ -905,6 +930,7 @@ export type ProjectUpdateWithoutMembersInput = {
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutMembersInput = {
|
||||
@@ -926,6 +952,7 @@ export type ProjectUncheckedUpdateWithoutMembersInput = {
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutShareLinksInput = {
|
||||
@@ -947,6 +974,7 @@ export type ProjectCreateWithoutShareLinksInput = {
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutShareLinksInput = {
|
||||
@@ -968,6 +996,7 @@ export type ProjectUncheckedCreateWithoutShareLinksInput = {
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutShareLinksInput = {
|
||||
@@ -1005,6 +1034,7 @@ export type ProjectUpdateWithoutShareLinksInput = {
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutShareLinksInput = {
|
||||
@@ -1026,6 +1056,7 @@ export type ProjectUncheckedUpdateWithoutShareLinksInput = {
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutAssetsInput = {
|
||||
@@ -1047,6 +1078,7 @@ export type ProjectCreateWithoutAssetsInput = {
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutAssetsInput = {
|
||||
@@ -1068,6 +1100,7 @@ export type ProjectUncheckedCreateWithoutAssetsInput = {
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutAssetsInput = {
|
||||
@@ -1094,6 +1127,7 @@ export type ProjectCreateWithoutRootFolderInput = {
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutRootFolderInput = {
|
||||
@@ -1115,6 +1149,7 @@ export type ProjectUncheckedCreateWithoutRootFolderInput = {
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutRootFolderInput = {
|
||||
@@ -1141,6 +1176,7 @@ export type ProjectCreateWithoutShareRootInput = {
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutShareRootInput = {
|
||||
@@ -1162,6 +1198,7 @@ export type ProjectUncheckedCreateWithoutShareRootInput = {
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutShareRootInput = {
|
||||
@@ -1199,6 +1236,7 @@ export type ProjectUpdateWithoutAssetsInput = {
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutAssetsInput = {
|
||||
@@ -1220,6 +1258,7 @@ export type ProjectUncheckedUpdateWithoutAssetsInput = {
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUpsertWithoutRootFolderInput = {
|
||||
@@ -1252,6 +1291,7 @@ export type ProjectUpdateWithoutRootFolderInput = {
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutRootFolderInput = {
|
||||
@@ -1273,6 +1313,7 @@ export type ProjectUncheckedUpdateWithoutRootFolderInput = {
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUpsertWithoutShareRootInput = {
|
||||
@@ -1305,6 +1346,7 @@ export type ProjectUpdateWithoutShareRootInput = {
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutShareRootInput = {
|
||||
@@ -1326,6 +1368,7 @@ export type ProjectUncheckedUpdateWithoutShareRootInput = {
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutInvitesInput = {
|
||||
@@ -1347,6 +1390,7 @@ export type ProjectCreateWithoutInvitesInput = {
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutInvitesInput = {
|
||||
@@ -1368,6 +1412,7 @@ export type ProjectUncheckedCreateWithoutInvitesInput = {
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutInvitesInput = {
|
||||
@@ -1405,6 +1450,7 @@ export type ProjectUpdateWithoutInvitesInput = {
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutInvitesInput = {
|
||||
@@ -1426,6 +1472,7 @@ export type ProjectUncheckedUpdateWithoutInvitesInput = {
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutMetadataFieldsInput = {
|
||||
@@ -1447,6 +1494,7 @@ export type ProjectCreateWithoutMetadataFieldsInput = {
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutMetadataFieldsInput = {
|
||||
@@ -1468,6 +1516,7 @@ export type ProjectUncheckedCreateWithoutMetadataFieldsInput = {
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutMetadataFieldsInput = {
|
||||
@@ -1505,6 +1554,7 @@ export type ProjectUpdateWithoutMetadataFieldsInput = {
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutMetadataFieldsInput = {
|
||||
@@ -1526,6 +1576,7 @@ export type ProjectUncheckedUpdateWithoutMetadataFieldsInput = {
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutNotificationsInput = {
|
||||
@@ -1547,6 +1598,7 @@ export type ProjectCreateWithoutNotificationsInput = {
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutNotificationsInput = {
|
||||
@@ -1568,6 +1620,7 @@ export type ProjectUncheckedCreateWithoutNotificationsInput = {
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutNotificationsInput = {
|
||||
@@ -1605,6 +1658,7 @@ export type ProjectUpdateWithoutNotificationsInput = {
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutNotificationsInput = {
|
||||
@@ -1626,6 +1680,7 @@ export type ProjectUncheckedUpdateWithoutNotificationsInput = {
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutCollectionsInput = {
|
||||
@@ -1647,6 +1702,7 @@ export type ProjectCreateWithoutCollectionsInput = {
|
||||
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutCollectionsInput = {
|
||||
@@ -1668,6 +1724,7 @@ export type ProjectUncheckedCreateWithoutCollectionsInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutCollectionsInput = {
|
||||
@@ -1705,6 +1762,7 @@ export type ProjectUpdateWithoutCollectionsInput = {
|
||||
shareLinks?: Prisma.ShareLinkUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutCollectionsInput = {
|
||||
@@ -1726,6 +1784,7 @@ export type ProjectUncheckedUpdateWithoutCollectionsInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutAuditLogsInput = {
|
||||
@@ -1747,6 +1806,7 @@ export type ProjectCreateWithoutAuditLogsInput = {
|
||||
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutAuditLogsInput = {
|
||||
@@ -1768,6 +1828,7 @@ export type ProjectUncheckedCreateWithoutAuditLogsInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutAuditLogsInput = {
|
||||
@@ -1805,6 +1866,7 @@ export type ProjectUpdateWithoutAuditLogsInput = {
|
||||
shareLinks?: Prisma.ShareLinkUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutAuditLogsInput = {
|
||||
@@ -1826,6 +1888,7 @@ export type ProjectUncheckedUpdateWithoutAuditLogsInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectCreateWithoutKanbanTasksInput = {
|
||||
@@ -1847,6 +1910,7 @@ export type ProjectCreateWithoutKanbanTasksInput = {
|
||||
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedCreateWithoutKanbanTasksInput = {
|
||||
@@ -1868,6 +1932,7 @@ export type ProjectUncheckedCreateWithoutKanbanTasksInput = {
|
||||
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutProjectInput
|
||||
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutProjectInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutProjectInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedCreateNestedManyWithoutProjectInput
|
||||
}
|
||||
|
||||
export type ProjectCreateOrConnectWithoutKanbanTasksInput = {
|
||||
@@ -1905,6 +1970,7 @@ export type ProjectUpdateWithoutKanbanTasksInput = {
|
||||
shareLinks?: Prisma.ShareLinkUpdateManyWithoutProjectNestedInput
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutKanbanTasksInput = {
|
||||
@@ -1926,6 +1992,111 @@ export type ProjectUncheckedUpdateWithoutKanbanTasksInput = {
|
||||
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 = {
|
||||
@@ -1959,6 +2130,7 @@ export type ProjectUpdateWithoutTeamInput = {
|
||||
collections?: Prisma.CollectionUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateWithoutTeamInput = {
|
||||
@@ -1980,6 +2152,7 @@ export type ProjectUncheckedUpdateWithoutTeamInput = {
|
||||
collections?: Prisma.CollectionUncheckedUpdateManyWithoutProjectNestedInput
|
||||
auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutProjectNestedInput
|
||||
kanbanTasks?: Prisma.KanbanTaskUncheckedUpdateManyWithoutProjectNestedInput
|
||||
recentFiles?: Prisma.RecentFileItemUncheckedUpdateManyWithoutProjectNestedInput
|
||||
}
|
||||
|
||||
export type ProjectUncheckedUpdateManyWithoutTeamInput = {
|
||||
@@ -2009,6 +2182,7 @@ export type ProjectCountOutputType = {
|
||||
collections: number
|
||||
auditLogs: number
|
||||
kanbanTasks: number
|
||||
recentFiles: number
|
||||
}
|
||||
|
||||
export type ProjectCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
@@ -2021,6 +2195,7 @@ export type ProjectCountOutputTypeSelect<ExtArgs extends runtime.Types.Extension
|
||||
collections?: boolean | ProjectCountOutputTypeCountCollectionsArgs
|
||||
auditLogs?: boolean | ProjectCountOutputTypeCountAuditLogsArgs
|
||||
kanbanTasks?: boolean | ProjectCountOutputTypeCountKanbanTasksArgs
|
||||
recentFiles?: boolean | ProjectCountOutputTypeCountRecentFilesArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2096,6 +2271,13 @@ export type ProjectCountOutputTypeCountKanbanTasksArgs<ExtArgs extends runtime.T
|
||||
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
|
||||
@@ -2120,6 +2302,7 @@ export type ProjectSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
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"]>
|
||||
|
||||
@@ -2182,6 +2365,7 @@ export type ProjectInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
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> = {
|
||||
@@ -2210,6 +2394,7 @@ export type $ProjectPayload<ExtArgs extends runtime.Types.Extensions.InternalArg
|
||||
collections: Prisma.$CollectionPayload<ExtArgs>[]
|
||||
auditLogs: Prisma.$AuditLogPayload<ExtArgs>[]
|
||||
kanbanTasks: Prisma.$KanbanTaskPayload<ExtArgs>[]
|
||||
recentFiles: Prisma.$RecentFileItemPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -2631,6 +2816,7 @@ export interface Prisma__ProjectClient<T, Null = never, ExtArgs extends runtime.
|
||||
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.
|
||||
@@ -3324,6 +3510,30 @@ export type Project$kanbanTasksArgs<ExtArgs extends runtime.Types.Extensions.Int
|
||||
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
+338
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/dtos",
|
||||
"version": "0.3.10",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
|
||||
@@ -24,3 +24,4 @@ export * from './auditLog'
|
||||
export * from './watermark'
|
||||
export * from './quota'
|
||||
export * from './kanban'
|
||||
export * from './recents'
|
||||
|
||||
@@ -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.10",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/tableprinter",
|
||||
"version": "0.3.10",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/transcode",
|
||||
"version": "0.3.10",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -30,6 +30,7 @@ type FileBrowserToolbarProps = {
|
||||
sort?: SearchSort
|
||||
onSortChange: (sort?: SearchSort) => void
|
||||
isRecentlyDeleted?: boolean
|
||||
isRecents?: boolean
|
||||
collection?: CollectionInfo
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
onUpdateCollection?: (updates: { name?: string; filter?: any }) => void
|
||||
@@ -46,6 +47,7 @@ export function FileBrowserToolbar({
|
||||
sort,
|
||||
onSortChange,
|
||||
isRecentlyDeleted,
|
||||
isRecents,
|
||||
collection,
|
||||
onUpdateCollection,
|
||||
rootFolderId,
|
||||
@@ -237,6 +239,14 @@ export function FileBrowserToolbar({
|
||||
.toUpperCase()
|
||||
}
|
||||
|
||||
if (isRecents) {
|
||||
return (
|
||||
<div className="flex items-center px-4 py-2.5 border-b sticky top-0 bg-background z-10 text-sm text-muted-foreground">
|
||||
<span>{m.recents_toolbar_hint()}</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex items-center justify-between p-2 border-b sticky top-0 bg-background z-10">
|
||||
<div className="flex items-center gap-2 h-full">
|
||||
@@ -260,7 +270,7 @@ export function FileBrowserToolbar({
|
||||
fields={fields}
|
||||
sort={sort}
|
||||
onSortChange={onSortChange}
|
||||
disabled={isRecentlyDeleted}
|
||||
disabled={isRecentlyDeleted || isRecents}
|
||||
/>
|
||||
|
||||
<Separator orientation="vertical" />
|
||||
@@ -343,7 +353,7 @@ export function FileBrowserToolbar({
|
||||
<>
|
||||
<Button
|
||||
onClick={() => setSearchDialogOpen(true)}
|
||||
disabled={isRecentlyDeleted}
|
||||
disabled={isRecentlyDeleted || isRecents}
|
||||
variant={activeFiltersCount > 0 ? 'secondary' : 'ghost'}
|
||||
size="sm"
|
||||
>
|
||||
@@ -355,7 +365,7 @@ export function FileBrowserToolbar({
|
||||
)}
|
||||
</Button>
|
||||
|
||||
{!isRecentlyDeleted && (
|
||||
{!isRecentlyDeleted && !isRecents && (
|
||||
<>
|
||||
<Separator orientation="vertical" />
|
||||
<Button
|
||||
@@ -387,7 +397,7 @@ export function FileBrowserToolbar({
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-2">
|
||||
{!isRecentlyDeleted && (
|
||||
{!isRecentlyDeleted && !isRecents && (
|
||||
<div
|
||||
className="flex items-center -space-x-2 cursor-pointer hover:opacity-90"
|
||||
data-testid="project-members-trigger"
|
||||
|
||||
@@ -89,6 +89,7 @@ export default function FileSystemManager({
|
||||
}, [fields, projectId, setFields])
|
||||
|
||||
const isRecentlyDeleted = assetId === 'recently-deleted'
|
||||
const isRecents = assetId === 'recents'
|
||||
const [selectedItem, setSelectedItem] = useState<AssetInfo | null>(null)
|
||||
const [selectedIds, setSelectedIds] = useState<Set<string>>(new Set())
|
||||
const [lastSelectedId, setLastSelectedId] = useState<string | null>(null)
|
||||
@@ -140,18 +141,19 @@ export default function FileSystemManager({
|
||||
|
||||
const containerRef = useRef<HTMLDivElement>(null)
|
||||
|
||||
const { data: folderInfo } = isRecentlyDeleted
|
||||
? { data: undefined }
|
||||
: useQuery({
|
||||
queryKey: ['folders', assetId],
|
||||
queryFn: async () => {
|
||||
const res = await client.api.folders[':folderId'].$get({
|
||||
param: { folderId: assetId },
|
||||
})
|
||||
if (!res.ok) throw new Error('failed to fetch folder')
|
||||
return (await res.json()) as unknown as AssetInfo
|
||||
},
|
||||
})
|
||||
const { data: folderInfo } =
|
||||
isRecentlyDeleted || isRecents
|
||||
? { data: undefined }
|
||||
: useQuery({
|
||||
queryKey: ['folders', assetId],
|
||||
queryFn: async () => {
|
||||
const res = await client.api.folders[':folderId'].$get({
|
||||
param: { folderId: assetId },
|
||||
})
|
||||
if (!res.ok) throw new Error('failed to fetch folder')
|
||||
return (await res.json()) as unknown as AssetInfo
|
||||
},
|
||||
})
|
||||
|
||||
const { setProjectState, clearProjectState } = useTopNavStore()
|
||||
|
||||
@@ -162,11 +164,13 @@ export default function FileSystemManager({
|
||||
projectName,
|
||||
ancestorFolders: folderInfo?.ancestorFolders ?? [],
|
||||
currentAsset: isRecentlyDeleted
|
||||
? { name: 'Recently Deleted', type: 'folder' }
|
||||
: isCollection
|
||||
? { id: collection.id, name: collection.name, type: 'folder' }
|
||||
: { id: folderInfo?.id || assetId, name: folderInfo?.name, type: 'folder' },
|
||||
isRootFolder: !isRecentlyDeleted && !isCollection && assetId === rootFolderId,
|
||||
? { name: m.recently_deleted(), type: 'folder' }
|
||||
: isRecents
|
||||
? { name: m.recents(), type: 'folder' }
|
||||
: isCollection
|
||||
? { id: collection.id, name: collection.name, type: 'folder' }
|
||||
: { id: folderInfo?.id || assetId, name: folderInfo?.name, type: 'folder' },
|
||||
isRootFolder: !isRecentlyDeleted && !isRecents && !isCollection && assetId === rootFolderId,
|
||||
onFolderClick: (id: string) => {
|
||||
navigate({
|
||||
to: '/projects/$projectId/folders/$folderId',
|
||||
@@ -182,6 +186,7 @@ export default function FileSystemManager({
|
||||
projectName,
|
||||
folderInfo,
|
||||
isRecentlyDeleted,
|
||||
isRecents,
|
||||
assetId,
|
||||
rootFolderId,
|
||||
setProjectState,
|
||||
@@ -197,9 +202,11 @@ export default function FileSystemManager({
|
||||
} = useInfiniteQuery<AssetInfoPaginatedList>({
|
||||
queryKey: isRecentlyDeleted
|
||||
? ['projects', projectId, 'recently-deleted', 'folder']
|
||||
: ['search', teamId, assetId, 'folder', filterConditions, sort, isCollection],
|
||||
: isRecents
|
||||
? ['projects', projectId, 'recents', 'folder']
|
||||
: ['search', teamId, assetId, 'folder', filterConditions, sort, isCollection],
|
||||
queryFn: async ({ pageParam }) => {
|
||||
if (isRecentlyDeleted || isCollection) {
|
||||
if (isRecentlyDeleted || isCollection || isRecents) {
|
||||
if (isRecentlyDeleted) {
|
||||
const res = await client.api.projects[':projectId']['recently-deleted'].$get({
|
||||
param: { projectId: projectId },
|
||||
@@ -230,7 +237,7 @@ export default function FileSystemManager({
|
||||
if (!res.ok) throw new Error('failed to search folders')
|
||||
return (await res.json()) as unknown as AssetInfoPaginatedList
|
||||
},
|
||||
enabled: !isFiltering, // Disable folders when filtering
|
||||
enabled: !isFiltering && !isRecents, // Disable folders when filtering or in recents
|
||||
initialPageParam: '',
|
||||
getNextPageParam: (lastPage) => {
|
||||
return lastPage.pageInfo?.cursor || undefined
|
||||
@@ -245,7 +252,9 @@ export default function FileSystemManager({
|
||||
} = useInfiniteQuery<AssetInfoPaginatedList>({
|
||||
queryKey: isRecentlyDeleted
|
||||
? ['projects', projectId, 'recently-deleted', 'file']
|
||||
: ['search', teamId, assetId, 'file', filterConditions, sort, isCollection],
|
||||
: isRecents
|
||||
? ['projects', projectId, 'recents', 'file']
|
||||
: ['search', teamId, assetId, 'file', filterConditions, sort, isCollection],
|
||||
queryFn: async ({ pageParam }) => {
|
||||
if (isRecentlyDeleted) {
|
||||
const res = await client.api.projects[':projectId']['recently-deleted'].$get({
|
||||
@@ -259,6 +268,18 @@ export default function FileSystemManager({
|
||||
return (await res.json()) as unknown as AssetInfoPaginatedList
|
||||
}
|
||||
|
||||
if (isRecents) {
|
||||
const res = await client.api.projects[':projectId'].recents.$get({
|
||||
param: { projectId: projectId },
|
||||
query: {
|
||||
after: pageParam as string,
|
||||
first: '20',
|
||||
},
|
||||
})
|
||||
if (!res.ok) throw new Error('failed to fetch recent files')
|
||||
return (await res.json()) as unknown as AssetInfoPaginatedList
|
||||
}
|
||||
|
||||
const res = await client.api.folders[':folderId'].search.$post({
|
||||
param: { folderId: assetId },
|
||||
json: {
|
||||
@@ -412,7 +433,7 @@ export default function FileSystemManager({
|
||||
})
|
||||
}
|
||||
sensors={
|
||||
isRecentlyDeleted || !canEdit
|
||||
isRecentlyDeleted || isRecents || !canEdit
|
||||
? []
|
||||
: [
|
||||
PointerSensor.configure({
|
||||
@@ -486,6 +507,7 @@ export default function FileSystemManager({
|
||||
hasNextFilesPage={hasNextPageFiles || false}
|
||||
isFetchingNextFilesPage={isFetchingNextFilesPage}
|
||||
isRecentlyDeleted={isRecentlyDeleted}
|
||||
isRecents={isRecents}
|
||||
filterConditions={filterConditions}
|
||||
onFilterChange={setFilterConditions}
|
||||
sort={sort}
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
// @vitest-environment happy-dom
|
||||
import { cleanup, render } from '@testing-library/react'
|
||||
import React from 'react'
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import { FileViewerLeftSidebar } from './file-viewer-left-sidebar'
|
||||
import type { AssetInfo } from '@shumai/dtos'
|
||||
|
||||
// Mock react-intersection-observer
|
||||
vi.mock('react-intersection-observer', () => ({
|
||||
useInView: () => ({
|
||||
ref: vi.fn(),
|
||||
inView: false,
|
||||
}),
|
||||
}))
|
||||
|
||||
// Mock @tanstack/react-router Link
|
||||
vi.mock('@tanstack/react-router', () => ({
|
||||
Link: ({
|
||||
children,
|
||||
className,
|
||||
to,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
className?: string
|
||||
to?: string
|
||||
}) => (
|
||||
<a href={to} className={className} data-testid="carousel-link">
|
||||
{children}
|
||||
</a>
|
||||
),
|
||||
}))
|
||||
|
||||
// Mock api client
|
||||
vi.mock('@/ui/api/client', () => ({
|
||||
client: {
|
||||
api: {
|
||||
folders: {
|
||||
':folderId': {
|
||||
search: {
|
||||
$post: vi.fn().mockResolvedValue({
|
||||
ok: true,
|
||||
json: async () => ({ data: [], pageInfo: {} }),
|
||||
}),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}))
|
||||
|
||||
describe('FileViewerLeftSidebar', () => {
|
||||
const scrollIntoViewMock = vi.fn()
|
||||
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks()
|
||||
window.HTMLElement.prototype.scrollIntoView = scrollIntoViewMock
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
cleanup()
|
||||
})
|
||||
|
||||
const mockFiles: AssetInfo[] = [
|
||||
{
|
||||
id: 'file-1',
|
||||
name: 'Image 1.png',
|
||||
proxyType: 'image',
|
||||
} as AssetInfo,
|
||||
{
|
||||
id: 'file-2',
|
||||
name: 'Image 2.png',
|
||||
proxyType: 'image',
|
||||
} as AssetInfo,
|
||||
{
|
||||
id: 'file-3',
|
||||
name: 'Image 3.png',
|
||||
proxyType: 'image',
|
||||
} as AssetInfo,
|
||||
]
|
||||
|
||||
it('renders files list and highlights active asset', () => {
|
||||
const { container } = render(
|
||||
<FileViewerLeftSidebar
|
||||
projectId="proj-1"
|
||||
currentAssetId="file-2"
|
||||
parentFolderId="folder-1"
|
||||
initialFiles={mockFiles}
|
||||
initialNextCursor={undefined}
|
||||
/>,
|
||||
)
|
||||
|
||||
const links = container.querySelectorAll('[data-testid="carousel-link"]')
|
||||
expect(links.length).toBe(3)
|
||||
// Active item (file-2) has w-[62px] h-[62px] opacity-100 class
|
||||
expect(links[1].className).toContain('w-[62px]')
|
||||
expect(links[1].className).toContain('opacity-100')
|
||||
// Inactive items have w-[52px] h-[52px] opacity-60 class
|
||||
expect(links[0].className).toContain('w-[52px]')
|
||||
expect(links[0].className).toContain('opacity-60')
|
||||
})
|
||||
|
||||
it('uses behavior auto and block center on initial mount', () => {
|
||||
render(
|
||||
<FileViewerLeftSidebar
|
||||
projectId="proj-1"
|
||||
currentAssetId="file-2"
|
||||
parentFolderId="folder-1"
|
||||
initialFiles={mockFiles}
|
||||
initialNextCursor={undefined}
|
||||
/>,
|
||||
)
|
||||
|
||||
expect(scrollIntoViewMock).toHaveBeenCalledTimes(1)
|
||||
expect(scrollIntoViewMock).toHaveBeenCalledWith({
|
||||
block: 'center',
|
||||
inline: 'center',
|
||||
behavior: 'auto',
|
||||
})
|
||||
})
|
||||
|
||||
it('uses behavior smooth and block nearest on subsequent active item change', () => {
|
||||
const { rerender } = render(
|
||||
<FileViewerLeftSidebar
|
||||
projectId="proj-1"
|
||||
currentAssetId="file-1"
|
||||
parentFolderId="folder-1"
|
||||
initialFiles={mockFiles}
|
||||
initialNextCursor={undefined}
|
||||
/>,
|
||||
)
|
||||
|
||||
expect(scrollIntoViewMock).toHaveBeenCalledTimes(1)
|
||||
expect(scrollIntoViewMock).toHaveBeenCalledWith({
|
||||
block: 'center',
|
||||
inline: 'center',
|
||||
behavior: 'auto',
|
||||
})
|
||||
|
||||
scrollIntoViewMock.mockClear()
|
||||
|
||||
// Switch to file-3 while staying mounted
|
||||
rerender(
|
||||
<FileViewerLeftSidebar
|
||||
projectId="proj-1"
|
||||
currentAssetId="file-3"
|
||||
parentFolderId="folder-1"
|
||||
initialFiles={mockFiles}
|
||||
initialNextCursor={undefined}
|
||||
/>,
|
||||
)
|
||||
|
||||
expect(scrollIntoViewMock).toHaveBeenCalledTimes(1)
|
||||
expect(scrollIntoViewMock).toHaveBeenCalledWith({
|
||||
block: 'nearest',
|
||||
inline: 'nearest',
|
||||
behavior: 'smooth',
|
||||
})
|
||||
})
|
||||
|
||||
it('resets initial mount centering when parent folder / initial files change', () => {
|
||||
const { rerender } = render(
|
||||
<FileViewerLeftSidebar
|
||||
projectId="proj-1"
|
||||
currentAssetId="file-1"
|
||||
parentFolderId="folder-1"
|
||||
initialFiles={mockFiles}
|
||||
initialNextCursor={undefined}
|
||||
/>,
|
||||
)
|
||||
|
||||
expect(scrollIntoViewMock).toHaveBeenCalledWith({
|
||||
block: 'center',
|
||||
inline: 'center',
|
||||
behavior: 'auto',
|
||||
})
|
||||
|
||||
scrollIntoViewMock.mockClear()
|
||||
|
||||
const newFiles: AssetInfo[] = [
|
||||
{
|
||||
id: 'file-10',
|
||||
name: 'Other 10.png',
|
||||
proxyType: 'image',
|
||||
} as AssetInfo,
|
||||
]
|
||||
|
||||
rerender(
|
||||
<FileViewerLeftSidebar
|
||||
projectId="proj-1"
|
||||
currentAssetId="file-10"
|
||||
parentFolderId="folder-2"
|
||||
initialFiles={newFiles}
|
||||
initialNextCursor={undefined}
|
||||
/>,
|
||||
)
|
||||
|
||||
expect(scrollIntoViewMock).toHaveBeenCalledWith({
|
||||
block: 'center',
|
||||
inline: 'center',
|
||||
behavior: 'auto',
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -50,7 +50,7 @@ export const FileViewerLeftSidebar: FC<FileViewerLeftSidebarProps> = ({
|
||||
rootMargin: '200px',
|
||||
})
|
||||
const activeItemRef = useRef<HTMLDivElement>(null)
|
||||
const hasScrolledRef = useRef(false)
|
||||
const isInitialMountRef = useRef(true)
|
||||
|
||||
const [files, setFiles] = useState<AssetInfo[]>(initialFiles)
|
||||
const [nextCursor, setNextCursor] = useState<string | undefined>(initialNextCursor)
|
||||
@@ -62,7 +62,7 @@ export const FileViewerLeftSidebar: FC<FileViewerLeftSidebarProps> = ({
|
||||
setFiles(initialFiles)
|
||||
setNextCursor(initialNextCursor)
|
||||
setHasMore(!!initialNextCursor)
|
||||
hasScrolledRef.current = false
|
||||
isInitialMountRef.current = true
|
||||
}, [initialFiles, initialNextCursor])
|
||||
|
||||
// Fetch next page when scrolling near bottom
|
||||
@@ -98,21 +98,24 @@ export const FileViewerLeftSidebar: FC<FileViewerLeftSidebarProps> = ({
|
||||
fetchNextPage()
|
||||
}, [inView, nextCursor, hasMore, isFetchingNext, parentFolderId])
|
||||
|
||||
// Reset scroll lock when current asset changes
|
||||
useEffect(() => {
|
||||
hasScrolledRef.current = false
|
||||
}, [currentAssetId])
|
||||
|
||||
// Scroll the active item into view
|
||||
useEffect(() => {
|
||||
const activeFileInView = files.some((f) => f?.id === currentAssetId)
|
||||
if (activeFileInView && activeItemRef.current && !hasScrolledRef.current) {
|
||||
activeItemRef.current.scrollIntoView({
|
||||
block: 'center',
|
||||
inline: 'center',
|
||||
behavior: 'smooth',
|
||||
})
|
||||
hasScrolledRef.current = true
|
||||
if (activeFileInView && activeItemRef.current) {
|
||||
if (isInitialMountRef.current) {
|
||||
activeItemRef.current.scrollIntoView({
|
||||
block: 'center',
|
||||
inline: 'center',
|
||||
behavior: 'auto',
|
||||
})
|
||||
isInitialMountRef.current = false
|
||||
} else {
|
||||
activeItemRef.current.scrollIntoView({
|
||||
block: 'nearest',
|
||||
inline: 'nearest',
|
||||
behavior: 'smooth',
|
||||
})
|
||||
}
|
||||
}
|
||||
}, [files, currentAssetId])
|
||||
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
// @vitest-environment happy-dom
|
||||
import { cleanup, fireEvent, render } from '@testing-library/react'
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
import { FileViewer } from './file-viewer'
|
||||
import type { AssetInfo } from '@shumai/dtos'
|
||||
|
||||
const MockViewer = React.forwardRef<unknown, { file: AssetInfo; children?: React.ReactNode }>(
|
||||
({ file, children }, ref) => {
|
||||
React.useImperativeHandle(ref, () => ({}))
|
||||
return (
|
||||
<div>
|
||||
<div data-testid={`viewer-${file.id}`}>{file.name}</div>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
)
|
||||
|
||||
// Mock registry so getViewerForFile returns a simple test viewer
|
||||
vi.mock('./viewers/registry', () => ({
|
||||
getViewerForFile: () => ({
|
||||
id: 'test-viewer',
|
||||
name: 'Test Viewer',
|
||||
match: () => true,
|
||||
viewer: MockViewer,
|
||||
}),
|
||||
}))
|
||||
|
||||
describe('FileViewer', () => {
|
||||
afterEach(() => {
|
||||
cleanup()
|
||||
})
|
||||
|
||||
it('renders children alongside viewer and preserves children state across file changes', () => {
|
||||
let mountCount = 0
|
||||
|
||||
const StatefulChild = () => {
|
||||
const [count, setCount] = useState(0)
|
||||
useEffect(() => {
|
||||
mountCount++
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div data-testid="sidebar-child">
|
||||
<span data-testid="child-count">{count}</span>
|
||||
<button data-testid="child-btn" onClick={() => setCount((c) => c + 1)}>
|
||||
Increment
|
||||
</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const fileA: AssetInfo = {
|
||||
id: 'file-a',
|
||||
name: 'File A.png',
|
||||
proxyType: 'image',
|
||||
} as AssetInfo
|
||||
|
||||
const fileB: AssetInfo = {
|
||||
id: 'file-b',
|
||||
name: 'File B.png',
|
||||
proxyType: 'image',
|
||||
} as AssetInfo
|
||||
|
||||
const { getByTestId, rerender } = render(
|
||||
<FileViewer file={fileA}>
|
||||
<StatefulChild />
|
||||
</FileViewer>,
|
||||
)
|
||||
|
||||
expect(getByTestId('viewer-file-a')).toBeDefined()
|
||||
expect(getByTestId('child-count').textContent).toBe('0')
|
||||
expect(mountCount).toBe(1)
|
||||
|
||||
// Increment count inside child
|
||||
fireEvent.click(getByTestId('child-btn'))
|
||||
expect(getByTestId('child-count').textContent).toBe('1')
|
||||
|
||||
// Rerender with new file (fileB)
|
||||
rerender(
|
||||
<FileViewer file={fileB}>
|
||||
<StatefulChild />
|
||||
</FileViewer>,
|
||||
)
|
||||
|
||||
// Viewer component changed to file B
|
||||
expect(getByTestId('viewer-file-b')).toBeDefined()
|
||||
|
||||
// Child component remained mounted without remounting or resetting state
|
||||
expect(mountCount).toBe(1)
|
||||
expect(getByTestId('child-count').textContent).toBe('1')
|
||||
})
|
||||
})
|
||||
@@ -23,7 +23,7 @@ export function FileViewer({
|
||||
|
||||
return (
|
||||
<ViewerComponent
|
||||
key={file.id}
|
||||
key={viewerDef.id}
|
||||
ref={mediaControllerRef}
|
||||
file={file}
|
||||
onPlay={onPlay}
|
||||
|
||||
@@ -50,6 +50,7 @@ import {
|
||||
Download,
|
||||
Edit,
|
||||
Folder,
|
||||
FolderClock,
|
||||
LayoutGrid,
|
||||
Loader2,
|
||||
MoreHorizontal,
|
||||
@@ -74,6 +75,7 @@ interface FolderTreeProps {
|
||||
hideCollections?: boolean
|
||||
hideShares?: boolean
|
||||
hideRecentlyDeleted?: boolean
|
||||
hideRecents?: boolean
|
||||
ancestorFolders?: AncestorFolder[]
|
||||
}
|
||||
|
||||
@@ -88,6 +90,7 @@ export function FolderTree({
|
||||
hideCollections,
|
||||
hideShares,
|
||||
hideRecentlyDeleted,
|
||||
hideRecents,
|
||||
ancestorFolders,
|
||||
}: FolderTreeProps) {
|
||||
const navigate = useNavigate()
|
||||
@@ -97,6 +100,10 @@ export function FolderTree({
|
||||
from: '/projects/$projectId/recently-deleted',
|
||||
shouldThrow: false,
|
||||
})
|
||||
const isRecents = useMatch({
|
||||
from: '/projects/$projectId/recents',
|
||||
shouldThrow: false,
|
||||
})
|
||||
|
||||
const [isAssetsExpanded, setIsAssetsExpanded] = useState(true)
|
||||
const [isCollectionsExpanded, setIsCollectionsExpanded] = useState(true)
|
||||
@@ -478,6 +485,26 @@ export function FolderTree({
|
||||
)}
|
||||
>
|
||||
<div className="space-y-0.5 pr-3">
|
||||
{!hideRecents && (
|
||||
<div
|
||||
className={cn(
|
||||
'group flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
|
||||
isRecents && 'bg-sidebar-accent text-sidebar-accent-foreground font-medium',
|
||||
)}
|
||||
onClick={() =>
|
||||
navigate({
|
||||
to: '/projects/$projectId/recents',
|
||||
params: { projectId },
|
||||
})
|
||||
}
|
||||
>
|
||||
<div className="flex h-4 w-4 items-center justify-center">
|
||||
<FolderClock className="h-4 w-4 text-sidebar-primary" />
|
||||
</div>
|
||||
<span className="flex-1 truncate text-sidebar-foreground">{m.recents()}</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<FolderTreeItem
|
||||
key={rootFolderId}
|
||||
teamId={teamId}
|
||||
|
||||
@@ -35,6 +35,11 @@ export const ImageViewer = React.forwardRef<MediaController, FileViewerProps>(
|
||||
|
||||
const containerRef = useRef<HTMLDivElement | null>(null)
|
||||
|
||||
useEffect(() => {
|
||||
setHasManuallyZoomed(false)
|
||||
setCopied(false)
|
||||
}, [file.id])
|
||||
|
||||
useEffect(() => {
|
||||
const node = containerRef.current
|
||||
if (!node) return
|
||||
|
||||
@@ -137,6 +137,10 @@ export const PdfViewer = React.forwardRef<MediaController, FileViewerProps>(
|
||||
const [pan, setPan] = useState({ x: 0, y: 0 })
|
||||
const [hasManuallyZoomed, setHasManuallyZoomed] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
setHasManuallyZoomed(false)
|
||||
}, [file.id])
|
||||
|
||||
const containerRef = useRef<HTMLDivElement | null>(null)
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -35,6 +35,7 @@ export function useFramePlayer(
|
||||
|
||||
// Track playing state of the HTML video element
|
||||
useEffect(() => {
|
||||
setCurrentFrame(0)
|
||||
const video = videoRef.current
|
||||
if (!video) return
|
||||
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
// @vitest-environment happy-dom
|
||||
import { cleanup, render } from '@testing-library/react'
|
||||
import React from 'react'
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import VideoViewer from './video-viewer'
|
||||
import type { AssetInfo } from '@shumai/dtos'
|
||||
|
||||
const videojsMock = vi.fn((...args: unknown[]) => {
|
||||
void args
|
||||
return {
|
||||
on: vi.fn(),
|
||||
volume: vi.fn(),
|
||||
duration: vi.fn(() => 10),
|
||||
currentTime: vi.fn(() => 0),
|
||||
bufferedEnd: vi.fn(() => 0),
|
||||
playbackRate: vi.fn(() => 1),
|
||||
ready: vi.fn(),
|
||||
dispose: vi.fn(),
|
||||
isDisposed: vi.fn(() => false),
|
||||
}
|
||||
})
|
||||
|
||||
vi.mock('video.js', () => ({
|
||||
default: (...args: unknown[]) => videojsMock(...args),
|
||||
}))
|
||||
|
||||
vi.mock('@/ui/components/drawing-canvas', () => ({
|
||||
default: () => <div data-testid="drawing-canvas" />,
|
||||
}))
|
||||
|
||||
vi.mock('@/ui/paraglide/messages.js', () => ({
|
||||
m: new Proxy({}, { get: () => () => '' }),
|
||||
}))
|
||||
|
||||
describe('VideoViewer', () => {
|
||||
beforeEach(() => {
|
||||
videojsMock.mockClear()
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
cleanup()
|
||||
})
|
||||
|
||||
it('reloads video player with new video source when file prop changes without unmounting', () => {
|
||||
const videoA: AssetInfo = {
|
||||
id: 'video-a',
|
||||
name: 'video-a.mp4',
|
||||
proxyType: 'video',
|
||||
media: {
|
||||
metadata: {
|
||||
originalWidth: 1280,
|
||||
originalHeight: 720,
|
||||
duration: 10,
|
||||
frameRate: 30,
|
||||
totalFrames: 300,
|
||||
},
|
||||
videoTranscodes: [
|
||||
{
|
||||
resolution: '720p',
|
||||
url: 'https://cdn.example.com/videoA-720p.mp4',
|
||||
width: 1280,
|
||||
height: 720,
|
||||
},
|
||||
],
|
||||
},
|
||||
} as unknown as AssetInfo
|
||||
|
||||
const videoB: AssetInfo = {
|
||||
id: 'video-b',
|
||||
name: 'video-b.mp4',
|
||||
proxyType: 'video',
|
||||
media: {
|
||||
metadata: {
|
||||
originalWidth: 1920,
|
||||
originalHeight: 1080,
|
||||
duration: 25,
|
||||
frameRate: 30,
|
||||
totalFrames: 750,
|
||||
},
|
||||
videoTranscodes: [
|
||||
{
|
||||
resolution: '1080p',
|
||||
url: 'https://cdn.example.com/videoB-1080p.mp4',
|
||||
width: 1920,
|
||||
height: 1080,
|
||||
},
|
||||
],
|
||||
},
|
||||
} as unknown as AssetInfo
|
||||
|
||||
const { rerender } = render(<VideoViewer file={videoA} />)
|
||||
|
||||
// Initial render should initialize videojs with video A URL
|
||||
expect(videojsMock).toHaveBeenCalledWith(
|
||||
expect.anything(),
|
||||
expect.objectContaining({
|
||||
sources: [
|
||||
{
|
||||
src: 'https://cdn.example.com/videoA-720p.mp4',
|
||||
type: 'video/mp4',
|
||||
},
|
||||
],
|
||||
}),
|
||||
)
|
||||
|
||||
// Rerender with video B (simulating selecting another video from the carousel)
|
||||
rerender(<VideoViewer file={videoB} />)
|
||||
|
||||
// VideoJS should be re-initialized with video B's URL
|
||||
expect(videojsMock).toHaveBeenLastCalledWith(
|
||||
expect.anything(),
|
||||
expect.objectContaining({
|
||||
sources: [
|
||||
{
|
||||
src: 'https://cdn.example.com/videoB-1080p.mp4',
|
||||
type: 'video/mp4',
|
||||
},
|
||||
],
|
||||
}),
|
||||
)
|
||||
})
|
||||
})
|
||||
@@ -127,6 +127,23 @@ const VideoViewer = React.forwardRef<MediaController, FileViewerProps>(
|
||||
const [hasManuallyZoomed, setHasManuallyZoomed] = useState(false)
|
||||
const [containerSize, setContainerSize] = useState({ width: 0, height: 0 })
|
||||
|
||||
useEffect(() => {
|
||||
const res = getInitialResolution()
|
||||
setState((prev) => ({
|
||||
...prev,
|
||||
isPlaying: false,
|
||||
progress: 0,
|
||||
currentTime: 0,
|
||||
duration: data.media?.metadata?.duration || 0,
|
||||
currentResolution: res?.resolution ?? '',
|
||||
currentSrc: res?.url ?? '',
|
||||
}))
|
||||
setHasManuallyZoomed(false)
|
||||
setIsPlayerReady(false)
|
||||
setBuffered(0)
|
||||
lastProcessedStartTimeRef.current = null
|
||||
}, [data.id])
|
||||
|
||||
const vidW = data.media?.metadata?.originalWidth || 1920
|
||||
const vidH = data.media?.metadata?.originalHeight || 1080
|
||||
const baseScale = fitScale(containerSize.width, containerSize.height, vidW, vidH)
|
||||
@@ -248,6 +265,17 @@ const VideoViewer = React.forwardRef<MediaController, FileViewerProps>(
|
||||
useEffect(() => {
|
||||
if (!videoContainerRef.current) return
|
||||
|
||||
const initialRes = getInitialResolution()
|
||||
const targetSrc = initialRes?.url ?? ''
|
||||
if (!targetSrc) return
|
||||
|
||||
// Clean up previous player if exists
|
||||
if (playerRef.current && !playerRef.current.isDisposed()) {
|
||||
playerRef.current.dispose()
|
||||
playerRef.current = null
|
||||
videoRef.current = null
|
||||
}
|
||||
|
||||
// 1. Create the video element manually
|
||||
// This avoids conflicts with React Strict Mode where the DOM might not match React's virtual DOM expectations after Video.js modifies it.
|
||||
const videoElement = document.createElement('video-js')
|
||||
@@ -268,7 +296,7 @@ const VideoViewer = React.forwardRef<MediaController, FileViewerProps>(
|
||||
playsinline: true,
|
||||
sources: [
|
||||
{
|
||||
src: state.currentSrc,
|
||||
src: targetSrc,
|
||||
type: 'video/mp4',
|
||||
},
|
||||
],
|
||||
@@ -348,7 +376,7 @@ const VideoViewer = React.forwardRef<MediaController, FileViewerProps>(
|
||||
videoRef.current = null
|
||||
}
|
||||
}
|
||||
}, [data])
|
||||
}, [data.id])
|
||||
|
||||
// Handle changes to startTime (e.g., clicking different chunks in search results)
|
||||
useEffect(() => {
|
||||
|
||||
@@ -22,13 +22,14 @@ test.describe('audio player e2e', () => {
|
||||
await vp.clickPlayToggle()
|
||||
await expect.poll(() => vp.isPaused(), { timeout: 5_000 }).toBe(false)
|
||||
|
||||
// Wait for 300ms. If the playhead froze (which happened under the bug where
|
||||
// Wait for playhead to advance. If the playhead froze (which happened under the bug where
|
||||
// it waited 1000ms for rVFC grace period), readoutFrame would still be 0.
|
||||
// With the fix, the playhead should advance immediately.
|
||||
await page.waitForTimeout(300)
|
||||
await expect
|
||||
.poll(async () => (await vp.snapshot()).readoutFrame, { timeout: 5_000 })
|
||||
.toBeGreaterThan(0)
|
||||
const afterPlay = await vp.snapshot()
|
||||
|
||||
expect(afterPlay.readoutFrame).toBeGreaterThan(0)
|
||||
expect(afterPlay.currentTime).toBeGreaterThan(0)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -5,4 +5,4 @@ export const authClient = createAuthClient({
|
||||
baseURL: window.location.origin,
|
||||
})
|
||||
|
||||
export const { signIn, signUp, useSession, signOut } = authClient
|
||||
export const { signIn, signUp, useSession, signOut, resetPassword } = authClient
|
||||
|
||||
@@ -51,6 +51,19 @@
|
||||
"first_user_notice": "You will be the owner of the default workspace as the first user!",
|
||||
"password_min_placeholder": "At least 3 characters",
|
||||
"invite_join_message": "{inviterName} invited you to join {targetName} as {role}.",
|
||||
"reset_password": "Reset Password",
|
||||
"reset_password_subtitle": "Enter your new password below.",
|
||||
"new_password": "New Password",
|
||||
"confirm_password": "Confirm Password",
|
||||
"new_password_placeholder": "Enter new password",
|
||||
"confirm_password_placeholder": "Confirm new password",
|
||||
"passwords_do_not_match": "Passwords do not match",
|
||||
"resetting_password": "Resetting password...",
|
||||
"password_reset_success": "Password reset successfully!",
|
||||
"password_reset_success_description": "You will be redirected to the login page shortly.",
|
||||
"invalid_reset_token": "Invalid or missing reset token.",
|
||||
"invalid_reset_token_description": "Please contact your administrator to generate a new password reset link.",
|
||||
"go_to_login": "Go to Login",
|
||||
|
||||
"cancel": "Cancel",
|
||||
"create": "Create",
|
||||
@@ -133,6 +146,10 @@
|
||||
|
||||
"all_files": "All Files",
|
||||
"recently_deleted": "Recently Deleted",
|
||||
"recents": "Recently Viewed",
|
||||
"recents_toolbar_hint": "This page displays the 100 most recent files you viewed in this project.",
|
||||
"no_recent_files": "No recently viewed files",
|
||||
"no_recent_files_description": "Files you view in this project will appear here.",
|
||||
"collections": "Collections",
|
||||
"shares": "Shares",
|
||||
|
||||
|
||||
@@ -51,6 +51,19 @@
|
||||
"first_user_notice": "作为第一位用户,您将成为默认工作空间的拥有者!",
|
||||
"password_min_placeholder": "至少 3 个字符",
|
||||
"invite_join_message": "{inviterName} 邀请您加入 {targetName},角色为 {role}。",
|
||||
"reset_password": "重置密码",
|
||||
"reset_password_subtitle": "请在下方输入您的新密码。",
|
||||
"new_password": "新密码",
|
||||
"confirm_password": "确认密码",
|
||||
"new_password_placeholder": "输入新密码",
|
||||
"confirm_password_placeholder": "确认新密码",
|
||||
"passwords_do_not_match": "两次输入的密码不一致",
|
||||
"resetting_password": "正在重置密码...",
|
||||
"password_reset_success": "密码重置成功!",
|
||||
"password_reset_success_description": "您将很快被重定向到登录页面。",
|
||||
"invalid_reset_token": "无效或缺失的重置令牌。",
|
||||
"invalid_reset_token_description": "请联系管理员生成新的密码重置链接。",
|
||||
"go_to_login": "前往登录",
|
||||
|
||||
"cancel": "取消",
|
||||
"create": "创建",
|
||||
@@ -133,6 +146,10 @@
|
||||
|
||||
"all_files": "全部文件",
|
||||
"recently_deleted": "最近删除",
|
||||
"recents": "最近浏览",
|
||||
"recents_toolbar_hint": "此页面显示您最近在当前项目中查看过的 100 个文件。",
|
||||
"no_recent_files": "暂无最近浏览文件",
|
||||
"no_recent_files_description": "您在此项目中查看的文件将显示在此处。",
|
||||
"collections": "媒体合集",
|
||||
"shares": "分享",
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shumai/webui",
|
||||
"version": "0.3.10",
|
||||
"version": "0.3.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./index.html",
|
||||
|
||||
+17
@@ -47,6 +47,19 @@ export * from "./registration_disabled_description.js";
|
||||
export * from "./first_user_notice.js";
|
||||
export * from "./password_min_placeholder.js";
|
||||
export * from "./invite_join_message.js";
|
||||
export * from "./reset_password.js";
|
||||
export * from "./reset_password_subtitle.js";
|
||||
export * from "./new_password.js";
|
||||
export * from "./confirm_password.js";
|
||||
export * from "./new_password_placeholder.js";
|
||||
export * from "./confirm_password_placeholder.js";
|
||||
export * from "./passwords_do_not_match.js";
|
||||
export * from "./resetting_password.js";
|
||||
export * from "./password_reset_success.js";
|
||||
export * from "./password_reset_success_description.js";
|
||||
export * from "./invalid_reset_token.js";
|
||||
export * from "./invalid_reset_token_description.js";
|
||||
export * from "./go_to_login.js";
|
||||
export * from "./cancel.js";
|
||||
export * from "./create.js";
|
||||
export * from "./save.js";
|
||||
@@ -125,6 +138,10 @@ export * from "./team_members.js";
|
||||
export * from "./updated_ago.js";
|
||||
export * from "./all_files.js";
|
||||
export * from "./recently_deleted.js";
|
||||
export * from "./recents.js";
|
||||
export * from "./recents_toolbar_hint.js";
|
||||
export * from "./no_recent_files.js";
|
||||
export * from "./no_recent_files_description.js";
|
||||
export * from "./collections.js";
|
||||
export * from "./shares.js";
|
||||
export * from "./no_collections_yet.js";
|
||||
|
||||
+17
@@ -49,6 +49,19 @@ export * from './registration_disabled_description.js'
|
||||
export * from './first_user_notice.js'
|
||||
export * from './password_min_placeholder.js'
|
||||
export * from './invite_join_message.js'
|
||||
export * from './reset_password.js'
|
||||
export * from './reset_password_subtitle.js'
|
||||
export * from './new_password.js'
|
||||
export * from './confirm_password.js'
|
||||
export * from './new_password_placeholder.js'
|
||||
export * from './confirm_password_placeholder.js'
|
||||
export * from './passwords_do_not_match.js'
|
||||
export * from './resetting_password.js'
|
||||
export * from './password_reset_success.js'
|
||||
export * from './password_reset_success_description.js'
|
||||
export * from './invalid_reset_token.js'
|
||||
export * from './invalid_reset_token_description.js'
|
||||
export * from './go_to_login.js'
|
||||
export * from './cancel.js'
|
||||
export * from './create.js'
|
||||
export * from './save.js'
|
||||
@@ -127,6 +140,10 @@ export * from './team_members.js'
|
||||
export * from './updated_ago.js'
|
||||
export * from './all_files.js'
|
||||
export * from './recently_deleted.js'
|
||||
export * from './recents.js'
|
||||
export * from './recents_toolbar_hint.js'
|
||||
export * from './no_recent_files.js'
|
||||
export * from './no_recent_files_description.js'
|
||||
export * from './collections.js'
|
||||
export * from './shares.js'
|
||||
export * from './no_collections_yet.js'
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Confirm Password" |
|
||||
*
|
||||
* @param {Confirm_PasswordInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const confirm_password: ((inputs?: Confirm_PasswordInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Confirm_PasswordInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Confirm_PasswordInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Confirm_PasswordInputs */
|
||||
|
||||
const en_confirm_password = /** @type {(inputs: Confirm_PasswordInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Confirm Password`)
|
||||
};
|
||||
|
||||
const zh_confirm_password = /** @type {(inputs: Confirm_PasswordInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`确认密码`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Confirm Password" |
|
||||
*
|
||||
* @param {Confirm_PasswordInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const confirm_password = /** @type {((inputs?: Confirm_PasswordInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Confirm_PasswordInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_confirm_password(inputs)
|
||||
return zh_confirm_password(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Confirm new password" |
|
||||
*
|
||||
* @param {Confirm_Password_PlaceholderInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const confirm_password_placeholder: ((inputs?: Confirm_Password_PlaceholderInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Confirm_Password_PlaceholderInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Confirm_Password_PlaceholderInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Confirm_Password_PlaceholderInputs */
|
||||
|
||||
const en_confirm_password_placeholder = /** @type {(inputs: Confirm_Password_PlaceholderInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Confirm new password`)
|
||||
};
|
||||
|
||||
const zh_confirm_password_placeholder = /** @type {(inputs: Confirm_Password_PlaceholderInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`确认新密码`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Confirm new password" |
|
||||
*
|
||||
* @param {Confirm_Password_PlaceholderInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const confirm_password_placeholder = /** @type {((inputs?: Confirm_Password_PlaceholderInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Confirm_Password_PlaceholderInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_confirm_password_placeholder(inputs)
|
||||
return zh_confirm_password_placeholder(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Go to Login" |
|
||||
*
|
||||
* @param {Go_To_LoginInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const go_to_login: ((inputs?: Go_To_LoginInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Go_To_LoginInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Go_To_LoginInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Go_To_LoginInputs */
|
||||
|
||||
const en_go_to_login = /** @type {(inputs: Go_To_LoginInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Go to Login`)
|
||||
};
|
||||
|
||||
const zh_go_to_login = /** @type {(inputs: Go_To_LoginInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`前往登录`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Go to Login" |
|
||||
*
|
||||
* @param {Go_To_LoginInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const go_to_login = /** @type {((inputs?: Go_To_LoginInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Go_To_LoginInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_go_to_login(inputs)
|
||||
return zh_go_to_login(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Invalid or missing reset token." |
|
||||
*
|
||||
* @param {Invalid_Reset_TokenInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const invalid_reset_token: ((inputs?: Invalid_Reset_TokenInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Invalid_Reset_TokenInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Invalid_Reset_TokenInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Invalid_Reset_TokenInputs */
|
||||
|
||||
const en_invalid_reset_token = /** @type {(inputs: Invalid_Reset_TokenInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Invalid or missing reset token.`)
|
||||
};
|
||||
|
||||
const zh_invalid_reset_token = /** @type {(inputs: Invalid_Reset_TokenInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`无效或缺失的重置令牌。`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Invalid or missing reset token." |
|
||||
*
|
||||
* @param {Invalid_Reset_TokenInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const invalid_reset_token = /** @type {((inputs?: Invalid_Reset_TokenInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Invalid_Reset_TokenInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_invalid_reset_token(inputs)
|
||||
return zh_invalid_reset_token(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Please contact your administrator to generate a new password reset link." |
|
||||
*
|
||||
* @param {Invalid_Reset_Token_DescriptionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const invalid_reset_token_description: ((inputs?: Invalid_Reset_Token_DescriptionInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Invalid_Reset_Token_DescriptionInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Invalid_Reset_Token_DescriptionInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Invalid_Reset_Token_DescriptionInputs */
|
||||
|
||||
const en_invalid_reset_token_description = /** @type {(inputs: Invalid_Reset_Token_DescriptionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Please contact your administrator to generate a new password reset link.`)
|
||||
};
|
||||
|
||||
const zh_invalid_reset_token_description = /** @type {(inputs: Invalid_Reset_Token_DescriptionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`请联系管理员生成新的密码重置链接。`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Please contact your administrator to generate a new password reset link." |
|
||||
*
|
||||
* @param {Invalid_Reset_Token_DescriptionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const invalid_reset_token_description = /** @type {((inputs?: Invalid_Reset_Token_DescriptionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Invalid_Reset_Token_DescriptionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_invalid_reset_token_description(inputs)
|
||||
return zh_invalid_reset_token_description(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "New Password" |
|
||||
*
|
||||
* @param {New_PasswordInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const new_password: ((inputs?: New_PasswordInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<New_PasswordInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type New_PasswordInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} New_PasswordInputs */
|
||||
|
||||
const en_new_password = /** @type {(inputs: New_PasswordInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`New Password`)
|
||||
};
|
||||
|
||||
const zh_new_password = /** @type {(inputs: New_PasswordInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`新密码`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "New Password" |
|
||||
*
|
||||
* @param {New_PasswordInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const new_password = /** @type {((inputs?: New_PasswordInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<New_PasswordInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_new_password(inputs)
|
||||
return zh_new_password(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Enter new password" |
|
||||
*
|
||||
* @param {New_Password_PlaceholderInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const new_password_placeholder: ((inputs?: New_Password_PlaceholderInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<New_Password_PlaceholderInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type New_Password_PlaceholderInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} New_Password_PlaceholderInputs */
|
||||
|
||||
const en_new_password_placeholder = /** @type {(inputs: New_Password_PlaceholderInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Enter new password`)
|
||||
};
|
||||
|
||||
const zh_new_password_placeholder = /** @type {(inputs: New_Password_PlaceholderInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`输入新密码`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Enter new password" |
|
||||
*
|
||||
* @param {New_Password_PlaceholderInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const new_password_placeholder = /** @type {((inputs?: New_Password_PlaceholderInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<New_Password_PlaceholderInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_new_password_placeholder(inputs)
|
||||
return zh_new_password_placeholder(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "No recently viewed files" |
|
||||
*
|
||||
* @param {No_Recent_FilesInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const no_recent_files: ((inputs?: No_Recent_FilesInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<No_Recent_FilesInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type No_Recent_FilesInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} No_Recent_FilesInputs */
|
||||
|
||||
const en_no_recent_files = /** @type {(inputs: No_Recent_FilesInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`No recently viewed files`)
|
||||
};
|
||||
|
||||
const zh_no_recent_files = /** @type {(inputs: No_Recent_FilesInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`暂无最近浏览文件`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "No recently viewed files" |
|
||||
*
|
||||
* @param {No_Recent_FilesInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const no_recent_files = /** @type {((inputs?: No_Recent_FilesInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<No_Recent_FilesInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_no_recent_files(inputs)
|
||||
return zh_no_recent_files(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Files you view in this project will appear here." |
|
||||
*
|
||||
* @param {No_Recent_Files_DescriptionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const no_recent_files_description: ((inputs?: No_Recent_Files_DescriptionInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<No_Recent_Files_DescriptionInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type No_Recent_Files_DescriptionInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} No_Recent_Files_DescriptionInputs */
|
||||
|
||||
const en_no_recent_files_description = /** @type {(inputs: No_Recent_Files_DescriptionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Files you view in this project will appear here.`)
|
||||
};
|
||||
|
||||
const zh_no_recent_files_description = /** @type {(inputs: No_Recent_Files_DescriptionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`您在此项目中查看的文件将显示在此处。`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Files you view in this project will appear here." |
|
||||
*
|
||||
* @param {No_Recent_Files_DescriptionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const no_recent_files_description = /** @type {((inputs?: No_Recent_Files_DescriptionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<No_Recent_Files_DescriptionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_no_recent_files_description(inputs)
|
||||
return zh_no_recent_files_description(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Password reset successfully!" |
|
||||
*
|
||||
* @param {Password_Reset_SuccessInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const password_reset_success: ((inputs?: Password_Reset_SuccessInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Password_Reset_SuccessInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Password_Reset_SuccessInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Password_Reset_SuccessInputs */
|
||||
|
||||
const en_password_reset_success = /** @type {(inputs: Password_Reset_SuccessInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Password reset successfully!`)
|
||||
};
|
||||
|
||||
const zh_password_reset_success = /** @type {(inputs: Password_Reset_SuccessInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`密码重置成功!`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Password reset successfully!" |
|
||||
*
|
||||
* @param {Password_Reset_SuccessInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const password_reset_success = /** @type {((inputs?: Password_Reset_SuccessInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Password_Reset_SuccessInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_password_reset_success(inputs)
|
||||
return zh_password_reset_success(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "You will be redirected to the login page shortly." |
|
||||
*
|
||||
* @param {Password_Reset_Success_DescriptionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const password_reset_success_description: ((inputs?: Password_Reset_Success_DescriptionInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Password_Reset_Success_DescriptionInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Password_Reset_Success_DescriptionInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Password_Reset_Success_DescriptionInputs */
|
||||
|
||||
const en_password_reset_success_description = /** @type {(inputs: Password_Reset_Success_DescriptionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`You will be redirected to the login page shortly.`)
|
||||
};
|
||||
|
||||
const zh_password_reset_success_description = /** @type {(inputs: Password_Reset_Success_DescriptionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`您将很快被重定向到登录页面。`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "You will be redirected to the login page shortly." |
|
||||
*
|
||||
* @param {Password_Reset_Success_DescriptionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const password_reset_success_description = /** @type {((inputs?: Password_Reset_Success_DescriptionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Password_Reset_Success_DescriptionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_password_reset_success_description(inputs)
|
||||
return zh_password_reset_success_description(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Passwords do not match" |
|
||||
*
|
||||
* @param {Passwords_Do_Not_MatchInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const passwords_do_not_match: ((inputs?: Passwords_Do_Not_MatchInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Passwords_Do_Not_MatchInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Passwords_Do_Not_MatchInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Passwords_Do_Not_MatchInputs */
|
||||
|
||||
const en_passwords_do_not_match = /** @type {(inputs: Passwords_Do_Not_MatchInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Passwords do not match`)
|
||||
};
|
||||
|
||||
const zh_passwords_do_not_match = /** @type {(inputs: Passwords_Do_Not_MatchInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`两次输入的密码不一致`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Passwords do not match" |
|
||||
*
|
||||
* @param {Passwords_Do_Not_MatchInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const passwords_do_not_match = /** @type {((inputs?: Passwords_Do_Not_MatchInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Passwords_Do_Not_MatchInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_passwords_do_not_match(inputs)
|
||||
return zh_passwords_do_not_match(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Recently Viewed" |
|
||||
*
|
||||
* @param {RecentsInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const recents: ((inputs?: RecentsInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<RecentsInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type RecentsInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} RecentsInputs */
|
||||
|
||||
const en_recents = /** @type {(inputs: RecentsInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Recently Viewed`)
|
||||
};
|
||||
|
||||
const zh_recents = /** @type {(inputs: RecentsInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`最近浏览`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Recently Viewed" |
|
||||
*
|
||||
* @param {RecentsInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const recents = /** @type {((inputs?: RecentsInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<RecentsInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_recents(inputs)
|
||||
return zh_recents(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "This page displays the 100 most recent files you viewed in this project." |
|
||||
*
|
||||
* @param {Recents_Toolbar_HintInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const recents_toolbar_hint: ((inputs?: Recents_Toolbar_HintInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Recents_Toolbar_HintInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Recents_Toolbar_HintInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Recents_Toolbar_HintInputs */
|
||||
|
||||
const en_recents_toolbar_hint = /** @type {(inputs: Recents_Toolbar_HintInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`This page displays the 100 most recent files you viewed in this project.`)
|
||||
};
|
||||
|
||||
const zh_recents_toolbar_hint = /** @type {(inputs: Recents_Toolbar_HintInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`此页面显示您最近在当前项目中查看过的 100 个文件。`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "This page displays the 100 most recent files you viewed in this project." |
|
||||
*
|
||||
* @param {Recents_Toolbar_HintInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const recents_toolbar_hint = /** @type {((inputs?: Recents_Toolbar_HintInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Recents_Toolbar_HintInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_recents_toolbar_hint(inputs)
|
||||
return zh_recents_toolbar_hint(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Reset Password" |
|
||||
*
|
||||
* @param {Reset_PasswordInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const reset_password: ((inputs?: Reset_PasswordInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Reset_PasswordInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Reset_PasswordInputs = {};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user