
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck
/*
 * This file exports the `Organization` model and its related types.
 *
 * 🟢 You can import this file directly.
 */
import type * as runtime from "@prisma/client/runtime/client"
import type * as $Enums from "../enums.js"
import type * as Prisma from "../internal/prismaNamespace.js"

/**
 * Model Organization
 *
 */
export type OrganizationModel = runtime.Types.Result.DefaultSelection<Prisma.$OrganizationPayload>

export type AggregateOrganization = {
  _count: OrganizationCountAggregateOutputType | null
  _min: OrganizationMinAggregateOutputType | null
  _max: OrganizationMaxAggregateOutputType | null
}

export type OrganizationMinAggregateOutputType = {
  id: string | null
  name: string | null
  slug: string | null
  logo: string | null
  createdAt: Date | null
  metadata: string | null
  stripeCustomerId: string | null
  accessKey: string | null
  plan: $Enums.PlanId | null
}

export type OrganizationMaxAggregateOutputType = {
  id: string | null
  name: string | null
  slug: string | null
  logo: string | null
  createdAt: Date | null
  metadata: string | null
  stripeCustomerId: string | null
  accessKey: string | null
  plan: $Enums.PlanId | null
}

export type OrganizationCountAggregateOutputType = {
  id: number
  name: number
  slug: number
  logo: number
  createdAt: number
  metadata: number
  stripeCustomerId: number
  accessKey: number
  plan: number
  _all: number
}


export type OrganizationMinAggregateInputType = {
  id?: true
  name?: true
  slug?: true
  logo?: true
  createdAt?: true
  metadata?: true
  stripeCustomerId?: true
  accessKey?: true
  plan?: true
}

export type OrganizationMaxAggregateInputType = {
  id?: true
  name?: true
  slug?: true
  logo?: true
  createdAt?: true
  metadata?: true
  stripeCustomerId?: true
  accessKey?: true
  plan?: true
}

export type OrganizationCountAggregateInputType = {
  id?: true
  name?: true
  slug?: true
  logo?: true
  createdAt?: true
  metadata?: true
  stripeCustomerId?: true
  accessKey?: true
  plan?: true
  _all?: true
}

export type OrganizationAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which Organization to aggregate.
   */
  where?: Prisma.OrganizationWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   *
   * Determine the order of Organizations to fetch.
   */
  orderBy?: Prisma.OrganizationOrderByWithRelationInput | Prisma.OrganizationOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   *
   * Sets the start position
   */
  cursor?: Prisma.OrganizationWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Take `±n` Organizations from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Skip the first `n` Organizations.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   *
   * Count returned Organizations
  **/
  _count?: true | OrganizationCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   *
   * Select which fields to find the minimum value
  **/
  _min?: OrganizationMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   *
   * Select which fields to find the maximum value
  **/
  _max?: OrganizationMaxAggregateInputType
}

export type GetOrganizationAggregateType<T extends OrganizationAggregateArgs> = {
      [P in keyof T & keyof AggregateOrganization]: P extends '_count' | 'count'
    ? T[P] extends true
      ? number
      : Prisma.GetScalarType<T[P], AggregateOrganization[P]>
    : Prisma.GetScalarType<T[P], AggregateOrganization[P]>
}




export type OrganizationGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.OrganizationWhereInput
  orderBy?: Prisma.OrganizationOrderByWithAggregationInput | Prisma.OrganizationOrderByWithAggregationInput[]
  by: Prisma.OrganizationScalarFieldEnum[] | Prisma.OrganizationScalarFieldEnum
  having?: Prisma.OrganizationScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: OrganizationCountAggregateInputType | true
  _min?: OrganizationMinAggregateInputType
  _max?: OrganizationMaxAggregateInputType
}

export type OrganizationGroupByOutputType = {
  id: string
  name: string
  slug: string
  logo: string | null
  createdAt: Date
  metadata: string | null
  stripeCustomerId: string | null
  accessKey: string | null
  plan: $Enums.PlanId
  _count: OrganizationCountAggregateOutputType | null
  _min: OrganizationMinAggregateOutputType | null
  _max: OrganizationMaxAggregateOutputType | null
}

export type GetOrganizationGroupByPayload<T extends OrganizationGroupByArgs> = Prisma.PrismaPromise<
  Array<
    Prisma.PickEnumerable<OrganizationGroupByOutputType, T['by']> &
      {
        [P in ((keyof T) & (keyof OrganizationGroupByOutputType))]: P extends '_count'
          ? T[P] extends boolean
            ? number
            : Prisma.GetScalarType<T[P], OrganizationGroupByOutputType[P]>
          : Prisma.GetScalarType<T[P], OrganizationGroupByOutputType[P]>
      }
    >
  >



export type OrganizationWhereInput = {
  AND?: Prisma.OrganizationWhereInput | Prisma.OrganizationWhereInput[]
  OR?: Prisma.OrganizationWhereInput[]
  NOT?: Prisma.OrganizationWhereInput | Prisma.OrganizationWhereInput[]
  id?: Prisma.StringFilter<"Organization"> | string
  name?: Prisma.StringFilter<"Organization"> | string
  slug?: Prisma.StringFilter<"Organization"> | string
  logo?: Prisma.StringNullableFilter<"Organization"> | string | null
  createdAt?: Prisma.DateTimeFilter<"Organization"> | Date | string
  metadata?: Prisma.StringNullableFilter<"Organization"> | string | null
  stripeCustomerId?: Prisma.StringNullableFilter<"Organization"> | string | null
  accessKey?: Prisma.StringNullableFilter<"Organization"> | string | null
  plan?: Prisma.EnumPlanIdFilter<"Organization"> | $Enums.PlanId
  members?: Prisma.MemberListRelationFilter
  invitations?: Prisma.InvitationListRelationFilter
  agents?: Prisma.AgentListRelationFilter
  knowledgeSources?: Prisma.KnowledgeSourceListRelationFilter
  phoneNumbers?: Prisma.PhoneNumberListRelationFilter
  tools?: Prisma.ToolListRelationFilter
  mcpConnections?: Prisma.McpConnectionListRelationFilter
  mcpCatalogItems?: Prisma.McpServerCatalogItemListRelationFilter
  agentMcpConnections?: Prisma.AgentMcpConnectionListRelationFilter
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogListRelationFilter
  secrets?: Prisma.SecretListRelationFilter
  callLogs?: Prisma.CallLogListRelationFilter
  outboundCalls?: Prisma.OutboundCallListRelationFilter
  campaigns?: Prisma.CampaignListRelationFilter
  organizationroles?: Prisma.OrganizationRoleListRelationFilter
  auditLogs?: Prisma.AuditLogListRelationFilter
}

export type OrganizationOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  slug?: Prisma.SortOrder
  logo?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  metadata?: Prisma.SortOrderInput | Prisma.SortOrder
  stripeCustomerId?: Prisma.SortOrderInput | Prisma.SortOrder
  accessKey?: Prisma.SortOrderInput | Prisma.SortOrder
  plan?: Prisma.SortOrder
  members?: Prisma.MemberOrderByRelationAggregateInput
  invitations?: Prisma.InvitationOrderByRelationAggregateInput
  agents?: Prisma.AgentOrderByRelationAggregateInput
  knowledgeSources?: Prisma.KnowledgeSourceOrderByRelationAggregateInput
  phoneNumbers?: Prisma.PhoneNumberOrderByRelationAggregateInput
  tools?: Prisma.ToolOrderByRelationAggregateInput
  mcpConnections?: Prisma.McpConnectionOrderByRelationAggregateInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemOrderByRelationAggregateInput
  agentMcpConnections?: Prisma.AgentMcpConnectionOrderByRelationAggregateInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogOrderByRelationAggregateInput
  secrets?: Prisma.SecretOrderByRelationAggregateInput
  callLogs?: Prisma.CallLogOrderByRelationAggregateInput
  outboundCalls?: Prisma.OutboundCallOrderByRelationAggregateInput
  campaigns?: Prisma.CampaignOrderByRelationAggregateInput
  organizationroles?: Prisma.OrganizationRoleOrderByRelationAggregateInput
  auditLogs?: Prisma.AuditLogOrderByRelationAggregateInput
}

export type OrganizationWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  slug?: string
  AND?: Prisma.OrganizationWhereInput | Prisma.OrganizationWhereInput[]
  OR?: Prisma.OrganizationWhereInput[]
  NOT?: Prisma.OrganizationWhereInput | Prisma.OrganizationWhereInput[]
  name?: Prisma.StringFilter<"Organization"> | string
  logo?: Prisma.StringNullableFilter<"Organization"> | string | null
  createdAt?: Prisma.DateTimeFilter<"Organization"> | Date | string
  metadata?: Prisma.StringNullableFilter<"Organization"> | string | null
  stripeCustomerId?: Prisma.StringNullableFilter<"Organization"> | string | null
  accessKey?: Prisma.StringNullableFilter<"Organization"> | string | null
  plan?: Prisma.EnumPlanIdFilter<"Organization"> | $Enums.PlanId
  members?: Prisma.MemberListRelationFilter
  invitations?: Prisma.InvitationListRelationFilter
  agents?: Prisma.AgentListRelationFilter
  knowledgeSources?: Prisma.KnowledgeSourceListRelationFilter
  phoneNumbers?: Prisma.PhoneNumberListRelationFilter
  tools?: Prisma.ToolListRelationFilter
  mcpConnections?: Prisma.McpConnectionListRelationFilter
  mcpCatalogItems?: Prisma.McpServerCatalogItemListRelationFilter
  agentMcpConnections?: Prisma.AgentMcpConnectionListRelationFilter
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogListRelationFilter
  secrets?: Prisma.SecretListRelationFilter
  callLogs?: Prisma.CallLogListRelationFilter
  outboundCalls?: Prisma.OutboundCallListRelationFilter
  campaigns?: Prisma.CampaignListRelationFilter
  organizationroles?: Prisma.OrganizationRoleListRelationFilter
  auditLogs?: Prisma.AuditLogListRelationFilter
}, "id" | "slug">

export type OrganizationOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  slug?: Prisma.SortOrder
  logo?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  metadata?: Prisma.SortOrderInput | Prisma.SortOrder
  stripeCustomerId?: Prisma.SortOrderInput | Prisma.SortOrder
  accessKey?: Prisma.SortOrderInput | Prisma.SortOrder
  plan?: Prisma.SortOrder
  _count?: Prisma.OrganizationCountOrderByAggregateInput
  _max?: Prisma.OrganizationMaxOrderByAggregateInput
  _min?: Prisma.OrganizationMinOrderByAggregateInput
}

export type OrganizationScalarWhereWithAggregatesInput = {
  AND?: Prisma.OrganizationScalarWhereWithAggregatesInput | Prisma.OrganizationScalarWhereWithAggregatesInput[]
  OR?: Prisma.OrganizationScalarWhereWithAggregatesInput[]
  NOT?: Prisma.OrganizationScalarWhereWithAggregatesInput | Prisma.OrganizationScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"Organization"> | string
  name?: Prisma.StringWithAggregatesFilter<"Organization"> | string
  slug?: Prisma.StringWithAggregatesFilter<"Organization"> | string
  logo?: Prisma.StringNullableWithAggregatesFilter<"Organization"> | string | null
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"Organization"> | Date | string
  metadata?: Prisma.StringNullableWithAggregatesFilter<"Organization"> | string | null
  stripeCustomerId?: Prisma.StringNullableWithAggregatesFilter<"Organization"> | string | null
  accessKey?: Prisma.StringNullableWithAggregatesFilter<"Organization"> | string | null
  plan?: Prisma.EnumPlanIdWithAggregatesFilter<"Organization"> | $Enums.PlanId
}

export type OrganizationCreateInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUncheckedCreateInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleUncheckedCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUncheckedUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUncheckedUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationCreateManyInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
}

export type OrganizationUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
}

export type OrganizationUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
}

export type OrganizationCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  slug?: Prisma.SortOrder
  logo?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  metadata?: Prisma.SortOrder
  stripeCustomerId?: Prisma.SortOrder
  accessKey?: Prisma.SortOrder
  plan?: Prisma.SortOrder
}

export type OrganizationMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  slug?: Prisma.SortOrder
  logo?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  metadata?: Prisma.SortOrder
  stripeCustomerId?: Prisma.SortOrder
  accessKey?: Prisma.SortOrder
  plan?: Prisma.SortOrder
}

export type OrganizationMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  slug?: Prisma.SortOrder
  logo?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  metadata?: Prisma.SortOrder
  stripeCustomerId?: Prisma.SortOrder
  accessKey?: Prisma.SortOrder
  plan?: Prisma.SortOrder
}

export type OrganizationScalarRelationFilter = {
  is?: Prisma.OrganizationWhereInput
  isNot?: Prisma.OrganizationWhereInput
}

export type OrganizationNullableScalarRelationFilter = {
  is?: Prisma.OrganizationWhereInput | null
  isNot?: Prisma.OrganizationWhereInput | null
}

export type EnumPlanIdFieldUpdateOperationsInput = {
  set?: $Enums.PlanId
}

export type OrganizationCreateNestedOneWithoutOrganizationrolesInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutOrganizationrolesInput, Prisma.OrganizationUncheckedCreateWithoutOrganizationrolesInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutOrganizationrolesInput
  connect?: Prisma.OrganizationWhereUniqueInput
}

export type OrganizationUpdateOneRequiredWithoutOrganizationrolesNestedInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutOrganizationrolesInput, Prisma.OrganizationUncheckedCreateWithoutOrganizationrolesInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutOrganizationrolesInput
  upsert?: Prisma.OrganizationUpsertWithoutOrganizationrolesInput
  connect?: Prisma.OrganizationWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.OrganizationUpdateToOneWithWhereWithoutOrganizationrolesInput, Prisma.OrganizationUpdateWithoutOrganizationrolesInput>, Prisma.OrganizationUncheckedUpdateWithoutOrganizationrolesInput>
}

export type OrganizationCreateNestedOneWithoutMembersInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutMembersInput, Prisma.OrganizationUncheckedCreateWithoutMembersInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutMembersInput
  connect?: Prisma.OrganizationWhereUniqueInput
}

export type OrganizationUpdateOneRequiredWithoutMembersNestedInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutMembersInput, Prisma.OrganizationUncheckedCreateWithoutMembersInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutMembersInput
  upsert?: Prisma.OrganizationUpsertWithoutMembersInput
  connect?: Prisma.OrganizationWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.OrganizationUpdateToOneWithWhereWithoutMembersInput, Prisma.OrganizationUpdateWithoutMembersInput>, Prisma.OrganizationUncheckedUpdateWithoutMembersInput>
}

export type OrganizationCreateNestedOneWithoutInvitationsInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutInvitationsInput, Prisma.OrganizationUncheckedCreateWithoutInvitationsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutInvitationsInput
  connect?: Prisma.OrganizationWhereUniqueInput
}

export type OrganizationUpdateOneRequiredWithoutInvitationsNestedInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutInvitationsInput, Prisma.OrganizationUncheckedCreateWithoutInvitationsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutInvitationsInput
  upsert?: Prisma.OrganizationUpsertWithoutInvitationsInput
  connect?: Prisma.OrganizationWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.OrganizationUpdateToOneWithWhereWithoutInvitationsInput, Prisma.OrganizationUpdateWithoutInvitationsInput>, Prisma.OrganizationUncheckedUpdateWithoutInvitationsInput>
}

export type OrganizationCreateNestedOneWithoutPhoneNumbersInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutPhoneNumbersInput, Prisma.OrganizationUncheckedCreateWithoutPhoneNumbersInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutPhoneNumbersInput
  connect?: Prisma.OrganizationWhereUniqueInput
}

export type OrganizationUpdateOneRequiredWithoutPhoneNumbersNestedInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutPhoneNumbersInput, Prisma.OrganizationUncheckedCreateWithoutPhoneNumbersInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutPhoneNumbersInput
  upsert?: Prisma.OrganizationUpsertWithoutPhoneNumbersInput
  connect?: Prisma.OrganizationWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.OrganizationUpdateToOneWithWhereWithoutPhoneNumbersInput, Prisma.OrganizationUpdateWithoutPhoneNumbersInput>, Prisma.OrganizationUncheckedUpdateWithoutPhoneNumbersInput>
}

export type OrganizationCreateNestedOneWithoutAgentsInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutAgentsInput, Prisma.OrganizationUncheckedCreateWithoutAgentsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutAgentsInput
  connect?: Prisma.OrganizationWhereUniqueInput
}

export type OrganizationUpdateOneRequiredWithoutAgentsNestedInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutAgentsInput, Prisma.OrganizationUncheckedCreateWithoutAgentsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutAgentsInput
  upsert?: Prisma.OrganizationUpsertWithoutAgentsInput
  connect?: Prisma.OrganizationWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.OrganizationUpdateToOneWithWhereWithoutAgentsInput, Prisma.OrganizationUpdateWithoutAgentsInput>, Prisma.OrganizationUncheckedUpdateWithoutAgentsInput>
}

export type OrganizationCreateNestedOneWithoutKnowledgeSourcesInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutKnowledgeSourcesInput, Prisma.OrganizationUncheckedCreateWithoutKnowledgeSourcesInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutKnowledgeSourcesInput
  connect?: Prisma.OrganizationWhereUniqueInput
}

export type OrganizationUpdateOneRequiredWithoutKnowledgeSourcesNestedInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutKnowledgeSourcesInput, Prisma.OrganizationUncheckedCreateWithoutKnowledgeSourcesInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutKnowledgeSourcesInput
  upsert?: Prisma.OrganizationUpsertWithoutKnowledgeSourcesInput
  connect?: Prisma.OrganizationWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.OrganizationUpdateToOneWithWhereWithoutKnowledgeSourcesInput, Prisma.OrganizationUpdateWithoutKnowledgeSourcesInput>, Prisma.OrganizationUncheckedUpdateWithoutKnowledgeSourcesInput>
}

export type OrganizationCreateNestedOneWithoutCallLogsInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutCallLogsInput, Prisma.OrganizationUncheckedCreateWithoutCallLogsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutCallLogsInput
  connect?: Prisma.OrganizationWhereUniqueInput
}

export type OrganizationUpdateOneRequiredWithoutCallLogsNestedInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutCallLogsInput, Prisma.OrganizationUncheckedCreateWithoutCallLogsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutCallLogsInput
  upsert?: Prisma.OrganizationUpsertWithoutCallLogsInput
  connect?: Prisma.OrganizationWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.OrganizationUpdateToOneWithWhereWithoutCallLogsInput, Prisma.OrganizationUpdateWithoutCallLogsInput>, Prisma.OrganizationUncheckedUpdateWithoutCallLogsInput>
}

export type OrganizationCreateNestedOneWithoutOutboundCallsInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutOutboundCallsInput, Prisma.OrganizationUncheckedCreateWithoutOutboundCallsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutOutboundCallsInput
  connect?: Prisma.OrganizationWhereUniqueInput
}

export type OrganizationUpdateOneRequiredWithoutOutboundCallsNestedInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutOutboundCallsInput, Prisma.OrganizationUncheckedCreateWithoutOutboundCallsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutOutboundCallsInput
  upsert?: Prisma.OrganizationUpsertWithoutOutboundCallsInput
  connect?: Prisma.OrganizationWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.OrganizationUpdateToOneWithWhereWithoutOutboundCallsInput, Prisma.OrganizationUpdateWithoutOutboundCallsInput>, Prisma.OrganizationUncheckedUpdateWithoutOutboundCallsInput>
}

export type OrganizationCreateNestedOneWithoutCampaignsInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutCampaignsInput, Prisma.OrganizationUncheckedCreateWithoutCampaignsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutCampaignsInput
  connect?: Prisma.OrganizationWhereUniqueInput
}

export type OrganizationUpdateOneRequiredWithoutCampaignsNestedInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutCampaignsInput, Prisma.OrganizationUncheckedCreateWithoutCampaignsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutCampaignsInput
  upsert?: Prisma.OrganizationUpsertWithoutCampaignsInput
  connect?: Prisma.OrganizationWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.OrganizationUpdateToOneWithWhereWithoutCampaignsInput, Prisma.OrganizationUpdateWithoutCampaignsInput>, Prisma.OrganizationUncheckedUpdateWithoutCampaignsInput>
}

export type OrganizationCreateNestedOneWithoutToolsInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutToolsInput, Prisma.OrganizationUncheckedCreateWithoutToolsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutToolsInput
  connect?: Prisma.OrganizationWhereUniqueInput
}

export type OrganizationUpdateOneRequiredWithoutToolsNestedInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutToolsInput, Prisma.OrganizationUncheckedCreateWithoutToolsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutToolsInput
  upsert?: Prisma.OrganizationUpsertWithoutToolsInput
  connect?: Prisma.OrganizationWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.OrganizationUpdateToOneWithWhereWithoutToolsInput, Prisma.OrganizationUpdateWithoutToolsInput>, Prisma.OrganizationUncheckedUpdateWithoutToolsInput>
}

export type OrganizationCreateNestedOneWithoutMcpCatalogItemsInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutMcpCatalogItemsInput, Prisma.OrganizationUncheckedCreateWithoutMcpCatalogItemsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutMcpCatalogItemsInput
  connect?: Prisma.OrganizationWhereUniqueInput
}

export type OrganizationUpdateOneWithoutMcpCatalogItemsNestedInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutMcpCatalogItemsInput, Prisma.OrganizationUncheckedCreateWithoutMcpCatalogItemsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutMcpCatalogItemsInput
  upsert?: Prisma.OrganizationUpsertWithoutMcpCatalogItemsInput
  disconnect?: Prisma.OrganizationWhereInput | boolean
  delete?: Prisma.OrganizationWhereInput | boolean
  connect?: Prisma.OrganizationWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.OrganizationUpdateToOneWithWhereWithoutMcpCatalogItemsInput, Prisma.OrganizationUpdateWithoutMcpCatalogItemsInput>, Prisma.OrganizationUncheckedUpdateWithoutMcpCatalogItemsInput>
}

export type OrganizationCreateNestedOneWithoutMcpConnectionsInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutMcpConnectionsInput, Prisma.OrganizationUncheckedCreateWithoutMcpConnectionsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutMcpConnectionsInput
  connect?: Prisma.OrganizationWhereUniqueInput
}

export type OrganizationUpdateOneRequiredWithoutMcpConnectionsNestedInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutMcpConnectionsInput, Prisma.OrganizationUncheckedCreateWithoutMcpConnectionsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutMcpConnectionsInput
  upsert?: Prisma.OrganizationUpsertWithoutMcpConnectionsInput
  connect?: Prisma.OrganizationWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.OrganizationUpdateToOneWithWhereWithoutMcpConnectionsInput, Prisma.OrganizationUpdateWithoutMcpConnectionsInput>, Prisma.OrganizationUncheckedUpdateWithoutMcpConnectionsInput>
}

export type OrganizationCreateNestedOneWithoutAgentMcpConnectionsInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutAgentMcpConnectionsInput, Prisma.OrganizationUncheckedCreateWithoutAgentMcpConnectionsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutAgentMcpConnectionsInput
  connect?: Prisma.OrganizationWhereUniqueInput
}

export type OrganizationUpdateOneRequiredWithoutAgentMcpConnectionsNestedInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutAgentMcpConnectionsInput, Prisma.OrganizationUncheckedCreateWithoutAgentMcpConnectionsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutAgentMcpConnectionsInput
  upsert?: Prisma.OrganizationUpsertWithoutAgentMcpConnectionsInput
  connect?: Prisma.OrganizationWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.OrganizationUpdateToOneWithWhereWithoutAgentMcpConnectionsInput, Prisma.OrganizationUpdateWithoutAgentMcpConnectionsInput>, Prisma.OrganizationUncheckedUpdateWithoutAgentMcpConnectionsInput>
}

export type OrganizationCreateNestedOneWithoutMcpToolExecutionLogsInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutMcpToolExecutionLogsInput, Prisma.OrganizationUncheckedCreateWithoutMcpToolExecutionLogsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutMcpToolExecutionLogsInput
  connect?: Prisma.OrganizationWhereUniqueInput
}

export type OrganizationUpdateOneRequiredWithoutMcpToolExecutionLogsNestedInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutMcpToolExecutionLogsInput, Prisma.OrganizationUncheckedCreateWithoutMcpToolExecutionLogsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutMcpToolExecutionLogsInput
  upsert?: Prisma.OrganizationUpsertWithoutMcpToolExecutionLogsInput
  connect?: Prisma.OrganizationWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.OrganizationUpdateToOneWithWhereWithoutMcpToolExecutionLogsInput, Prisma.OrganizationUpdateWithoutMcpToolExecutionLogsInput>, Prisma.OrganizationUncheckedUpdateWithoutMcpToolExecutionLogsInput>
}

export type OrganizationCreateNestedOneWithoutSecretsInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutSecretsInput, Prisma.OrganizationUncheckedCreateWithoutSecretsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutSecretsInput
  connect?: Prisma.OrganizationWhereUniqueInput
}

export type OrganizationUpdateOneRequiredWithoutSecretsNestedInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutSecretsInput, Prisma.OrganizationUncheckedCreateWithoutSecretsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutSecretsInput
  upsert?: Prisma.OrganizationUpsertWithoutSecretsInput
  connect?: Prisma.OrganizationWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.OrganizationUpdateToOneWithWhereWithoutSecretsInput, Prisma.OrganizationUpdateWithoutSecretsInput>, Prisma.OrganizationUncheckedUpdateWithoutSecretsInput>
}

export type OrganizationCreateNestedOneWithoutAuditLogsInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutAuditLogsInput, Prisma.OrganizationUncheckedCreateWithoutAuditLogsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutAuditLogsInput
  connect?: Prisma.OrganizationWhereUniqueInput
}

export type OrganizationUpdateOneRequiredWithoutAuditLogsNestedInput = {
  create?: Prisma.XOR<Prisma.OrganizationCreateWithoutAuditLogsInput, Prisma.OrganizationUncheckedCreateWithoutAuditLogsInput>
  connectOrCreate?: Prisma.OrganizationCreateOrConnectWithoutAuditLogsInput
  upsert?: Prisma.OrganizationUpsertWithoutAuditLogsInput
  connect?: Prisma.OrganizationWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.OrganizationUpdateToOneWithWhereWithoutAuditLogsInput, Prisma.OrganizationUpdateWithoutAuditLogsInput>, Prisma.OrganizationUncheckedUpdateWithoutAuditLogsInput>
}

export type OrganizationCreateWithoutOrganizationrolesInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUncheckedCreateWithoutOrganizationrolesInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutOrganizationInput
}

export type OrganizationCreateOrConnectWithoutOrganizationrolesInput = {
  where: Prisma.OrganizationWhereUniqueInput
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutOrganizationrolesInput, Prisma.OrganizationUncheckedCreateWithoutOrganizationrolesInput>
}

export type OrganizationUpsertWithoutOrganizationrolesInput = {
  update: Prisma.XOR<Prisma.OrganizationUpdateWithoutOrganizationrolesInput, Prisma.OrganizationUncheckedUpdateWithoutOrganizationrolesInput>
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutOrganizationrolesInput, Prisma.OrganizationUncheckedCreateWithoutOrganizationrolesInput>
  where?: Prisma.OrganizationWhereInput
}

export type OrganizationUpdateToOneWithWhereWithoutOrganizationrolesInput = {
  where?: Prisma.OrganizationWhereInput
  data: Prisma.XOR<Prisma.OrganizationUpdateWithoutOrganizationrolesInput, Prisma.OrganizationUncheckedUpdateWithoutOrganizationrolesInput>
}

export type OrganizationUpdateWithoutOrganizationrolesInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationUncheckedUpdateWithoutOrganizationrolesInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUncheckedUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationCreateWithoutMembersInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  invitations?: Prisma.InvitationCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUncheckedCreateWithoutMembersInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleUncheckedCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutOrganizationInput
}

export type OrganizationCreateOrConnectWithoutMembersInput = {
  where: Prisma.OrganizationWhereUniqueInput
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutMembersInput, Prisma.OrganizationUncheckedCreateWithoutMembersInput>
}

export type OrganizationUpsertWithoutMembersInput = {
  update: Prisma.XOR<Prisma.OrganizationUpdateWithoutMembersInput, Prisma.OrganizationUncheckedUpdateWithoutMembersInput>
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutMembersInput, Prisma.OrganizationUncheckedCreateWithoutMembersInput>
  where?: Prisma.OrganizationWhereInput
}

export type OrganizationUpdateToOneWithWhereWithoutMembersInput = {
  where?: Prisma.OrganizationWhereInput
  data: Prisma.XOR<Prisma.OrganizationUpdateWithoutMembersInput, Prisma.OrganizationUncheckedUpdateWithoutMembersInput>
}

export type OrganizationUpdateWithoutMembersInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  invitations?: Prisma.InvitationUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationUncheckedUpdateWithoutMembersInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUncheckedUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationCreateWithoutInvitationsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUncheckedCreateWithoutInvitationsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleUncheckedCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutOrganizationInput
}

export type OrganizationCreateOrConnectWithoutInvitationsInput = {
  where: Prisma.OrganizationWhereUniqueInput
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutInvitationsInput, Prisma.OrganizationUncheckedCreateWithoutInvitationsInput>
}

export type OrganizationUpsertWithoutInvitationsInput = {
  update: Prisma.XOR<Prisma.OrganizationUpdateWithoutInvitationsInput, Prisma.OrganizationUncheckedUpdateWithoutInvitationsInput>
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutInvitationsInput, Prisma.OrganizationUncheckedCreateWithoutInvitationsInput>
  where?: Prisma.OrganizationWhereInput
}

export type OrganizationUpdateToOneWithWhereWithoutInvitationsInput = {
  where?: Prisma.OrganizationWhereInput
  data: Prisma.XOR<Prisma.OrganizationUpdateWithoutInvitationsInput, Prisma.OrganizationUncheckedUpdateWithoutInvitationsInput>
}

export type OrganizationUpdateWithoutInvitationsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationUncheckedUpdateWithoutInvitationsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUncheckedUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUncheckedUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationCreateWithoutPhoneNumbersInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUncheckedCreateWithoutPhoneNumbersInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleUncheckedCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutOrganizationInput
}

export type OrganizationCreateOrConnectWithoutPhoneNumbersInput = {
  where: Prisma.OrganizationWhereUniqueInput
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutPhoneNumbersInput, Prisma.OrganizationUncheckedCreateWithoutPhoneNumbersInput>
}

export type OrganizationUpsertWithoutPhoneNumbersInput = {
  update: Prisma.XOR<Prisma.OrganizationUpdateWithoutPhoneNumbersInput, Prisma.OrganizationUncheckedUpdateWithoutPhoneNumbersInput>
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutPhoneNumbersInput, Prisma.OrganizationUncheckedCreateWithoutPhoneNumbersInput>
  where?: Prisma.OrganizationWhereInput
}

export type OrganizationUpdateToOneWithWhereWithoutPhoneNumbersInput = {
  where?: Prisma.OrganizationWhereInput
  data: Prisma.XOR<Prisma.OrganizationUpdateWithoutPhoneNumbersInput, Prisma.OrganizationUncheckedUpdateWithoutPhoneNumbersInput>
}

export type OrganizationUpdateWithoutPhoneNumbersInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationUncheckedUpdateWithoutPhoneNumbersInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUncheckedUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUncheckedUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationCreateWithoutAgentsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUncheckedCreateWithoutAgentsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleUncheckedCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutOrganizationInput
}

export type OrganizationCreateOrConnectWithoutAgentsInput = {
  where: Prisma.OrganizationWhereUniqueInput
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutAgentsInput, Prisma.OrganizationUncheckedCreateWithoutAgentsInput>
}

export type OrganizationUpsertWithoutAgentsInput = {
  update: Prisma.XOR<Prisma.OrganizationUpdateWithoutAgentsInput, Prisma.OrganizationUncheckedUpdateWithoutAgentsInput>
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutAgentsInput, Prisma.OrganizationUncheckedCreateWithoutAgentsInput>
  where?: Prisma.OrganizationWhereInput
}

export type OrganizationUpdateToOneWithWhereWithoutAgentsInput = {
  where?: Prisma.OrganizationWhereInput
  data: Prisma.XOR<Prisma.OrganizationUpdateWithoutAgentsInput, Prisma.OrganizationUncheckedUpdateWithoutAgentsInput>
}

export type OrganizationUpdateWithoutAgentsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationUncheckedUpdateWithoutAgentsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUncheckedUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUncheckedUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationCreateWithoutKnowledgeSourcesInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUncheckedCreateWithoutKnowledgeSourcesInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleUncheckedCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutOrganizationInput
}

export type OrganizationCreateOrConnectWithoutKnowledgeSourcesInput = {
  where: Prisma.OrganizationWhereUniqueInput
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutKnowledgeSourcesInput, Prisma.OrganizationUncheckedCreateWithoutKnowledgeSourcesInput>
}

export type OrganizationUpsertWithoutKnowledgeSourcesInput = {
  update: Prisma.XOR<Prisma.OrganizationUpdateWithoutKnowledgeSourcesInput, Prisma.OrganizationUncheckedUpdateWithoutKnowledgeSourcesInput>
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutKnowledgeSourcesInput, Prisma.OrganizationUncheckedCreateWithoutKnowledgeSourcesInput>
  where?: Prisma.OrganizationWhereInput
}

export type OrganizationUpdateToOneWithWhereWithoutKnowledgeSourcesInput = {
  where?: Prisma.OrganizationWhereInput
  data: Prisma.XOR<Prisma.OrganizationUpdateWithoutKnowledgeSourcesInput, Prisma.OrganizationUncheckedUpdateWithoutKnowledgeSourcesInput>
}

export type OrganizationUpdateWithoutKnowledgeSourcesInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationUncheckedUpdateWithoutKnowledgeSourcesInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUncheckedUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUncheckedUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationCreateWithoutCallLogsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUncheckedCreateWithoutCallLogsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleUncheckedCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutOrganizationInput
}

export type OrganizationCreateOrConnectWithoutCallLogsInput = {
  where: Prisma.OrganizationWhereUniqueInput
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutCallLogsInput, Prisma.OrganizationUncheckedCreateWithoutCallLogsInput>
}

export type OrganizationUpsertWithoutCallLogsInput = {
  update: Prisma.XOR<Prisma.OrganizationUpdateWithoutCallLogsInput, Prisma.OrganizationUncheckedUpdateWithoutCallLogsInput>
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutCallLogsInput, Prisma.OrganizationUncheckedCreateWithoutCallLogsInput>
  where?: Prisma.OrganizationWhereInput
}

export type OrganizationUpdateToOneWithWhereWithoutCallLogsInput = {
  where?: Prisma.OrganizationWhereInput
  data: Prisma.XOR<Prisma.OrganizationUpdateWithoutCallLogsInput, Prisma.OrganizationUncheckedUpdateWithoutCallLogsInput>
}

export type OrganizationUpdateWithoutCallLogsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationUncheckedUpdateWithoutCallLogsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUncheckedUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUncheckedUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationCreateWithoutOutboundCallsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUncheckedCreateWithoutOutboundCallsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleUncheckedCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutOrganizationInput
}

export type OrganizationCreateOrConnectWithoutOutboundCallsInput = {
  where: Prisma.OrganizationWhereUniqueInput
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutOutboundCallsInput, Prisma.OrganizationUncheckedCreateWithoutOutboundCallsInput>
}

export type OrganizationUpsertWithoutOutboundCallsInput = {
  update: Prisma.XOR<Prisma.OrganizationUpdateWithoutOutboundCallsInput, Prisma.OrganizationUncheckedUpdateWithoutOutboundCallsInput>
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutOutboundCallsInput, Prisma.OrganizationUncheckedCreateWithoutOutboundCallsInput>
  where?: Prisma.OrganizationWhereInput
}

export type OrganizationUpdateToOneWithWhereWithoutOutboundCallsInput = {
  where?: Prisma.OrganizationWhereInput
  data: Prisma.XOR<Prisma.OrganizationUpdateWithoutOutboundCallsInput, Prisma.OrganizationUncheckedUpdateWithoutOutboundCallsInput>
}

export type OrganizationUpdateWithoutOutboundCallsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationUncheckedUpdateWithoutOutboundCallsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUncheckedUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUncheckedUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationCreateWithoutCampaignsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUncheckedCreateWithoutCampaignsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleUncheckedCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutOrganizationInput
}

export type OrganizationCreateOrConnectWithoutCampaignsInput = {
  where: Prisma.OrganizationWhereUniqueInput
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutCampaignsInput, Prisma.OrganizationUncheckedCreateWithoutCampaignsInput>
}

export type OrganizationUpsertWithoutCampaignsInput = {
  update: Prisma.XOR<Prisma.OrganizationUpdateWithoutCampaignsInput, Prisma.OrganizationUncheckedUpdateWithoutCampaignsInput>
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutCampaignsInput, Prisma.OrganizationUncheckedCreateWithoutCampaignsInput>
  where?: Prisma.OrganizationWhereInput
}

export type OrganizationUpdateToOneWithWhereWithoutCampaignsInput = {
  where?: Prisma.OrganizationWhereInput
  data: Prisma.XOR<Prisma.OrganizationUpdateWithoutCampaignsInput, Prisma.OrganizationUncheckedUpdateWithoutCampaignsInput>
}

export type OrganizationUpdateWithoutCampaignsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationUncheckedUpdateWithoutCampaignsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUncheckedUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUncheckedUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationCreateWithoutToolsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUncheckedCreateWithoutToolsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleUncheckedCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutOrganizationInput
}

export type OrganizationCreateOrConnectWithoutToolsInput = {
  where: Prisma.OrganizationWhereUniqueInput
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutToolsInput, Prisma.OrganizationUncheckedCreateWithoutToolsInput>
}

export type OrganizationUpsertWithoutToolsInput = {
  update: Prisma.XOR<Prisma.OrganizationUpdateWithoutToolsInput, Prisma.OrganizationUncheckedUpdateWithoutToolsInput>
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutToolsInput, Prisma.OrganizationUncheckedCreateWithoutToolsInput>
  where?: Prisma.OrganizationWhereInput
}

export type OrganizationUpdateToOneWithWhereWithoutToolsInput = {
  where?: Prisma.OrganizationWhereInput
  data: Prisma.XOR<Prisma.OrganizationUpdateWithoutToolsInput, Prisma.OrganizationUncheckedUpdateWithoutToolsInput>
}

export type OrganizationUpdateWithoutToolsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationUncheckedUpdateWithoutToolsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUncheckedUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUncheckedUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationCreateWithoutMcpCatalogItemsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUncheckedCreateWithoutMcpCatalogItemsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleUncheckedCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutOrganizationInput
}

export type OrganizationCreateOrConnectWithoutMcpCatalogItemsInput = {
  where: Prisma.OrganizationWhereUniqueInput
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutMcpCatalogItemsInput, Prisma.OrganizationUncheckedCreateWithoutMcpCatalogItemsInput>
}

export type OrganizationUpsertWithoutMcpCatalogItemsInput = {
  update: Prisma.XOR<Prisma.OrganizationUpdateWithoutMcpCatalogItemsInput, Prisma.OrganizationUncheckedUpdateWithoutMcpCatalogItemsInput>
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutMcpCatalogItemsInput, Prisma.OrganizationUncheckedCreateWithoutMcpCatalogItemsInput>
  where?: Prisma.OrganizationWhereInput
}

export type OrganizationUpdateToOneWithWhereWithoutMcpCatalogItemsInput = {
  where?: Prisma.OrganizationWhereInput
  data: Prisma.XOR<Prisma.OrganizationUpdateWithoutMcpCatalogItemsInput, Prisma.OrganizationUncheckedUpdateWithoutMcpCatalogItemsInput>
}

export type OrganizationUpdateWithoutMcpCatalogItemsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationUncheckedUpdateWithoutMcpCatalogItemsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUncheckedUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUncheckedUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationCreateWithoutMcpConnectionsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUncheckedCreateWithoutMcpConnectionsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleUncheckedCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutOrganizationInput
}

export type OrganizationCreateOrConnectWithoutMcpConnectionsInput = {
  where: Prisma.OrganizationWhereUniqueInput
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutMcpConnectionsInput, Prisma.OrganizationUncheckedCreateWithoutMcpConnectionsInput>
}

export type OrganizationUpsertWithoutMcpConnectionsInput = {
  update: Prisma.XOR<Prisma.OrganizationUpdateWithoutMcpConnectionsInput, Prisma.OrganizationUncheckedUpdateWithoutMcpConnectionsInput>
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutMcpConnectionsInput, Prisma.OrganizationUncheckedCreateWithoutMcpConnectionsInput>
  where?: Prisma.OrganizationWhereInput
}

export type OrganizationUpdateToOneWithWhereWithoutMcpConnectionsInput = {
  where?: Prisma.OrganizationWhereInput
  data: Prisma.XOR<Prisma.OrganizationUpdateWithoutMcpConnectionsInput, Prisma.OrganizationUncheckedUpdateWithoutMcpConnectionsInput>
}

export type OrganizationUpdateWithoutMcpConnectionsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationUncheckedUpdateWithoutMcpConnectionsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUncheckedUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUncheckedUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationCreateWithoutAgentMcpConnectionsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUncheckedCreateWithoutAgentMcpConnectionsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleUncheckedCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutOrganizationInput
}

export type OrganizationCreateOrConnectWithoutAgentMcpConnectionsInput = {
  where: Prisma.OrganizationWhereUniqueInput
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutAgentMcpConnectionsInput, Prisma.OrganizationUncheckedCreateWithoutAgentMcpConnectionsInput>
}

export type OrganizationUpsertWithoutAgentMcpConnectionsInput = {
  update: Prisma.XOR<Prisma.OrganizationUpdateWithoutAgentMcpConnectionsInput, Prisma.OrganizationUncheckedUpdateWithoutAgentMcpConnectionsInput>
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutAgentMcpConnectionsInput, Prisma.OrganizationUncheckedCreateWithoutAgentMcpConnectionsInput>
  where?: Prisma.OrganizationWhereInput
}

export type OrganizationUpdateToOneWithWhereWithoutAgentMcpConnectionsInput = {
  where?: Prisma.OrganizationWhereInput
  data: Prisma.XOR<Prisma.OrganizationUpdateWithoutAgentMcpConnectionsInput, Prisma.OrganizationUncheckedUpdateWithoutAgentMcpConnectionsInput>
}

export type OrganizationUpdateWithoutAgentMcpConnectionsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationUncheckedUpdateWithoutAgentMcpConnectionsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUncheckedUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUncheckedUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationCreateWithoutMcpToolExecutionLogsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUncheckedCreateWithoutMcpToolExecutionLogsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleUncheckedCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutOrganizationInput
}

export type OrganizationCreateOrConnectWithoutMcpToolExecutionLogsInput = {
  where: Prisma.OrganizationWhereUniqueInput
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutMcpToolExecutionLogsInput, Prisma.OrganizationUncheckedCreateWithoutMcpToolExecutionLogsInput>
}

export type OrganizationUpsertWithoutMcpToolExecutionLogsInput = {
  update: Prisma.XOR<Prisma.OrganizationUpdateWithoutMcpToolExecutionLogsInput, Prisma.OrganizationUncheckedUpdateWithoutMcpToolExecutionLogsInput>
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutMcpToolExecutionLogsInput, Prisma.OrganizationUncheckedCreateWithoutMcpToolExecutionLogsInput>
  where?: Prisma.OrganizationWhereInput
}

export type OrganizationUpdateToOneWithWhereWithoutMcpToolExecutionLogsInput = {
  where?: Prisma.OrganizationWhereInput
  data: Prisma.XOR<Prisma.OrganizationUpdateWithoutMcpToolExecutionLogsInput, Prisma.OrganizationUncheckedUpdateWithoutMcpToolExecutionLogsInput>
}

export type OrganizationUpdateWithoutMcpToolExecutionLogsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationUncheckedUpdateWithoutMcpToolExecutionLogsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUncheckedUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUncheckedUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationCreateWithoutSecretsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUncheckedCreateWithoutSecretsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleUncheckedCreateNestedManyWithoutOrganizationInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutOrganizationInput
}

export type OrganizationCreateOrConnectWithoutSecretsInput = {
  where: Prisma.OrganizationWhereUniqueInput
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutSecretsInput, Prisma.OrganizationUncheckedCreateWithoutSecretsInput>
}

export type OrganizationUpsertWithoutSecretsInput = {
  update: Prisma.XOR<Prisma.OrganizationUpdateWithoutSecretsInput, Prisma.OrganizationUncheckedUpdateWithoutSecretsInput>
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutSecretsInput, Prisma.OrganizationUncheckedCreateWithoutSecretsInput>
  where?: Prisma.OrganizationWhereInput
}

export type OrganizationUpdateToOneWithWhereWithoutSecretsInput = {
  where?: Prisma.OrganizationWhereInput
  data: Prisma.XOR<Prisma.OrganizationUpdateWithoutSecretsInput, Prisma.OrganizationUncheckedUpdateWithoutSecretsInput>
}

export type OrganizationUpdateWithoutSecretsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationUncheckedUpdateWithoutSecretsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUncheckedUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUncheckedUpdateManyWithoutOrganizationNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationCreateWithoutAuditLogsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleCreateNestedManyWithoutOrganizationInput
}

export type OrganizationUncheckedCreateWithoutAuditLogsInput = {
  id: string
  name: string
  slug: string
  logo?: string | null
  createdAt: Date | string
  metadata?: string | null
  stripeCustomerId?: string | null
  accessKey?: string | null
  plan?: $Enums.PlanId
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutOrganizationInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutOrganizationInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutOrganizationInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutOrganizationInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutOrganizationInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutOrganizationInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedCreateNestedManyWithoutOrganizationInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedCreateNestedManyWithoutOrganizationInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedCreateNestedManyWithoutOrganizationInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutOrganizationInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutOrganizationInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutOrganizationInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutOrganizationInput
  organizationroles?: Prisma.OrganizationRoleUncheckedCreateNestedManyWithoutOrganizationInput
}

export type OrganizationCreateOrConnectWithoutAuditLogsInput = {
  where: Prisma.OrganizationWhereUniqueInput
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutAuditLogsInput, Prisma.OrganizationUncheckedCreateWithoutAuditLogsInput>
}

export type OrganizationUpsertWithoutAuditLogsInput = {
  update: Prisma.XOR<Prisma.OrganizationUpdateWithoutAuditLogsInput, Prisma.OrganizationUncheckedUpdateWithoutAuditLogsInput>
  create: Prisma.XOR<Prisma.OrganizationCreateWithoutAuditLogsInput, Prisma.OrganizationUncheckedCreateWithoutAuditLogsInput>
  where?: Prisma.OrganizationWhereInput
}

export type OrganizationUpdateToOneWithWhereWithoutAuditLogsInput = {
  where?: Prisma.OrganizationWhereInput
  data: Prisma.XOR<Prisma.OrganizationUpdateWithoutAuditLogsInput, Prisma.OrganizationUncheckedUpdateWithoutAuditLogsInput>
}

export type OrganizationUpdateWithoutAuditLogsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUpdateManyWithoutOrganizationNestedInput
}

export type OrganizationUncheckedUpdateWithoutAuditLogsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  slug?: Prisma.StringFieldUpdateOperationsInput | string
  logo?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accessKey?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  plan?: Prisma.EnumPlanIdFieldUpdateOperationsInput | $Enums.PlanId
  members?: Prisma.MemberUncheckedUpdateManyWithoutOrganizationNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutOrganizationNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutOrganizationNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutOrganizationNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutOrganizationNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpCatalogItems?: Prisma.McpServerCatalogItemUncheckedUpdateManyWithoutOrganizationNestedInput
  agentMcpConnections?: Prisma.AgentMcpConnectionUncheckedUpdateManyWithoutOrganizationNestedInput
  mcpToolExecutionLogs?: Prisma.McpToolExecutionLogUncheckedUpdateManyWithoutOrganizationNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutOrganizationNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutOrganizationNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutOrganizationNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutOrganizationNestedInput
  organizationroles?: Prisma.OrganizationRoleUncheckedUpdateManyWithoutOrganizationNestedInput
}


/**
 * Count Type OrganizationCountOutputType
 */

export type OrganizationCountOutputType = {
  members: number
  invitations: number
  agents: number
  knowledgeSources: number
  phoneNumbers: number
  tools: number
  mcpConnections: number
  mcpCatalogItems: number
  agentMcpConnections: number
  mcpToolExecutionLogs: number
  secrets: number
  callLogs: number
  outboundCalls: number
  campaigns: number
  organizationroles: number
  auditLogs: number
}

export type OrganizationCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  members?: boolean | OrganizationCountOutputTypeCountMembersArgs
  invitations?: boolean | OrganizationCountOutputTypeCountInvitationsArgs
  agents?: boolean | OrganizationCountOutputTypeCountAgentsArgs
  knowledgeSources?: boolean | OrganizationCountOutputTypeCountKnowledgeSourcesArgs
  phoneNumbers?: boolean | OrganizationCountOutputTypeCountPhoneNumbersArgs
  tools?: boolean | OrganizationCountOutputTypeCountToolsArgs
  mcpConnections?: boolean | OrganizationCountOutputTypeCountMcpConnectionsArgs
  mcpCatalogItems?: boolean | OrganizationCountOutputTypeCountMcpCatalogItemsArgs
  agentMcpConnections?: boolean | OrganizationCountOutputTypeCountAgentMcpConnectionsArgs
  mcpToolExecutionLogs?: boolean | OrganizationCountOutputTypeCountMcpToolExecutionLogsArgs
  secrets?: boolean | OrganizationCountOutputTypeCountSecretsArgs
  callLogs?: boolean | OrganizationCountOutputTypeCountCallLogsArgs
  outboundCalls?: boolean | OrganizationCountOutputTypeCountOutboundCallsArgs
  campaigns?: boolean | OrganizationCountOutputTypeCountCampaignsArgs
  organizationroles?: boolean | OrganizationCountOutputTypeCountOrganizationrolesArgs
  auditLogs?: boolean | OrganizationCountOutputTypeCountAuditLogsArgs
}

/**
 * OrganizationCountOutputType without action
 */
export type OrganizationCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the OrganizationCountOutputType
   */
  select?: Prisma.OrganizationCountOutputTypeSelect<ExtArgs> | null
}

/**
 * OrganizationCountOutputType without action
 */
export type OrganizationCountOutputTypeCountMembersArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.MemberWhereInput
}

/**
 * OrganizationCountOutputType without action
 */
export type OrganizationCountOutputTypeCountInvitationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.InvitationWhereInput
}

/**
 * OrganizationCountOutputType without action
 */
export type OrganizationCountOutputTypeCountAgentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.AgentWhereInput
}

/**
 * OrganizationCountOutputType without action
 */
export type OrganizationCountOutputTypeCountKnowledgeSourcesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.KnowledgeSourceWhereInput
}

/**
 * OrganizationCountOutputType without action
 */
export type OrganizationCountOutputTypeCountPhoneNumbersArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.PhoneNumberWhereInput
}

/**
 * OrganizationCountOutputType without action
 */
export type OrganizationCountOutputTypeCountToolsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.ToolWhereInput
}

/**
 * OrganizationCountOutputType without action
 */
export type OrganizationCountOutputTypeCountMcpConnectionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.McpConnectionWhereInput
}

/**
 * OrganizationCountOutputType without action
 */
export type OrganizationCountOutputTypeCountMcpCatalogItemsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.McpServerCatalogItemWhereInput
}

/**
 * OrganizationCountOutputType without action
 */
export type OrganizationCountOutputTypeCountAgentMcpConnectionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.AgentMcpConnectionWhereInput
}

/**
 * OrganizationCountOutputType without action
 */
export type OrganizationCountOutputTypeCountMcpToolExecutionLogsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.McpToolExecutionLogWhereInput
}

/**
 * OrganizationCountOutputType without action
 */
export type OrganizationCountOutputTypeCountSecretsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.SecretWhereInput
}

/**
 * OrganizationCountOutputType without action
 */
export type OrganizationCountOutputTypeCountCallLogsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.CallLogWhereInput
}

/**
 * OrganizationCountOutputType without action
 */
export type OrganizationCountOutputTypeCountOutboundCallsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.OutboundCallWhereInput
}

/**
 * OrganizationCountOutputType without action
 */
export type OrganizationCountOutputTypeCountCampaignsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.CampaignWhereInput
}

/**
 * OrganizationCountOutputType without action
 */
export type OrganizationCountOutputTypeCountOrganizationrolesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.OrganizationRoleWhereInput
}

/**
 * OrganizationCountOutputType without action
 */
export type OrganizationCountOutputTypeCountAuditLogsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.AuditLogWhereInput
}


export type OrganizationSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  name?: boolean
  slug?: boolean
  logo?: boolean
  createdAt?: boolean
  metadata?: boolean
  stripeCustomerId?: boolean
  accessKey?: boolean
  plan?: boolean
  members?: boolean | Prisma.Organization$membersArgs<ExtArgs>
  invitations?: boolean | Prisma.Organization$invitationsArgs<ExtArgs>
  agents?: boolean | Prisma.Organization$agentsArgs<ExtArgs>
  knowledgeSources?: boolean | Prisma.Organization$knowledgeSourcesArgs<ExtArgs>
  phoneNumbers?: boolean | Prisma.Organization$phoneNumbersArgs<ExtArgs>
  tools?: boolean | Prisma.Organization$toolsArgs<ExtArgs>
  mcpConnections?: boolean | Prisma.Organization$mcpConnectionsArgs<ExtArgs>
  mcpCatalogItems?: boolean | Prisma.Organization$mcpCatalogItemsArgs<ExtArgs>
  agentMcpConnections?: boolean | Prisma.Organization$agentMcpConnectionsArgs<ExtArgs>
  mcpToolExecutionLogs?: boolean | Prisma.Organization$mcpToolExecutionLogsArgs<ExtArgs>
  secrets?: boolean | Prisma.Organization$secretsArgs<ExtArgs>
  callLogs?: boolean | Prisma.Organization$callLogsArgs<ExtArgs>
  outboundCalls?: boolean | Prisma.Organization$outboundCallsArgs<ExtArgs>
  campaigns?: boolean | Prisma.Organization$campaignsArgs<ExtArgs>
  organizationroles?: boolean | Prisma.Organization$organizationrolesArgs<ExtArgs>
  auditLogs?: boolean | Prisma.Organization$auditLogsArgs<ExtArgs>
  _count?: boolean | Prisma.OrganizationCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["organization"]>

export type OrganizationSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  name?: boolean
  slug?: boolean
  logo?: boolean
  createdAt?: boolean
  metadata?: boolean
  stripeCustomerId?: boolean
  accessKey?: boolean
  plan?: boolean
}, ExtArgs["result"]["organization"]>

export type OrganizationSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  name?: boolean
  slug?: boolean
  logo?: boolean
  createdAt?: boolean
  metadata?: boolean
  stripeCustomerId?: boolean
  accessKey?: boolean
  plan?: boolean
}, ExtArgs["result"]["organization"]>

export type OrganizationSelectScalar = {
  id?: boolean
  name?: boolean
  slug?: boolean
  logo?: boolean
  createdAt?: boolean
  metadata?: boolean
  stripeCustomerId?: boolean
  accessKey?: boolean
  plan?: boolean
}

export type OrganizationOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "slug" | "logo" | "createdAt" | "metadata" | "stripeCustomerId" | "accessKey" | "plan", ExtArgs["result"]["organization"]>
export type OrganizationInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  members?: boolean | Prisma.Organization$membersArgs<ExtArgs>
  invitations?: boolean | Prisma.Organization$invitationsArgs<ExtArgs>
  agents?: boolean | Prisma.Organization$agentsArgs<ExtArgs>
  knowledgeSources?: boolean | Prisma.Organization$knowledgeSourcesArgs<ExtArgs>
  phoneNumbers?: boolean | Prisma.Organization$phoneNumbersArgs<ExtArgs>
  tools?: boolean | Prisma.Organization$toolsArgs<ExtArgs>
  mcpConnections?: boolean | Prisma.Organization$mcpConnectionsArgs<ExtArgs>
  mcpCatalogItems?: boolean | Prisma.Organization$mcpCatalogItemsArgs<ExtArgs>
  agentMcpConnections?: boolean | Prisma.Organization$agentMcpConnectionsArgs<ExtArgs>
  mcpToolExecutionLogs?: boolean | Prisma.Organization$mcpToolExecutionLogsArgs<ExtArgs>
  secrets?: boolean | Prisma.Organization$secretsArgs<ExtArgs>
  callLogs?: boolean | Prisma.Organization$callLogsArgs<ExtArgs>
  outboundCalls?: boolean | Prisma.Organization$outboundCallsArgs<ExtArgs>
  campaigns?: boolean | Prisma.Organization$campaignsArgs<ExtArgs>
  organizationroles?: boolean | Prisma.Organization$organizationrolesArgs<ExtArgs>
  auditLogs?: boolean | Prisma.Organization$auditLogsArgs<ExtArgs>
  _count?: boolean | Prisma.OrganizationCountOutputTypeDefaultArgs<ExtArgs>
}
export type OrganizationIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}
export type OrganizationIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}

export type $OrganizationPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "Organization"
  objects: {
    members: Prisma.$MemberPayload<ExtArgs>[]
    invitations: Prisma.$InvitationPayload<ExtArgs>[]
    agents: Prisma.$AgentPayload<ExtArgs>[]
    knowledgeSources: Prisma.$KnowledgeSourcePayload<ExtArgs>[]
    phoneNumbers: Prisma.$PhoneNumberPayload<ExtArgs>[]
    tools: Prisma.$ToolPayload<ExtArgs>[]
    mcpConnections: Prisma.$McpConnectionPayload<ExtArgs>[]
    mcpCatalogItems: Prisma.$McpServerCatalogItemPayload<ExtArgs>[]
    agentMcpConnections: Prisma.$AgentMcpConnectionPayload<ExtArgs>[]
    mcpToolExecutionLogs: Prisma.$McpToolExecutionLogPayload<ExtArgs>[]
    secrets: Prisma.$SecretPayload<ExtArgs>[]
    callLogs: Prisma.$CallLogPayload<ExtArgs>[]
    outboundCalls: Prisma.$OutboundCallPayload<ExtArgs>[]
    campaigns: Prisma.$CampaignPayload<ExtArgs>[]
    organizationroles: Prisma.$OrganizationRolePayload<ExtArgs>[]
    auditLogs: Prisma.$AuditLogPayload<ExtArgs>[]
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    name: string
    slug: string
    logo: string | null
    createdAt: Date
    metadata: string | null
    stripeCustomerId: string | null
    accessKey: string | null
    plan: $Enums.PlanId
  }, ExtArgs["result"]["organization"]>
  composites: {}
}

export type OrganizationGetPayload<S extends boolean | null | undefined | OrganizationDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$OrganizationPayload, S>

export type OrganizationCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
  Omit<OrganizationFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
    select?: OrganizationCountAggregateInputType | true
  }

export interface OrganizationDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
  [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Organization'], meta: { name: 'Organization' } }
  /**
   * Find zero or one Organization that matches the filter.
   * @param {OrganizationFindUniqueArgs} args - Arguments to find a Organization
   * @example
   * // Get one Organization
   * const organization = await prisma.organization.findUnique({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findUnique<T extends OrganizationFindUniqueArgs>(args: Prisma.SelectSubset<T, OrganizationFindUniqueArgs<ExtArgs>>): Prisma.Prisma__OrganizationClient<runtime.Types.Result.GetResult<Prisma.$OrganizationPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

  /**
   * Find one Organization that matches the filter or throw an error with `error.code='P2025'`
   * if no matches were found.
   * @param {OrganizationFindUniqueOrThrowArgs} args - Arguments to find a Organization
   * @example
   * // Get one Organization
   * const organization = await prisma.organization.findUniqueOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findUniqueOrThrow<T extends OrganizationFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, OrganizationFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__OrganizationClient<runtime.Types.Result.GetResult<Prisma.$OrganizationPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Find the first Organization that matches the filter.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {OrganizationFindFirstArgs} args - Arguments to find a Organization
   * @example
   * // Get one Organization
   * const organization = await prisma.organization.findFirst({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirst<T extends OrganizationFindFirstArgs>(args?: Prisma.SelectSubset<T, OrganizationFindFirstArgs<ExtArgs>>): Prisma.Prisma__OrganizationClient<runtime.Types.Result.GetResult<Prisma.$OrganizationPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

  /**
   * Find the first Organization that matches the filter or
   * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {OrganizationFindFirstOrThrowArgs} args - Arguments to find a Organization
   * @example
   * // Get one Organization
   * const organization = await prisma.organization.findFirstOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirstOrThrow<T extends OrganizationFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, OrganizationFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__OrganizationClient<runtime.Types.Result.GetResult<Prisma.$OrganizationPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Find zero or more Organizations that matches the filter.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {OrganizationFindManyArgs} args - Arguments to filter and select certain fields only.
   * @example
   * // Get all Organizations
   * const organizations = await prisma.organization.findMany()
   *
   * // Get first 10 Organizations
   * const organizations = await prisma.organization.findMany({ take: 10 })
   *
   * // Only select the `id`
   * const organizationWithIdOnly = await prisma.organization.findMany({ select: { id: true } })
   *
   */
  findMany<T extends OrganizationFindManyArgs>(args?: Prisma.SelectSubset<T, OrganizationFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$OrganizationPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

  /**
   * Create a Organization.
   * @param {OrganizationCreateArgs} args - Arguments to create a Organization.
   * @example
   * // Create one Organization
   * const Organization = await prisma.organization.create({
   *   data: {
   *     // ... data to create a Organization
   *   }
   * })
   *
   */
  create<T extends OrganizationCreateArgs>(args: Prisma.SelectSubset<T, OrganizationCreateArgs<ExtArgs>>): Prisma.Prisma__OrganizationClient<runtime.Types.Result.GetResult<Prisma.$OrganizationPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Create many Organizations.
   * @param {OrganizationCreateManyArgs} args - Arguments to create many Organizations.
   * @example
   * // Create many Organizations
   * const organization = await prisma.organization.createMany({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   *
   */
  createMany<T extends OrganizationCreateManyArgs>(args?: Prisma.SelectSubset<T, OrganizationCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Create many Organizations and returns the data saved in the database.
   * @param {OrganizationCreateManyAndReturnArgs} args - Arguments to create many Organizations.
   * @example
   * // Create many Organizations
   * const organization = await prisma.organization.createManyAndReturn({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   *
   * // Create many Organizations and only return the `id`
   * const organizationWithIdOnly = await prisma.organization.createManyAndReturn({
   *   select: { id: true },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   *
   */
  createManyAndReturn<T extends OrganizationCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, OrganizationCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$OrganizationPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

  /**
   * Delete a Organization.
   * @param {OrganizationDeleteArgs} args - Arguments to delete one Organization.
   * @example
   * // Delete one Organization
   * const Organization = await prisma.organization.delete({
   *   where: {
   *     // ... filter to delete one Organization
   *   }
   * })
   *
   */
  delete<T extends OrganizationDeleteArgs>(args: Prisma.SelectSubset<T, OrganizationDeleteArgs<ExtArgs>>): Prisma.Prisma__OrganizationClient<runtime.Types.Result.GetResult<Prisma.$OrganizationPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Update one Organization.
   * @param {OrganizationUpdateArgs} args - Arguments to update one Organization.
   * @example
   * // Update one Organization
   * const organization = await prisma.organization.update({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   *
   */
  update<T extends OrganizationUpdateArgs>(args: Prisma.SelectSubset<T, OrganizationUpdateArgs<ExtArgs>>): Prisma.Prisma__OrganizationClient<runtime.Types.Result.GetResult<Prisma.$OrganizationPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Delete zero or more Organizations.
   * @param {OrganizationDeleteManyArgs} args - Arguments to filter Organizations to delete.
   * @example
   * // Delete a few Organizations
   * const { count } = await prisma.organization.deleteMany({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   *
   */
  deleteMany<T extends OrganizationDeleteManyArgs>(args?: Prisma.SelectSubset<T, OrganizationDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Update zero or more Organizations.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {OrganizationUpdateManyArgs} args - Arguments to update one or more rows.
   * @example
   * // Update many Organizations
   * const organization = await prisma.organization.updateMany({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   *
   */
  updateMany<T extends OrganizationUpdateManyArgs>(args: Prisma.SelectSubset<T, OrganizationUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Update zero or more Organizations and returns the data updated in the database.
   * @param {OrganizationUpdateManyAndReturnArgs} args - Arguments to update many Organizations.
   * @example
   * // Update many Organizations
   * const organization = await prisma.organization.updateManyAndReturn({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   *
   * // Update zero or more Organizations and only return the `id`
   * const organizationWithIdOnly = await prisma.organization.updateManyAndReturn({
   *   select: { id: true },
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   *
   */
  updateManyAndReturn<T extends OrganizationUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, OrganizationUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$OrganizationPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

  /**
   * Create or update one Organization.
   * @param {OrganizationUpsertArgs} args - Arguments to update or create a Organization.
   * @example
   * // Update or create a Organization
   * const organization = await prisma.organization.upsert({
   *   create: {
   *     // ... data to create a Organization
   *   },
   *   update: {
   *     // ... in case it already exists, update
   *   },
   *   where: {
   *     // ... the filter for the Organization we want to update
   *   }
   * })
   */
  upsert<T extends OrganizationUpsertArgs>(args: Prisma.SelectSubset<T, OrganizationUpsertArgs<ExtArgs>>): Prisma.Prisma__OrganizationClient<runtime.Types.Result.GetResult<Prisma.$OrganizationPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


  /**
   * Count the number of Organizations.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {OrganizationCountArgs} args - Arguments to filter Organizations to count.
   * @example
   * // Count the number of Organizations
   * const count = await prisma.organization.count({
   *   where: {
   *     // ... the filter for the Organizations we want to count
   *   }
   * })
  **/
  count<T extends OrganizationCountArgs>(
    args?: Prisma.Subset<T, OrganizationCountArgs>,
  ): Prisma.PrismaPromise<
    T extends runtime.Types.Utils.Record<'select', any>
      ? T['select'] extends true
        ? number
        : Prisma.GetScalarType<T['select'], OrganizationCountAggregateOutputType>
      : number
  >

  /**
   * Allows you to perform aggregations operations on a Organization.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {OrganizationAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
   * @example
   * // Ordered by age ascending
   * // Where email contains prisma.io
   * // Limited to the 10 users
   * const aggregations = await prisma.user.aggregate({
   *   _avg: {
   *     age: true,
   *   },
   *   where: {
   *     email: {
   *       contains: "prisma.io",
   *     },
   *   },
   *   orderBy: {
   *     age: "asc",
   *   },
   *   take: 10,
   * })
  **/
  aggregate<T extends OrganizationAggregateArgs>(args: Prisma.Subset<T, OrganizationAggregateArgs>): Prisma.PrismaPromise<GetOrganizationAggregateType<T>>

  /**
   * Group by Organization.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {OrganizationGroupByArgs} args - Group by arguments.
   * @example
   * // Group by city, order by createdAt, get count
   * const result = await prisma.user.groupBy({
   *   by: ['city', 'createdAt'],
   *   orderBy: {
   *     createdAt: true
   *   },
   *   _count: {
   *     _all: true
   *   },
   * })
   *
  **/
  groupBy<
    T extends OrganizationGroupByArgs,
    HasSelectOrTake extends Prisma.Or<
      Prisma.Extends<'skip', Prisma.Keys<T>>,
      Prisma.Extends<'take', Prisma.Keys<T>>
    >,
    OrderByArg extends Prisma.True extends HasSelectOrTake
      ? { orderBy: OrganizationGroupByArgs['orderBy'] }
      : { orderBy?: OrganizationGroupByArgs['orderBy'] },
    OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
    ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
    ByValid extends Prisma.Has<ByFields, OrderFields>,
    HavingFields extends Prisma.GetHavingFields<T['having']>,
    HavingValid extends Prisma.Has<ByFields, HavingFields>,
    ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
    InputErrors extends ByEmpty extends Prisma.True
    ? `Error: "by" must not be empty.`
    : HavingValid extends Prisma.False
    ? {
        [P in HavingFields]: P extends ByFields
          ? never
          : P extends string
          ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
          : [
              Error,
              'Field ',
              P,
              ` in "having" needs to be provided in "by"`,
            ]
      }[HavingFields]
    : 'take' extends Prisma.Keys<T>
    ? 'orderBy' extends Prisma.Keys<T>
      ? ByValid extends Prisma.True
        ? {}
        : {
            [P in OrderFields]: P extends ByFields
              ? never
              : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
          }[OrderFields]
      : 'Error: If you provide "take", you also need to provide "orderBy"'
    : 'skip' extends Prisma.Keys<T>
    ? 'orderBy' extends Prisma.Keys<T>
      ? ByValid extends Prisma.True
        ? {}
        : {
            [P in OrderFields]: P extends ByFields
              ? never
              : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
          }[OrderFields]
      : 'Error: If you provide "skip", you also need to provide "orderBy"'
    : ByValid extends Prisma.True
    ? {}
    : {
        [P in OrderFields]: P extends ByFields
          ? never
          : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
      }[OrderFields]
  >(args: Prisma.SubsetIntersection<T, OrganizationGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetOrganizationGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
 * Fields of the Organization model
 */
readonly fields: OrganizationFieldRefs;
}

/**
 * The delegate class that acts as a "Promise-like" for Organization.
 * Why is this prefixed with `Prisma__`?
 * Because we want to prevent naming conflicts as mentioned in
 * https://github.com/prisma/prisma-client-js/issues/707
 */
export interface Prisma__OrganizationClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  members<T extends Prisma.Organization$membersArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Organization$membersArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$MemberPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  invitations<T extends Prisma.Organization$invitationsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Organization$invitationsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$InvitationPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  agents<T extends Prisma.Organization$agentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Organization$agentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AgentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  knowledgeSources<T extends Prisma.Organization$knowledgeSourcesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Organization$knowledgeSourcesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$KnowledgeSourcePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  phoneNumbers<T extends Prisma.Organization$phoneNumbersArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Organization$phoneNumbersArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PhoneNumberPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  tools<T extends Prisma.Organization$toolsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Organization$toolsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ToolPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  mcpConnections<T extends Prisma.Organization$mcpConnectionsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Organization$mcpConnectionsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$McpConnectionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  mcpCatalogItems<T extends Prisma.Organization$mcpCatalogItemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Organization$mcpCatalogItemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$McpServerCatalogItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  agentMcpConnections<T extends Prisma.Organization$agentMcpConnectionsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Organization$agentMcpConnectionsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AgentMcpConnectionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  mcpToolExecutionLogs<T extends Prisma.Organization$mcpToolExecutionLogsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Organization$mcpToolExecutionLogsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$McpToolExecutionLogPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  secrets<T extends Prisma.Organization$secretsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Organization$secretsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SecretPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  callLogs<T extends Prisma.Organization$callLogsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Organization$callLogsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CallLogPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  outboundCalls<T extends Prisma.Organization$outboundCallsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Organization$outboundCallsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$OutboundCallPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  campaigns<T extends Prisma.Organization$campaignsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Organization$campaignsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CampaignPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  organizationroles<T extends Prisma.Organization$organizationrolesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Organization$organizationrolesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$OrganizationRolePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  auditLogs<T extends Prisma.Organization$auditLogsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Organization$auditLogsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AuditLogPayload<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.
   * @param onrejected The callback to execute when the Promise is rejected.
   * @returns A Promise for the completion of which ever callback is executed.
   */
  then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
  /**
   * Attaches a callback for only the rejection of the Promise.
   * @param onrejected The callback to execute when the Promise is rejected.
   * @returns A Promise for the completion of the callback.
   */
  catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
  /**
   * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
   * resolved value cannot be modified from the callback.
   * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
   * @returns A Promise for the completion of the callback.
   */
  finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
}




/**
 * Fields of the Organization model
 */
export interface OrganizationFieldRefs {
  readonly id: Prisma.FieldRef<"Organization", 'String'>
  readonly name: Prisma.FieldRef<"Organization", 'String'>
  readonly slug: Prisma.FieldRef<"Organization", 'String'>
  readonly logo: Prisma.FieldRef<"Organization", 'String'>
  readonly createdAt: Prisma.FieldRef<"Organization", 'DateTime'>
  readonly metadata: Prisma.FieldRef<"Organization", 'String'>
  readonly stripeCustomerId: Prisma.FieldRef<"Organization", 'String'>
  readonly accessKey: Prisma.FieldRef<"Organization", 'String'>
  readonly plan: Prisma.FieldRef<"Organization", 'PlanId'>
}


// Custom InputTypes
/**
 * Organization findUnique
 */
export type OrganizationFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Organization
   */
  select?: Prisma.OrganizationSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Organization
   */
  omit?: Prisma.OrganizationOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.OrganizationInclude<ExtArgs> | null
  /**
   * Filter, which Organization to fetch.
   */
  where: Prisma.OrganizationWhereUniqueInput
}

/**
 * Organization findUniqueOrThrow
 */
export type OrganizationFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Organization
   */
  select?: Prisma.OrganizationSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Organization
   */
  omit?: Prisma.OrganizationOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.OrganizationInclude<ExtArgs> | null
  /**
   * Filter, which Organization to fetch.
   */
  where: Prisma.OrganizationWhereUniqueInput
}

/**
 * Organization findFirst
 */
export type OrganizationFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Organization
   */
  select?: Prisma.OrganizationSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Organization
   */
  omit?: Prisma.OrganizationOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.OrganizationInclude<ExtArgs> | null
  /**
   * Filter, which Organization to fetch.
   */
  where?: Prisma.OrganizationWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   *
   * Determine the order of Organizations to fetch.
   */
  orderBy?: Prisma.OrganizationOrderByWithRelationInput | Prisma.OrganizationOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   *
   * Sets the position for searching for Organizations.
   */
  cursor?: Prisma.OrganizationWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Take `±n` Organizations from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Skip the first `n` Organizations.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   *
   * Filter by unique combinations of Organizations.
   */
  distinct?: Prisma.OrganizationScalarFieldEnum | Prisma.OrganizationScalarFieldEnum[]
}

/**
 * Organization findFirstOrThrow
 */
export type OrganizationFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Organization
   */
  select?: Prisma.OrganizationSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Organization
   */
  omit?: Prisma.OrganizationOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.OrganizationInclude<ExtArgs> | null
  /**
   * Filter, which Organization to fetch.
   */
  where?: Prisma.OrganizationWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   *
   * Determine the order of Organizations to fetch.
   */
  orderBy?: Prisma.OrganizationOrderByWithRelationInput | Prisma.OrganizationOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   *
   * Sets the position for searching for Organizations.
   */
  cursor?: Prisma.OrganizationWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Take `±n` Organizations from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Skip the first `n` Organizations.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   *
   * Filter by unique combinations of Organizations.
   */
  distinct?: Prisma.OrganizationScalarFieldEnum | Prisma.OrganizationScalarFieldEnum[]
}

/**
 * Organization findMany
 */
export type OrganizationFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Organization
   */
  select?: Prisma.OrganizationSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Organization
   */
  omit?: Prisma.OrganizationOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.OrganizationInclude<ExtArgs> | null
  /**
   * Filter, which Organizations to fetch.
   */
  where?: Prisma.OrganizationWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   *
   * Determine the order of Organizations to fetch.
   */
  orderBy?: Prisma.OrganizationOrderByWithRelationInput | Prisma.OrganizationOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   *
   * Sets the position for listing Organizations.
   */
  cursor?: Prisma.OrganizationWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Take `±n` Organizations from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Skip the first `n` Organizations.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   *
   * Filter by unique combinations of Organizations.
   */
  distinct?: Prisma.OrganizationScalarFieldEnum | Prisma.OrganizationScalarFieldEnum[]
}

/**
 * Organization create
 */
export type OrganizationCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Organization
   */
  select?: Prisma.OrganizationSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Organization
   */
  omit?: Prisma.OrganizationOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.OrganizationInclude<ExtArgs> | null
  /**
   * The data needed to create a Organization.
   */
  data: Prisma.XOR<Prisma.OrganizationCreateInput, Prisma.OrganizationUncheckedCreateInput>
}

/**
 * Organization createMany
 */
export type OrganizationCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to create many Organizations.
   */
  data: Prisma.OrganizationCreateManyInput | Prisma.OrganizationCreateManyInput[]
  skipDuplicates?: boolean
}

/**
 * Organization createManyAndReturn
 */
export type OrganizationCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Organization
   */
  select?: Prisma.OrganizationSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Organization
   */
  omit?: Prisma.OrganizationOmit<ExtArgs> | null
  /**
   * The data used to create many Organizations.
   */
  data: Prisma.OrganizationCreateManyInput | Prisma.OrganizationCreateManyInput[]
  skipDuplicates?: boolean
}

/**
 * Organization update
 */
export type OrganizationUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Organization
   */
  select?: Prisma.OrganizationSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Organization
   */
  omit?: Prisma.OrganizationOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.OrganizationInclude<ExtArgs> | null
  /**
   * The data needed to update a Organization.
   */
  data: Prisma.XOR<Prisma.OrganizationUpdateInput, Prisma.OrganizationUncheckedUpdateInput>
  /**
   * Choose, which Organization to update.
   */
  where: Prisma.OrganizationWhereUniqueInput
}

/**
 * Organization updateMany
 */
export type OrganizationUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update Organizations.
   */
  data: Prisma.XOR<Prisma.OrganizationUpdateManyMutationInput, Prisma.OrganizationUncheckedUpdateManyInput>
  /**
   * Filter which Organizations to update
   */
  where?: Prisma.OrganizationWhereInput
  /**
   * Limit how many Organizations to update.
   */
  limit?: number
}

/**
 * Organization updateManyAndReturn
 */
export type OrganizationUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Organization
   */
  select?: Prisma.OrganizationSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Organization
   */
  omit?: Prisma.OrganizationOmit<ExtArgs> | null
  /**
   * The data used to update Organizations.
   */
  data: Prisma.XOR<Prisma.OrganizationUpdateManyMutationInput, Prisma.OrganizationUncheckedUpdateManyInput>
  /**
   * Filter which Organizations to update
   */
  where?: Prisma.OrganizationWhereInput
  /**
   * Limit how many Organizations to update.
   */
  limit?: number
}

/**
 * Organization upsert
 */
export type OrganizationUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Organization
   */
  select?: Prisma.OrganizationSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Organization
   */
  omit?: Prisma.OrganizationOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.OrganizationInclude<ExtArgs> | null
  /**
   * The filter to search for the Organization to update in case it exists.
   */
  where: Prisma.OrganizationWhereUniqueInput
  /**
   * In case the Organization found by the `where` argument doesn't exist, create a new Organization with this data.
   */
  create: Prisma.XOR<Prisma.OrganizationCreateInput, Prisma.OrganizationUncheckedCreateInput>
  /**
   * In case the Organization was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.OrganizationUpdateInput, Prisma.OrganizationUncheckedUpdateInput>
}

/**
 * Organization delete
 */
export type OrganizationDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Organization
   */
  select?: Prisma.OrganizationSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Organization
   */
  omit?: Prisma.OrganizationOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.OrganizationInclude<ExtArgs> | null
  /**
   * Filter which Organization to delete.
   */
  where: Prisma.OrganizationWhereUniqueInput
}

/**
 * Organization deleteMany
 */
export type OrganizationDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which Organizations to delete
   */
  where?: Prisma.OrganizationWhereInput
  /**
   * Limit how many Organizations to delete.
   */
  limit?: number
}

/**
 * Organization.members
 */
export type Organization$membersArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Member
   */
  select?: Prisma.MemberSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Member
   */
  omit?: Prisma.MemberOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.MemberInclude<ExtArgs> | null
  where?: Prisma.MemberWhereInput
  orderBy?: Prisma.MemberOrderByWithRelationInput | Prisma.MemberOrderByWithRelationInput[]
  cursor?: Prisma.MemberWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.MemberScalarFieldEnum | Prisma.MemberScalarFieldEnum[]
}

/**
 * Organization.invitations
 */
export type Organization$invitationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Invitation
   */
  select?: Prisma.InvitationSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Invitation
   */
  omit?: Prisma.InvitationOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.InvitationInclude<ExtArgs> | null
  where?: Prisma.InvitationWhereInput
  orderBy?: Prisma.InvitationOrderByWithRelationInput | Prisma.InvitationOrderByWithRelationInput[]
  cursor?: Prisma.InvitationWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.InvitationScalarFieldEnum | Prisma.InvitationScalarFieldEnum[]
}

/**
 * Organization.agents
 */
export type Organization$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[]
}

/**
 * Organization.knowledgeSources
 */
export type Organization$knowledgeSourcesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the KnowledgeSource
   */
  select?: Prisma.KnowledgeSourceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the KnowledgeSource
   */
  omit?: Prisma.KnowledgeSourceOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.KnowledgeSourceInclude<ExtArgs> | null
  where?: Prisma.KnowledgeSourceWhereInput
  orderBy?: Prisma.KnowledgeSourceOrderByWithRelationInput | Prisma.KnowledgeSourceOrderByWithRelationInput[]
  cursor?: Prisma.KnowledgeSourceWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.KnowledgeSourceScalarFieldEnum | Prisma.KnowledgeSourceScalarFieldEnum[]
}

/**
 * Organization.phoneNumbers
 */
export type Organization$phoneNumbersArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the PhoneNumber
   */
  select?: Prisma.PhoneNumberSelect<ExtArgs> | null
  /**
   * Omit specific fields from the PhoneNumber
   */
  omit?: Prisma.PhoneNumberOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.PhoneNumberInclude<ExtArgs> | null
  where?: Prisma.PhoneNumberWhereInput
  orderBy?: Prisma.PhoneNumberOrderByWithRelationInput | Prisma.PhoneNumberOrderByWithRelationInput[]
  cursor?: Prisma.PhoneNumberWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.PhoneNumberScalarFieldEnum | Prisma.PhoneNumberScalarFieldEnum[]
}

/**
 * Organization.tools
 */
export type Organization$toolsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Tool
   */
  select?: Prisma.ToolSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Tool
   */
  omit?: Prisma.ToolOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ToolInclude<ExtArgs> | null
  where?: Prisma.ToolWhereInput
  orderBy?: Prisma.ToolOrderByWithRelationInput | Prisma.ToolOrderByWithRelationInput[]
  cursor?: Prisma.ToolWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.ToolScalarFieldEnum | Prisma.ToolScalarFieldEnum[]
}

/**
 * Organization.mcpConnections
 */
export type Organization$mcpConnectionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpConnection
   */
  select?: Prisma.McpConnectionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the McpConnection
   */
  omit?: Prisma.McpConnectionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpConnectionInclude<ExtArgs> | null
  where?: Prisma.McpConnectionWhereInput
  orderBy?: Prisma.McpConnectionOrderByWithRelationInput | Prisma.McpConnectionOrderByWithRelationInput[]
  cursor?: Prisma.McpConnectionWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.McpConnectionScalarFieldEnum | Prisma.McpConnectionScalarFieldEnum[]
}

/**
 * Organization.mcpCatalogItems
 */
export type Organization$mcpCatalogItemsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpServerCatalogItem
   */
  select?: Prisma.McpServerCatalogItemSelect<ExtArgs> | null
  /**
   * Omit specific fields from the McpServerCatalogItem
   */
  omit?: Prisma.McpServerCatalogItemOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpServerCatalogItemInclude<ExtArgs> | null
  where?: Prisma.McpServerCatalogItemWhereInput
  orderBy?: Prisma.McpServerCatalogItemOrderByWithRelationInput | Prisma.McpServerCatalogItemOrderByWithRelationInput[]
  cursor?: Prisma.McpServerCatalogItemWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.McpServerCatalogItemScalarFieldEnum | Prisma.McpServerCatalogItemScalarFieldEnum[]
}

/**
 * Organization.agentMcpConnections
 */
export type Organization$agentMcpConnectionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the AgentMcpConnection
   */
  select?: Prisma.AgentMcpConnectionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the AgentMcpConnection
   */
  omit?: Prisma.AgentMcpConnectionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AgentMcpConnectionInclude<ExtArgs> | null
  where?: Prisma.AgentMcpConnectionWhereInput
  orderBy?: Prisma.AgentMcpConnectionOrderByWithRelationInput | Prisma.AgentMcpConnectionOrderByWithRelationInput[]
  cursor?: Prisma.AgentMcpConnectionWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.AgentMcpConnectionScalarFieldEnum | Prisma.AgentMcpConnectionScalarFieldEnum[]
}

/**
 * Organization.mcpToolExecutionLogs
 */
export type Organization$mcpToolExecutionLogsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpToolExecutionLog
   */
  select?: Prisma.McpToolExecutionLogSelect<ExtArgs> | null
  /**
   * Omit specific fields from the McpToolExecutionLog
   */
  omit?: Prisma.McpToolExecutionLogOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpToolExecutionLogInclude<ExtArgs> | null
  where?: Prisma.McpToolExecutionLogWhereInput
  orderBy?: Prisma.McpToolExecutionLogOrderByWithRelationInput | Prisma.McpToolExecutionLogOrderByWithRelationInput[]
  cursor?: Prisma.McpToolExecutionLogWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.McpToolExecutionLogScalarFieldEnum | Prisma.McpToolExecutionLogScalarFieldEnum[]
}

/**
 * Organization.secrets
 */
export type Organization$secretsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Secret
   */
  select?: Prisma.SecretSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Secret
   */
  omit?: Prisma.SecretOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.SecretInclude<ExtArgs> | null
  where?: Prisma.SecretWhereInput
  orderBy?: Prisma.SecretOrderByWithRelationInput | Prisma.SecretOrderByWithRelationInput[]
  cursor?: Prisma.SecretWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.SecretScalarFieldEnum | Prisma.SecretScalarFieldEnum[]
}

/**
 * Organization.callLogs
 */
export type Organization$callLogsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the CallLog
   */
  select?: Prisma.CallLogSelect<ExtArgs> | null
  /**
   * Omit specific fields from the CallLog
   */
  omit?: Prisma.CallLogOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.CallLogInclude<ExtArgs> | null
  where?: Prisma.CallLogWhereInput
  orderBy?: Prisma.CallLogOrderByWithRelationInput | Prisma.CallLogOrderByWithRelationInput[]
  cursor?: Prisma.CallLogWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.CallLogScalarFieldEnum | Prisma.CallLogScalarFieldEnum[]
}

/**
 * Organization.outboundCalls
 */
export type Organization$outboundCallsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the OutboundCall
   */
  select?: Prisma.OutboundCallSelect<ExtArgs> | null
  /**
   * Omit specific fields from the OutboundCall
   */
  omit?: Prisma.OutboundCallOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.OutboundCallInclude<ExtArgs> | null
  where?: Prisma.OutboundCallWhereInput
  orderBy?: Prisma.OutboundCallOrderByWithRelationInput | Prisma.OutboundCallOrderByWithRelationInput[]
  cursor?: Prisma.OutboundCallWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.OutboundCallScalarFieldEnum | Prisma.OutboundCallScalarFieldEnum[]
}

/**
 * Organization.campaigns
 */
export type Organization$campaignsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Campaign
   */
  select?: Prisma.CampaignSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Campaign
   */
  omit?: Prisma.CampaignOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.CampaignInclude<ExtArgs> | null
  where?: Prisma.CampaignWhereInput
  orderBy?: Prisma.CampaignOrderByWithRelationInput | Prisma.CampaignOrderByWithRelationInput[]
  cursor?: Prisma.CampaignWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.CampaignScalarFieldEnum | Prisma.CampaignScalarFieldEnum[]
}

/**
 * Organization.organizationroles
 */
export type Organization$organizationrolesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the OrganizationRole
   */
  select?: Prisma.OrganizationRoleSelect<ExtArgs> | null
  /**
   * Omit specific fields from the OrganizationRole
   */
  omit?: Prisma.OrganizationRoleOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.OrganizationRoleInclude<ExtArgs> | null
  where?: Prisma.OrganizationRoleWhereInput
  orderBy?: Prisma.OrganizationRoleOrderByWithRelationInput | Prisma.OrganizationRoleOrderByWithRelationInput[]
  cursor?: Prisma.OrganizationRoleWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.OrganizationRoleScalarFieldEnum | Prisma.OrganizationRoleScalarFieldEnum[]
}

/**
 * Organization.auditLogs
 */
export type Organization$auditLogsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the AuditLog
   */
  select?: Prisma.AuditLogSelect<ExtArgs> | null
  /**
   * Omit specific fields from the AuditLog
   */
  omit?: Prisma.AuditLogOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AuditLogInclude<ExtArgs> | null
  where?: Prisma.AuditLogWhereInput
  orderBy?: Prisma.AuditLogOrderByWithRelationInput | Prisma.AuditLogOrderByWithRelationInput[]
  cursor?: Prisma.AuditLogWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.AuditLogScalarFieldEnum | Prisma.AuditLogScalarFieldEnum[]
}

/**
 * Organization without action
 */
export type OrganizationDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Organization
   */
  select?: Prisma.OrganizationSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Organization
   */
  omit?: Prisma.OrganizationOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.OrganizationInclude<ExtArgs> | null
}
