feat(agent): add teamId foreign key to agent table and refactor service queries

This commit is contained in:
yiling
2026-05-21 20:41:37 +08:00
parent 6e2ff8a003
commit 2c106bbb77
16 changed files with 498 additions and 71 deletions
@@ -0,0 +1,11 @@
/*
Warnings:
- Added the required column `team_id` to the `agents` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "agents" ADD COLUMN "team_id" TEXT NOT NULL;
-- AddForeignKey
ALTER TABLE "agents" ADD CONSTRAINT "agents_team_id_fkey" FOREIGN KEY ("team_id") REFERENCES "teams"("id") ON DELETE CASCADE ON UPDATE CASCADE;
+5
View File
@@ -220,6 +220,7 @@ model Team {
providers Provider[] @relation("TeamToProvider")
skills Skill[] @relation("TeamToSkill")
sandbox Sandbox? @relation("TeamToSandbox")
agents Agent[] @relation("TeamToAgent")
@@map("teams")
}
@@ -619,6 +620,10 @@ model Agent {
provider Provider? @relation("ProviderToAgent", fields: [providerId], references: [id], onDelete: SetNull)
modelId String? @map("model_id")
modelRef Model? @relation("ModelToAgent", fields: [modelId], references: [id], onDelete: SetNull)
teamId String @map("team_id")
team Team @relation("TeamToAgent", fields: [teamId], references: [id], onDelete: Cascade)
/// [AgentConfig]
config Json
createdAt DateTime @default(now()) @map("created_at")
@@ -40,6 +40,7 @@ describe('DatabaseSessionStorage', () => {
const agent = await prisma.agent.create({
data: {
id: user.id,
teamId: team.id,
type: 'chat',
providerId: provider.id,
modelId: model.id,
File diff suppressed because one or more lines are too long
+1
View File
@@ -3039,6 +3039,7 @@ export const AgentScalarFieldEnum = {
soul: 'soul',
providerId: 'providerId',
modelId: 'modelId',
teamId: 'teamId',
config: 'config',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
+1
View File
@@ -446,6 +446,7 @@ export const AgentScalarFieldEnum = {
soul: 'soul',
providerId: 'providerId',
modelId: 'modelId',
teamId: 'teamId',
config: 'config',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
+237 -26
View File
@@ -33,6 +33,7 @@ export type AgentMinAggregateOutputType = {
soul: string | null
providerId: string | null
modelId: string | null
teamId: string | null
createdAt: Date | null
updatedAt: Date | null
}
@@ -44,6 +45,7 @@ export type AgentMaxAggregateOutputType = {
soul: string | null
providerId: string | null
modelId: string | null
teamId: string | null
createdAt: Date | null
updatedAt: Date | null
}
@@ -55,6 +57,7 @@ export type AgentCountAggregateOutputType = {
soul: number
providerId: number
modelId: number
teamId: number
config:PrismaJson.AgentConfig
createdAt: number
updatedAt: number
@@ -69,6 +72,7 @@ export type AgentMinAggregateInputType = {
soul?: true
providerId?: true
modelId?: true
teamId?: true
createdAt?: true
updatedAt?: true
}
@@ -80,6 +84,7 @@ export type AgentMaxAggregateInputType = {
soul?: true
providerId?: true
modelId?: true
teamId?: true
createdAt?: true
updatedAt?: true
}
@@ -91,6 +96,7 @@ export type AgentCountAggregateInputType = {
soul?: true
providerId?: true
modelId?: true
teamId?: true
config?: true
createdAt?: true
updatedAt?: true
@@ -176,6 +182,7 @@ export type AgentGroupByOutputType = {
soul: string | null
providerId: string | null
modelId: string | null
teamId: string
config:PrismaJson.AgentConfig
createdAt: Date
updatedAt: Date
@@ -209,12 +216,14 @@ export type AgentWhereInput = {
soul?: Prisma.StringNullableFilter<"Agent"> | string | null
providerId?: Prisma.StringNullableFilter<"Agent"> | string | null
modelId?: Prisma.StringNullableFilter<"Agent"> | string | null
teamId?: Prisma.StringFilter<"Agent"> | string
config?: Prisma.JsonFilter<"Agent">
createdAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
provider?: Prisma.XOR<Prisma.ProviderNullableScalarRelationFilter, Prisma.ProviderWhereInput> | null
modelRef?: Prisma.XOR<Prisma.ModelNullableScalarRelationFilter, Prisma.ModelWhereInput> | null
team?: Prisma.XOR<Prisma.TeamScalarRelationFilter, Prisma.TeamWhereInput>
agentSessions?: Prisma.AgentSessionListRelationFilter
skills?: Prisma.AgentSkillListRelationFilter
}
@@ -226,12 +235,14 @@ export type AgentOrderByWithRelationInput = {
soul?: Prisma.SortOrderInput | Prisma.SortOrder
providerId?: Prisma.SortOrderInput | Prisma.SortOrder
modelId?: Prisma.SortOrderInput | Prisma.SortOrder
teamId?: Prisma.SortOrder
config?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
user?: Prisma.UserOrderByWithRelationInput
provider?: Prisma.ProviderOrderByWithRelationInput
modelRef?: Prisma.ModelOrderByWithRelationInput
team?: Prisma.TeamOrderByWithRelationInput
agentSessions?: Prisma.AgentSessionOrderByRelationAggregateInput
skills?: Prisma.AgentSkillOrderByRelationAggregateInput
}
@@ -246,12 +257,14 @@ export type AgentWhereUniqueInput = Prisma.AtLeast<{
soul?: Prisma.StringNullableFilter<"Agent"> | string | null
providerId?: Prisma.StringNullableFilter<"Agent"> | string | null
modelId?: Prisma.StringNullableFilter<"Agent"> | string | null
teamId?: Prisma.StringFilter<"Agent"> | string
config?: Prisma.JsonFilter<"Agent">
createdAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
provider?: Prisma.XOR<Prisma.ProviderNullableScalarRelationFilter, Prisma.ProviderWhereInput> | null
modelRef?: Prisma.XOR<Prisma.ModelNullableScalarRelationFilter, Prisma.ModelWhereInput> | null
team?: Prisma.XOR<Prisma.TeamScalarRelationFilter, Prisma.TeamWhereInput>
agentSessions?: Prisma.AgentSessionListRelationFilter
skills?: Prisma.AgentSkillListRelationFilter
}, "id">
@@ -263,6 +276,7 @@ export type AgentOrderByWithAggregationInput = {
soul?: Prisma.SortOrderInput | Prisma.SortOrder
providerId?: Prisma.SortOrderInput | Prisma.SortOrder
modelId?: Prisma.SortOrderInput | Prisma.SortOrder
teamId?: Prisma.SortOrder
config?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
@@ -281,6 +295,7 @@ export type AgentScalarWhereWithAggregatesInput = {
soul?: Prisma.StringNullableWithAggregatesFilter<"Agent"> | string | null
providerId?: Prisma.StringNullableWithAggregatesFilter<"Agent"> | string | null
modelId?: Prisma.StringNullableWithAggregatesFilter<"Agent"> | string | null
teamId?: Prisma.StringWithAggregatesFilter<"Agent"> | string
config?: Prisma.JsonWithAggregatesFilter<"Agent">
createdAt?: Prisma.DateTimeWithAggregatesFilter<"Agent"> | Date | string
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Agent"> | Date | string
@@ -296,6 +311,7 @@ export type AgentCreateInput = {
user: Prisma.UserCreateNestedOneWithoutAgentInput
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
}
@@ -307,6 +323,7 @@ export type AgentUncheckedCreateInput = {
soul?: string | null
providerId?: string | null
modelId?: string | null
teamId: string
config:PrismaJson.AgentConfig
createdAt?: Date | string
updatedAt?: Date | string
@@ -324,6 +341,7 @@ export type AgentUpdateInput = {
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
}
@@ -335,6 +353,7 @@ export type AgentUncheckedUpdateInput = {
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -349,6 +368,7 @@ export type AgentCreateManyInput = {
soul?: string | null
providerId?: string | null
modelId?: string | null
teamId: string
config:PrismaJson.AgentConfig
createdAt?: Date | string
updatedAt?: Date | string
@@ -370,6 +390,7 @@ export type AgentUncheckedUpdateManyInput = {
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -380,6 +401,16 @@ export type AgentNullableScalarRelationFilter = {
isNot?: Prisma.AgentWhereInput | null
}
export type AgentListRelationFilter = {
every?: Prisma.AgentWhereInput
some?: Prisma.AgentWhereInput
none?: Prisma.AgentWhereInput
}
export type AgentOrderByRelationAggregateInput = {
_count?: Prisma.SortOrder
}
export type AgentCountOrderByAggregateInput = {
id?: Prisma.SortOrder
type?: Prisma.SortOrder
@@ -387,6 +418,7 @@ export type AgentCountOrderByAggregateInput = {
soul?: Prisma.SortOrder
providerId?: Prisma.SortOrder
modelId?: Prisma.SortOrder
teamId?: Prisma.SortOrder
config?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
@@ -399,6 +431,7 @@ export type AgentMaxOrderByAggregateInput = {
soul?: Prisma.SortOrder
providerId?: Prisma.SortOrder
modelId?: Prisma.SortOrder
teamId?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
}
@@ -410,6 +443,7 @@ export type AgentMinOrderByAggregateInput = {
soul?: Prisma.SortOrder
providerId?: Prisma.SortOrder
modelId?: Prisma.SortOrder
teamId?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
}
@@ -419,16 +453,6 @@ export type AgentScalarRelationFilter = {
isNot?: Prisma.AgentWhereInput
}
export type AgentListRelationFilter = {
every?: Prisma.AgentWhereInput
some?: Prisma.AgentWhereInput
none?: Prisma.AgentWhereInput
}
export type AgentOrderByRelationAggregateInput = {
_count?: Prisma.SortOrder
}
export type AgentCreateNestedOneWithoutUserInput = {
create?: Prisma.XOR<Prisma.AgentCreateWithoutUserInput, Prisma.AgentUncheckedCreateWithoutUserInput>
connectOrCreate?: Prisma.AgentCreateOrConnectWithoutUserInput
@@ -461,6 +485,48 @@ export type AgentUncheckedUpdateOneWithoutUserNestedInput = {
update?: Prisma.XOR<Prisma.XOR<Prisma.AgentUpdateToOneWithWhereWithoutUserInput, Prisma.AgentUpdateWithoutUserInput>, Prisma.AgentUncheckedUpdateWithoutUserInput>
}
export type AgentCreateNestedManyWithoutTeamInput = {
create?: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput> | Prisma.AgentCreateWithoutTeamInput[] | Prisma.AgentUncheckedCreateWithoutTeamInput[]
connectOrCreate?: Prisma.AgentCreateOrConnectWithoutTeamInput | Prisma.AgentCreateOrConnectWithoutTeamInput[]
createMany?: Prisma.AgentCreateManyTeamInputEnvelope
connect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
}
export type AgentUncheckedCreateNestedManyWithoutTeamInput = {
create?: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput> | Prisma.AgentCreateWithoutTeamInput[] | Prisma.AgentUncheckedCreateWithoutTeamInput[]
connectOrCreate?: Prisma.AgentCreateOrConnectWithoutTeamInput | Prisma.AgentCreateOrConnectWithoutTeamInput[]
createMany?: Prisma.AgentCreateManyTeamInputEnvelope
connect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
}
export type AgentUpdateManyWithoutTeamNestedInput = {
create?: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput> | Prisma.AgentCreateWithoutTeamInput[] | Prisma.AgentUncheckedCreateWithoutTeamInput[]
connectOrCreate?: Prisma.AgentCreateOrConnectWithoutTeamInput | Prisma.AgentCreateOrConnectWithoutTeamInput[]
upsert?: Prisma.AgentUpsertWithWhereUniqueWithoutTeamInput | Prisma.AgentUpsertWithWhereUniqueWithoutTeamInput[]
createMany?: Prisma.AgentCreateManyTeamInputEnvelope
set?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
disconnect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
delete?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
connect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
update?: Prisma.AgentUpdateWithWhereUniqueWithoutTeamInput | Prisma.AgentUpdateWithWhereUniqueWithoutTeamInput[]
updateMany?: Prisma.AgentUpdateManyWithWhereWithoutTeamInput | Prisma.AgentUpdateManyWithWhereWithoutTeamInput[]
deleteMany?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
}
export type AgentUncheckedUpdateManyWithoutTeamNestedInput = {
create?: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput> | Prisma.AgentCreateWithoutTeamInput[] | Prisma.AgentUncheckedCreateWithoutTeamInput[]
connectOrCreate?: Prisma.AgentCreateOrConnectWithoutTeamInput | Prisma.AgentCreateOrConnectWithoutTeamInput[]
upsert?: Prisma.AgentUpsertWithWhereUniqueWithoutTeamInput | Prisma.AgentUpsertWithWhereUniqueWithoutTeamInput[]
createMany?: Prisma.AgentCreateManyTeamInputEnvelope
set?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
disconnect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
delete?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
connect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
update?: Prisma.AgentUpdateWithWhereUniqueWithoutTeamInput | Prisma.AgentUpdateWithWhereUniqueWithoutTeamInput[]
updateMany?: Prisma.AgentUpdateManyWithWhereWithoutTeamInput | Prisma.AgentUpdateManyWithWhereWithoutTeamInput[]
deleteMany?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
}
export type EnumAgentTypeFieldUpdateOperationsInput = {
set?: $Enums.AgentType
}
@@ -586,6 +652,7 @@ export type AgentCreateWithoutUserInput = {
updatedAt?: Date | string
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
}
@@ -596,6 +663,7 @@ export type AgentUncheckedCreateWithoutUserInput = {
soul?: string | null
providerId?: string | null
modelId?: string | null
teamId: string
config:PrismaJson.AgentConfig
createdAt?: Date | string
updatedAt?: Date | string
@@ -628,6 +696,7 @@ export type AgentUpdateWithoutUserInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
}
@@ -638,6 +707,7 @@ export type AgentUncheckedUpdateWithoutUserInput = {
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -645,6 +715,76 @@ export type AgentUncheckedUpdateWithoutUserInput = {
skills?: Prisma.AgentSkillUncheckedUpdateManyWithoutAgentNestedInput
}
export type AgentCreateWithoutTeamInput = {
type: $Enums.AgentType
enabled?: boolean
soul?: string | null
config:PrismaJson.AgentConfig
createdAt?: Date | string
updatedAt?: Date | string
user: Prisma.UserCreateNestedOneWithoutAgentInput
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
}
export type AgentUncheckedCreateWithoutTeamInput = {
id: string
type: $Enums.AgentType
enabled?: boolean
soul?: string | null
providerId?: string | null
modelId?: string | null
config:PrismaJson.AgentConfig
createdAt?: Date | string
updatedAt?: Date | string
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutAgentInput
skills?: Prisma.AgentSkillUncheckedCreateNestedManyWithoutAgentInput
}
export type AgentCreateOrConnectWithoutTeamInput = {
where: Prisma.AgentWhereUniqueInput
create: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput>
}
export type AgentCreateManyTeamInputEnvelope = {
data: Prisma.AgentCreateManyTeamInput | Prisma.AgentCreateManyTeamInput[]
skipDuplicates?: boolean
}
export type AgentUpsertWithWhereUniqueWithoutTeamInput = {
where: Prisma.AgentWhereUniqueInput
update: Prisma.XOR<Prisma.AgentUpdateWithoutTeamInput, Prisma.AgentUncheckedUpdateWithoutTeamInput>
create: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput>
}
export type AgentUpdateWithWhereUniqueWithoutTeamInput = {
where: Prisma.AgentWhereUniqueInput
data: Prisma.XOR<Prisma.AgentUpdateWithoutTeamInput, Prisma.AgentUncheckedUpdateWithoutTeamInput>
}
export type AgentUpdateManyWithWhereWithoutTeamInput = {
where: Prisma.AgentScalarWhereInput
data: Prisma.XOR<Prisma.AgentUpdateManyMutationInput, Prisma.AgentUncheckedUpdateManyWithoutTeamInput>
}
export type AgentScalarWhereInput = {
AND?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
OR?: Prisma.AgentScalarWhereInput[]
NOT?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
id?: Prisma.StringFilter<"Agent"> | string
type?: Prisma.EnumAgentTypeFilter<"Agent"> | $Enums.AgentType
enabled?: Prisma.BoolFilter<"Agent"> | boolean
soul?: Prisma.StringNullableFilter<"Agent"> | string | null
providerId?: Prisma.StringNullableFilter<"Agent"> | string | null
modelId?: Prisma.StringNullableFilter<"Agent"> | string | null
teamId?: Prisma.StringFilter<"Agent"> | string
config?: Prisma.JsonFilter<"Agent">
createdAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
}
export type AgentCreateWithoutSkillsInput = {
type: $Enums.AgentType
enabled?: boolean
@@ -655,6 +795,7 @@ export type AgentCreateWithoutSkillsInput = {
user: Prisma.UserCreateNestedOneWithoutAgentInput
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
}
@@ -665,6 +806,7 @@ export type AgentUncheckedCreateWithoutSkillsInput = {
soul?: string | null
providerId?: string | null
modelId?: string | null
teamId: string
config:PrismaJson.AgentConfig
createdAt?: Date | string
updatedAt?: Date | string
@@ -697,6 +839,7 @@ export type AgentUpdateWithoutSkillsInput = {
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
}
@@ -707,6 +850,7 @@ export type AgentUncheckedUpdateWithoutSkillsInput = {
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -723,6 +867,7 @@ export type AgentCreateWithoutAgentSessionsInput = {
user: Prisma.UserCreateNestedOneWithoutAgentInput
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
}
@@ -733,6 +878,7 @@ export type AgentUncheckedCreateWithoutAgentSessionsInput = {
soul?: string | null
providerId?: string | null
modelId?: string | null
teamId: string
config:PrismaJson.AgentConfig
createdAt?: Date | string
updatedAt?: Date | string
@@ -765,6 +911,7 @@ export type AgentUpdateWithoutAgentSessionsInput = {
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
}
@@ -775,6 +922,7 @@ export type AgentUncheckedUpdateWithoutAgentSessionsInput = {
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -790,6 +938,7 @@ export type AgentCreateWithoutModelRefInput = {
updatedAt?: Date | string
user: Prisma.UserCreateNestedOneWithoutAgentInput
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
}
@@ -800,6 +949,7 @@ export type AgentUncheckedCreateWithoutModelRefInput = {
enabled?: boolean
soul?: string | null
providerId?: string | null
teamId: string
config:PrismaJson.AgentConfig
createdAt?: Date | string
updatedAt?: Date | string
@@ -833,21 +983,6 @@ export type AgentUpdateManyWithWhereWithoutModelRefInput = {
data: Prisma.XOR<Prisma.AgentUpdateManyMutationInput, Prisma.AgentUncheckedUpdateManyWithoutModelRefInput>
}
export type AgentScalarWhereInput = {
AND?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
OR?: Prisma.AgentScalarWhereInput[]
NOT?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
id?: Prisma.StringFilter<"Agent"> | string
type?: Prisma.EnumAgentTypeFilter<"Agent"> | $Enums.AgentType
enabled?: Prisma.BoolFilter<"Agent"> | boolean
soul?: Prisma.StringNullableFilter<"Agent"> | string | null
providerId?: Prisma.StringNullableFilter<"Agent"> | string | null
modelId?: Prisma.StringNullableFilter<"Agent"> | string | null
config?: Prisma.JsonFilter<"Agent">
createdAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
}
export type AgentCreateWithoutProviderInput = {
type: $Enums.AgentType
enabled?: boolean
@@ -857,6 +992,7 @@ export type AgentCreateWithoutProviderInput = {
updatedAt?: Date | string
user: Prisma.UserCreateNestedOneWithoutAgentInput
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
}
@@ -867,6 +1003,7 @@ export type AgentUncheckedCreateWithoutProviderInput = {
enabled?: boolean
soul?: string | null
modelId?: string | null
teamId: string
config:PrismaJson.AgentConfig
createdAt?: Date | string
updatedAt?: Date | string
@@ -900,12 +1037,65 @@ export type AgentUpdateManyWithWhereWithoutProviderInput = {
data: Prisma.XOR<Prisma.AgentUpdateManyMutationInput, Prisma.AgentUncheckedUpdateManyWithoutProviderInput>
}
export type AgentCreateManyTeamInput = {
id: string
type: $Enums.AgentType
enabled?: boolean
soul?: string | null
providerId?: string | null
modelId?: string | null
config:PrismaJson.AgentConfig
createdAt?: Date | string
updatedAt?: Date | string
}
export type AgentUpdateWithoutTeamInput = {
type?: Prisma.EnumAgentTypeFieldUpdateOperationsInput | $Enums.AgentType
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
}
export type AgentUncheckedUpdateWithoutTeamInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
type?: Prisma.EnumAgentTypeFieldUpdateOperationsInput | $Enums.AgentType
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutAgentNestedInput
skills?: Prisma.AgentSkillUncheckedUpdateManyWithoutAgentNestedInput
}
export type AgentUncheckedUpdateManyWithoutTeamInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
type?: Prisma.EnumAgentTypeFieldUpdateOperationsInput | $Enums.AgentType
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type AgentCreateManyModelRefInput = {
id: string
type: $Enums.AgentType
enabled?: boolean
soul?: string | null
providerId?: string | null
teamId: string
config:PrismaJson.AgentConfig
createdAt?: Date | string
updatedAt?: Date | string
@@ -920,6 +1110,7 @@ export type AgentUpdateWithoutModelRefInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
}
@@ -930,6 +1121,7 @@ export type AgentUncheckedUpdateWithoutModelRefInput = {
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -943,6 +1135,7 @@ export type AgentUncheckedUpdateManyWithoutModelRefInput = {
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -954,6 +1147,7 @@ export type AgentCreateManyProviderInput = {
enabled?: boolean
soul?: string | null
modelId?: string | null
teamId: string
config:PrismaJson.AgentConfig
createdAt?: Date | string
updatedAt?: Date | string
@@ -968,6 +1162,7 @@ export type AgentUpdateWithoutProviderInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
}
@@ -978,6 +1173,7 @@ export type AgentUncheckedUpdateWithoutProviderInput = {
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -991,6 +1187,7 @@ export type AgentUncheckedUpdateManyWithoutProviderInput = {
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -1043,12 +1240,14 @@ export type AgentSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs =
soul?: boolean
providerId?: boolean
modelId?: boolean
teamId?: boolean
config?: boolean
createdAt?: boolean
updatedAt?: boolean
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
agentSessions?: boolean | Prisma.Agent$agentSessionsArgs<ExtArgs>
skills?: boolean | Prisma.Agent$skillsArgs<ExtArgs>
_count?: boolean | Prisma.AgentCountOutputTypeDefaultArgs<ExtArgs>
@@ -1061,12 +1260,14 @@ export type AgentSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensi
soul?: boolean
providerId?: boolean
modelId?: boolean
teamId?: boolean
config?: boolean
createdAt?: boolean
updatedAt?: boolean
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
}, ExtArgs["result"]["agent"]>
export type AgentSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
@@ -1076,12 +1277,14 @@ export type AgentSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensi
soul?: boolean
providerId?: boolean
modelId?: boolean
teamId?: boolean
config?: boolean
createdAt?: boolean
updatedAt?: boolean
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
}, ExtArgs["result"]["agent"]>
export type AgentSelectScalar = {
@@ -1091,16 +1294,18 @@ export type AgentSelectScalar = {
soul?: boolean
providerId?: boolean
modelId?: boolean
teamId?: boolean
config?: boolean
createdAt?: boolean
updatedAt?: boolean
}
export type AgentOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "type" | "enabled" | "soul" | "providerId" | "modelId" | "config" | "createdAt" | "updatedAt", ExtArgs["result"]["agent"]>
export type AgentOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "type" | "enabled" | "soul" | "providerId" | "modelId" | "teamId" | "config" | "createdAt" | "updatedAt", ExtArgs["result"]["agent"]>
export type AgentInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
agentSessions?: boolean | Prisma.Agent$agentSessionsArgs<ExtArgs>
skills?: boolean | Prisma.Agent$skillsArgs<ExtArgs>
_count?: boolean | Prisma.AgentCountOutputTypeDefaultArgs<ExtArgs>
@@ -1109,11 +1314,13 @@ export type AgentIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extens
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
}
export type AgentIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
}
export type $AgentPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
@@ -1122,6 +1329,7 @@ export type $AgentPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs
user: Prisma.$UserPayload<ExtArgs>
provider: Prisma.$ProviderPayload<ExtArgs> | null
modelRef: Prisma.$ModelPayload<ExtArgs> | null
team: Prisma.$TeamPayload<ExtArgs>
agentSessions: Prisma.$AgentSessionPayload<ExtArgs>[]
skills: Prisma.$AgentSkillPayload<ExtArgs>[]
}
@@ -1132,6 +1340,7 @@ export type $AgentPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs
soul: string | null
providerId: string | null
modelId: string | null
teamId: string
/**
* [AgentConfig]
*/
@@ -1535,6 +1744,7 @@ export interface Prisma__AgentClient<T, Null = never, ExtArgs extends runtime.Ty
user<T extends Prisma.UserDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.UserDefaultArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
provider<T extends Prisma.Agent$providerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Agent$providerArgs<ExtArgs>>): Prisma.Prisma__ProviderClient<runtime.Types.Result.GetResult<Prisma.$ProviderPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
modelRef<T extends Prisma.Agent$modelRefArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Agent$modelRefArgs<ExtArgs>>): Prisma.Prisma__ModelClient<runtime.Types.Result.GetResult<Prisma.$ModelPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
team<T extends Prisma.TeamDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.TeamDefaultArgs<ExtArgs>>): Prisma.Prisma__TeamClient<runtime.Types.Result.GetResult<Prisma.$TeamPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
agentSessions<T extends Prisma.Agent$agentSessionsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Agent$agentSessionsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AgentSessionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
skills<T extends Prisma.Agent$skillsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Agent$skillsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AgentSkillPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
/**
@@ -1572,6 +1782,7 @@ export interface AgentFieldRefs {
readonly soul: Prisma.FieldRef<"Agent", 'String'>
readonly providerId: Prisma.FieldRef<"Agent", 'String'>
readonly modelId: Prisma.FieldRef<"Agent", 'String'>
readonly teamId: Prisma.FieldRef<"Agent", 'String'>
readonly config: Prisma.FieldRef<"Agent", 'Json'>
readonly createdAt: Prisma.FieldRef<"Agent", 'DateTime'>
readonly updatedAt: Prisma.FieldRef<"Agent", 'DateTime'>
+186
View File
@@ -198,6 +198,7 @@ export type TeamWhereInput = {
providers?: Prisma.ProviderListRelationFilter
skills?: Prisma.SkillListRelationFilter
sandbox?: Prisma.XOR<Prisma.SandboxNullableScalarRelationFilter, Prisma.SandboxWhereInput> | null
agents?: Prisma.AgentListRelationFilter
}
export type TeamOrderByWithRelationInput = {
@@ -217,6 +218,7 @@ export type TeamOrderByWithRelationInput = {
providers?: Prisma.ProviderOrderByRelationAggregateInput
skills?: Prisma.SkillOrderByRelationAggregateInput
sandbox?: Prisma.SandboxOrderByWithRelationInput
agents?: Prisma.AgentOrderByRelationAggregateInput
}
export type TeamWhereUniqueInput = Prisma.AtLeast<{
@@ -239,6 +241,7 @@ export type TeamWhereUniqueInput = Prisma.AtLeast<{
providers?: Prisma.ProviderListRelationFilter
skills?: Prisma.SkillListRelationFilter
sandbox?: Prisma.XOR<Prisma.SandboxNullableScalarRelationFilter, Prisma.SandboxWhereInput> | null
agents?: Prisma.AgentListRelationFilter
}, "id" | "rootFolderId">
export type TeamOrderByWithAggregationInput = {
@@ -281,6 +284,7 @@ export type TeamCreateInput = {
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
}
export type TeamUncheckedCreateInput = {
@@ -299,6 +303,7 @@ export type TeamUncheckedCreateInput = {
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
}
export type TeamUpdateInput = {
@@ -317,6 +322,7 @@ export type TeamUpdateInput = {
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
}
export type TeamUncheckedUpdateInput = {
@@ -335,6 +341,7 @@ export type TeamUncheckedUpdateInput = {
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
}
export type TeamCreateManyInput = {
@@ -530,6 +537,20 @@ export type TeamUpdateOneRequiredWithoutNotificationsNestedInput = {
update?: Prisma.XOR<Prisma.XOR<Prisma.TeamUpdateToOneWithWhereWithoutNotificationsInput, Prisma.TeamUpdateWithoutNotificationsInput>, Prisma.TeamUncheckedUpdateWithoutNotificationsInput>
}
export type TeamCreateNestedOneWithoutAgentsInput = {
create?: Prisma.XOR<Prisma.TeamCreateWithoutAgentsInput, Prisma.TeamUncheckedCreateWithoutAgentsInput>
connectOrCreate?: Prisma.TeamCreateOrConnectWithoutAgentsInput
connect?: Prisma.TeamWhereUniqueInput
}
export type TeamUpdateOneRequiredWithoutAgentsNestedInput = {
create?: Prisma.XOR<Prisma.TeamCreateWithoutAgentsInput, Prisma.TeamUncheckedCreateWithoutAgentsInput>
connectOrCreate?: Prisma.TeamCreateOrConnectWithoutAgentsInput
upsert?: Prisma.TeamUpsertWithoutAgentsInput
connect?: Prisma.TeamWhereUniqueInput
update?: Prisma.XOR<Prisma.XOR<Prisma.TeamUpdateToOneWithWhereWithoutAgentsInput, Prisma.TeamUpdateWithoutAgentsInput>, Prisma.TeamUncheckedUpdateWithoutAgentsInput>
}
export type TeamCreateNestedOneWithoutUserMetadataInput = {
create?: Prisma.XOR<Prisma.TeamCreateWithoutUserMetadataInput, Prisma.TeamUncheckedCreateWithoutUserMetadataInput>
connectOrCreate?: Prisma.TeamCreateOrConnectWithoutUserMetadataInput
@@ -573,6 +594,7 @@ export type TeamCreateWithoutSandboxInput = {
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutTeamInput
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
}
export type TeamUncheckedCreateWithoutSandboxInput = {
@@ -590,6 +612,7 @@ export type TeamUncheckedCreateWithoutSandboxInput = {
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutTeamInput
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
}
export type TeamCreateOrConnectWithoutSandboxInput = {
@@ -623,6 +646,7 @@ export type TeamUpdateWithoutSandboxInput = {
userMetadata?: Prisma.UserMetadataUpdateManyWithoutTeamNestedInput
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
}
export type TeamUncheckedUpdateWithoutSandboxInput = {
@@ -640,6 +664,7 @@ export type TeamUncheckedUpdateWithoutSandboxInput = {
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutTeamNestedInput
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
}
export type TeamCreateWithoutSkillsInput = {
@@ -657,6 +682,7 @@ export type TeamCreateWithoutSkillsInput = {
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutTeamInput
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
}
export type TeamUncheckedCreateWithoutSkillsInput = {
@@ -674,6 +700,7 @@ export type TeamUncheckedCreateWithoutSkillsInput = {
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutTeamInput
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
}
export type TeamCreateOrConnectWithoutSkillsInput = {
@@ -707,6 +734,7 @@ export type TeamUpdateWithoutSkillsInput = {
userMetadata?: Prisma.UserMetadataUpdateManyWithoutTeamNestedInput
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
}
export type TeamUncheckedUpdateWithoutSkillsInput = {
@@ -724,6 +752,7 @@ export type TeamUncheckedUpdateWithoutSkillsInput = {
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutTeamNestedInput
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
}
export type TeamCreateWithoutMembersInput = {
@@ -741,6 +770,7 @@ export type TeamCreateWithoutMembersInput = {
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
}
export type TeamUncheckedCreateWithoutMembersInput = {
@@ -758,6 +788,7 @@ export type TeamUncheckedCreateWithoutMembersInput = {
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
}
export type TeamCreateOrConnectWithoutMembersInput = {
@@ -791,6 +822,7 @@ export type TeamUpdateWithoutMembersInput = {
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
}
export type TeamUncheckedUpdateWithoutMembersInput = {
@@ -808,6 +840,7 @@ export type TeamUncheckedUpdateWithoutMembersInput = {
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
}
export type TeamCreateWithoutProjectsInput = {
@@ -825,6 +858,7 @@ export type TeamCreateWithoutProjectsInput = {
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
}
export type TeamUncheckedCreateWithoutProjectsInput = {
@@ -842,6 +876,7 @@ export type TeamUncheckedCreateWithoutProjectsInput = {
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
}
export type TeamCreateOrConnectWithoutProjectsInput = {
@@ -875,6 +910,7 @@ export type TeamUpdateWithoutProjectsInput = {
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
}
export type TeamUncheckedUpdateWithoutProjectsInput = {
@@ -892,6 +928,7 @@ export type TeamUncheckedUpdateWithoutProjectsInput = {
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
}
export type TeamCreateWithoutRootFolderInput = {
@@ -909,6 +946,7 @@ export type TeamCreateWithoutRootFolderInput = {
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
}
export type TeamUncheckedCreateWithoutRootFolderInput = {
@@ -926,6 +964,7 @@ export type TeamUncheckedCreateWithoutRootFolderInput = {
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
}
export type TeamCreateOrConnectWithoutRootFolderInput = {
@@ -959,6 +998,7 @@ export type TeamUpdateWithoutRootFolderInput = {
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
}
export type TeamUncheckedUpdateWithoutRootFolderInput = {
@@ -976,6 +1016,7 @@ export type TeamUncheckedUpdateWithoutRootFolderInput = {
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
}
export type TeamCreateWithoutInvitesInput = {
@@ -993,6 +1034,7 @@ export type TeamCreateWithoutInvitesInput = {
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
}
export type TeamUncheckedCreateWithoutInvitesInput = {
@@ -1010,6 +1052,7 @@ export type TeamUncheckedCreateWithoutInvitesInput = {
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
}
export type TeamCreateOrConnectWithoutInvitesInput = {
@@ -1043,6 +1086,7 @@ export type TeamUpdateWithoutInvitesInput = {
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
}
export type TeamUncheckedUpdateWithoutInvitesInput = {
@@ -1060,6 +1104,7 @@ export type TeamUncheckedUpdateWithoutInvitesInput = {
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
}
export type TeamCreateWithoutMetadataFieldsInput = {
@@ -1077,6 +1122,7 @@ export type TeamCreateWithoutMetadataFieldsInput = {
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
}
export type TeamUncheckedCreateWithoutMetadataFieldsInput = {
@@ -1094,6 +1140,7 @@ export type TeamUncheckedCreateWithoutMetadataFieldsInput = {
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
}
export type TeamCreateOrConnectWithoutMetadataFieldsInput = {
@@ -1127,6 +1174,7 @@ export type TeamUpdateWithoutMetadataFieldsInput = {
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
}
export type TeamUncheckedUpdateWithoutMetadataFieldsInput = {
@@ -1144,6 +1192,7 @@ export type TeamUncheckedUpdateWithoutMetadataFieldsInput = {
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
}
export type TeamCreateWithoutNotificationsInput = {
@@ -1161,6 +1210,7 @@ export type TeamCreateWithoutNotificationsInput = {
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
}
export type TeamUncheckedCreateWithoutNotificationsInput = {
@@ -1178,6 +1228,7 @@ export type TeamUncheckedCreateWithoutNotificationsInput = {
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
}
export type TeamCreateOrConnectWithoutNotificationsInput = {
@@ -1211,6 +1262,7 @@ export type TeamUpdateWithoutNotificationsInput = {
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
}
export type TeamUncheckedUpdateWithoutNotificationsInput = {
@@ -1228,6 +1280,95 @@ export type TeamUncheckedUpdateWithoutNotificationsInput = {
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
}
export type TeamCreateWithoutAgentsInput = {
id?: string
name: string
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
createdAt?: Date | string
updatedAt?: Date | string
rootFolder?: Prisma.AssetCreateNestedOneWithoutTeamRootFolderInput
members?: Prisma.TeamMemberCreateNestedManyWithoutTeamInput
projects?: Prisma.ProjectCreateNestedManyWithoutTeamInput
metadataFields?: Prisma.MetadataFieldCreateNestedManyWithoutTeamInput
invites?: Prisma.InviteCreateNestedManyWithoutTeamInput
notifications?: Prisma.NotificationCreateNestedManyWithoutTeamInput
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutTeamInput
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
}
export type TeamUncheckedCreateWithoutAgentsInput = {
id?: string
name: string
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
createdAt?: Date | string
updatedAt?: Date | string
rootFolderId?: string | null
members?: Prisma.TeamMemberUncheckedCreateNestedManyWithoutTeamInput
projects?: Prisma.ProjectUncheckedCreateNestedManyWithoutTeamInput
metadataFields?: Prisma.MetadataFieldUncheckedCreateNestedManyWithoutTeamInput
invites?: Prisma.InviteUncheckedCreateNestedManyWithoutTeamInput
notifications?: Prisma.NotificationUncheckedCreateNestedManyWithoutTeamInput
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutTeamInput
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
}
export type TeamCreateOrConnectWithoutAgentsInput = {
where: Prisma.TeamWhereUniqueInput
create: Prisma.XOR<Prisma.TeamCreateWithoutAgentsInput, Prisma.TeamUncheckedCreateWithoutAgentsInput>
}
export type TeamUpsertWithoutAgentsInput = {
update: Prisma.XOR<Prisma.TeamUpdateWithoutAgentsInput, Prisma.TeamUncheckedUpdateWithoutAgentsInput>
create: Prisma.XOR<Prisma.TeamCreateWithoutAgentsInput, Prisma.TeamUncheckedCreateWithoutAgentsInput>
where?: Prisma.TeamWhereInput
}
export type TeamUpdateToOneWithWhereWithoutAgentsInput = {
where?: Prisma.TeamWhereInput
data: Prisma.XOR<Prisma.TeamUpdateWithoutAgentsInput, Prisma.TeamUncheckedUpdateWithoutAgentsInput>
}
export type TeamUpdateWithoutAgentsInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
name?: Prisma.StringFieldUpdateOperationsInput | string
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
rootFolder?: Prisma.AssetUpdateOneWithoutTeamRootFolderNestedInput
members?: Prisma.TeamMemberUpdateManyWithoutTeamNestedInput
projects?: Prisma.ProjectUpdateManyWithoutTeamNestedInput
metadataFields?: Prisma.MetadataFieldUpdateManyWithoutTeamNestedInput
invites?: Prisma.InviteUpdateManyWithoutTeamNestedInput
notifications?: Prisma.NotificationUpdateManyWithoutTeamNestedInput
userMetadata?: Prisma.UserMetadataUpdateManyWithoutTeamNestedInput
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
}
export type TeamUncheckedUpdateWithoutAgentsInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
name?: Prisma.StringFieldUpdateOperationsInput | string
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
rootFolderId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
members?: Prisma.TeamMemberUncheckedUpdateManyWithoutTeamNestedInput
projects?: Prisma.ProjectUncheckedUpdateManyWithoutTeamNestedInput
metadataFields?: Prisma.MetadataFieldUncheckedUpdateManyWithoutTeamNestedInput
invites?: Prisma.InviteUncheckedUpdateManyWithoutTeamNestedInput
notifications?: Prisma.NotificationUncheckedUpdateManyWithoutTeamNestedInput
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutTeamNestedInput
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
}
export type TeamCreateWithoutUserMetadataInput = {
@@ -1245,6 +1386,7 @@ export type TeamCreateWithoutUserMetadataInput = {
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
}
export type TeamUncheckedCreateWithoutUserMetadataInput = {
@@ -1262,6 +1404,7 @@ export type TeamUncheckedCreateWithoutUserMetadataInput = {
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
}
export type TeamCreateOrConnectWithoutUserMetadataInput = {
@@ -1295,6 +1438,7 @@ export type TeamUpdateWithoutUserMetadataInput = {
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
}
export type TeamUncheckedUpdateWithoutUserMetadataInput = {
@@ -1312,6 +1456,7 @@ export type TeamUncheckedUpdateWithoutUserMetadataInput = {
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
}
export type TeamCreateWithoutProvidersInput = {
@@ -1329,6 +1474,7 @@ export type TeamCreateWithoutProvidersInput = {
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
}
export type TeamUncheckedCreateWithoutProvidersInput = {
@@ -1346,6 +1492,7 @@ export type TeamUncheckedCreateWithoutProvidersInput = {
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
}
export type TeamCreateOrConnectWithoutProvidersInput = {
@@ -1379,6 +1526,7 @@ export type TeamUpdateWithoutProvidersInput = {
userMetadata?: Prisma.UserMetadataUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
}
export type TeamUncheckedUpdateWithoutProvidersInput = {
@@ -1396,6 +1544,7 @@ export type TeamUncheckedUpdateWithoutProvidersInput = {
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
}
@@ -1412,6 +1561,7 @@ export type TeamCountOutputType = {
userMetadata: number
providers: number
skills: number
agents: number
}
export type TeamCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
@@ -1423,6 +1573,7 @@ export type TeamCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.I
userMetadata?: boolean | TeamCountOutputTypeCountUserMetadataArgs
providers?: boolean | TeamCountOutputTypeCountProvidersArgs
skills?: boolean | TeamCountOutputTypeCountSkillsArgs
agents?: boolean | TeamCountOutputTypeCountAgentsArgs
}
/**
@@ -1491,6 +1642,13 @@ export type TeamCountOutputTypeCountSkillsArgs<ExtArgs extends runtime.Types.Ext
where?: Prisma.SkillWhereInput
}
/**
* TeamCountOutputType without action
*/
export type TeamCountOutputTypeCountAgentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.AgentWhereInput
}
export type TeamSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
@@ -1509,6 +1667,7 @@ export type TeamSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = r
providers?: boolean | Prisma.Team$providersArgs<ExtArgs>
skills?: boolean | Prisma.Team$skillsArgs<ExtArgs>
sandbox?: boolean | Prisma.Team$sandboxArgs<ExtArgs>
agents?: boolean | Prisma.Team$agentsArgs<ExtArgs>
_count?: boolean | Prisma.TeamCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["team"]>
@@ -1553,6 +1712,7 @@ export type TeamInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs =
providers?: boolean | Prisma.Team$providersArgs<ExtArgs>
skills?: boolean | Prisma.Team$skillsArgs<ExtArgs>
sandbox?: boolean | Prisma.Team$sandboxArgs<ExtArgs>
agents?: boolean | Prisma.Team$agentsArgs<ExtArgs>
_count?: boolean | Prisma.TeamCountOutputTypeDefaultArgs<ExtArgs>
}
export type TeamIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
@@ -1575,6 +1735,7 @@ export type $TeamPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs =
providers: Prisma.$ProviderPayload<ExtArgs>[]
skills: Prisma.$SkillPayload<ExtArgs>[]
sandbox: Prisma.$SandboxPayload<ExtArgs> | null
agents: Prisma.$AgentPayload<ExtArgs>[]
}
scalars: runtime.Types.Extensions.GetPayloadResult<{
id: string
@@ -1990,6 +2151,7 @@ export interface Prisma__TeamClient<T, Null = never, ExtArgs extends runtime.Typ
providers<T extends Prisma.Team$providersArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$providersArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ProviderPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
skills<T extends Prisma.Team$skillsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$skillsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SkillPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
sandbox<T extends Prisma.Team$sandboxArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$sandboxArgs<ExtArgs>>): Prisma.Prisma__SandboxClient<runtime.Types.Result.GetResult<Prisma.$SandboxPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
agents<T extends Prisma.Team$agentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$agentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AgentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
@@ -2655,6 +2817,30 @@ export type Team$sandboxArgs<ExtArgs extends runtime.Types.Extensions.InternalAr
where?: Prisma.SandboxWhereInput
}
/**
* Team.agents
*/
export type Team$agentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Agent
*/
select?: Prisma.AgentSelect<ExtArgs> | null
/**
* Omit specific fields from the Agent
*/
omit?: Prisma.AgentOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AgentInclude<ExtArgs> | null
where?: Prisma.AgentWhereInput
orderBy?: Prisma.AgentOrderByWithRelationInput | Prisma.AgentOrderByWithRelationInput[]
cursor?: Prisma.AgentWhereUniqueInput
take?: number
skip?: number
distinct?: Prisma.AgentScalarFieldEnum | Prisma.AgentScalarFieldEnum[]
}
/**
* Team without action
*/
+4
View File
@@ -63,6 +63,7 @@ describe('AgentService', () => {
const agent = await db.agent.create({
data: {
id: user.id,
teamId: team.id,
type: 'chat',
providerId: provider.id,
modelId: model.id,
@@ -290,6 +291,7 @@ describe('AgentService', () => {
type: 'agent',
agent: {
create: {
teamId: team.id,
type: 'autofill',
enabled: true,
providerId: provider.id,
@@ -378,6 +380,7 @@ describe('AgentService', () => {
type: 'agent',
agent: {
create: {
teamId: team.id,
type: 'chat',
enabled: true,
providerId: provider.id,
@@ -456,6 +459,7 @@ describe('AgentService', () => {
const agent = await db.agent.create({
data: {
id: botUser.id,
teamId: team.id,
type: 'chat',
enabled: true,
providerId: provider.id,
+14 -36
View File
@@ -35,11 +35,7 @@ export class AgentService {
const existing = await this.prismaClient.agent.findFirst({
where: {
type,
user: {
teamMembers: {
some: { teamId },
},
},
teamId,
},
})
if (existing) {
@@ -85,6 +81,7 @@ export class AgentService {
const agent = await tx.agent.create({
data: {
id: user.id,
teamId,
type,
enabled: enabled ?? true,
providerId: providerId || null,
@@ -139,22 +136,15 @@ export class AgentService {
if (!agent) throw new Error('agent not found')
if (type === 'embedding' || type === 'transcription' || type === 'autofill') {
const teamId = agent.user.teamMembers[0]?.teamId
if (teamId) {
const existing = await this.prismaClient.agent.findFirst({
where: {
type,
id: { not: agentId },
user: {
teamMembers: {
some: { teamId },
},
},
},
})
if (existing) {
throw new Error(`Agent of type ${type} already exists for this team`)
}
const existing = await this.prismaClient.agent.findFirst({
where: {
type,
id: { not: agentId },
teamId: agent.teamId,
},
})
if (existing) {
throw new Error(`Agent of type ${type} already exists for this team`)
}
}
@@ -232,11 +222,7 @@ export class AgentService {
async listAgents(params: ListAgentsParams) {
return this.prismaClient.agent.findMany({
where: {
user: {
teamMembers: {
some: { teamId: params.teamId },
},
},
teamId: params.teamId,
},
orderBy: {
id: 'desc',
@@ -271,11 +257,7 @@ export class AgentService {
where: {
type: 'chat',
enabled: true,
user: {
teamMembers: {
some: { teamId },
},
},
teamId,
},
})
if (!agent) {
@@ -426,11 +408,7 @@ export class AgentService {
where: {
type: 'autofill',
enabled: true,
user: {
teamMembers: {
some: { teamId },
},
},
teamId,
},
})
if (!agent) {
+1
View File
@@ -70,6 +70,7 @@ describe('AiService', () => {
type: 'agent',
agent: {
create: {
teamId: team.id,
type: 'transcription',
enabled: true,
providerId: provider.id,
+3 -1
View File
@@ -483,7 +483,7 @@ describe('AssetService', () => {
})
it('correctly handles AI comments with agent identity', async () => {
const { assets } = await setupBasicAssets()
const { assets, project } = await setupBasicAssets()
// Create an agent user
const agentUser = await prisma.user.create({
@@ -499,6 +499,7 @@ describe('AssetService', () => {
await prisma.agent.create({
data: {
id: agentUser.id,
teamId: project.teamId,
type: 'autofill',
config: {
provider: 'test',
@@ -617,6 +618,7 @@ describe('AssetService', () => {
const agent = await prisma.agent.create({
data: {
id: botUser.id,
teamId: project.teamId,
type: 'chat',
config: {
provider: 'google',
+1
View File
@@ -152,6 +152,7 @@ describe('ProjectService', () => {
type: 'agent',
agent: {
create: {
teamId: team.id,
type: 'chat',
enabled: true,
config: {
+6 -4
View File
@@ -120,6 +120,11 @@ describe('TeamService', () => {
const user = await prisma.user.create({
data: { name: 'Human', email: `human-${Date.now()}@example.com`, password: 'pw' },
})
const team = await teamService.createTeam(user, {
name: 'Test Team',
})
const bot = await prisma.user.create({
data: {
name: 'Bot',
@@ -128,6 +133,7 @@ describe('TeamService', () => {
type: 'agent',
agent: {
create: {
teamId: team.id,
type: 'chat',
enabled: true,
config: {
@@ -139,10 +145,6 @@ describe('TeamService', () => {
},
})
const team = await teamService.createTeam(user, {
name: 'Test Team',
})
await teamService.joinTeam({
teamId: team.id,
userId: bot.id,
+9
View File
@@ -50,6 +50,14 @@ export async function createCommentActivity(params: CreateCommentParams) {
if (params.sessionId) {
const agentId = params.agentId && params.agentId !== 'default' ? params.agentId : 'default'
// Fetch teamId from asset
const asset = await prisma.asset.findUnique({
where: { id: params.assetId },
include: { project: true },
})
if (!asset || !asset.project) throw new Error('asset or project not found')
const teamId = asset.project.teamId
// Ensure user exists for agent
const userExists = await prisma.user.findUnique({ where: { id: agentId } })
if (!userExists) {
@@ -69,6 +77,7 @@ export async function createCommentActivity(params: CreateCommentParams) {
await prisma.agent.create({
data: {
id: agentId,
teamId,
type: 'chat',
config: {
provider: 'openai',
+15 -1
View File
@@ -47,12 +47,19 @@ describe('WorkflowService', () => {
contentType: 'audio/mpeg',
})
const team = await prisma.team.create({
data: { name: 'Transcription Team' },
})
const project = await prisma.project.create({
data: { name: 'Transcription Project', teamId: team.id },
})
const asset = await prisma.asset.create({
data: {
name: 'test.mp3',
key: 'test/test.mp3',
status: 'uploaded',
type: 'file',
projectId: project.id,
},
})
@@ -84,6 +91,12 @@ describe('WorkflowService', () => {
}, 15000)
it('should process ai_embedding task locally', async () => {
const team = await prisma.team.create({
data: { name: 'Embedding Team' },
})
const project = await prisma.project.create({
data: { name: 'Embedding Project', teamId: team.id },
})
const asset = await prisma.asset.create({
data: {
name: 'test.png',
@@ -91,6 +104,7 @@ describe('WorkflowService', () => {
status: 'uploaded',
type: 'file',
mediaType: 'image/png',
projectId: project.id,
},
})
@@ -99,7 +113,7 @@ describe('WorkflowService', () => {
assetId: asset.id,
type: WorkflowTaskType.ai_embedding,
status: WorkflowTaskStatus.pending,
teamId: 'test-team', // Needs a teamId for embeddings
teamId: team.id,
},
})