feat(ui): add collection and share link pages and management actions

This commit is contained in:
yiling
2026-06-06 12:02:51 +08:00
parent 0d76ddfc34
commit 6ebeb3f804
22 changed files with 2052 additions and 69 deletions
+9 -1
View File
@@ -52,6 +52,8 @@ describe('Collection API', () => {
projectId, projectId,
createdAt: new Date(), createdAt: new Date(),
updatedAt: new Date(), updatedAt: new Date(),
creator: null,
creatorId: null,
}) })
const res = await app.request(`/projects/${projectId}/collections`, { const res = await app.request(`/projects/${projectId}/collections`, {
@@ -67,7 +69,7 @@ describe('Collection API', () => {
}) })
expect(res.status).toBe(200) expect(res.status).toBe(200)
expect(mockCreate).toHaveBeenCalledWith(projectId, expect.any(Object)) expect(mockCreate).toHaveBeenCalledWith(projectId, expect.any(Object), 'user-1')
expect(authzService.hasPermission).toHaveBeenCalledWith({ expect(authzService.hasPermission).toHaveBeenCalledWith({
user: expect.any(Object), user: expect.any(Object),
permission: Permission.Edit, permission: Permission.Edit,
@@ -90,6 +92,8 @@ describe('Collection API', () => {
projectId, projectId,
createdAt: new Date(), createdAt: new Date(),
updatedAt: new Date(), updatedAt: new Date(),
creator: null,
creatorId: null,
}, },
], ],
pageInfo: { total: 1 }, pageInfo: { total: 1 },
@@ -121,6 +125,8 @@ describe('Collection API', () => {
projectId, projectId,
createdAt: new Date(), createdAt: new Date(),
updatedAt: new Date(), updatedAt: new Date(),
creator: null,
creatorId: null,
}) })
const res = await app.request(`/collections/${collectionId}`) const res = await app.request(`/collections/${collectionId}`)
@@ -147,6 +153,8 @@ describe('Collection API', () => {
projectId, projectId,
createdAt: new Date(), createdAt: new Date(),
updatedAt: new Date(), updatedAt: new Date(),
creator: null,
creatorId: null,
}) })
const res = await app.request(`/collections/${collectionId}`, { const res = await app.request(`/collections/${collectionId}`, {
+7 -2
View File
@@ -13,7 +13,9 @@ import type { Prisma } from '@shumai/db'
type User = Prisma.UserGetPayload<Record<string, never>> type User = Prisma.UserGetPayload<Record<string, never>>
function toCollectionInfo(c: Prisma.CollectionGetPayload<Record<string, never>>): CollectionInfo { function toCollectionInfo(
c: Prisma.CollectionGetPayload<{ include: { creator: true } }>,
): CollectionInfo {
return { return {
id: c.id, id: c.id,
name: c.name, name: c.name,
@@ -21,6 +23,9 @@ function toCollectionInfo(c: Prisma.CollectionGetPayload<Record<string, never>>)
projectId: c.projectId, projectId: c.projectId,
createdAt: c.createdAt.toISOString(), createdAt: c.createdAt.toISOString(),
updatedAt: c.updatedAt.toISOString(), updatedAt: c.updatedAt.toISOString(),
creator: c.creator
? { id: c.creator.id, name: c.creator.name, image: c.creator.image ?? undefined }
: null,
} }
} }
@@ -40,7 +45,7 @@ const route = new Hono<{ Variables: { user: User } }>()
id: projectId, id: projectId,
}) })
const collection = await collectionService.createCollection(projectId, req) const collection = await collectionService.createCollection(projectId, req, user.id)
return c.json(toCollectionInfo(collection)) return c.json(toCollectionInfo(collection))
}, },
) )
+1 -1
View File
@@ -139,7 +139,7 @@ describe('Share API', () => {
permission: Permission.Edit, permission: Permission.Edit,
}), }),
) )
expect(shareService.createShareLink).toHaveBeenCalledWith('project1', { name: 'My Share' }) expect(shareService.createShareLink).toHaveBeenCalledWith('project1', { name: 'My Share' }, 'user1')
}) })
}) })
+1 -1
View File
@@ -28,7 +28,7 @@ const route = new Hono<{ Variables: { user: User } }>()
id: projectId, id: projectId,
}) })
const shareLink = await shareService.createShareLink(projectId, req) const shareLink = await shareService.createShareLink(projectId, req, user.id)
return c.json(shareLink) return c.json(shareLink)
}, },
) )
+6 -1
View File
@@ -7,14 +7,16 @@ import {
} from '@shumai/dtos' } from '@shumai/dtos'
export class CollectionService { export class CollectionService {
async createCollection(projectId: string, req: CreateCollectionRequest) { async createCollection(projectId: string, req: CreateCollectionRequest, creatorId?: string) {
return await prisma.collection.create({ return await prisma.collection.create({
data: { data: {
name: req.name, name: req.name,
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
filter: req.filter as any, filter: req.filter as any,
projectId, projectId,
creatorId,
}, },
include: { creator: true },
}) })
} }
@@ -26,6 +28,7 @@ export class CollectionService {
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
...(req.filter && { filter: req.filter as any }), ...(req.filter && { filter: req.filter as any }),
}, },
include: { creator: true },
}) })
} }
@@ -38,6 +41,7 @@ export class CollectionService {
async getCollection(collectionId: string) { async getCollection(collectionId: string) {
return await prisma.collection.findUnique({ return await prisma.collection.findUnique({
where: { id: collectionId }, where: { id: collectionId },
include: { creator: true },
}) })
} }
@@ -46,6 +50,7 @@ export class CollectionService {
(skip, take) => (skip, take) =>
prisma.collection.findMany({ prisma.collection.findMany({
where: { projectId }, where: { projectId },
include: { creator: true },
orderBy: { id: 'desc' }, orderBy: { id: 'desc' },
skip, skip,
take, take,
+13 -1
View File
@@ -10,7 +10,11 @@ import {
import { PaginatedData, paginateQuery } from '@shumai/core/src/pagination' import { PaginatedData, paginateQuery } from '@shumai/core/src/pagination'
export class ShareService { export class ShareService {
async createShareLink(projectId: string, req: CreateShareLinkRequest): Promise<ShareLinkInfo> { async createShareLink(
projectId: string,
req: CreateShareLinkRequest,
creatorId?: string,
): Promise<ShareLinkInfo> {
let project = await prisma.project.findUnique({ let project = await prisma.project.findUnique({
where: { id: projectId }, where: { id: projectId },
include: { shareRoot: true }, include: { shareRoot: true },
@@ -55,7 +59,9 @@ export class ShareService {
defaultSortOrder: req.defaultSortOrder, defaultSortOrder: req.defaultSortOrder,
projectId: projectId, projectId: projectId,
rootFolderId: shareFolder.id, rootFolderId: shareFolder.id,
creatorId,
}, },
include: { creator: true },
}) })
return this.toShareLinkInfo(shareLink) return this.toShareLinkInfo(shareLink)
@@ -79,6 +85,7 @@ export class ShareService {
defaultSortOrder: req.defaultSortOrder, defaultSortOrder: req.defaultSortOrder,
fieldVisibility: (req.fieldVisibility as PrismaJson.ShareLinkFieldVisibility) ?? undefined, fieldVisibility: (req.fieldVisibility as PrismaJson.ShareLinkFieldVisibility) ?? undefined,
}, },
include: { creator: true },
}) })
if (req.name) { if (req.name) {
@@ -116,6 +123,7 @@ export class ShareService {
async (skip, take) => { async (skip, take) => {
const links = await prisma.shareLink.findMany({ const links = await prisma.shareLink.findMany({
where, where,
include: { creator: true },
skip, skip,
take, take,
orderBy: { createdAt: 'desc' }, orderBy: { createdAt: 'desc' },
@@ -130,6 +138,7 @@ export class ShareService {
async getShareLink(shareLinkId: string): Promise<ShareLinkInfo> { async getShareLink(shareLinkId: string): Promise<ShareLinkInfo> {
const shareLink = await prisma.shareLink.findUnique({ const shareLink = await prisma.shareLink.findUnique({
where: { id: shareLinkId }, where: { id: shareLinkId },
include: { creator: true },
}) })
if (!shareLink) throw new Error('Share link not found') if (!shareLink) throw new Error('Share link not found')
return this.toShareLinkInfo(shareLink) return this.toShareLinkInfo(shareLink)
@@ -295,6 +304,9 @@ export class ShareService {
isExpired, isExpired,
createdAt: l.createdAt.toISOString(), createdAt: l.createdAt.toISOString(),
updatedAt: l.updatedAt.toISOString(), updatedAt: l.updatedAt.toISOString(),
creator: l.creator
? { id: l.creator.id, name: l.creator.name, image: l.creator.image ?? undefined }
: null,
} }
} }
} }
@@ -0,0 +1,11 @@
-- AlterTable
ALTER TABLE "collections" ADD COLUMN "creator_id" TEXT;
-- AlterTable
ALTER TABLE "share_links" ADD COLUMN "creator_id" TEXT;
-- AddForeignKey
ALTER TABLE "share_links" ADD CONSTRAINT "share_links_creator_id_fkey" FOREIGN KEY ("creator_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "collections" ADD CONSTRAINT "collections_creator_id_fkey" FOREIGN KEY ("creator_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
+8
View File
@@ -145,6 +145,8 @@ model User {
agent Agent? agent Agent?
agentSessions AgentSession[] agentSessions AgentSession[]
userMetadata UserMetadata[] @relation("UserToUserMetadata") userMetadata UserMetadata[] @relation("UserToUserMetadata")
collections Collection[] @relation("UserToCollection")
shareLinks ShareLink[] @relation("UserToShareLink")
@@map("users") @@map("users")
} }
@@ -346,6 +348,9 @@ model ShareLink {
rootFolderId String @unique @map("root_folder_id") rootFolderId String @unique @map("root_folder_id")
rootFolder Asset @relation("ShareLinkToRootFolder", fields: [rootFolderId], references: [id]) rootFolder Asset @relation("ShareLinkToRootFolder", fields: [rootFolderId], references: [id])
creatorId String? @map("creator_id")
creator User? @relation("UserToShareLink", fields: [creatorId], references: [id])
@@map("share_links") @@map("share_links")
} }
@@ -765,6 +770,9 @@ model Collection {
projectId String @map("project_id") projectId String @map("project_id")
project Project @relation("ProjectToCollection", fields: [projectId], references: [id], onDelete: Cascade) project Project @relation("ProjectToCollection", fields: [projectId], references: [id], onDelete: Cascade)
creatorId String? @map("creator_id")
creator User? @relation("UserToCollection", fields: [creatorId], references: [id])
@@index([projectId, createdAt(sort: Desc)]) @@index([projectId, createdAt(sort: Desc)])
@@map("collections") @@map("collections")
} }
File diff suppressed because one or more lines are too long
@@ -3042,6 +3042,7 @@ export const ShareLinkScalarFieldEnum = {
updatedAt: 'updatedAt', updatedAt: 'updatedAt',
projectId: 'projectId', projectId: 'projectId',
rootFolderId: 'rootFolderId', rootFolderId: 'rootFolderId',
creatorId: 'creatorId',
} as const } as const
export type ShareLinkScalarFieldEnum = export type ShareLinkScalarFieldEnum =
@@ -3324,6 +3325,7 @@ export const CollectionScalarFieldEnum = {
createdAt: 'createdAt', createdAt: 'createdAt',
updatedAt: 'updatedAt', updatedAt: 'updatedAt',
projectId: 'projectId', projectId: 'projectId',
creatorId: 'creatorId',
} as const } as const
export type CollectionScalarFieldEnum = export type CollectionScalarFieldEnum =
@@ -257,6 +257,7 @@ export const ShareLinkScalarFieldEnum = {
updatedAt: 'updatedAt', updatedAt: 'updatedAt',
projectId: 'projectId', projectId: 'projectId',
rootFolderId: 'rootFolderId', rootFolderId: 'rootFolderId',
creatorId: 'creatorId',
} as const } as const
export type ShareLinkScalarFieldEnum = export type ShareLinkScalarFieldEnum =
@@ -539,6 +540,7 @@ export const CollectionScalarFieldEnum = {
createdAt: 'createdAt', createdAt: 'createdAt',
updatedAt: 'updatedAt', updatedAt: 'updatedAt',
projectId: 'projectId', projectId: 'projectId',
creatorId: 'creatorId',
} as const } as const
export type CollectionScalarFieldEnum = export type CollectionScalarFieldEnum =
@@ -31,6 +31,7 @@ export type CollectionMinAggregateOutputType = {
createdAt: Date | null createdAt: Date | null
updatedAt: Date | null updatedAt: Date | null
projectId: string | null projectId: string | null
creatorId: string | null
} }
export type CollectionMaxAggregateOutputType = { export type CollectionMaxAggregateOutputType = {
@@ -39,6 +40,7 @@ export type CollectionMaxAggregateOutputType = {
createdAt: Date | null createdAt: Date | null
updatedAt: Date | null updatedAt: Date | null
projectId: string | null projectId: string | null
creatorId: string | null
} }
export type CollectionCountAggregateOutputType = { export type CollectionCountAggregateOutputType = {
@@ -48,6 +50,7 @@ export type CollectionCountAggregateOutputType = {
createdAt: number createdAt: number
updatedAt: number updatedAt: number
projectId: number projectId: number
creatorId: number
_all: number _all: number
} }
@@ -57,6 +60,7 @@ export type CollectionMinAggregateInputType = {
createdAt?: true createdAt?: true
updatedAt?: true updatedAt?: true
projectId?: true projectId?: true
creatorId?: true
} }
export type CollectionMaxAggregateInputType = { export type CollectionMaxAggregateInputType = {
@@ -65,6 +69,7 @@ export type CollectionMaxAggregateInputType = {
createdAt?: true createdAt?: true
updatedAt?: true updatedAt?: true
projectId?: true projectId?: true
creatorId?: true
} }
export type CollectionCountAggregateInputType = { export type CollectionCountAggregateInputType = {
@@ -74,6 +79,7 @@ export type CollectionCountAggregateInputType = {
createdAt?: true createdAt?: true
updatedAt?: true updatedAt?: true
projectId?: true projectId?: true
creatorId?: true
_all?: true _all?: true
} }
@@ -159,6 +165,7 @@ export type CollectionGroupByOutputType = {
createdAt: Date createdAt: Date
updatedAt: Date updatedAt: Date
projectId: string projectId: string
creatorId: string | null
_count: CollectionCountAggregateOutputType | null _count: CollectionCountAggregateOutputType | null
_min: CollectionMinAggregateOutputType | null _min: CollectionMinAggregateOutputType | null
_max: CollectionMaxAggregateOutputType | null _max: CollectionMaxAggregateOutputType | null
@@ -186,7 +193,9 @@ export type CollectionWhereInput = {
createdAt?: Prisma.DateTimeFilter<'Collection'> | Date | string createdAt?: Prisma.DateTimeFilter<'Collection'> | Date | string
updatedAt?: Prisma.DateTimeFilter<'Collection'> | Date | string updatedAt?: Prisma.DateTimeFilter<'Collection'> | Date | string
projectId?: Prisma.StringFilter<'Collection'> | string projectId?: Prisma.StringFilter<'Collection'> | string
creatorId?: Prisma.StringNullableFilter<'Collection'> | string | null
project?: Prisma.XOR<Prisma.ProjectScalarRelationFilter, Prisma.ProjectWhereInput> project?: Prisma.XOR<Prisma.ProjectScalarRelationFilter, Prisma.ProjectWhereInput>
creator?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
} }
export type CollectionOrderByWithRelationInput = { export type CollectionOrderByWithRelationInput = {
@@ -196,7 +205,9 @@ export type CollectionOrderByWithRelationInput = {
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
projectId?: Prisma.SortOrder projectId?: Prisma.SortOrder
creatorId?: Prisma.SortOrderInput | Prisma.SortOrder
project?: Prisma.ProjectOrderByWithRelationInput project?: Prisma.ProjectOrderByWithRelationInput
creator?: Prisma.UserOrderByWithRelationInput
} }
export type CollectionWhereUniqueInput = Prisma.AtLeast< export type CollectionWhereUniqueInput = Prisma.AtLeast<
@@ -210,7 +221,9 @@ export type CollectionWhereUniqueInput = Prisma.AtLeast<
createdAt?: Prisma.DateTimeFilter<'Collection'> | Date | string createdAt?: Prisma.DateTimeFilter<'Collection'> | Date | string
updatedAt?: Prisma.DateTimeFilter<'Collection'> | Date | string updatedAt?: Prisma.DateTimeFilter<'Collection'> | Date | string
projectId?: Prisma.StringFilter<'Collection'> | string projectId?: Prisma.StringFilter<'Collection'> | string
creatorId?: Prisma.StringNullableFilter<'Collection'> | string | null
project?: Prisma.XOR<Prisma.ProjectScalarRelationFilter, Prisma.ProjectWhereInput> project?: Prisma.XOR<Prisma.ProjectScalarRelationFilter, Prisma.ProjectWhereInput>
creator?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
}, },
'id' 'id'
> >
@@ -222,6 +235,7 @@ export type CollectionOrderByWithAggregationInput = {
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
projectId?: Prisma.SortOrder projectId?: Prisma.SortOrder
creatorId?: Prisma.SortOrderInput | Prisma.SortOrder
_count?: Prisma.CollectionCountOrderByAggregateInput _count?: Prisma.CollectionCountOrderByAggregateInput
_max?: Prisma.CollectionMaxOrderByAggregateInput _max?: Prisma.CollectionMaxOrderByAggregateInput
_min?: Prisma.CollectionMinOrderByAggregateInput _min?: Prisma.CollectionMinOrderByAggregateInput
@@ -241,6 +255,7 @@ export type CollectionScalarWhereWithAggregatesInput = {
createdAt?: Prisma.DateTimeWithAggregatesFilter<'Collection'> | Date | string createdAt?: Prisma.DateTimeWithAggregatesFilter<'Collection'> | Date | string
updatedAt?: Prisma.DateTimeWithAggregatesFilter<'Collection'> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<'Collection'> | Date | string
projectId?: Prisma.StringWithAggregatesFilter<'Collection'> | string projectId?: Prisma.StringWithAggregatesFilter<'Collection'> | string
creatorId?: Prisma.StringNullableWithAggregatesFilter<'Collection'> | string | null
} }
export type CollectionCreateInput = { export type CollectionCreateInput = {
@@ -250,6 +265,7 @@ export type CollectionCreateInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
project: Prisma.ProjectCreateNestedOneWithoutCollectionsInput project: Prisma.ProjectCreateNestedOneWithoutCollectionsInput
creator?: Prisma.UserCreateNestedOneWithoutCollectionsInput
} }
export type CollectionUncheckedCreateInput = { export type CollectionUncheckedCreateInput = {
@@ -259,6 +275,7 @@ export type CollectionUncheckedCreateInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
projectId: string projectId: string
creatorId?: string | null
} }
export type CollectionUpdateInput = { export type CollectionUpdateInput = {
@@ -268,6 +285,7 @@ export type CollectionUpdateInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
project?: Prisma.ProjectUpdateOneRequiredWithoutCollectionsNestedInput project?: Prisma.ProjectUpdateOneRequiredWithoutCollectionsNestedInput
creator?: Prisma.UserUpdateOneWithoutCollectionsNestedInput
} }
export type CollectionUncheckedUpdateInput = { export type CollectionUncheckedUpdateInput = {
@@ -277,6 +295,7 @@ export type CollectionUncheckedUpdateInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
projectId?: Prisma.StringFieldUpdateOperationsInput | string projectId?: Prisma.StringFieldUpdateOperationsInput | string
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
} }
export type CollectionCreateManyInput = { export type CollectionCreateManyInput = {
@@ -286,6 +305,7 @@ export type CollectionCreateManyInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
projectId: string projectId: string
creatorId?: string | null
} }
export type CollectionUpdateManyMutationInput = { export type CollectionUpdateManyMutationInput = {
@@ -303,6 +323,7 @@ export type CollectionUncheckedUpdateManyInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
projectId?: Prisma.StringFieldUpdateOperationsInput | string projectId?: Prisma.StringFieldUpdateOperationsInput | string
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
} }
export type CollectionListRelationFilter = { export type CollectionListRelationFilter = {
@@ -322,6 +343,7 @@ export type CollectionCountOrderByAggregateInput = {
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
projectId?: Prisma.SortOrder projectId?: Prisma.SortOrder
creatorId?: Prisma.SortOrder
} }
export type CollectionMaxOrderByAggregateInput = { export type CollectionMaxOrderByAggregateInput = {
@@ -330,6 +352,7 @@ export type CollectionMaxOrderByAggregateInput = {
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
projectId?: Prisma.SortOrder projectId?: Prisma.SortOrder
creatorId?: Prisma.SortOrder
} }
export type CollectionMinOrderByAggregateInput = { export type CollectionMinOrderByAggregateInput = {
@@ -338,6 +361,93 @@ export type CollectionMinOrderByAggregateInput = {
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
projectId?: Prisma.SortOrder projectId?: Prisma.SortOrder
creatorId?: Prisma.SortOrder
}
export type CollectionCreateNestedManyWithoutCreatorInput = {
create?:
| Prisma.XOR<
Prisma.CollectionCreateWithoutCreatorInput,
Prisma.CollectionUncheckedCreateWithoutCreatorInput
>
| Prisma.CollectionCreateWithoutCreatorInput[]
| Prisma.CollectionUncheckedCreateWithoutCreatorInput[]
connectOrCreate?:
| Prisma.CollectionCreateOrConnectWithoutCreatorInput
| Prisma.CollectionCreateOrConnectWithoutCreatorInput[]
createMany?: Prisma.CollectionCreateManyCreatorInputEnvelope
connect?: Prisma.CollectionWhereUniqueInput | Prisma.CollectionWhereUniqueInput[]
}
export type CollectionUncheckedCreateNestedManyWithoutCreatorInput = {
create?:
| Prisma.XOR<
Prisma.CollectionCreateWithoutCreatorInput,
Prisma.CollectionUncheckedCreateWithoutCreatorInput
>
| Prisma.CollectionCreateWithoutCreatorInput[]
| Prisma.CollectionUncheckedCreateWithoutCreatorInput[]
connectOrCreate?:
| Prisma.CollectionCreateOrConnectWithoutCreatorInput
| Prisma.CollectionCreateOrConnectWithoutCreatorInput[]
createMany?: Prisma.CollectionCreateManyCreatorInputEnvelope
connect?: Prisma.CollectionWhereUniqueInput | Prisma.CollectionWhereUniqueInput[]
}
export type CollectionUpdateManyWithoutCreatorNestedInput = {
create?:
| Prisma.XOR<
Prisma.CollectionCreateWithoutCreatorInput,
Prisma.CollectionUncheckedCreateWithoutCreatorInput
>
| Prisma.CollectionCreateWithoutCreatorInput[]
| Prisma.CollectionUncheckedCreateWithoutCreatorInput[]
connectOrCreate?:
| Prisma.CollectionCreateOrConnectWithoutCreatorInput
| Prisma.CollectionCreateOrConnectWithoutCreatorInput[]
upsert?:
| Prisma.CollectionUpsertWithWhereUniqueWithoutCreatorInput
| Prisma.CollectionUpsertWithWhereUniqueWithoutCreatorInput[]
createMany?: Prisma.CollectionCreateManyCreatorInputEnvelope
set?: Prisma.CollectionWhereUniqueInput | Prisma.CollectionWhereUniqueInput[]
disconnect?: Prisma.CollectionWhereUniqueInput | Prisma.CollectionWhereUniqueInput[]
delete?: Prisma.CollectionWhereUniqueInput | Prisma.CollectionWhereUniqueInput[]
connect?: Prisma.CollectionWhereUniqueInput | Prisma.CollectionWhereUniqueInput[]
update?:
| Prisma.CollectionUpdateWithWhereUniqueWithoutCreatorInput
| Prisma.CollectionUpdateWithWhereUniqueWithoutCreatorInput[]
updateMany?:
| Prisma.CollectionUpdateManyWithWhereWithoutCreatorInput
| Prisma.CollectionUpdateManyWithWhereWithoutCreatorInput[]
deleteMany?: Prisma.CollectionScalarWhereInput | Prisma.CollectionScalarWhereInput[]
}
export type CollectionUncheckedUpdateManyWithoutCreatorNestedInput = {
create?:
| Prisma.XOR<
Prisma.CollectionCreateWithoutCreatorInput,
Prisma.CollectionUncheckedCreateWithoutCreatorInput
>
| Prisma.CollectionCreateWithoutCreatorInput[]
| Prisma.CollectionUncheckedCreateWithoutCreatorInput[]
connectOrCreate?:
| Prisma.CollectionCreateOrConnectWithoutCreatorInput
| Prisma.CollectionCreateOrConnectWithoutCreatorInput[]
upsert?:
| Prisma.CollectionUpsertWithWhereUniqueWithoutCreatorInput
| Prisma.CollectionUpsertWithWhereUniqueWithoutCreatorInput[]
createMany?: Prisma.CollectionCreateManyCreatorInputEnvelope
set?: Prisma.CollectionWhereUniqueInput | Prisma.CollectionWhereUniqueInput[]
disconnect?: Prisma.CollectionWhereUniqueInput | Prisma.CollectionWhereUniqueInput[]
delete?: Prisma.CollectionWhereUniqueInput | Prisma.CollectionWhereUniqueInput[]
connect?: Prisma.CollectionWhereUniqueInput | Prisma.CollectionWhereUniqueInput[]
update?:
| Prisma.CollectionUpdateWithWhereUniqueWithoutCreatorInput
| Prisma.CollectionUpdateWithWhereUniqueWithoutCreatorInput[]
updateMany?:
| Prisma.CollectionUpdateManyWithWhereWithoutCreatorInput
| Prisma.CollectionUpdateManyWithWhereWithoutCreatorInput[]
deleteMany?: Prisma.CollectionScalarWhereInput | Prisma.CollectionScalarWhereInput[]
} }
export type CollectionCreateNestedManyWithoutProjectInput = { export type CollectionCreateNestedManyWithoutProjectInput = {
@@ -426,12 +536,85 @@ export type CollectionUncheckedUpdateManyWithoutProjectNestedInput = {
deleteMany?: Prisma.CollectionScalarWhereInput | Prisma.CollectionScalarWhereInput[] deleteMany?: Prisma.CollectionScalarWhereInput | Prisma.CollectionScalarWhereInput[]
} }
export type CollectionCreateWithoutCreatorInput = {
id?: string
name: string
filter: PrismaJson.CollectionFilter
createdAt?: Date | string
updatedAt?: Date | string
project: Prisma.ProjectCreateNestedOneWithoutCollectionsInput
}
export type CollectionUncheckedCreateWithoutCreatorInput = {
id?: string
name: string
filter: PrismaJson.CollectionFilter
createdAt?: Date | string
updatedAt?: Date | string
projectId: string
}
export type CollectionCreateOrConnectWithoutCreatorInput = {
where: Prisma.CollectionWhereUniqueInput
create: Prisma.XOR<
Prisma.CollectionCreateWithoutCreatorInput,
Prisma.CollectionUncheckedCreateWithoutCreatorInput
>
}
export type CollectionCreateManyCreatorInputEnvelope = {
data: Prisma.CollectionCreateManyCreatorInput | Prisma.CollectionCreateManyCreatorInput[]
skipDuplicates?: boolean
}
export type CollectionUpsertWithWhereUniqueWithoutCreatorInput = {
where: Prisma.CollectionWhereUniqueInput
update: Prisma.XOR<
Prisma.CollectionUpdateWithoutCreatorInput,
Prisma.CollectionUncheckedUpdateWithoutCreatorInput
>
create: Prisma.XOR<
Prisma.CollectionCreateWithoutCreatorInput,
Prisma.CollectionUncheckedCreateWithoutCreatorInput
>
}
export type CollectionUpdateWithWhereUniqueWithoutCreatorInput = {
where: Prisma.CollectionWhereUniqueInput
data: Prisma.XOR<
Prisma.CollectionUpdateWithoutCreatorInput,
Prisma.CollectionUncheckedUpdateWithoutCreatorInput
>
}
export type CollectionUpdateManyWithWhereWithoutCreatorInput = {
where: Prisma.CollectionScalarWhereInput
data: Prisma.XOR<
Prisma.CollectionUpdateManyMutationInput,
Prisma.CollectionUncheckedUpdateManyWithoutCreatorInput
>
}
export type CollectionScalarWhereInput = {
AND?: Prisma.CollectionScalarWhereInput | Prisma.CollectionScalarWhereInput[]
OR?: Prisma.CollectionScalarWhereInput[]
NOT?: Prisma.CollectionScalarWhereInput | Prisma.CollectionScalarWhereInput[]
id?: Prisma.StringFilter<'Collection'> | string
name?: Prisma.StringFilter<'Collection'> | string
filter?: Prisma.JsonFilter<'Collection'>
createdAt?: Prisma.DateTimeFilter<'Collection'> | Date | string
updatedAt?: Prisma.DateTimeFilter<'Collection'> | Date | string
projectId?: Prisma.StringFilter<'Collection'> | string
creatorId?: Prisma.StringNullableFilter<'Collection'> | string | null
}
export type CollectionCreateWithoutProjectInput = { export type CollectionCreateWithoutProjectInput = {
id?: string id?: string
name: string name: string
filter: PrismaJson.CollectionFilter filter: PrismaJson.CollectionFilter
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
creator?: Prisma.UserCreateNestedOneWithoutCollectionsInput
} }
export type CollectionUncheckedCreateWithoutProjectInput = { export type CollectionUncheckedCreateWithoutProjectInput = {
@@ -440,6 +623,7 @@ export type CollectionUncheckedCreateWithoutProjectInput = {
filter: PrismaJson.CollectionFilter filter: PrismaJson.CollectionFilter
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
creatorId?: string | null
} }
export type CollectionCreateOrConnectWithoutProjectInput = { export type CollectionCreateOrConnectWithoutProjectInput = {
@@ -483,16 +667,40 @@ export type CollectionUpdateManyWithWhereWithoutProjectInput = {
> >
} }
export type CollectionScalarWhereInput = { export type CollectionCreateManyCreatorInput = {
AND?: Prisma.CollectionScalarWhereInput | Prisma.CollectionScalarWhereInput[] id?: string
OR?: Prisma.CollectionScalarWhereInput[] name: string
NOT?: Prisma.CollectionScalarWhereInput | Prisma.CollectionScalarWhereInput[] filter: PrismaJson.CollectionFilter
id?: Prisma.StringFilter<'Collection'> | string createdAt?: Date | string
name?: Prisma.StringFilter<'Collection'> | string updatedAt?: Date | string
filter?: Prisma.JsonFilter<'Collection'> projectId: string
createdAt?: Prisma.DateTimeFilter<'Collection'> | Date | string }
updatedAt?: Prisma.DateTimeFilter<'Collection'> | Date | string
projectId?: Prisma.StringFilter<'Collection'> | string export type CollectionUpdateWithoutCreatorInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
name?: Prisma.StringFieldUpdateOperationsInput | string
filter?: PrismaJson.CollectionFilter
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
project?: Prisma.ProjectUpdateOneRequiredWithoutCollectionsNestedInput
}
export type CollectionUncheckedUpdateWithoutCreatorInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
name?: Prisma.StringFieldUpdateOperationsInput | string
filter?: PrismaJson.CollectionFilter
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
projectId?: Prisma.StringFieldUpdateOperationsInput | string
}
export type CollectionUncheckedUpdateManyWithoutCreatorInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
name?: Prisma.StringFieldUpdateOperationsInput | string
filter?: PrismaJson.CollectionFilter
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
projectId?: Prisma.StringFieldUpdateOperationsInput | string
} }
export type CollectionCreateManyProjectInput = { export type CollectionCreateManyProjectInput = {
@@ -501,6 +709,7 @@ export type CollectionCreateManyProjectInput = {
filter: PrismaJson.CollectionFilter filter: PrismaJson.CollectionFilter
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
creatorId?: string | null
} }
export type CollectionUpdateWithoutProjectInput = { export type CollectionUpdateWithoutProjectInput = {
@@ -509,6 +718,7 @@ export type CollectionUpdateWithoutProjectInput = {
filter?: PrismaJson.CollectionFilter filter?: PrismaJson.CollectionFilter
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
creator?: Prisma.UserUpdateOneWithoutCollectionsNestedInput
} }
export type CollectionUncheckedUpdateWithoutProjectInput = { export type CollectionUncheckedUpdateWithoutProjectInput = {
@@ -517,6 +727,7 @@ export type CollectionUncheckedUpdateWithoutProjectInput = {
filter?: PrismaJson.CollectionFilter filter?: PrismaJson.CollectionFilter
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
} }
export type CollectionUncheckedUpdateManyWithoutProjectInput = { export type CollectionUncheckedUpdateManyWithoutProjectInput = {
@@ -525,6 +736,7 @@ export type CollectionUncheckedUpdateManyWithoutProjectInput = {
filter?: PrismaJson.CollectionFilter filter?: PrismaJson.CollectionFilter
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
} }
export type CollectionSelect< export type CollectionSelect<
@@ -537,7 +749,9 @@ export type CollectionSelect<
createdAt?: boolean createdAt?: boolean
updatedAt?: boolean updatedAt?: boolean
projectId?: boolean projectId?: boolean
creatorId?: boolean
project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs> project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs>
creator?: boolean | Prisma.Collection$creatorArgs<ExtArgs>
}, },
ExtArgs['result']['collection'] ExtArgs['result']['collection']
> >
@@ -552,7 +766,9 @@ export type CollectionSelectCreateManyAndReturn<
createdAt?: boolean createdAt?: boolean
updatedAt?: boolean updatedAt?: boolean
projectId?: boolean projectId?: boolean
creatorId?: boolean
project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs> project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs>
creator?: boolean | Prisma.Collection$creatorArgs<ExtArgs>
}, },
ExtArgs['result']['collection'] ExtArgs['result']['collection']
> >
@@ -567,7 +783,9 @@ export type CollectionSelectUpdateManyAndReturn<
createdAt?: boolean createdAt?: boolean
updatedAt?: boolean updatedAt?: boolean
projectId?: boolean projectId?: boolean
creatorId?: boolean
project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs> project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs>
creator?: boolean | Prisma.Collection$creatorArgs<ExtArgs>
}, },
ExtArgs['result']['collection'] ExtArgs['result']['collection']
> >
@@ -579,28 +797,32 @@ export type CollectionSelectScalar = {
createdAt?: boolean createdAt?: boolean
updatedAt?: boolean updatedAt?: boolean
projectId?: boolean projectId?: boolean
creatorId?: boolean
} }
export type CollectionOmit< export type CollectionOmit<
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = runtime.Types.Extensions.GetOmit< > = runtime.Types.Extensions.GetOmit<
'id' | 'name' | 'filter' | 'createdAt' | 'updatedAt' | 'projectId', 'id' | 'name' | 'filter' | 'createdAt' | 'updatedAt' | 'projectId' | 'creatorId',
ExtArgs['result']['collection'] ExtArgs['result']['collection']
> >
export type CollectionInclude< export type CollectionInclude<
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = { > = {
project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs> project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs>
creator?: boolean | Prisma.Collection$creatorArgs<ExtArgs>
} }
export type CollectionIncludeCreateManyAndReturn< export type CollectionIncludeCreateManyAndReturn<
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = { > = {
project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs> project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs>
creator?: boolean | Prisma.Collection$creatorArgs<ExtArgs>
} }
export type CollectionIncludeUpdateManyAndReturn< export type CollectionIncludeUpdateManyAndReturn<
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = { > = {
project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs> project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs>
creator?: boolean | Prisma.Collection$creatorArgs<ExtArgs>
} }
export type $CollectionPayload< export type $CollectionPayload<
@@ -609,6 +831,7 @@ export type $CollectionPayload<
name: 'Collection' name: 'Collection'
objects: { objects: {
project: Prisma.$ProjectPayload<ExtArgs> project: Prisma.$ProjectPayload<ExtArgs>
creator: Prisma.$UserPayload<ExtArgs> | null
} }
scalars: runtime.Types.Extensions.GetPayloadResult< scalars: runtime.Types.Extensions.GetPayloadResult<
{ {
@@ -621,6 +844,7 @@ export type $CollectionPayload<
createdAt: Date createdAt: Date
updatedAt: Date updatedAt: Date
projectId: string projectId: string
creatorId: string | null
}, },
ExtArgs['result']['collection'] ExtArgs['result']['collection']
> >
@@ -1173,6 +1397,19 @@ export interface Prisma__CollectionClient<
ExtArgs, ExtArgs,
GlobalOmitOptions GlobalOmitOptions
> >
creator<T extends Prisma.Collection$creatorArgs<ExtArgs> = {}>(
args?: Prisma.Subset<T, Prisma.Collection$creatorArgs<ExtArgs>>,
): Prisma.Prisma__UserClient<
runtime.Types.Result.GetResult<
Prisma.$UserPayload<ExtArgs>,
T,
'findUniqueOrThrow',
GlobalOmitOptions
> | null,
null,
ExtArgs,
GlobalOmitOptions
>
/** /**
* Attaches callbacks for the resolution and/or rejection of the Promise. * Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved. * @param onfulfilled The callback to execute when the Promise is resolved.
@@ -1210,6 +1447,7 @@ export interface CollectionFieldRefs {
readonly createdAt: Prisma.FieldRef<'Collection', 'DateTime'> readonly createdAt: Prisma.FieldRef<'Collection', 'DateTime'>
readonly updatedAt: Prisma.FieldRef<'Collection', 'DateTime'> readonly updatedAt: Prisma.FieldRef<'Collection', 'DateTime'>
readonly projectId: Prisma.FieldRef<'Collection', 'String'> readonly projectId: Prisma.FieldRef<'Collection', 'String'>
readonly creatorId: Prisma.FieldRef<'Collection', 'String'>
} }
// Custom InputTypes // Custom InputTypes
@@ -1643,6 +1881,27 @@ export type CollectionDeleteManyArgs<
limit?: number limit?: number
} }
/**
* Collection.creator
*/
export type Collection$creatorArgs<
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
/**
* Select specific fields to fetch from the User
*/
select?: Prisma.UserSelect<ExtArgs> | null
/**
* Omit specific fields from the User
*/
omit?: Prisma.UserOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.UserInclude<ExtArgs> | null
where?: Prisma.UserWhereInput
}
/** /**
* Collection without action * Collection without action
*/ */
@@ -36,6 +36,7 @@ export type ShareLinkMinAggregateOutputType = {
updatedAt: Date | null updatedAt: Date | null
projectId: string | null projectId: string | null
rootFolderId: string | null rootFolderId: string | null
creatorId: string | null
} }
export type ShareLinkMaxAggregateOutputType = { export type ShareLinkMaxAggregateOutputType = {
@@ -49,6 +50,7 @@ export type ShareLinkMaxAggregateOutputType = {
updatedAt: Date | null updatedAt: Date | null
projectId: string | null projectId: string | null
rootFolderId: string | null rootFolderId: string | null
creatorId: string | null
} }
export type ShareLinkCountAggregateOutputType = { export type ShareLinkCountAggregateOutputType = {
@@ -63,6 +65,7 @@ export type ShareLinkCountAggregateOutputType = {
updatedAt: number updatedAt: number
projectId: number projectId: number
rootFolderId: number rootFolderId: number
creatorId: number
_all: number _all: number
} }
@@ -77,6 +80,7 @@ export type ShareLinkMinAggregateInputType = {
updatedAt?: true updatedAt?: true
projectId?: true projectId?: true
rootFolderId?: true rootFolderId?: true
creatorId?: true
} }
export type ShareLinkMaxAggregateInputType = { export type ShareLinkMaxAggregateInputType = {
@@ -90,6 +94,7 @@ export type ShareLinkMaxAggregateInputType = {
updatedAt?: true updatedAt?: true
projectId?: true projectId?: true
rootFolderId?: true rootFolderId?: true
creatorId?: true
} }
export type ShareLinkCountAggregateInputType = { export type ShareLinkCountAggregateInputType = {
@@ -104,6 +109,7 @@ export type ShareLinkCountAggregateInputType = {
updatedAt?: true updatedAt?: true
projectId?: true projectId?: true
rootFolderId?: true rootFolderId?: true
creatorId?: true
_all?: true _all?: true
} }
@@ -194,6 +200,7 @@ export type ShareLinkGroupByOutputType = {
updatedAt: Date updatedAt: Date
projectId: string projectId: string
rootFolderId: string rootFolderId: string
creatorId: string | null
_count: ShareLinkCountAggregateOutputType | null _count: ShareLinkCountAggregateOutputType | null
_min: ShareLinkMinAggregateOutputType | null _min: ShareLinkMinAggregateOutputType | null
_max: ShareLinkMaxAggregateOutputType | null _max: ShareLinkMaxAggregateOutputType | null
@@ -226,8 +233,10 @@ export type ShareLinkWhereInput = {
updatedAt?: Prisma.DateTimeFilter<'ShareLink'> | Date | string updatedAt?: Prisma.DateTimeFilter<'ShareLink'> | Date | string
projectId?: Prisma.StringFilter<'ShareLink'> | string projectId?: Prisma.StringFilter<'ShareLink'> | string
rootFolderId?: Prisma.StringFilter<'ShareLink'> | string rootFolderId?: Prisma.StringFilter<'ShareLink'> | string
creatorId?: Prisma.StringNullableFilter<'ShareLink'> | string | null
project?: Prisma.XOR<Prisma.ProjectScalarRelationFilter, Prisma.ProjectWhereInput> project?: Prisma.XOR<Prisma.ProjectScalarRelationFilter, Prisma.ProjectWhereInput>
rootFolder?: Prisma.XOR<Prisma.AssetScalarRelationFilter, Prisma.AssetWhereInput> rootFolder?: Prisma.XOR<Prisma.AssetScalarRelationFilter, Prisma.AssetWhereInput>
creator?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
} }
export type ShareLinkOrderByWithRelationInput = { export type ShareLinkOrderByWithRelationInput = {
@@ -242,8 +251,10 @@ export type ShareLinkOrderByWithRelationInput = {
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
projectId?: Prisma.SortOrder projectId?: Prisma.SortOrder
rootFolderId?: Prisma.SortOrder rootFolderId?: Prisma.SortOrder
creatorId?: Prisma.SortOrderInput | Prisma.SortOrder
project?: Prisma.ProjectOrderByWithRelationInput project?: Prisma.ProjectOrderByWithRelationInput
rootFolder?: Prisma.AssetOrderByWithRelationInput rootFolder?: Prisma.AssetOrderByWithRelationInput
creator?: Prisma.UserOrderByWithRelationInput
} }
export type ShareLinkWhereUniqueInput = Prisma.AtLeast< export type ShareLinkWhereUniqueInput = Prisma.AtLeast<
@@ -262,8 +273,10 @@ export type ShareLinkWhereUniqueInput = Prisma.AtLeast<
createdAt?: Prisma.DateTimeFilter<'ShareLink'> | Date | string createdAt?: Prisma.DateTimeFilter<'ShareLink'> | Date | string
updatedAt?: Prisma.DateTimeFilter<'ShareLink'> | Date | string updatedAt?: Prisma.DateTimeFilter<'ShareLink'> | Date | string
projectId?: Prisma.StringFilter<'ShareLink'> | string projectId?: Prisma.StringFilter<'ShareLink'> | string
creatorId?: Prisma.StringNullableFilter<'ShareLink'> | string | null
project?: Prisma.XOR<Prisma.ProjectScalarRelationFilter, Prisma.ProjectWhereInput> project?: Prisma.XOR<Prisma.ProjectScalarRelationFilter, Prisma.ProjectWhereInput>
rootFolder?: Prisma.XOR<Prisma.AssetScalarRelationFilter, Prisma.AssetWhereInput> rootFolder?: Prisma.XOR<Prisma.AssetScalarRelationFilter, Prisma.AssetWhereInput>
creator?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
}, },
'id' | 'rootFolderId' 'id' | 'rootFolderId'
> >
@@ -280,6 +293,7 @@ export type ShareLinkOrderByWithAggregationInput = {
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
projectId?: Prisma.SortOrder projectId?: Prisma.SortOrder
rootFolderId?: Prisma.SortOrder rootFolderId?: Prisma.SortOrder
creatorId?: Prisma.SortOrderInput | Prisma.SortOrder
_count?: Prisma.ShareLinkCountOrderByAggregateInput _count?: Prisma.ShareLinkCountOrderByAggregateInput
_max?: Prisma.ShareLinkMaxOrderByAggregateInput _max?: Prisma.ShareLinkMaxOrderByAggregateInput
_min?: Prisma.ShareLinkMinOrderByAggregateInput _min?: Prisma.ShareLinkMinOrderByAggregateInput
@@ -304,6 +318,7 @@ export type ShareLinkScalarWhereWithAggregatesInput = {
updatedAt?: Prisma.DateTimeWithAggregatesFilter<'ShareLink'> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<'ShareLink'> | Date | string
projectId?: Prisma.StringWithAggregatesFilter<'ShareLink'> | string projectId?: Prisma.StringWithAggregatesFilter<'ShareLink'> | string
rootFolderId?: Prisma.StringWithAggregatesFilter<'ShareLink'> | string rootFolderId?: Prisma.StringWithAggregatesFilter<'ShareLink'> | string
creatorId?: Prisma.StringNullableWithAggregatesFilter<'ShareLink'> | string | null
} }
export type ShareLinkCreateInput = { export type ShareLinkCreateInput = {
@@ -318,6 +333,7 @@ export type ShareLinkCreateInput = {
updatedAt?: Date | string updatedAt?: Date | string
project: Prisma.ProjectCreateNestedOneWithoutShareLinksInput project: Prisma.ProjectCreateNestedOneWithoutShareLinksInput
rootFolder: Prisma.AssetCreateNestedOneWithoutShareLinkRootFolderInput rootFolder: Prisma.AssetCreateNestedOneWithoutShareLinkRootFolderInput
creator?: Prisma.UserCreateNestedOneWithoutShareLinksInput
} }
export type ShareLinkUncheckedCreateInput = { export type ShareLinkUncheckedCreateInput = {
@@ -332,6 +348,7 @@ export type ShareLinkUncheckedCreateInput = {
updatedAt?: Date | string updatedAt?: Date | string
projectId: string projectId: string
rootFolderId: string rootFolderId: string
creatorId?: string | null
} }
export type ShareLinkUpdateInput = { export type ShareLinkUpdateInput = {
@@ -346,6 +363,7 @@ export type ShareLinkUpdateInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
project?: Prisma.ProjectUpdateOneRequiredWithoutShareLinksNestedInput project?: Prisma.ProjectUpdateOneRequiredWithoutShareLinksNestedInput
rootFolder?: Prisma.AssetUpdateOneRequiredWithoutShareLinkRootFolderNestedInput rootFolder?: Prisma.AssetUpdateOneRequiredWithoutShareLinkRootFolderNestedInput
creator?: Prisma.UserUpdateOneWithoutShareLinksNestedInput
} }
export type ShareLinkUncheckedUpdateInput = { export type ShareLinkUncheckedUpdateInput = {
@@ -360,6 +378,7 @@ export type ShareLinkUncheckedUpdateInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
projectId?: Prisma.StringFieldUpdateOperationsInput | string projectId?: Prisma.StringFieldUpdateOperationsInput | string
rootFolderId?: Prisma.StringFieldUpdateOperationsInput | string rootFolderId?: Prisma.StringFieldUpdateOperationsInput | string
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
} }
export type ShareLinkCreateManyInput = { export type ShareLinkCreateManyInput = {
@@ -374,6 +393,7 @@ export type ShareLinkCreateManyInput = {
updatedAt?: Date | string updatedAt?: Date | string
projectId: string projectId: string
rootFolderId: string rootFolderId: string
creatorId?: string | null
} }
export type ShareLinkUpdateManyMutationInput = { export type ShareLinkUpdateManyMutationInput = {
@@ -400,6 +420,7 @@ export type ShareLinkUncheckedUpdateManyInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
projectId?: Prisma.StringFieldUpdateOperationsInput | string projectId?: Prisma.StringFieldUpdateOperationsInput | string
rootFolderId?: Prisma.StringFieldUpdateOperationsInput | string rootFolderId?: Prisma.StringFieldUpdateOperationsInput | string
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
} }
export type ShareLinkListRelationFilter = { export type ShareLinkListRelationFilter = {
@@ -424,6 +445,7 @@ export type ShareLinkCountOrderByAggregateInput = {
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
projectId?: Prisma.SortOrder projectId?: Prisma.SortOrder
rootFolderId?: Prisma.SortOrder rootFolderId?: Prisma.SortOrder
creatorId?: Prisma.SortOrder
} }
export type ShareLinkMaxOrderByAggregateInput = { export type ShareLinkMaxOrderByAggregateInput = {
@@ -437,6 +459,7 @@ export type ShareLinkMaxOrderByAggregateInput = {
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
projectId?: Prisma.SortOrder projectId?: Prisma.SortOrder
rootFolderId?: Prisma.SortOrder rootFolderId?: Prisma.SortOrder
creatorId?: Prisma.SortOrder
} }
export type ShareLinkMinOrderByAggregateInput = { export type ShareLinkMinOrderByAggregateInput = {
@@ -450,6 +473,7 @@ export type ShareLinkMinOrderByAggregateInput = {
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
projectId?: Prisma.SortOrder projectId?: Prisma.SortOrder
rootFolderId?: Prisma.SortOrder rootFolderId?: Prisma.SortOrder
creatorId?: Prisma.SortOrder
} }
export type ShareLinkNullableScalarRelationFilter = { export type ShareLinkNullableScalarRelationFilter = {
@@ -457,6 +481,92 @@ export type ShareLinkNullableScalarRelationFilter = {
isNot?: Prisma.ShareLinkWhereInput | null isNot?: Prisma.ShareLinkWhereInput | null
} }
export type ShareLinkCreateNestedManyWithoutCreatorInput = {
create?:
| Prisma.XOR<
Prisma.ShareLinkCreateWithoutCreatorInput,
Prisma.ShareLinkUncheckedCreateWithoutCreatorInput
>
| Prisma.ShareLinkCreateWithoutCreatorInput[]
| Prisma.ShareLinkUncheckedCreateWithoutCreatorInput[]
connectOrCreate?:
| Prisma.ShareLinkCreateOrConnectWithoutCreatorInput
| Prisma.ShareLinkCreateOrConnectWithoutCreatorInput[]
createMany?: Prisma.ShareLinkCreateManyCreatorInputEnvelope
connect?: Prisma.ShareLinkWhereUniqueInput | Prisma.ShareLinkWhereUniqueInput[]
}
export type ShareLinkUncheckedCreateNestedManyWithoutCreatorInput = {
create?:
| Prisma.XOR<
Prisma.ShareLinkCreateWithoutCreatorInput,
Prisma.ShareLinkUncheckedCreateWithoutCreatorInput
>
| Prisma.ShareLinkCreateWithoutCreatorInput[]
| Prisma.ShareLinkUncheckedCreateWithoutCreatorInput[]
connectOrCreate?:
| Prisma.ShareLinkCreateOrConnectWithoutCreatorInput
| Prisma.ShareLinkCreateOrConnectWithoutCreatorInput[]
createMany?: Prisma.ShareLinkCreateManyCreatorInputEnvelope
connect?: Prisma.ShareLinkWhereUniqueInput | Prisma.ShareLinkWhereUniqueInput[]
}
export type ShareLinkUpdateManyWithoutCreatorNestedInput = {
create?:
| Prisma.XOR<
Prisma.ShareLinkCreateWithoutCreatorInput,
Prisma.ShareLinkUncheckedCreateWithoutCreatorInput
>
| Prisma.ShareLinkCreateWithoutCreatorInput[]
| Prisma.ShareLinkUncheckedCreateWithoutCreatorInput[]
connectOrCreate?:
| Prisma.ShareLinkCreateOrConnectWithoutCreatorInput
| Prisma.ShareLinkCreateOrConnectWithoutCreatorInput[]
upsert?:
| Prisma.ShareLinkUpsertWithWhereUniqueWithoutCreatorInput
| Prisma.ShareLinkUpsertWithWhereUniqueWithoutCreatorInput[]
createMany?: Prisma.ShareLinkCreateManyCreatorInputEnvelope
set?: Prisma.ShareLinkWhereUniqueInput | Prisma.ShareLinkWhereUniqueInput[]
disconnect?: Prisma.ShareLinkWhereUniqueInput | Prisma.ShareLinkWhereUniqueInput[]
delete?: Prisma.ShareLinkWhereUniqueInput | Prisma.ShareLinkWhereUniqueInput[]
connect?: Prisma.ShareLinkWhereUniqueInput | Prisma.ShareLinkWhereUniqueInput[]
update?:
| Prisma.ShareLinkUpdateWithWhereUniqueWithoutCreatorInput
| Prisma.ShareLinkUpdateWithWhereUniqueWithoutCreatorInput[]
updateMany?:
| Prisma.ShareLinkUpdateManyWithWhereWithoutCreatorInput
| Prisma.ShareLinkUpdateManyWithWhereWithoutCreatorInput[]
deleteMany?: Prisma.ShareLinkScalarWhereInput | Prisma.ShareLinkScalarWhereInput[]
}
export type ShareLinkUncheckedUpdateManyWithoutCreatorNestedInput = {
create?:
| Prisma.XOR<
Prisma.ShareLinkCreateWithoutCreatorInput,
Prisma.ShareLinkUncheckedCreateWithoutCreatorInput
>
| Prisma.ShareLinkCreateWithoutCreatorInput[]
| Prisma.ShareLinkUncheckedCreateWithoutCreatorInput[]
connectOrCreate?:
| Prisma.ShareLinkCreateOrConnectWithoutCreatorInput
| Prisma.ShareLinkCreateOrConnectWithoutCreatorInput[]
upsert?:
| Prisma.ShareLinkUpsertWithWhereUniqueWithoutCreatorInput
| Prisma.ShareLinkUpsertWithWhereUniqueWithoutCreatorInput[]
createMany?: Prisma.ShareLinkCreateManyCreatorInputEnvelope
set?: Prisma.ShareLinkWhereUniqueInput | Prisma.ShareLinkWhereUniqueInput[]
disconnect?: Prisma.ShareLinkWhereUniqueInput | Prisma.ShareLinkWhereUniqueInput[]
delete?: Prisma.ShareLinkWhereUniqueInput | Prisma.ShareLinkWhereUniqueInput[]
connect?: Prisma.ShareLinkWhereUniqueInput | Prisma.ShareLinkWhereUniqueInput[]
update?:
| Prisma.ShareLinkUpdateWithWhereUniqueWithoutCreatorInput
| Prisma.ShareLinkUpdateWithWhereUniqueWithoutCreatorInput[]
updateMany?:
| Prisma.ShareLinkUpdateManyWithWhereWithoutCreatorInput
| Prisma.ShareLinkUpdateManyWithWhereWithoutCreatorInput[]
deleteMany?: Prisma.ShareLinkScalarWhereInput | Prisma.ShareLinkScalarWhereInput[]
}
export type ShareLinkCreateNestedManyWithoutProjectInput = { export type ShareLinkCreateNestedManyWithoutProjectInput = {
create?: create?:
| Prisma.XOR< | Prisma.XOR<
@@ -599,6 +709,93 @@ export type ShareLinkUncheckedUpdateOneWithoutRootFolderNestedInput = {
> >
} }
export type ShareLinkCreateWithoutCreatorInput = {
id?: string
name: string
expireAt?: Date | string | null
password?: string | null
isDisabled?: boolean
defaultSortOrder?: string | null
fieldVisibility?: PrismaJson.ShareLinkFieldVisibility | Prisma.NullableJsonNullValueInput
createdAt?: Date | string
updatedAt?: Date | string
project: Prisma.ProjectCreateNestedOneWithoutShareLinksInput
rootFolder: Prisma.AssetCreateNestedOneWithoutShareLinkRootFolderInput
}
export type ShareLinkUncheckedCreateWithoutCreatorInput = {
id?: string
name: string
expireAt?: Date | string | null
password?: string | null
isDisabled?: boolean
defaultSortOrder?: string | null
fieldVisibility?: PrismaJson.ShareLinkFieldVisibility | Prisma.NullableJsonNullValueInput
createdAt?: Date | string
updatedAt?: Date | string
projectId: string
rootFolderId: string
}
export type ShareLinkCreateOrConnectWithoutCreatorInput = {
where: Prisma.ShareLinkWhereUniqueInput
create: Prisma.XOR<
Prisma.ShareLinkCreateWithoutCreatorInput,
Prisma.ShareLinkUncheckedCreateWithoutCreatorInput
>
}
export type ShareLinkCreateManyCreatorInputEnvelope = {
data: Prisma.ShareLinkCreateManyCreatorInput | Prisma.ShareLinkCreateManyCreatorInput[]
skipDuplicates?: boolean
}
export type ShareLinkUpsertWithWhereUniqueWithoutCreatorInput = {
where: Prisma.ShareLinkWhereUniqueInput
update: Prisma.XOR<
Prisma.ShareLinkUpdateWithoutCreatorInput,
Prisma.ShareLinkUncheckedUpdateWithoutCreatorInput
>
create: Prisma.XOR<
Prisma.ShareLinkCreateWithoutCreatorInput,
Prisma.ShareLinkUncheckedCreateWithoutCreatorInput
>
}
export type ShareLinkUpdateWithWhereUniqueWithoutCreatorInput = {
where: Prisma.ShareLinkWhereUniqueInput
data: Prisma.XOR<
Prisma.ShareLinkUpdateWithoutCreatorInput,
Prisma.ShareLinkUncheckedUpdateWithoutCreatorInput
>
}
export type ShareLinkUpdateManyWithWhereWithoutCreatorInput = {
where: Prisma.ShareLinkScalarWhereInput
data: Prisma.XOR<
Prisma.ShareLinkUpdateManyMutationInput,
Prisma.ShareLinkUncheckedUpdateManyWithoutCreatorInput
>
}
export type ShareLinkScalarWhereInput = {
AND?: Prisma.ShareLinkScalarWhereInput | Prisma.ShareLinkScalarWhereInput[]
OR?: Prisma.ShareLinkScalarWhereInput[]
NOT?: Prisma.ShareLinkScalarWhereInput | Prisma.ShareLinkScalarWhereInput[]
id?: Prisma.StringFilter<'ShareLink'> | string
name?: Prisma.StringFilter<'ShareLink'> | string
expireAt?: Prisma.DateTimeNullableFilter<'ShareLink'> | Date | string | null
password?: Prisma.StringNullableFilter<'ShareLink'> | string | null
isDisabled?: Prisma.BoolFilter<'ShareLink'> | boolean
defaultSortOrder?: Prisma.StringNullableFilter<'ShareLink'> | string | null
fieldVisibility?: Prisma.JsonNullableFilter<'ShareLink'>
createdAt?: Prisma.DateTimeFilter<'ShareLink'> | Date | string
updatedAt?: Prisma.DateTimeFilter<'ShareLink'> | Date | string
projectId?: Prisma.StringFilter<'ShareLink'> | string
rootFolderId?: Prisma.StringFilter<'ShareLink'> | string
creatorId?: Prisma.StringNullableFilter<'ShareLink'> | string | null
}
export type ShareLinkCreateWithoutProjectInput = { export type ShareLinkCreateWithoutProjectInput = {
id?: string id?: string
name: string name: string
@@ -610,6 +807,7 @@ export type ShareLinkCreateWithoutProjectInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
rootFolder: Prisma.AssetCreateNestedOneWithoutShareLinkRootFolderInput rootFolder: Prisma.AssetCreateNestedOneWithoutShareLinkRootFolderInput
creator?: Prisma.UserCreateNestedOneWithoutShareLinksInput
} }
export type ShareLinkUncheckedCreateWithoutProjectInput = { export type ShareLinkUncheckedCreateWithoutProjectInput = {
@@ -623,6 +821,7 @@ export type ShareLinkUncheckedCreateWithoutProjectInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
rootFolderId: string rootFolderId: string
creatorId?: string | null
} }
export type ShareLinkCreateOrConnectWithoutProjectInput = { export type ShareLinkCreateOrConnectWithoutProjectInput = {
@@ -666,23 +865,6 @@ export type ShareLinkUpdateManyWithWhereWithoutProjectInput = {
> >
} }
export type ShareLinkScalarWhereInput = {
AND?: Prisma.ShareLinkScalarWhereInput | Prisma.ShareLinkScalarWhereInput[]
OR?: Prisma.ShareLinkScalarWhereInput[]
NOT?: Prisma.ShareLinkScalarWhereInput | Prisma.ShareLinkScalarWhereInput[]
id?: Prisma.StringFilter<'ShareLink'> | string
name?: Prisma.StringFilter<'ShareLink'> | string
expireAt?: Prisma.DateTimeNullableFilter<'ShareLink'> | Date | string | null
password?: Prisma.StringNullableFilter<'ShareLink'> | string | null
isDisabled?: Prisma.BoolFilter<'ShareLink'> | boolean
defaultSortOrder?: Prisma.StringNullableFilter<'ShareLink'> | string | null
fieldVisibility?: Prisma.JsonNullableFilter<'ShareLink'>
createdAt?: Prisma.DateTimeFilter<'ShareLink'> | Date | string
updatedAt?: Prisma.DateTimeFilter<'ShareLink'> | Date | string
projectId?: Prisma.StringFilter<'ShareLink'> | string
rootFolderId?: Prisma.StringFilter<'ShareLink'> | string
}
export type ShareLinkCreateWithoutRootFolderInput = { export type ShareLinkCreateWithoutRootFolderInput = {
id?: string id?: string
name: string name: string
@@ -694,6 +876,7 @@ export type ShareLinkCreateWithoutRootFolderInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
project: Prisma.ProjectCreateNestedOneWithoutShareLinksInput project: Prisma.ProjectCreateNestedOneWithoutShareLinksInput
creator?: Prisma.UserCreateNestedOneWithoutShareLinksInput
} }
export type ShareLinkUncheckedCreateWithoutRootFolderInput = { export type ShareLinkUncheckedCreateWithoutRootFolderInput = {
@@ -707,6 +890,7 @@ export type ShareLinkUncheckedCreateWithoutRootFolderInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
projectId: string projectId: string
creatorId?: string | null
} }
export type ShareLinkCreateOrConnectWithoutRootFolderInput = { export type ShareLinkCreateOrConnectWithoutRootFolderInput = {
@@ -748,6 +932,7 @@ export type ShareLinkUpdateWithoutRootFolderInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
project?: Prisma.ProjectUpdateOneRequiredWithoutShareLinksNestedInput project?: Prisma.ProjectUpdateOneRequiredWithoutShareLinksNestedInput
creator?: Prisma.UserUpdateOneWithoutShareLinksNestedInput
} }
export type ShareLinkUncheckedUpdateWithoutRootFolderInput = { export type ShareLinkUncheckedUpdateWithoutRootFolderInput = {
@@ -761,6 +946,63 @@ export type ShareLinkUncheckedUpdateWithoutRootFolderInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
projectId?: Prisma.StringFieldUpdateOperationsInput | string projectId?: Prisma.StringFieldUpdateOperationsInput | string
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type ShareLinkCreateManyCreatorInput = {
id?: string
name: string
expireAt?: Date | string | null
password?: string | null
isDisabled?: boolean
defaultSortOrder?: string | null
fieldVisibility?: PrismaJson.ShareLinkFieldVisibility | Prisma.NullableJsonNullValueInput
createdAt?: Date | string
updatedAt?: Date | string
projectId: string
rootFolderId: string
}
export type ShareLinkUpdateWithoutCreatorInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
name?: Prisma.StringFieldUpdateOperationsInput | string
expireAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
password?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
isDisabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
defaultSortOrder?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
fieldVisibility?: PrismaJson.ShareLinkFieldVisibility | Prisma.NullableJsonNullValueInput
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
project?: Prisma.ProjectUpdateOneRequiredWithoutShareLinksNestedInput
rootFolder?: Prisma.AssetUpdateOneRequiredWithoutShareLinkRootFolderNestedInput
}
export type ShareLinkUncheckedUpdateWithoutCreatorInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
name?: Prisma.StringFieldUpdateOperationsInput | string
expireAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
password?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
isDisabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
defaultSortOrder?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
fieldVisibility?: PrismaJson.ShareLinkFieldVisibility | Prisma.NullableJsonNullValueInput
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
projectId?: Prisma.StringFieldUpdateOperationsInput | string
rootFolderId?: Prisma.StringFieldUpdateOperationsInput | string
}
export type ShareLinkUncheckedUpdateManyWithoutCreatorInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
name?: Prisma.StringFieldUpdateOperationsInput | string
expireAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
password?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
isDisabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
defaultSortOrder?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
fieldVisibility?: PrismaJson.ShareLinkFieldVisibility | Prisma.NullableJsonNullValueInput
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
projectId?: Prisma.StringFieldUpdateOperationsInput | string
rootFolderId?: Prisma.StringFieldUpdateOperationsInput | string
} }
export type ShareLinkCreateManyProjectInput = { export type ShareLinkCreateManyProjectInput = {
@@ -774,6 +1016,7 @@ export type ShareLinkCreateManyProjectInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
rootFolderId: string rootFolderId: string
creatorId?: string | null
} }
export type ShareLinkUpdateWithoutProjectInput = { export type ShareLinkUpdateWithoutProjectInput = {
@@ -787,6 +1030,7 @@ export type ShareLinkUpdateWithoutProjectInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
rootFolder?: Prisma.AssetUpdateOneRequiredWithoutShareLinkRootFolderNestedInput rootFolder?: Prisma.AssetUpdateOneRequiredWithoutShareLinkRootFolderNestedInput
creator?: Prisma.UserUpdateOneWithoutShareLinksNestedInput
} }
export type ShareLinkUncheckedUpdateWithoutProjectInput = { export type ShareLinkUncheckedUpdateWithoutProjectInput = {
@@ -800,6 +1044,7 @@ export type ShareLinkUncheckedUpdateWithoutProjectInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
rootFolderId?: Prisma.StringFieldUpdateOperationsInput | string rootFolderId?: Prisma.StringFieldUpdateOperationsInput | string
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
} }
export type ShareLinkUncheckedUpdateManyWithoutProjectInput = { export type ShareLinkUncheckedUpdateManyWithoutProjectInput = {
@@ -813,6 +1058,7 @@ export type ShareLinkUncheckedUpdateManyWithoutProjectInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
rootFolderId?: Prisma.StringFieldUpdateOperationsInput | string rootFolderId?: Prisma.StringFieldUpdateOperationsInput | string
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
} }
export type ShareLinkSelect< export type ShareLinkSelect<
@@ -830,8 +1076,10 @@ export type ShareLinkSelect<
updatedAt?: boolean updatedAt?: boolean
projectId?: boolean projectId?: boolean
rootFolderId?: boolean rootFolderId?: boolean
creatorId?: boolean
project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs> project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs>
rootFolder?: boolean | Prisma.AssetDefaultArgs<ExtArgs> rootFolder?: boolean | Prisma.AssetDefaultArgs<ExtArgs>
creator?: boolean | Prisma.ShareLink$creatorArgs<ExtArgs>
}, },
ExtArgs['result']['shareLink'] ExtArgs['result']['shareLink']
> >
@@ -851,8 +1099,10 @@ export type ShareLinkSelectCreateManyAndReturn<
updatedAt?: boolean updatedAt?: boolean
projectId?: boolean projectId?: boolean
rootFolderId?: boolean rootFolderId?: boolean
creatorId?: boolean
project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs> project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs>
rootFolder?: boolean | Prisma.AssetDefaultArgs<ExtArgs> rootFolder?: boolean | Prisma.AssetDefaultArgs<ExtArgs>
creator?: boolean | Prisma.ShareLink$creatorArgs<ExtArgs>
}, },
ExtArgs['result']['shareLink'] ExtArgs['result']['shareLink']
> >
@@ -872,8 +1122,10 @@ export type ShareLinkSelectUpdateManyAndReturn<
updatedAt?: boolean updatedAt?: boolean
projectId?: boolean projectId?: boolean
rootFolderId?: boolean rootFolderId?: boolean
creatorId?: boolean
project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs> project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs>
rootFolder?: boolean | Prisma.AssetDefaultArgs<ExtArgs> rootFolder?: boolean | Prisma.AssetDefaultArgs<ExtArgs>
creator?: boolean | Prisma.ShareLink$creatorArgs<ExtArgs>
}, },
ExtArgs['result']['shareLink'] ExtArgs['result']['shareLink']
> >
@@ -890,6 +1142,7 @@ export type ShareLinkSelectScalar = {
updatedAt?: boolean updatedAt?: boolean
projectId?: boolean projectId?: boolean
rootFolderId?: boolean rootFolderId?: boolean
creatorId?: boolean
} }
export type ShareLinkOmit< export type ShareLinkOmit<
@@ -905,7 +1158,8 @@ export type ShareLinkOmit<
| 'createdAt' | 'createdAt'
| 'updatedAt' | 'updatedAt'
| 'projectId' | 'projectId'
| 'rootFolderId', | 'rootFolderId'
| 'creatorId',
ExtArgs['result']['shareLink'] ExtArgs['result']['shareLink']
> >
export type ShareLinkInclude< export type ShareLinkInclude<
@@ -913,18 +1167,21 @@ export type ShareLinkInclude<
> = { > = {
project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs> project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs>
rootFolder?: boolean | Prisma.AssetDefaultArgs<ExtArgs> rootFolder?: boolean | Prisma.AssetDefaultArgs<ExtArgs>
creator?: boolean | Prisma.ShareLink$creatorArgs<ExtArgs>
} }
export type ShareLinkIncludeCreateManyAndReturn< export type ShareLinkIncludeCreateManyAndReturn<
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = { > = {
project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs> project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs>
rootFolder?: boolean | Prisma.AssetDefaultArgs<ExtArgs> rootFolder?: boolean | Prisma.AssetDefaultArgs<ExtArgs>
creator?: boolean | Prisma.ShareLink$creatorArgs<ExtArgs>
} }
export type ShareLinkIncludeUpdateManyAndReturn< export type ShareLinkIncludeUpdateManyAndReturn<
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = { > = {
project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs> project?: boolean | Prisma.ProjectDefaultArgs<ExtArgs>
rootFolder?: boolean | Prisma.AssetDefaultArgs<ExtArgs> rootFolder?: boolean | Prisma.AssetDefaultArgs<ExtArgs>
creator?: boolean | Prisma.ShareLink$creatorArgs<ExtArgs>
} }
export type $ShareLinkPayload< export type $ShareLinkPayload<
@@ -934,6 +1191,7 @@ export type $ShareLinkPayload<
objects: { objects: {
project: Prisma.$ProjectPayload<ExtArgs> project: Prisma.$ProjectPayload<ExtArgs>
rootFolder: Prisma.$AssetPayload<ExtArgs> rootFolder: Prisma.$AssetPayload<ExtArgs>
creator: Prisma.$UserPayload<ExtArgs> | null
} }
scalars: runtime.Types.Extensions.GetPayloadResult< scalars: runtime.Types.Extensions.GetPayloadResult<
{ {
@@ -951,6 +1209,7 @@ export type $ShareLinkPayload<
updatedAt: Date updatedAt: Date
projectId: string projectId: string
rootFolderId: string rootFolderId: string
creatorId: string | null
}, },
ExtArgs['result']['shareLink'] ExtArgs['result']['shareLink']
> >
@@ -1514,6 +1773,19 @@ export interface Prisma__ShareLinkClient<
ExtArgs, ExtArgs,
GlobalOmitOptions GlobalOmitOptions
> >
creator<T extends Prisma.ShareLink$creatorArgs<ExtArgs> = {}>(
args?: Prisma.Subset<T, Prisma.ShareLink$creatorArgs<ExtArgs>>,
): Prisma.Prisma__UserClient<
runtime.Types.Result.GetResult<
Prisma.$UserPayload<ExtArgs>,
T,
'findUniqueOrThrow',
GlobalOmitOptions
> | null,
null,
ExtArgs,
GlobalOmitOptions
>
/** /**
* Attaches callbacks for the resolution and/or rejection of the Promise. * Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved. * @param onfulfilled The callback to execute when the Promise is resolved.
@@ -1556,6 +1828,7 @@ export interface ShareLinkFieldRefs {
readonly updatedAt: Prisma.FieldRef<'ShareLink', 'DateTime'> readonly updatedAt: Prisma.FieldRef<'ShareLink', 'DateTime'>
readonly projectId: Prisma.FieldRef<'ShareLink', 'String'> readonly projectId: Prisma.FieldRef<'ShareLink', 'String'>
readonly rootFolderId: Prisma.FieldRef<'ShareLink', 'String'> readonly rootFolderId: Prisma.FieldRef<'ShareLink', 'String'>
readonly creatorId: Prisma.FieldRef<'ShareLink', 'String'>
} }
// Custom InputTypes // Custom InputTypes
@@ -1989,6 +2262,27 @@ export type ShareLinkDeleteManyArgs<
limit?: number limit?: number
} }
/**
* ShareLink.creator
*/
export type ShareLink$creatorArgs<
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
/**
* Select specific fields to fetch from the User
*/
select?: Prisma.UserSelect<ExtArgs> | null
/**
* Omit specific fields from the User
*/
omit?: Prisma.UserOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.UserInclude<ExtArgs> | null
where?: Prisma.UserWhereInput
}
/** /**
* ShareLink without action * ShareLink without action
*/ */
@@ -237,6 +237,8 @@ export type UserWhereInput = {
agent?: Prisma.XOR<Prisma.AgentNullableScalarRelationFilter, Prisma.AgentWhereInput> | null agent?: Prisma.XOR<Prisma.AgentNullableScalarRelationFilter, Prisma.AgentWhereInput> | null
agentSessions?: Prisma.AgentSessionListRelationFilter agentSessions?: Prisma.AgentSessionListRelationFilter
userMetadata?: Prisma.UserMetadataListRelationFilter userMetadata?: Prisma.UserMetadataListRelationFilter
collections?: Prisma.CollectionListRelationFilter
shareLinks?: Prisma.ShareLinkListRelationFilter
} }
export type UserOrderByWithRelationInput = { export type UserOrderByWithRelationInput = {
@@ -264,6 +266,8 @@ export type UserOrderByWithRelationInput = {
agent?: Prisma.AgentOrderByWithRelationInput agent?: Prisma.AgentOrderByWithRelationInput
agentSessions?: Prisma.AgentSessionOrderByRelationAggregateInput agentSessions?: Prisma.AgentSessionOrderByRelationAggregateInput
userMetadata?: Prisma.UserMetadataOrderByRelationAggregateInput userMetadata?: Prisma.UserMetadataOrderByRelationAggregateInput
collections?: Prisma.CollectionOrderByRelationAggregateInput
shareLinks?: Prisma.ShareLinkOrderByRelationAggregateInput
} }
export type UserWhereUniqueInput = Prisma.AtLeast< export type UserWhereUniqueInput = Prisma.AtLeast<
@@ -295,6 +299,8 @@ export type UserWhereUniqueInput = Prisma.AtLeast<
agent?: Prisma.XOR<Prisma.AgentNullableScalarRelationFilter, Prisma.AgentWhereInput> | null agent?: Prisma.XOR<Prisma.AgentNullableScalarRelationFilter, Prisma.AgentWhereInput> | null
agentSessions?: Prisma.AgentSessionListRelationFilter agentSessions?: Prisma.AgentSessionListRelationFilter
userMetadata?: Prisma.UserMetadataListRelationFilter userMetadata?: Prisma.UserMetadataListRelationFilter
collections?: Prisma.CollectionListRelationFilter
shareLinks?: Prisma.ShareLinkListRelationFilter
}, },
'id' | 'email' 'id' | 'email'
> >
@@ -358,6 +364,8 @@ export type UserCreateInput = {
agent?: Prisma.AgentCreateNestedOneWithoutUserInput agent?: Prisma.AgentCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutCreatorInput
} }
export type UserUncheckedCreateInput = { export type UserUncheckedCreateInput = {
@@ -385,6 +393,8 @@ export type UserUncheckedCreateInput = {
agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutCreatorInput
} }
export type UserUpdateInput = { export type UserUpdateInput = {
@@ -412,6 +422,8 @@ export type UserUpdateInput = {
agent?: Prisma.AgentUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUpdateManyWithoutCreatorNestedInput
} }
export type UserUncheckedUpdateInput = { export type UserUncheckedUpdateInput = {
@@ -439,6 +451,8 @@ export type UserUncheckedUpdateInput = {
agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUncheckedUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutCreatorNestedInput
} }
export type UserCreateManyInput = { export type UserCreateManyInput = {
@@ -657,6 +671,34 @@ export type UserUpdateOneRequiredWithoutTeamMembersNestedInput = {
> >
} }
export type UserCreateNestedOneWithoutShareLinksInput = {
create?: Prisma.XOR<
Prisma.UserCreateWithoutShareLinksInput,
Prisma.UserUncheckedCreateWithoutShareLinksInput
>
connectOrCreate?: Prisma.UserCreateOrConnectWithoutShareLinksInput
connect?: Prisma.UserWhereUniqueInput
}
export type UserUpdateOneWithoutShareLinksNestedInput = {
create?: Prisma.XOR<
Prisma.UserCreateWithoutShareLinksInput,
Prisma.UserUncheckedCreateWithoutShareLinksInput
>
connectOrCreate?: Prisma.UserCreateOrConnectWithoutShareLinksInput
upsert?: Prisma.UserUpsertWithoutShareLinksInput
disconnect?: Prisma.UserWhereInput | boolean
delete?: Prisma.UserWhereInput | boolean
connect?: Prisma.UserWhereUniqueInput
update?: Prisma.XOR<
Prisma.XOR<
Prisma.UserUpdateToOneWithWhereWithoutShareLinksInput,
Prisma.UserUpdateWithoutShareLinksInput
>,
Prisma.UserUncheckedUpdateWithoutShareLinksInput
>
}
export type UserCreateNestedOneWithoutAssetsInput = { export type UserCreateNestedOneWithoutAssetsInput = {
create?: Prisma.XOR< create?: Prisma.XOR<
Prisma.UserCreateWithoutAssetsInput, Prisma.UserCreateWithoutAssetsInput,
@@ -903,6 +945,34 @@ export type UserUpdateOneRequiredWithoutUserMetadataNestedInput = {
> >
} }
export type UserCreateNestedOneWithoutCollectionsInput = {
create?: Prisma.XOR<
Prisma.UserCreateWithoutCollectionsInput,
Prisma.UserUncheckedCreateWithoutCollectionsInput
>
connectOrCreate?: Prisma.UserCreateOrConnectWithoutCollectionsInput
connect?: Prisma.UserWhereUniqueInput
}
export type UserUpdateOneWithoutCollectionsNestedInput = {
create?: Prisma.XOR<
Prisma.UserCreateWithoutCollectionsInput,
Prisma.UserUncheckedCreateWithoutCollectionsInput
>
connectOrCreate?: Prisma.UserCreateOrConnectWithoutCollectionsInput
upsert?: Prisma.UserUpsertWithoutCollectionsInput
disconnect?: Prisma.UserWhereInput | boolean
delete?: Prisma.UserWhereInput | boolean
connect?: Prisma.UserWhereUniqueInput
update?: Prisma.XOR<
Prisma.XOR<
Prisma.UserUpdateToOneWithWhereWithoutCollectionsInput,
Prisma.UserUpdateWithoutCollectionsInput
>,
Prisma.UserUncheckedUpdateWithoutCollectionsInput
>
}
export type UserCreateWithoutSessionsInput = { export type UserCreateWithoutSessionsInput = {
id?: string id?: string
type?: $Enums.UserType type?: $Enums.UserType
@@ -927,6 +997,8 @@ export type UserCreateWithoutSessionsInput = {
agent?: Prisma.AgentCreateNestedOneWithoutUserInput agent?: Prisma.AgentCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutCreatorInput
} }
export type UserUncheckedCreateWithoutSessionsInput = { export type UserUncheckedCreateWithoutSessionsInput = {
@@ -953,6 +1025,8 @@ export type UserUncheckedCreateWithoutSessionsInput = {
agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutCreatorInput
} }
export type UserCreateOrConnectWithoutSessionsInput = { export type UserCreateOrConnectWithoutSessionsInput = {
@@ -1007,6 +1081,8 @@ export type UserUpdateWithoutSessionsInput = {
agent?: Prisma.AgentUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUpdateManyWithoutCreatorNestedInput
} }
export type UserUncheckedUpdateWithoutSessionsInput = { export type UserUncheckedUpdateWithoutSessionsInput = {
@@ -1033,6 +1109,8 @@ export type UserUncheckedUpdateWithoutSessionsInput = {
agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUncheckedUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutCreatorNestedInput
} }
export type UserCreateWithoutAccountsInput = { export type UserCreateWithoutAccountsInput = {
@@ -1059,6 +1137,8 @@ export type UserCreateWithoutAccountsInput = {
agent?: Prisma.AgentCreateNestedOneWithoutUserInput agent?: Prisma.AgentCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutCreatorInput
} }
export type UserUncheckedCreateWithoutAccountsInput = { export type UserUncheckedCreateWithoutAccountsInput = {
@@ -1085,6 +1165,8 @@ export type UserUncheckedCreateWithoutAccountsInput = {
agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutCreatorInput
} }
export type UserCreateOrConnectWithoutAccountsInput = { export type UserCreateOrConnectWithoutAccountsInput = {
@@ -1139,6 +1221,8 @@ export type UserUpdateWithoutAccountsInput = {
agent?: Prisma.AgentUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUpdateManyWithoutCreatorNestedInput
} }
export type UserUncheckedUpdateWithoutAccountsInput = { export type UserUncheckedUpdateWithoutAccountsInput = {
@@ -1165,6 +1249,8 @@ export type UserUncheckedUpdateWithoutAccountsInput = {
agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUncheckedUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutCreatorNestedInput
} }
export type UserCreateWithoutAuthTokensInput = { export type UserCreateWithoutAuthTokensInput = {
@@ -1191,6 +1277,8 @@ export type UserCreateWithoutAuthTokensInput = {
agent?: Prisma.AgentCreateNestedOneWithoutUserInput agent?: Prisma.AgentCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutCreatorInput
} }
export type UserUncheckedCreateWithoutAuthTokensInput = { export type UserUncheckedCreateWithoutAuthTokensInput = {
@@ -1217,6 +1305,8 @@ export type UserUncheckedCreateWithoutAuthTokensInput = {
agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutCreatorInput
} }
export type UserCreateOrConnectWithoutAuthTokensInput = { export type UserCreateOrConnectWithoutAuthTokensInput = {
@@ -1271,6 +1361,8 @@ export type UserUpdateWithoutAuthTokensInput = {
agent?: Prisma.AgentUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUpdateManyWithoutCreatorNestedInput
} }
export type UserUncheckedUpdateWithoutAuthTokensInput = { export type UserUncheckedUpdateWithoutAuthTokensInput = {
@@ -1297,6 +1389,8 @@ export type UserUncheckedUpdateWithoutAuthTokensInput = {
agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUncheckedUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutCreatorNestedInput
} }
export type UserCreateWithoutTeamMembersInput = { export type UserCreateWithoutTeamMembersInput = {
@@ -1323,6 +1417,8 @@ export type UserCreateWithoutTeamMembersInput = {
agent?: Prisma.AgentCreateNestedOneWithoutUserInput agent?: Prisma.AgentCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutCreatorInput
} }
export type UserUncheckedCreateWithoutTeamMembersInput = { export type UserUncheckedCreateWithoutTeamMembersInput = {
@@ -1349,6 +1445,8 @@ export type UserUncheckedCreateWithoutTeamMembersInput = {
agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutCreatorInput
} }
export type UserCreateOrConnectWithoutTeamMembersInput = { export type UserCreateOrConnectWithoutTeamMembersInput = {
@@ -1403,6 +1501,8 @@ export type UserUpdateWithoutTeamMembersInput = {
agent?: Prisma.AgentUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUpdateManyWithoutCreatorNestedInput
} }
export type UserUncheckedUpdateWithoutTeamMembersInput = { export type UserUncheckedUpdateWithoutTeamMembersInput = {
@@ -1429,6 +1529,148 @@ export type UserUncheckedUpdateWithoutTeamMembersInput = {
agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUncheckedUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutCreatorNestedInput
}
export type UserCreateWithoutShareLinksInput = {
id?: string
type?: $Enums.UserType
name: string
email: string
emailVerified?: boolean
image?: string | null
password?: string | null
agentSettings?: PrismaJson.AgentSettings | Prisma.NullableJsonNullValueInput
guestEmail?: string | null
createdAt?: Date | string
updatedAt?: Date | string
assets?: Prisma.AssetCreateNestedManyWithoutCreatorInput
authTokens?: Prisma.AuthTokenCreateNestedManyWithoutUserInput
tasks?: Prisma.TaskCreateNestedManyWithoutCreatorInput
teamMembers?: Prisma.TeamMemberCreateNestedManyWithoutUserInput
comments?: Prisma.AssetCommentCreateNestedManyWithoutCreatorInput
createdInvites?: Prisma.InviteCreateNestedManyWithoutInviterInput
createdNotifications?: Prisma.NotificationCreateNestedManyWithoutCreatorInput
notifications?: Prisma.NotificationCreateNestedManyWithoutUserInput
sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
agent?: Prisma.AgentCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionCreateNestedManyWithoutCreatorInput
}
export type UserUncheckedCreateWithoutShareLinksInput = {
id?: string
type?: $Enums.UserType
name: string
email: string
emailVerified?: boolean
image?: string | null
password?: string | null
agentSettings?: PrismaJson.AgentSettings | Prisma.NullableJsonNullValueInput
guestEmail?: string | null
createdAt?: Date | string
updatedAt?: Date | string
assets?: Prisma.AssetUncheckedCreateNestedManyWithoutCreatorInput
authTokens?: Prisma.AuthTokenUncheckedCreateNestedManyWithoutUserInput
tasks?: Prisma.TaskUncheckedCreateNestedManyWithoutCreatorInput
teamMembers?: Prisma.TeamMemberUncheckedCreateNestedManyWithoutUserInput
comments?: Prisma.AssetCommentUncheckedCreateNestedManyWithoutCreatorInput
createdInvites?: Prisma.InviteUncheckedCreateNestedManyWithoutInviterInput
createdNotifications?: Prisma.NotificationUncheckedCreateNestedManyWithoutCreatorInput
notifications?: Prisma.NotificationUncheckedCreateNestedManyWithoutUserInput
sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutCreatorInput
}
export type UserCreateOrConnectWithoutShareLinksInput = {
where: Prisma.UserWhereUniqueInput
create: Prisma.XOR<
Prisma.UserCreateWithoutShareLinksInput,
Prisma.UserUncheckedCreateWithoutShareLinksInput
>
}
export type UserUpsertWithoutShareLinksInput = {
update: Prisma.XOR<
Prisma.UserUpdateWithoutShareLinksInput,
Prisma.UserUncheckedUpdateWithoutShareLinksInput
>
create: Prisma.XOR<
Prisma.UserCreateWithoutShareLinksInput,
Prisma.UserUncheckedCreateWithoutShareLinksInput
>
where?: Prisma.UserWhereInput
}
export type UserUpdateToOneWithWhereWithoutShareLinksInput = {
where?: Prisma.UserWhereInput
data: Prisma.XOR<
Prisma.UserUpdateWithoutShareLinksInput,
Prisma.UserUncheckedUpdateWithoutShareLinksInput
>
}
export type UserUpdateWithoutShareLinksInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
type?: Prisma.EnumUserTypeFieldUpdateOperationsInput | $Enums.UserType
name?: Prisma.StringFieldUpdateOperationsInput | string
email?: Prisma.StringFieldUpdateOperationsInput | string
emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
password?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
agentSettings?: PrismaJson.AgentSettings | Prisma.NullableJsonNullValueInput
guestEmail?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
assets?: Prisma.AssetUpdateManyWithoutCreatorNestedInput
authTokens?: Prisma.AuthTokenUpdateManyWithoutUserNestedInput
tasks?: Prisma.TaskUpdateManyWithoutCreatorNestedInput
teamMembers?: Prisma.TeamMemberUpdateManyWithoutUserNestedInput
comments?: Prisma.AssetCommentUpdateManyWithoutCreatorNestedInput
createdInvites?: Prisma.InviteUpdateManyWithoutInviterNestedInput
createdNotifications?: Prisma.NotificationUpdateManyWithoutCreatorNestedInput
notifications?: Prisma.NotificationUpdateManyWithoutUserNestedInput
sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
agent?: Prisma.AgentUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUpdateManyWithoutCreatorNestedInput
}
export type UserUncheckedUpdateWithoutShareLinksInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
type?: Prisma.EnumUserTypeFieldUpdateOperationsInput | $Enums.UserType
name?: Prisma.StringFieldUpdateOperationsInput | string
email?: Prisma.StringFieldUpdateOperationsInput | string
emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
password?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
agentSettings?: PrismaJson.AgentSettings | Prisma.NullableJsonNullValueInput
guestEmail?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
assets?: Prisma.AssetUncheckedUpdateManyWithoutCreatorNestedInput
authTokens?: Prisma.AuthTokenUncheckedUpdateManyWithoutUserNestedInput
tasks?: Prisma.TaskUncheckedUpdateManyWithoutCreatorNestedInput
teamMembers?: Prisma.TeamMemberUncheckedUpdateManyWithoutUserNestedInput
comments?: Prisma.AssetCommentUncheckedUpdateManyWithoutCreatorNestedInput
createdInvites?: Prisma.InviteUncheckedUpdateManyWithoutInviterNestedInput
createdNotifications?: Prisma.NotificationUncheckedUpdateManyWithoutCreatorNestedInput
notifications?: Prisma.NotificationUncheckedUpdateManyWithoutUserNestedInput
sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUncheckedUpdateManyWithoutCreatorNestedInput
} }
export type UserCreateWithoutAssetsInput = { export type UserCreateWithoutAssetsInput = {
@@ -1455,6 +1697,8 @@ export type UserCreateWithoutAssetsInput = {
agent?: Prisma.AgentCreateNestedOneWithoutUserInput agent?: Prisma.AgentCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutCreatorInput
} }
export type UserUncheckedCreateWithoutAssetsInput = { export type UserUncheckedCreateWithoutAssetsInput = {
@@ -1481,6 +1725,8 @@ export type UserUncheckedCreateWithoutAssetsInput = {
agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutCreatorInput
} }
export type UserCreateOrConnectWithoutAssetsInput = { export type UserCreateOrConnectWithoutAssetsInput = {
@@ -1535,6 +1781,8 @@ export type UserUpdateWithoutAssetsInput = {
agent?: Prisma.AgentUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUpdateManyWithoutCreatorNestedInput
} }
export type UserUncheckedUpdateWithoutAssetsInput = { export type UserUncheckedUpdateWithoutAssetsInput = {
@@ -1561,6 +1809,8 @@ export type UserUncheckedUpdateWithoutAssetsInput = {
agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUncheckedUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutCreatorNestedInput
} }
export type UserCreateWithoutCommentsInput = { export type UserCreateWithoutCommentsInput = {
@@ -1587,6 +1837,8 @@ export type UserCreateWithoutCommentsInput = {
agent?: Prisma.AgentCreateNestedOneWithoutUserInput agent?: Prisma.AgentCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutCreatorInput
} }
export type UserUncheckedCreateWithoutCommentsInput = { export type UserUncheckedCreateWithoutCommentsInput = {
@@ -1613,6 +1865,8 @@ export type UserUncheckedCreateWithoutCommentsInput = {
agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutCreatorInput
} }
export type UserCreateOrConnectWithoutCommentsInput = { export type UserCreateOrConnectWithoutCommentsInput = {
@@ -1667,6 +1921,8 @@ export type UserUpdateWithoutCommentsInput = {
agent?: Prisma.AgentUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUpdateManyWithoutCreatorNestedInput
} }
export type UserUncheckedUpdateWithoutCommentsInput = { export type UserUncheckedUpdateWithoutCommentsInput = {
@@ -1693,6 +1949,8 @@ export type UserUncheckedUpdateWithoutCommentsInput = {
agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUncheckedUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutCreatorNestedInput
} }
export type UserCreateWithoutCreatedInvitesInput = { export type UserCreateWithoutCreatedInvitesInput = {
@@ -1719,6 +1977,8 @@ export type UserCreateWithoutCreatedInvitesInput = {
agent?: Prisma.AgentCreateNestedOneWithoutUserInput agent?: Prisma.AgentCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutCreatorInput
} }
export type UserUncheckedCreateWithoutCreatedInvitesInput = { export type UserUncheckedCreateWithoutCreatedInvitesInput = {
@@ -1745,6 +2005,8 @@ export type UserUncheckedCreateWithoutCreatedInvitesInput = {
agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutCreatorInput
} }
export type UserCreateOrConnectWithoutCreatedInvitesInput = { export type UserCreateOrConnectWithoutCreatedInvitesInput = {
@@ -1799,6 +2061,8 @@ export type UserUpdateWithoutCreatedInvitesInput = {
agent?: Prisma.AgentUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUpdateManyWithoutCreatorNestedInput
} }
export type UserUncheckedUpdateWithoutCreatedInvitesInput = { export type UserUncheckedUpdateWithoutCreatedInvitesInput = {
@@ -1825,6 +2089,8 @@ export type UserUncheckedUpdateWithoutCreatedInvitesInput = {
agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUncheckedUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutCreatorNestedInput
} }
export type UserCreateWithoutCreatedNotificationsInput = { export type UserCreateWithoutCreatedNotificationsInput = {
@@ -1851,6 +2117,8 @@ export type UserCreateWithoutCreatedNotificationsInput = {
agent?: Prisma.AgentCreateNestedOneWithoutUserInput agent?: Prisma.AgentCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutCreatorInput
} }
export type UserUncheckedCreateWithoutCreatedNotificationsInput = { export type UserUncheckedCreateWithoutCreatedNotificationsInput = {
@@ -1877,6 +2145,8 @@ export type UserUncheckedCreateWithoutCreatedNotificationsInput = {
agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutCreatorInput
} }
export type UserCreateOrConnectWithoutCreatedNotificationsInput = { export type UserCreateOrConnectWithoutCreatedNotificationsInput = {
@@ -1911,6 +2181,8 @@ export type UserCreateWithoutNotificationsInput = {
agent?: Prisma.AgentCreateNestedOneWithoutUserInput agent?: Prisma.AgentCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutCreatorInput
} }
export type UserUncheckedCreateWithoutNotificationsInput = { export type UserUncheckedCreateWithoutNotificationsInput = {
@@ -1937,6 +2209,8 @@ export type UserUncheckedCreateWithoutNotificationsInput = {
agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutCreatorInput
} }
export type UserCreateOrConnectWithoutNotificationsInput = { export type UserCreateOrConnectWithoutNotificationsInput = {
@@ -1991,6 +2265,8 @@ export type UserUpdateWithoutCreatedNotificationsInput = {
agent?: Prisma.AgentUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUpdateManyWithoutCreatorNestedInput
} }
export type UserUncheckedUpdateWithoutCreatedNotificationsInput = { export type UserUncheckedUpdateWithoutCreatedNotificationsInput = {
@@ -2017,6 +2293,8 @@ export type UserUncheckedUpdateWithoutCreatedNotificationsInput = {
agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUncheckedUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutCreatorNestedInput
} }
export type UserUpsertWithoutNotificationsInput = { export type UserUpsertWithoutNotificationsInput = {
@@ -2063,6 +2341,8 @@ export type UserUpdateWithoutNotificationsInput = {
agent?: Prisma.AgentUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUpdateManyWithoutCreatorNestedInput
} }
export type UserUncheckedUpdateWithoutNotificationsInput = { export type UserUncheckedUpdateWithoutNotificationsInput = {
@@ -2089,6 +2369,8 @@ export type UserUncheckedUpdateWithoutNotificationsInput = {
agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUncheckedUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutCreatorNestedInput
} }
export type UserCreateWithoutTasksInput = { export type UserCreateWithoutTasksInput = {
@@ -2115,6 +2397,8 @@ export type UserCreateWithoutTasksInput = {
agent?: Prisma.AgentCreateNestedOneWithoutUserInput agent?: Prisma.AgentCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutCreatorInput
} }
export type UserUncheckedCreateWithoutTasksInput = { export type UserUncheckedCreateWithoutTasksInput = {
@@ -2141,6 +2425,8 @@ export type UserUncheckedCreateWithoutTasksInput = {
agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutCreatorInput
} }
export type UserCreateOrConnectWithoutTasksInput = { export type UserCreateOrConnectWithoutTasksInput = {
@@ -2192,6 +2478,8 @@ export type UserUpdateWithoutTasksInput = {
agent?: Prisma.AgentUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUpdateManyWithoutCreatorNestedInput
} }
export type UserUncheckedUpdateWithoutTasksInput = { export type UserUncheckedUpdateWithoutTasksInput = {
@@ -2218,6 +2506,8 @@ export type UserUncheckedUpdateWithoutTasksInput = {
agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUncheckedUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutCreatorNestedInput
} }
export type UserCreateWithoutAgentInput = { export type UserCreateWithoutAgentInput = {
@@ -2244,6 +2534,8 @@ export type UserCreateWithoutAgentInput = {
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutCreatorInput
} }
export type UserUncheckedCreateWithoutAgentInput = { export type UserUncheckedCreateWithoutAgentInput = {
@@ -2270,6 +2562,8 @@ export type UserUncheckedCreateWithoutAgentInput = {
accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutCreatorInput
} }
export type UserCreateOrConnectWithoutAgentInput = { export type UserCreateOrConnectWithoutAgentInput = {
@@ -2321,6 +2615,8 @@ export type UserUpdateWithoutAgentInput = {
accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUpdateManyWithoutCreatorNestedInput
} }
export type UserUncheckedUpdateWithoutAgentInput = { export type UserUncheckedUpdateWithoutAgentInput = {
@@ -2347,6 +2643,8 @@ export type UserUncheckedUpdateWithoutAgentInput = {
accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUncheckedUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutCreatorNestedInput
} }
export type UserCreateWithoutAgentSessionsInput = { export type UserCreateWithoutAgentSessionsInput = {
@@ -2373,6 +2671,8 @@ export type UserCreateWithoutAgentSessionsInput = {
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
agent?: Prisma.AgentCreateNestedOneWithoutUserInput agent?: Prisma.AgentCreateNestedOneWithoutUserInput
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutCreatorInput
} }
export type UserUncheckedCreateWithoutAgentSessionsInput = { export type UserUncheckedCreateWithoutAgentSessionsInput = {
@@ -2399,6 +2699,8 @@ export type UserUncheckedCreateWithoutAgentSessionsInput = {
accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutCreatorInput
} }
export type UserCreateOrConnectWithoutAgentSessionsInput = { export type UserCreateOrConnectWithoutAgentSessionsInput = {
@@ -2453,6 +2755,8 @@ export type UserUpdateWithoutAgentSessionsInput = {
accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
agent?: Prisma.AgentUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUpdateOneWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUpdateManyWithoutCreatorNestedInput
} }
export type UserUncheckedUpdateWithoutAgentSessionsInput = { export type UserUncheckedUpdateWithoutAgentSessionsInput = {
@@ -2479,6 +2783,8 @@ export type UserUncheckedUpdateWithoutAgentSessionsInput = {
accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUncheckedUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutCreatorNestedInput
} }
export type UserCreateWithoutUserMetadataInput = { export type UserCreateWithoutUserMetadataInput = {
@@ -2505,6 +2811,8 @@ export type UserCreateWithoutUserMetadataInput = {
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
agent?: Prisma.AgentCreateNestedOneWithoutUserInput agent?: Prisma.AgentCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutCreatorInput
} }
export type UserUncheckedCreateWithoutUserMetadataInput = { export type UserUncheckedCreateWithoutUserMetadataInput = {
@@ -2531,6 +2839,8 @@ export type UserUncheckedCreateWithoutUserMetadataInput = {
accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput
collections?: Prisma.CollectionUncheckedCreateNestedManyWithoutCreatorInput
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutCreatorInput
} }
export type UserCreateOrConnectWithoutUserMetadataInput = { export type UserCreateOrConnectWithoutUserMetadataInput = {
@@ -2585,6 +2895,8 @@ export type UserUpdateWithoutUserMetadataInput = {
accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
agent?: Prisma.AgentUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUpdateManyWithoutCreatorNestedInput
} }
export type UserUncheckedUpdateWithoutUserMetadataInput = { export type UserUncheckedUpdateWithoutUserMetadataInput = {
@@ -2611,6 +2923,148 @@ export type UserUncheckedUpdateWithoutUserMetadataInput = {
accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput
collections?: Prisma.CollectionUncheckedUpdateManyWithoutCreatorNestedInput
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutCreatorNestedInput
}
export type UserCreateWithoutCollectionsInput = {
id?: string
type?: $Enums.UserType
name: string
email: string
emailVerified?: boolean
image?: string | null
password?: string | null
agentSettings?: PrismaJson.AgentSettings | Prisma.NullableJsonNullValueInput
guestEmail?: string | null
createdAt?: Date | string
updatedAt?: Date | string
assets?: Prisma.AssetCreateNestedManyWithoutCreatorInput
authTokens?: Prisma.AuthTokenCreateNestedManyWithoutUserInput
tasks?: Prisma.TaskCreateNestedManyWithoutCreatorInput
teamMembers?: Prisma.TeamMemberCreateNestedManyWithoutUserInput
comments?: Prisma.AssetCommentCreateNestedManyWithoutCreatorInput
createdInvites?: Prisma.InviteCreateNestedManyWithoutInviterInput
createdNotifications?: Prisma.NotificationCreateNestedManyWithoutCreatorInput
notifications?: Prisma.NotificationCreateNestedManyWithoutUserInput
sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
agent?: Prisma.AgentCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutUserInput
shareLinks?: Prisma.ShareLinkCreateNestedManyWithoutCreatorInput
}
export type UserUncheckedCreateWithoutCollectionsInput = {
id?: string
type?: $Enums.UserType
name: string
email: string
emailVerified?: boolean
image?: string | null
password?: string | null
agentSettings?: PrismaJson.AgentSettings | Prisma.NullableJsonNullValueInput
guestEmail?: string | null
createdAt?: Date | string
updatedAt?: Date | string
assets?: Prisma.AssetUncheckedCreateNestedManyWithoutCreatorInput
authTokens?: Prisma.AuthTokenUncheckedCreateNestedManyWithoutUserInput
tasks?: Prisma.TaskUncheckedCreateNestedManyWithoutCreatorInput
teamMembers?: Prisma.TeamMemberUncheckedCreateNestedManyWithoutUserInput
comments?: Prisma.AssetCommentUncheckedCreateNestedManyWithoutCreatorInput
createdInvites?: Prisma.InviteUncheckedCreateNestedManyWithoutInviterInput
createdNotifications?: Prisma.NotificationUncheckedCreateNestedManyWithoutCreatorInput
notifications?: Prisma.NotificationUncheckedCreateNestedManyWithoutUserInput
sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
agent?: Prisma.AgentUncheckedCreateNestedOneWithoutUserInput
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutUserInput
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutUserInput
shareLinks?: Prisma.ShareLinkUncheckedCreateNestedManyWithoutCreatorInput
}
export type UserCreateOrConnectWithoutCollectionsInput = {
where: Prisma.UserWhereUniqueInput
create: Prisma.XOR<
Prisma.UserCreateWithoutCollectionsInput,
Prisma.UserUncheckedCreateWithoutCollectionsInput
>
}
export type UserUpsertWithoutCollectionsInput = {
update: Prisma.XOR<
Prisma.UserUpdateWithoutCollectionsInput,
Prisma.UserUncheckedUpdateWithoutCollectionsInput
>
create: Prisma.XOR<
Prisma.UserCreateWithoutCollectionsInput,
Prisma.UserUncheckedCreateWithoutCollectionsInput
>
where?: Prisma.UserWhereInput
}
export type UserUpdateToOneWithWhereWithoutCollectionsInput = {
where?: Prisma.UserWhereInput
data: Prisma.XOR<
Prisma.UserUpdateWithoutCollectionsInput,
Prisma.UserUncheckedUpdateWithoutCollectionsInput
>
}
export type UserUpdateWithoutCollectionsInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
type?: Prisma.EnumUserTypeFieldUpdateOperationsInput | $Enums.UserType
name?: Prisma.StringFieldUpdateOperationsInput | string
email?: Prisma.StringFieldUpdateOperationsInput | string
emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
password?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
agentSettings?: PrismaJson.AgentSettings | Prisma.NullableJsonNullValueInput
guestEmail?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
assets?: Prisma.AssetUpdateManyWithoutCreatorNestedInput
authTokens?: Prisma.AuthTokenUpdateManyWithoutUserNestedInput
tasks?: Prisma.TaskUpdateManyWithoutCreatorNestedInput
teamMembers?: Prisma.TeamMemberUpdateManyWithoutUserNestedInput
comments?: Prisma.AssetCommentUpdateManyWithoutCreatorNestedInput
createdInvites?: Prisma.InviteUpdateManyWithoutInviterNestedInput
createdNotifications?: Prisma.NotificationUpdateManyWithoutCreatorNestedInput
notifications?: Prisma.NotificationUpdateManyWithoutUserNestedInput
sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
agent?: Prisma.AgentUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUpdateManyWithoutUserNestedInput
shareLinks?: Prisma.ShareLinkUpdateManyWithoutCreatorNestedInput
}
export type UserUncheckedUpdateWithoutCollectionsInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
type?: Prisma.EnumUserTypeFieldUpdateOperationsInput | $Enums.UserType
name?: Prisma.StringFieldUpdateOperationsInput | string
email?: Prisma.StringFieldUpdateOperationsInput | string
emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
password?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
agentSettings?: PrismaJson.AgentSettings | Prisma.NullableJsonNullValueInput
guestEmail?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
assets?: Prisma.AssetUncheckedUpdateManyWithoutCreatorNestedInput
authTokens?: Prisma.AuthTokenUncheckedUpdateManyWithoutUserNestedInput
tasks?: Prisma.TaskUncheckedUpdateManyWithoutCreatorNestedInput
teamMembers?: Prisma.TeamMemberUncheckedUpdateManyWithoutUserNestedInput
comments?: Prisma.AssetCommentUncheckedUpdateManyWithoutCreatorNestedInput
createdInvites?: Prisma.InviteUncheckedUpdateManyWithoutInviterNestedInput
createdNotifications?: Prisma.NotificationUncheckedUpdateManyWithoutCreatorNestedInput
notifications?: Prisma.NotificationUncheckedUpdateManyWithoutUserNestedInput
sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
agent?: Prisma.AgentUncheckedUpdateOneWithoutUserNestedInput
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutUserNestedInput
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutUserNestedInput
shareLinks?: Prisma.ShareLinkUncheckedUpdateManyWithoutCreatorNestedInput
} }
/** /**
@@ -2630,6 +3084,8 @@ export type UserCountOutputType = {
accounts: number accounts: number
agentSessions: number agentSessions: number
userMetadata: number userMetadata: number
collections: number
shareLinks: number
} }
export type UserCountOutputTypeSelect< export type UserCountOutputTypeSelect<
@@ -2647,6 +3103,8 @@ export type UserCountOutputTypeSelect<
accounts?: boolean | UserCountOutputTypeCountAccountsArgs accounts?: boolean | UserCountOutputTypeCountAccountsArgs
agentSessions?: boolean | UserCountOutputTypeCountAgentSessionsArgs agentSessions?: boolean | UserCountOutputTypeCountAgentSessionsArgs
userMetadata?: boolean | UserCountOutputTypeCountUserMetadataArgs userMetadata?: boolean | UserCountOutputTypeCountUserMetadataArgs
collections?: boolean | UserCountOutputTypeCountCollectionsArgs
shareLinks?: boolean | UserCountOutputTypeCountShareLinksArgs
} }
/** /**
@@ -2769,6 +3227,24 @@ export type UserCountOutputTypeCountUserMetadataArgs<
where?: Prisma.UserMetadataWhereInput where?: Prisma.UserMetadataWhereInput
} }
/**
* UserCountOutputType without action
*/
export type UserCountOutputTypeCountCollectionsArgs<
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
where?: Prisma.CollectionWhereInput
}
/**
* UserCountOutputType without action
*/
export type UserCountOutputTypeCountShareLinksArgs<
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
where?: Prisma.ShareLinkWhereInput
}
export type UserSelect< export type UserSelect<
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = runtime.Types.Extensions.GetSelect< > = runtime.Types.Extensions.GetSelect<
@@ -2797,6 +3273,8 @@ export type UserSelect<
agent?: boolean | Prisma.User$agentArgs<ExtArgs> agent?: boolean | Prisma.User$agentArgs<ExtArgs>
agentSessions?: boolean | Prisma.User$agentSessionsArgs<ExtArgs> agentSessions?: boolean | Prisma.User$agentSessionsArgs<ExtArgs>
userMetadata?: boolean | Prisma.User$userMetadataArgs<ExtArgs> userMetadata?: boolean | Prisma.User$userMetadataArgs<ExtArgs>
collections?: boolean | Prisma.User$collectionsArgs<ExtArgs>
shareLinks?: boolean | Prisma.User$shareLinksArgs<ExtArgs>
_count?: boolean | Prisma.UserCountOutputTypeDefaultArgs<ExtArgs> _count?: boolean | Prisma.UserCountOutputTypeDefaultArgs<ExtArgs>
}, },
ExtArgs['result']['user'] ExtArgs['result']['user']
@@ -2886,6 +3364,8 @@ export type UserInclude<
agent?: boolean | Prisma.User$agentArgs<ExtArgs> agent?: boolean | Prisma.User$agentArgs<ExtArgs>
agentSessions?: boolean | Prisma.User$agentSessionsArgs<ExtArgs> agentSessions?: boolean | Prisma.User$agentSessionsArgs<ExtArgs>
userMetadata?: boolean | Prisma.User$userMetadataArgs<ExtArgs> userMetadata?: boolean | Prisma.User$userMetadataArgs<ExtArgs>
collections?: boolean | Prisma.User$collectionsArgs<ExtArgs>
shareLinks?: boolean | Prisma.User$shareLinksArgs<ExtArgs>
_count?: boolean | Prisma.UserCountOutputTypeDefaultArgs<ExtArgs> _count?: boolean | Prisma.UserCountOutputTypeDefaultArgs<ExtArgs>
} }
export type UserIncludeCreateManyAndReturn< export type UserIncludeCreateManyAndReturn<
@@ -2913,6 +3393,8 @@ export type $UserPayload<
agent: Prisma.$AgentPayload<ExtArgs> | null agent: Prisma.$AgentPayload<ExtArgs> | null
agentSessions: Prisma.$AgentSessionPayload<ExtArgs>[] agentSessions: Prisma.$AgentSessionPayload<ExtArgs>[]
userMetadata: Prisma.$UserMetadataPayload<ExtArgs>[] userMetadata: Prisma.$UserMetadataPayload<ExtArgs>[]
collections: Prisma.$CollectionPayload<ExtArgs>[]
shareLinks: Prisma.$ShareLinkPayload<ExtArgs>[]
} }
scalars: runtime.Types.Extensions.GetPayloadResult< scalars: runtime.Types.Extensions.GetPayloadResult<
{ {
@@ -3580,6 +4062,28 @@ export interface Prisma__UserClient<
> >
| Null | Null
> >
collections<T extends Prisma.User$collectionsArgs<ExtArgs> = {}>(
args?: Prisma.Subset<T, Prisma.User$collectionsArgs<ExtArgs>>,
): Prisma.PrismaPromise<
| runtime.Types.Result.GetResult<
Prisma.$CollectionPayload<ExtArgs>,
T,
'findMany',
GlobalOmitOptions
>
| Null
>
shareLinks<T extends Prisma.User$shareLinksArgs<ExtArgs> = {}>(
args?: Prisma.Subset<T, Prisma.User$shareLinksArgs<ExtArgs>>,
): Prisma.PrismaPromise<
| runtime.Types.Result.GetResult<
Prisma.$ShareLinkPayload<ExtArgs>,
T,
'findMany',
GlobalOmitOptions
>
| Null
>
/** /**
* Attaches callbacks for the resolution and/or rejection of the Promise. * Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved. * @param onfulfilled The callback to execute when the Promise is resolved.
@@ -4384,6 +4888,58 @@ export type User$userMetadataArgs<
distinct?: Prisma.UserMetadataScalarFieldEnum | Prisma.UserMetadataScalarFieldEnum[] distinct?: Prisma.UserMetadataScalarFieldEnum | Prisma.UserMetadataScalarFieldEnum[]
} }
/**
* User.collections
*/
export type User$collectionsArgs<
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
/**
* Select specific fields to fetch from the Collection
*/
select?: Prisma.CollectionSelect<ExtArgs> | null
/**
* Omit specific fields from the Collection
*/
omit?: Prisma.CollectionOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.CollectionInclude<ExtArgs> | null
where?: Prisma.CollectionWhereInput
orderBy?: Prisma.CollectionOrderByWithRelationInput | Prisma.CollectionOrderByWithRelationInput[]
cursor?: Prisma.CollectionWhereUniqueInput
take?: number
skip?: number
distinct?: Prisma.CollectionScalarFieldEnum | Prisma.CollectionScalarFieldEnum[]
}
/**
* User.shareLinks
*/
export type User$shareLinksArgs<
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
/**
* Select specific fields to fetch from the ShareLink
*/
select?: Prisma.ShareLinkSelect<ExtArgs> | null
/**
* Omit specific fields from the ShareLink
*/
omit?: Prisma.ShareLinkOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.ShareLinkInclude<ExtArgs> | null
where?: Prisma.ShareLinkWhereInput
orderBy?: Prisma.ShareLinkOrderByWithRelationInput | Prisma.ShareLinkOrderByWithRelationInput[]
cursor?: Prisma.ShareLinkWhereUniqueInput
take?: number
skip?: number
distinct?: Prisma.ShareLinkScalarFieldEnum | Prisma.ShareLinkScalarFieldEnum[]
}
/** /**
* User without action * User without action
*/ */
+8
View File
@@ -16,6 +16,14 @@ export const collectionSchema = z.object({
projectId: z.string(), projectId: z.string(),
createdAt: z.string(), createdAt: z.string(),
updatedAt: z.string(), updatedAt: z.string(),
creator: z
.object({
id: z.string(),
name: z.string(),
image: z.string().optional().nullable(),
})
.optional()
.nullable(),
}) })
export type CollectionInfo = z.infer<typeof collectionSchema> export type CollectionInfo = z.infer<typeof collectionSchema>
+1
View File
@@ -14,6 +14,7 @@ export interface ShareLinkInfo {
isExpired: boolean isExpired: boolean
createdAt: string createdAt: string
updatedAt: string updatedAt: string
creator?: { id: string; name: string; image?: string | null } | null
} }
export const createShareLinkRequestSchema = z.object({ export const createShareLinkRequestSchema = z.object({
@@ -134,7 +134,7 @@ export function FileBrowser({
}, [files, localUploadingFiles]) }, [files, localUploadingFiles])
const { data: shareLinksData } = useQuery({ const { data: shareLinksData } = useQuery({
queryKey: ['shares', teamId, projectId], queryKey: ['shares', projectId],
queryFn: async () => { queryFn: async () => {
const res = await client.api.projects[':projectId'].shares.$get({ const res = await client.api.projects[':projectId'].shares.$get({
param: { projectId }, param: { projectId },
@@ -143,7 +143,7 @@ export function FileBrowser({
if (!res.ok) throw new Error('Failed to fetch share links') if (!res.ok) throw new Error('Failed to fetch share links')
return (await res.json()) as unknown as { data: ShareLinkInfo[] } return (await res.json()) as unknown as { data: ShareLinkInfo[] }
}, },
enabled: !!teamId && !!projectId && !isPublic, enabled: !!projectId && !isPublic,
}) })
const $reparent = client.api.projects[':projectId'].reparent.$post const $reparent = client.api.projects[':projectId'].reparent.$post
@@ -265,7 +265,7 @@ export function FileBrowser({
return share return share
}, },
onSuccess: (share) => { onSuccess: (share) => {
queryClient.invalidateQueries({ queryKey: ['shares', teamId, projectId] }) queryClient.invalidateQueries({ queryKey: ['shares', projectId] })
toast.success('Share link created', { toast.success('Share link created', {
action: { action: {
label: 'View', label: 'View',
@@ -706,7 +706,7 @@ export function FileBrowser({
const handlePaste = useCallback( const handlePaste = useCallback(
(e: React.ClipboardEvent | ClipboardEvent) => { (e: React.ClipboardEvent | ClipboardEvent) => {
if (isShareView) return if (isShareView || !!collection) return
if (!e.clipboardData) return if (!e.clipboardData) return
const items = e.clipboardData.items const items = e.clipboardData.items
const files: File[] = [] const files: File[] = []
@@ -739,13 +739,13 @@ export function FileBrowser({
processAndUploadFiles(files) processAndUploadFiles(files)
} }
}, },
[processAndUploadFiles], [processAndUploadFiles, isShareView, collection],
) )
// Add global paste listener if browser is active // Add global paste listener if browser is active
useEffect(() => { useEffect(() => {
const onGlobalPaste = (e: ClipboardEvent) => { const onGlobalPaste = (e: ClipboardEvent) => {
if (isShareView) return if (isShareView || !!collection) return
// Don't intercept if user is typing in an input // Don't intercept if user is typing in an input
if ( if (
document.activeElement && document.activeElement &&
@@ -762,12 +762,12 @@ export function FileBrowser({
return () => { return () => {
window.removeEventListener('paste', onGlobalPaste) window.removeEventListener('paste', onGlobalPaste)
} }
}, [handlePaste, isShareView]) }, [handlePaste, isShareView, collection])
const renderContent = () => { const renderContent = () => {
return ( return (
<ContextMenu modal={false}> <ContextMenu modal={false}>
<ContextMenuTrigger asChild disabled={isShareView || isPublic}> <ContextMenuTrigger asChild disabled={isShareView || isPublic || !!collection}>
<div <div
className="flex-1 bg-background relative flex flex-col min-h-0 overflow-hidden" className="flex-1 bg-background relative flex flex-col min-h-0 overflow-hidden"
onContextMenu={(e) => onContextMenu(e)} onContextMenu={(e) => onContextMenu(e)}
+351 -21
View File
@@ -16,6 +16,7 @@ import {
Share2, Share2,
LayoutGrid, LayoutGrid,
Bookmark, Bookmark,
MoreHorizontal,
} from 'lucide-react' } from 'lucide-react'
import { useEffect, useMemo, useState } from 'react' import { useEffect, useMemo, useState } from 'react'
import { useInView } from 'react-intersection-observer' import { useInView } from 'react-intersection-observer'
@@ -24,6 +25,31 @@ import type { DragState } from './dnd-types'
import { toast } from 'sonner' import { toast } from 'sonner'
import type { ShareLinkInfo } from '@shumai/dtos' import type { ShareLinkInfo } from '@shumai/dtos'
import type { CollectionInfo } from '@shumai/dtos' import type { CollectionInfo } from '@shumai/dtos'
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from '@/ui/components/ui/dropdown-menu'
import {
Dialog,
DialogContent,
DialogHeader,
DialogTitle,
DialogFooter,
} from '@/ui/components/ui/dialog'
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from '@/ui/components/ui/alert-dialog'
import { Input } from '@/ui/components/ui/input'
import { Button } from '@/ui/components/ui/button'
interface FolderTreeProps { interface FolderTreeProps {
teamId: string teamId: string
@@ -144,6 +170,110 @@ export function FolderTree({
}, },
}) })
const params = useParams({
from: '/projects/$projectId/collections/$collectionId',
shouldThrow: false,
})
const shareParams = useParams({
from: '/projects/$projectId/shares/$shareId',
shouldThrow: false,
})
const [renameId, setRenameId] = useState<string | null>(null)
const [renameType, setRenameType] = useState<'collection' | 'share'>('collection')
const [renameName, setRenameName] = useState('')
const [isRenameOpen, setIsRenameOpen] = useState(false)
const [deleteId, setDeleteId] = useState<string | null>(null)
const [deleteType, setDeleteType] = useState<'collection' | 'share'>('collection')
const [isDeleteOpen, setIsDeleteOpen] = useState(false)
const { mutate: renameCollection } = useMutation({
mutationFn: async ({ id, name }: { id: string; name: string }) => {
const res = await client.api.collections[':collectionId'].$patch({
param: { collectionId: id },
json: { name },
})
if (!res.ok) throw new Error('Failed to rename collection')
return await res.json()
},
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['collections', projectId] })
toast.success('Collection renamed')
setIsRenameOpen(false)
},
onError: (err) => {
toast.error(`Error: ${err.message}`)
},
})
const { mutate: deleteCollection } = useMutation({
mutationFn: async (id: string) => {
const res = await client.api.collections[':collectionId'].$delete({
param: { collectionId: id },
})
if (!res.ok) throw new Error('Failed to delete collection')
return await res.json()
},
onSuccess: (_, deletedId) => {
queryClient.invalidateQueries({ queryKey: ['collections', projectId] })
toast.success('Collection deleted')
setIsDeleteOpen(false)
if (params?.collectionId === deletedId) {
navigate({
to: '/projects/$projectId',
params: { projectId },
})
}
},
onError: (err) => {
toast.error(`Error: ${err.message}`)
},
})
const { mutate: renameShareLink } = useMutation({
mutationFn: async ({ id, name }: { id: string; name: string }) => {
const res = await client.api.shares[':shareId'].$put({
param: { shareId: id },
json: { name },
})
if (!res.ok) throw new Error('Failed to rename share link')
return await res.json()
},
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['shares', projectId] })
toast.success('Share link renamed')
setIsRenameOpen(false)
},
onError: (err) => {
toast.error(`Error: ${err.message}`)
},
})
const { mutate: deleteShareLink } = useMutation({
mutationFn: async (id: string) => {
const res = await client.api.shares[':shareId'].$delete({
param: { shareId: id },
})
if (!res.ok) throw new Error('Failed to delete share link')
return id
},
onSuccess: (deletedId) => {
queryClient.invalidateQueries({ queryKey: ['shares', projectId] })
toast.success('Share link deleted')
setIsDeleteOpen(false)
if (shareParams?.shareId === deletedId) {
navigate({
to: '/projects/$projectId',
params: { projectId },
})
}
},
onError: (err) => {
toast.error(`Error: ${err.message}`)
},
})
const shareLinks = shareLinksData?.data ?? [] const shareLinks = shareLinksData?.data ?? []
return ( return (
@@ -255,23 +385,89 @@ export function FolderTree({
: 'opacity-0 invisible pointer-events-none h-0', : 'opacity-0 invisible pointer-events-none h-0',
)} )}
> >
{collectionsData?.data.map((collection) => ( <div
<div className="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"
key={collection.id} onClick={() =>
className="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" navigate({
onClick={() => to: '/projects/$projectId/collections',
navigate({ params: { projectId },
to: '/projects/$projectId/collections/$collectionId', })
params: { projectId, collectionId: collection.id }, }
}) >
} <div className="flex h-4 w-4 items-center justify-center">
> <LayoutGrid className="h-4 w-4 text-sidebar-primary" />
<div className="flex h-4 w-4 items-center justify-center">
<Bookmark className="h-4 w-4 text-sidebar-primary" />
</div>
<span className="flex-1 truncate text-sidebar-foreground">{collection.name}</span>
</div> </div>
))} <span className="flex-1 truncate text-sidebar-foreground">
All Collections ({collectionsData?.data.length || 0})
</span>
</div>
{collectionsData?.data.map((collection) => {
const isColActive = params?.collectionId === collection.id
return (
<div
key={collection.id}
className={cn(
'group flex cursor-pointer items-center justify-between rounded-md px-2 py-1 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
isColActive && 'bg-sidebar-accent text-sidebar-accent-foreground font-medium',
)}
onClick={() =>
navigate({
to: '/projects/$projectId/collections/$collectionId',
params: { projectId, collectionId: collection.id },
})
}
>
<div className="flex items-center gap-2 min-w-0 flex-1">
<div className="flex h-4 w-4 items-center justify-center shrink-0">
<Bookmark className="h-4 w-4 text-sidebar-primary" />
</div>
<span className="truncate text-sidebar-foreground flex-1">
{collection.name}
</span>
</div>
<div
className="opacity-0 group-hover:opacity-100 transition-opacity"
onClick={(e) => e.stopPropagation()}
>
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
<Button
variant="ghost"
size="icon-sm"
className="h-6 w-6 shrink-0 hover:bg-muted hover:text-muted-foreground p-0"
>
<MoreHorizontal className="h-3.5 w-3.5" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" className="w-32">
<DropdownMenuItem
onClick={() => {
setRenameId(collection.id)
setRenameType('collection')
setRenameName(collection.name)
setIsRenameOpen(true)
}}
>
Rename
</DropdownMenuItem>
<DropdownMenuItem
className="text-destructive focus:text-destructive focus:bg-destructive/10"
onClick={() => {
setDeleteId(collection.id)
setDeleteType('collection')
setIsDeleteOpen(true)
}}
>
Delete
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</div>
</div>
)
})}
</div> </div>
</div> </div>
)} )}
@@ -313,7 +509,15 @@ export function FolderTree({
: 'opacity-0 invisible pointer-events-none h-0', : 'opacity-0 invisible pointer-events-none h-0',
)} )}
> >
<div className="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"> <div
className="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"
onClick={() =>
navigate({
to: '/projects/$projectId/shares',
params: { projectId },
})
}
>
<div className="flex h-4 w-4 items-center justify-center"> <div className="flex h-4 w-4 items-center justify-center">
<LayoutGrid className="h-4 w-4 text-sidebar-primary" /> <LayoutGrid className="h-4 w-4 text-sidebar-primary" />
</div> </div>
@@ -328,11 +532,97 @@ export function FolderTree({
link={link} link={link}
projectId={projectId} projectId={projectId}
dragState={dragState} dragState={dragState}
onRenameTrigger={(id, currentName) => {
setRenameId(id)
setRenameType('share')
setRenameName(currentName)
setIsRenameOpen(true)
}}
onDeleteTrigger={(id) => {
setDeleteId(id)
setDeleteType('share')
setIsDeleteOpen(true)
}}
/> />
))} ))}
</div> </div>
</div> </div>
)} )}
{/* Rename Dialog */}
<Dialog open={isRenameOpen} onOpenChange={setIsRenameOpen}>
<DialogContent onClick={(e) => e.stopPropagation()}>
<DialogHeader>
<DialogTitle>
Rename {renameType === 'collection' ? 'Collection' : 'Share Link'}
</DialogTitle>
</DialogHeader>
<div className="py-4">
<Input
value={renameName}
onChange={(e) => setRenameName(e.target.value)}
placeholder="Enter new name"
onKeyDown={(e) => {
if (e.key === 'Enter' && renameName.trim()) {
if (renameType === 'collection') {
renameCollection({ id: renameId!, name: renameName })
} else {
renameShareLink({ id: renameId!, name: renameName })
}
}
}}
/>
</div>
<DialogFooter>
<Button variant="ghost" onClick={() => setIsRenameOpen(false)}>
Cancel
</Button>
<Button
disabled={!renameName.trim()}
onClick={() => {
if (renameType === 'collection') {
renameCollection({ id: renameId!, name: renameName })
} else {
renameShareLink({ id: renameId!, name: renameName })
}
}}
>
Rename
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
{/* Delete Confirmation Alert Dialog */}
<AlertDialog open={isDeleteOpen} onOpenChange={setIsDeleteOpen}>
<AlertDialogContent onClick={(e) => e.stopPropagation()}>
<AlertDialogHeader>
<AlertDialogTitle>
Delete {deleteType === 'collection' ? 'Collection' : 'Share Link'}?
</AlertDialogTitle>
<AlertDialogDescription>
Are you sure you want to delete this{' '}
{deleteType === 'collection' ? 'collection' : 'share link'}? This action cannot be
undone.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
onClick={() => {
if (deleteType === 'collection') {
deleteCollection(deleteId!)
} else {
deleteShareLink(deleteId!)
}
}}
>
Delete
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div> </div>
) )
} }
@@ -341,10 +631,14 @@ function ShareLinkItem({
link, link,
projectId, projectId,
dragState, dragState,
onRenameTrigger,
onDeleteTrigger,
}: { }: {
link: ShareLinkInfo link: ShareLinkInfo
projectId: string projectId: string
dragState?: DragState dragState?: DragState
onRenameTrigger: (id: string, currentName: string) => void
onDeleteTrigger: (id: string) => void
}) { }) {
const navigate = useNavigate() const navigate = useNavigate()
const params = useParams({ const params = useParams({
@@ -367,7 +661,7 @@ function ShareLinkItem({
<div <div
ref={setDroppableRef} ref={setDroppableRef}
className={cn( 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', 'group flex cursor-pointer items-center justify-between rounded-md px-2 py-1 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
isActive && 'bg-sidebar-accent text-sidebar-accent-foreground font-medium', isActive && 'bg-sidebar-accent text-sidebar-accent-foreground font-medium',
isOver && isValidDropTarget && 'bg-sidebar-accent ring-2 ring-primary ring-inset', isOver && isValidDropTarget && 'bg-sidebar-accent ring-2 ring-primary ring-inset',
)} )}
@@ -378,10 +672,46 @@ function ShareLinkItem({
}) })
} }
> >
<div className="flex h-4 w-4 items-center justify-center"> <div className="flex items-center gap-2 min-w-0 flex-1">
<Share2 className="h-4 w-4 text-sidebar-primary" /> <div className="flex h-4 w-4 items-center justify-center shrink-0">
<Share2 className="h-4 w-4 text-sidebar-primary" />
</div>
<span className="truncate text-sidebar-foreground flex-1">{link.name}</span>
</div>
<div
className="opacity-0 group-hover:opacity-100 transition-opacity"
onClick={(e) => e.stopPropagation()}
>
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
<Button
variant="ghost"
size="icon-sm"
className="h-6 w-6 shrink-0 hover:bg-muted hover:text-muted-foreground p-0"
>
<MoreHorizontal className="h-3.5 w-3.5" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" className="w-32">
<DropdownMenuItem
onClick={() => {
onRenameTrigger(link.id, link.name)
}}
>
Rename
</DropdownMenuItem>
<DropdownMenuItem
className="text-destructive focus:text-destructive focus:bg-destructive/10"
onClick={() => {
onDeleteTrigger(link.id)
}}
>
Delete
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</div> </div>
<span className="flex-1 truncate text-sidebar-foreground">{link.name}</span>
</div> </div>
) )
} }
+42
View File
@@ -18,6 +18,8 @@ import { Route as ShareShareIdIndexRouteImport } from './routes/share/$shareId/i
import { Route as ProjectsProjectIdIndexRouteImport } from './routes/projects/$projectId/index' import { Route as ProjectsProjectIdIndexRouteImport } from './routes/projects/$projectId/index'
import { Route as TeamsTeamIdSettingsRouteImport } from './routes/teams/$teamId/settings' import { Route as TeamsTeamIdSettingsRouteImport } from './routes/teams/$teamId/settings'
import { Route as ProjectsProjectIdRecentlyDeletedRouteImport } from './routes/projects/$projectId/recently-deleted' import { Route as ProjectsProjectIdRecentlyDeletedRouteImport } from './routes/projects/$projectId/recently-deleted'
import { Route as ProjectsProjectIdSharesIndexRouteImport } from './routes/projects/$projectId/shares/index'
import { Route as ProjectsProjectIdCollectionsIndexRouteImport } from './routes/projects/$projectId/collections/index'
import { Route as ShareShareIdFoldersFolderIdRouteImport } from './routes/share/$shareId/folders/$folderId' import { Route as ShareShareIdFoldersFolderIdRouteImport } from './routes/share/$shareId/folders/$folderId'
import { Route as ShareShareIdFilesFileIdRouteImport } from './routes/share/$shareId/files/$fileId' import { Route as ShareShareIdFilesFileIdRouteImport } from './routes/share/$shareId/files/$fileId'
import { Route as ProjectsProjectIdSharesShareIdRouteImport } from './routes/projects/$projectId/shares/$shareId' import { Route as ProjectsProjectIdSharesShareIdRouteImport } from './routes/projects/$projectId/shares/$shareId'
@@ -70,6 +72,16 @@ const ProjectsProjectIdRecentlyDeletedRoute = ProjectsProjectIdRecentlyDeletedRo
path: '/projects/$projectId/recently-deleted', path: '/projects/$projectId/recently-deleted',
getParentRoute: () => rootRouteImport, getParentRoute: () => rootRouteImport,
} as any) } as any)
const ProjectsProjectIdSharesIndexRoute = ProjectsProjectIdSharesIndexRouteImport.update({
id: '/projects/$projectId/shares/',
path: '/projects/$projectId/shares/',
getParentRoute: () => rootRouteImport,
} as any)
const ProjectsProjectIdCollectionsIndexRoute = ProjectsProjectIdCollectionsIndexRouteImport.update({
id: '/projects/$projectId/collections/',
path: '/projects/$projectId/collections/',
getParentRoute: () => rootRouteImport,
} as any)
const ShareShareIdFoldersFolderIdRoute = ShareShareIdFoldersFolderIdRouteImport.update({ const ShareShareIdFoldersFolderIdRoute = ShareShareIdFoldersFolderIdRouteImport.update({
id: '/folders/$folderId', id: '/folders/$folderId',
path: '/folders/$folderId', path: '/folders/$folderId',
@@ -118,6 +130,8 @@ export interface FileRoutesByFullPath {
'/projects/$projectId/shares/$shareId': typeof ProjectsProjectIdSharesShareIdRoute '/projects/$projectId/shares/$shareId': typeof ProjectsProjectIdSharesShareIdRoute
'/share/$shareId/files/$fileId': typeof ShareShareIdFilesFileIdRoute '/share/$shareId/files/$fileId': typeof ShareShareIdFilesFileIdRoute
'/share/$shareId/folders/$folderId': typeof ShareShareIdFoldersFolderIdRoute '/share/$shareId/folders/$folderId': typeof ShareShareIdFoldersFolderIdRoute
'/projects/$projectId/collections/': typeof ProjectsProjectIdCollectionsIndexRoute
'/projects/$projectId/shares/': typeof ProjectsProjectIdSharesIndexRoute
} }
export interface FileRoutesByTo { export interface FileRoutesByTo {
'/': typeof IndexRoute '/': typeof IndexRoute
@@ -134,6 +148,8 @@ export interface FileRoutesByTo {
'/projects/$projectId/shares/$shareId': typeof ProjectsProjectIdSharesShareIdRoute '/projects/$projectId/shares/$shareId': typeof ProjectsProjectIdSharesShareIdRoute
'/share/$shareId/files/$fileId': typeof ShareShareIdFilesFileIdRoute '/share/$shareId/files/$fileId': typeof ShareShareIdFilesFileIdRoute
'/share/$shareId/folders/$folderId': typeof ShareShareIdFoldersFolderIdRoute '/share/$shareId/folders/$folderId': typeof ShareShareIdFoldersFolderIdRoute
'/projects/$projectId/collections': typeof ProjectsProjectIdCollectionsIndexRoute
'/projects/$projectId/shares': typeof ProjectsProjectIdSharesIndexRoute
} }
export interface FileRoutesById { export interface FileRoutesById {
__root__: typeof rootRouteImport __root__: typeof rootRouteImport
@@ -152,6 +168,8 @@ export interface FileRoutesById {
'/projects/$projectId/shares/$shareId': typeof ProjectsProjectIdSharesShareIdRoute '/projects/$projectId/shares/$shareId': typeof ProjectsProjectIdSharesShareIdRoute
'/share/$shareId/files/$fileId': typeof ShareShareIdFilesFileIdRoute '/share/$shareId/files/$fileId': typeof ShareShareIdFilesFileIdRoute
'/share/$shareId/folders/$folderId': typeof ShareShareIdFoldersFolderIdRoute '/share/$shareId/folders/$folderId': typeof ShareShareIdFoldersFolderIdRoute
'/projects/$projectId/collections/': typeof ProjectsProjectIdCollectionsIndexRoute
'/projects/$projectId/shares/': typeof ProjectsProjectIdSharesIndexRoute
} }
export interface FileRouteTypes { export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath fileRoutesByFullPath: FileRoutesByFullPath
@@ -171,6 +189,8 @@ export interface FileRouteTypes {
| '/projects/$projectId/shares/$shareId' | '/projects/$projectId/shares/$shareId'
| '/share/$shareId/files/$fileId' | '/share/$shareId/files/$fileId'
| '/share/$shareId/folders/$folderId' | '/share/$shareId/folders/$folderId'
| '/projects/$projectId/collections/'
| '/projects/$projectId/shares/'
fileRoutesByTo: FileRoutesByTo fileRoutesByTo: FileRoutesByTo
to: to:
| '/' | '/'
@@ -187,6 +207,8 @@ export interface FileRouteTypes {
| '/projects/$projectId/shares/$shareId' | '/projects/$projectId/shares/$shareId'
| '/share/$shareId/files/$fileId' | '/share/$shareId/files/$fileId'
| '/share/$shareId/folders/$folderId' | '/share/$shareId/folders/$folderId'
| '/projects/$projectId/collections'
| '/projects/$projectId/shares'
id: id:
| '__root__' | '__root__'
| '/' | '/'
@@ -204,6 +226,8 @@ export interface FileRouteTypes {
| '/projects/$projectId/shares/$shareId' | '/projects/$projectId/shares/$shareId'
| '/share/$shareId/files/$fileId' | '/share/$shareId/files/$fileId'
| '/share/$shareId/folders/$folderId' | '/share/$shareId/folders/$folderId'
| '/projects/$projectId/collections/'
| '/projects/$projectId/shares/'
fileRoutesById: FileRoutesById fileRoutesById: FileRoutesById
} }
export interface RootRouteChildren { export interface RootRouteChildren {
@@ -219,6 +243,8 @@ export interface RootRouteChildren {
ProjectsProjectIdFilesFileIdRoute: typeof ProjectsProjectIdFilesFileIdRoute ProjectsProjectIdFilesFileIdRoute: typeof ProjectsProjectIdFilesFileIdRoute
ProjectsProjectIdFoldersFolderIdRoute: typeof ProjectsProjectIdFoldersFolderIdRoute ProjectsProjectIdFoldersFolderIdRoute: typeof ProjectsProjectIdFoldersFolderIdRoute
ProjectsProjectIdSharesShareIdRoute: typeof ProjectsProjectIdSharesShareIdRoute ProjectsProjectIdSharesShareIdRoute: typeof ProjectsProjectIdSharesShareIdRoute
ProjectsProjectIdCollectionsIndexRoute: typeof ProjectsProjectIdCollectionsIndexRoute
ProjectsProjectIdSharesIndexRoute: typeof ProjectsProjectIdSharesIndexRoute
} }
declare module '@tanstack/react-router' { declare module '@tanstack/react-router' {
@@ -286,6 +312,20 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof ProjectsProjectIdRecentlyDeletedRouteImport preLoaderRoute: typeof ProjectsProjectIdRecentlyDeletedRouteImport
parentRoute: typeof rootRouteImport parentRoute: typeof rootRouteImport
} }
'/projects/$projectId/shares/': {
id: '/projects/$projectId/shares/'
path: '/projects/$projectId/shares'
fullPath: '/projects/$projectId/shares/'
preLoaderRoute: typeof ProjectsProjectIdSharesIndexRouteImport
parentRoute: typeof rootRouteImport
}
'/projects/$projectId/collections/': {
id: '/projects/$projectId/collections/'
path: '/projects/$projectId/collections'
fullPath: '/projects/$projectId/collections/'
preLoaderRoute: typeof ProjectsProjectIdCollectionsIndexRouteImport
parentRoute: typeof rootRouteImport
}
'/share/$shareId/folders/$folderId': { '/share/$shareId/folders/$folderId': {
id: '/share/$shareId/folders/$folderId' id: '/share/$shareId/folders/$folderId'
path: '/folders/$folderId' path: '/folders/$folderId'
@@ -358,6 +398,8 @@ const rootRouteChildren: RootRouteChildren = {
ProjectsProjectIdFilesFileIdRoute: ProjectsProjectIdFilesFileIdRoute, ProjectsProjectIdFilesFileIdRoute: ProjectsProjectIdFilesFileIdRoute,
ProjectsProjectIdFoldersFolderIdRoute: ProjectsProjectIdFoldersFolderIdRoute, ProjectsProjectIdFoldersFolderIdRoute: ProjectsProjectIdFoldersFolderIdRoute,
ProjectsProjectIdSharesShareIdRoute: ProjectsProjectIdSharesShareIdRoute, ProjectsProjectIdSharesShareIdRoute: ProjectsProjectIdSharesShareIdRoute,
ProjectsProjectIdCollectionsIndexRoute: ProjectsProjectIdCollectionsIndexRoute,
ProjectsProjectIdSharesIndexRoute: ProjectsProjectIdSharesIndexRoute,
} }
export const routeTree = rootRouteImport export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren) ._addFileChildren(rootRouteChildren)
@@ -0,0 +1,184 @@
import { client } from '@/ui/api/client'
import { FolderTree } from '@/ui/components/folder-tree'
import { ResizeHandle } from '@/ui/components/resize-handle'
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from '@/ui/components/ui/table'
import { useUiStore } from '@/ui/stores/ui'
import { useTeamContextStore } from '@/ui/stores/team-context'
import { useQuery, useSuspenseQuery } from '@tanstack/react-query'
import { createFileRoute, useNavigate } from '@tanstack/react-router'
import { useEffect, useState } from 'react'
import { Bookmark, Calendar, User, LayoutGrid } from 'lucide-react'
import type { CollectionInfo } from '@shumai/dtos'
import { ProjectFolderSkeleton } from '@/ui/components/loading-skeletons'
const projectInfoQueryOptions = (projectId: string) => ({
queryKey: ['projects', projectId],
queryFn: async () => {
const res = await client.api.projects[':projectId'].$get({
param: { projectId },
})
if (!res.ok) throw new Error('Failed to fetch project')
return await res.json()
},
})
function CollectionsPage() {
const { projectId } = Route.useParams()
const { teamId, ensureTeamIdForProject } = useTeamContextStore()
const navigate = useNavigate()
useEffect(() => {
ensureTeamIdForProject(projectId)
}, [projectId, ensureTeamIdForProject])
const { data: projectInfo } = useSuspenseQuery(projectInfoQueryOptions(projectId))
const rootFolderId = projectInfo?.rootFolder
const [leftSidebarWidth, setLeftSidebarWidth] = useState(240)
const {
fileListLeftSidebarCollapsed: isLeftSidebarCollapsed,
setFileListLeftSidebarCollapsed: setIsLeftSidebarCollapsed,
} = useUiStore()
const { data: collectionsData, isLoading: isCollectionsLoading } = useQuery({
queryKey: ['collections', projectId],
queryFn: async () => {
const res = await client.api.projects[':projectId'].collections.$get({
param: { projectId },
query: { first: '100' },
})
if (!res.ok) throw new Error('Failed to fetch collections')
return (await res.json()) as unknown as { data: CollectionInfo[] }
},
enabled: !!projectId,
})
if (!teamId || !rootFolderId || !projectInfo) {
return <ProjectFolderSkeleton />
}
const collections = collectionsData?.data ?? []
return (
<div className="flex flex-1 flex-col bg-background min-h-0">
<div className="flex flex-1 overflow-hidden relative">
{!isLeftSidebarCollapsed && (
<div
className="md:hidden fixed inset-0 bg-black/50 z-40"
onClick={() => setIsLeftSidebarCollapsed(true)}
/>
)}
{!isLeftSidebarCollapsed && (
<>
<div className="bg-background" style={{ width: leftSidebarWidth }}>
<FolderTree
teamId={teamId}
projectId={projectId}
projectName={projectInfo.name ?? ''}
rootFolderId={rootFolderId}
/>
</div>
<ResizeHandle
onResize={(delta) => {
setLeftSidebarWidth((prev) => Math.max(180, Math.min(400, prev + delta)))
}}
className="hidden md:block"
/>
</>
)}
{/* Main Content Area */}
<div className="flex-1 flex flex-col min-h-0 bg-card overflow-hidden">
<header className="h-14 border-b flex items-center justify-between px-6 shrink-0 bg-background/50 backdrop-blur-sm sticky top-0 z-10">
<div className="flex items-center gap-2">
<Bookmark className="h-5 w-5 text-primary" />
<h1 className="font-bold text-lg text-foreground">All Collections</h1>
</div>
</header>
<div className="flex-1 overflow-y-auto p-6">
{isCollectionsLoading ? (
<div className="flex justify-center items-center h-64">
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-primary"></div>
</div>
) : collections.length === 0 ? (
<div className="flex flex-col items-center justify-center h-64 text-muted-foreground gap-3">
<LayoutGrid className="h-10 w-10 text-muted-foreground/50" />
<p>No collections created yet.</p>
</div>
) : (
<div className="border border-border rounded-xl bg-background overflow-hidden shadow-xs">
<Table>
<TableHeader>
<TableRow className="hover:bg-transparent bg-muted/20">
<TableHead className="font-semibold px-4 py-3">Collection Name</TableHead>
<TableHead className="font-semibold px-4 py-3">Creator</TableHead>
<TableHead className="font-semibold px-4 py-3 w-[200px]">
Created Date
</TableHead>
</TableRow>
</TableHeader>
<TableBody>
{collections.map((collection) => (
<TableRow
key={collection.id}
className="hover:bg-muted/10 transition-colors cursor-pointer"
onClick={() =>
navigate({
to: '/projects/$projectId/collections/$collectionId',
params: { projectId, collectionId: collection.id },
})
}
>
<TableCell className="font-medium px-4 py-3.5">
<div className="flex items-center gap-2">
<Bookmark className="h-4 w-4 text-primary shrink-0" />
<span className="text-foreground font-semibold hover:underline">
{collection.name}
</span>
</div>
</TableCell>
<TableCell className="px-4 py-3.5">
<div className="flex items-center gap-2">
<div className="h-6 w-6 rounded-full bg-primary/10 flex items-center justify-center shrink-0">
<User className="h-3.5 w-3.5 text-primary" />
</div>
<span className="text-sm font-medium text-foreground truncate max-w-[200px]">
{collection.creator?.name || 'Unknown'}
</span>
</div>
</TableCell>
<TableCell className="px-4 py-3.5 text-muted-foreground text-sm">
<div className="flex items-center gap-2">
<Calendar className="h-3.5 w-3.5 text-muted-foreground/70" />
<span>{new Date(collection.createdAt).toLocaleDateString()}</span>
</div>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</div>
)}
</div>
</div>
</div>
</div>
)
}
export const Route = createFileRoute('/projects/$projectId/collections/')({
component: CollectionsPage,
loader: ({ context: { queryClient }, params: { projectId } }) =>
queryClient.ensureQueryData(projectInfoQueryOptions(projectId)),
pendingComponent: () => <ProjectFolderSkeleton />,
})
@@ -0,0 +1,252 @@
import { client } from '@/ui/api/client'
import { FolderTree } from '@/ui/components/folder-tree'
import { ResizeHandle } from '@/ui/components/resize-handle'
import { Switch } from '@/ui/components/ui/switch'
import { Button } from '@/ui/components/ui/button'
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from '@/ui/components/ui/table'
import { useUiStore } from '@/ui/stores/ui'
import { useTeamContextStore } from '@/ui/stores/team-context'
import { useMutation, useQuery, useQueryClient, useSuspenseQuery } from '@tanstack/react-query'
import { createFileRoute, useNavigate } from '@tanstack/react-router'
import { useEffect, useState } from 'react'
import { Copy, ExternalLink, Calendar, User, Link2, Share2 } from 'lucide-react'
import { toast } from 'sonner'
import type { ShareLinkInfo } from '@shumai/dtos'
import { ProjectFolderSkeleton } from '@/ui/components/loading-skeletons'
const projectInfoQueryOptions = (projectId: string) => ({
queryKey: ['projects', projectId],
queryFn: async () => {
const res = await client.api.projects[':projectId'].$get({
param: { projectId },
})
if (!res.ok) throw new Error('Failed to fetch project')
return await res.json()
},
})
function SharesPage() {
const { projectId } = Route.useParams()
const { teamId, ensureTeamIdForProject } = useTeamContextStore()
const queryClient = useQueryClient()
const navigate = useNavigate()
useEffect(() => {
ensureTeamIdForProject(projectId)
}, [projectId, ensureTeamIdForProject])
const { data: projectInfo } = useSuspenseQuery(projectInfoQueryOptions(projectId))
const rootFolderId = projectInfo?.rootFolder
const [leftSidebarWidth, setLeftSidebarWidth] = useState(240)
const {
fileListLeftSidebarCollapsed: isLeftSidebarCollapsed,
setFileListLeftSidebarCollapsed: setIsLeftSidebarCollapsed,
} = useUiStore()
const { data: sharesData, isLoading: isSharesLoading } = useQuery({
queryKey: ['shares', projectId],
queryFn: async () => {
const res = await client.api.projects[':projectId'].shares.$get({
param: { projectId },
query: { first: '100' },
})
if (!res.ok) throw new Error('Failed to fetch share links')
return (await res.json()) as unknown as { data: ShareLinkInfo[] }
},
enabled: !!projectId,
})
const { mutate: toggleVisibility } = useMutation({
mutationFn: async ({ id, isDisabled }: { id: string; isDisabled: boolean }) => {
const res = await client.api.shares[':shareId'].$put({
param: { shareId: id },
json: { isDisabled },
})
if (!res.ok) throw new Error('Failed to update share link')
return await res.json()
},
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['shares', projectId] })
toast.success('Share link status updated')
},
onError: (err) => {
toast.error(`Error: ${err.message}`)
},
})
if (!teamId || !rootFolderId || !projectInfo) {
return <ProjectFolderSkeleton />
}
const shares = sharesData?.data ?? []
const handleCopyLink = (shareId: string) => {
const url = `${window.location.origin}/share/${shareId}`
navigator.clipboard.writeText(url)
toast.success('Link copied to clipboard')
}
return (
<div className="flex flex-1 flex-col bg-background min-h-0">
<div className="flex flex-1 overflow-hidden relative">
{!isLeftSidebarCollapsed && (
<div
className="md:hidden fixed inset-0 bg-black/50 z-40"
onClick={() => setIsLeftSidebarCollapsed(true)}
/>
)}
{!isLeftSidebarCollapsed && (
<>
<div className="bg-background" style={{ width: leftSidebarWidth }}>
<FolderTree
teamId={teamId}
projectId={projectId}
projectName={projectInfo.name ?? ''}
rootFolderId={rootFolderId}
/>
</div>
<ResizeHandle
onResize={(delta) => {
setLeftSidebarWidth((prev) => Math.max(180, Math.min(400, prev + delta)))
}}
className="hidden md:block"
/>
</>
)}
{/* Main Content Area */}
<div className="flex-1 flex flex-col min-h-0 bg-card overflow-hidden">
<header className="h-14 border-b flex items-center justify-between px-6 shrink-0 bg-background/50 backdrop-blur-sm sticky top-0 z-10">
<div className="flex items-center gap-2">
<Share2 className="h-5 w-5 text-primary" />
<h1 className="font-bold text-lg text-foreground">All Share Links</h1>
</div>
</header>
<div className="flex-1 overflow-y-auto p-6">
{isSharesLoading ? (
<div className="flex justify-center items-center h-64">
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-primary"></div>
</div>
) : shares.length === 0 ? (
<div className="flex flex-col items-center justify-center h-64 text-muted-foreground gap-3">
<Link2 className="h-10 w-10 text-muted-foreground/50" />
<p>No share links created yet.</p>
</div>
) : (
<div className="border border-border rounded-xl bg-background overflow-hidden shadow-xs">
<Table>
<TableHeader>
<TableRow className="hover:bg-transparent bg-muted/20">
<TableHead className="font-semibold px-4 py-3">Name</TableHead>
<TableHead className="font-semibold px-4 py-3">Public Link</TableHead>
<TableHead className="font-semibold px-4 py-3">Creator</TableHead>
<TableHead className="font-semibold px-4 py-3 w-[150px]">
Created Date
</TableHead>
<TableHead className="font-semibold px-4 py-3 text-right w-[120px]">
Active
</TableHead>
</TableRow>
</TableHeader>
<TableBody>
{shares.map((share) => {
const shareUrl = `${window.location.origin}/share/${share.id}`
return (
<TableRow key={share.id} className="hover:bg-muted/10 transition-colors">
<TableCell className="font-medium px-4 py-3.5">
<span
className="cursor-pointer hover:underline text-foreground"
onClick={() =>
navigate({
to: '/projects/$projectId/shares/$shareId',
params: { projectId, shareId: share.id },
})
}
>
{share.name}
</span>
</TableCell>
<TableCell className="px-4 py-3.5 max-w-[300px]">
<div className="flex items-center gap-2 group">
<span
className="truncate text-xs font-mono bg-muted/50 text-muted-foreground px-2 py-1 rounded-md border border-border cursor-pointer hover:bg-muted transition-colors flex-1"
onClick={() => handleCopyLink(share.id)}
title="Click to copy link"
>
{shareUrl}
</span>
<Button
variant="ghost"
size="icon-sm"
className="h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity"
onClick={() => handleCopyLink(share.id)}
>
<Copy className="h-3.5 w-3.5" />
</Button>
<a
href={shareUrl}
target="_blank"
rel="noreferrer"
className="text-muted-foreground hover:text-foreground inline-flex items-center"
>
<ExternalLink className="h-3.5 w-3.5" />
</a>
</div>
</TableCell>
<TableCell className="px-4 py-3.5">
<div className="flex items-center gap-2">
<div className="h-6 w-6 rounded-full bg-primary/10 flex items-center justify-center shrink-0">
<User className="h-3.5 w-3.5 text-primary" />
</div>
<span className="text-sm font-medium text-foreground truncate max-w-[150px]">
{share.creator?.name || 'Unknown'}
</span>
</div>
</TableCell>
<TableCell className="px-4 py-3.5 text-muted-foreground text-sm">
<div className="flex items-center gap-2">
<Calendar className="h-3.5 w-3.5 text-muted-foreground/70" />
<span>{new Date(share.createdAt).toLocaleDateString()}</span>
</div>
</TableCell>
<TableCell className="px-4 py-3.5 text-right">
<div className="flex justify-end">
<Switch
checked={!share.isDisabled}
onCheckedChange={(checked) =>
toggleVisibility({ id: share.id, isDisabled: !checked })
}
/>
</div>
</TableCell>
</TableRow>
)
})}
</TableBody>
</Table>
</div>
)}
</div>
</div>
</div>
</div>
)
}
export const Route = createFileRoute('/projects/$projectId/shares/')({
component: SharesPage,
loader: ({ context: { queryClient }, params: { projectId } }) =>
queryClient.ensureQueryData(projectInfoQueryOptions(projectId)),
pendingComponent: () => <ProjectFolderSkeleton />,
})
+4
View File
@@ -0,0 +1,4 @@
{
"routesDirectory": "routes",
"generatedRouteTree": "routeTree.gen.ts"
}