# Generated by ariadne-codegen
# Source: ./documents

__all__ = [
    "ADD_CONTENTS_TO_COLLECTIONS_GQL",
    "CLEAR_CONVERSATION_GQL",
    "CLOSE_CONVERSATION_GQL",
    "COMPLETE_CONVERSATION_GQL",
    "CONTINUE_CONVERSATION_GQL",
    "COUNT_ALERTS_GQL",
    "COUNT_CATEGORIES_GQL",
    "COUNT_COLLECTIONS_GQL",
    "COUNT_CONTENTS_GQL",
    "COUNT_CONVERSATIONS_GQL",
    "COUNT_EVENTS_GQL",
    "COUNT_FEEDS_GQL",
    "COUNT_LABELS_GQL",
    "COUNT_MEDICAL_CONDITIONS_GQL",
    "COUNT_MEDICAL_CONTRAINDICATIONS_GQL",
    "COUNT_MEDICAL_DEVICES_GQL",
    "COUNT_MEDICAL_DRUGS_GQL",
    "COUNT_MEDICAL_DRUG_CLASSES_GQL",
    "COUNT_MEDICAL_GUIDELINES_GQL",
    "COUNT_MEDICAL_INDICATIONS_GQL",
    "COUNT_MEDICAL_PROCEDURES_GQL",
    "COUNT_MEDICAL_STUDIES_GQL",
    "COUNT_MEDICAL_TESTS_GQL",
    "COUNT_MEDICAL_THERAPIES_GQL",
    "COUNT_ORGANIZATIONS_GQL",
    "COUNT_PERSONS_GQL",
    "COUNT_PLACES_GQL",
    "COUNT_PRODUCTS_GQL",
    "COUNT_REPOS_GQL",
    "COUNT_SOFTWARES_GQL",
    "COUNT_SPECIFICATIONS_GQL",
    "COUNT_WORKFLOWS_GQL",
    "CREATE_ALERT_GQL",
    "CREATE_CATEGORY_GQL",
    "CREATE_COLLECTION_GQL",
    "CREATE_CONVERSATION_GQL",
    "CREATE_EVENT_GQL",
    "CREATE_FEED_GQL",
    "CREATE_LABEL_GQL",
    "CREATE_MEDICAL_CONDITION_GQL",
    "CREATE_MEDICAL_CONTRAINDICATION_GQL",
    "CREATE_MEDICAL_DEVICE_GQL",
    "CREATE_MEDICAL_DRUG_CLASS_GQL",
    "CREATE_MEDICAL_DRUG_GQL",
    "CREATE_MEDICAL_GUIDELINE_GQL",
    "CREATE_MEDICAL_INDICATION_GQL",
    "CREATE_MEDICAL_PROCEDURE_GQL",
    "CREATE_MEDICAL_STUDY_GQL",
    "CREATE_MEDICAL_TEST_GQL",
    "CREATE_MEDICAL_THERAPY_GQL",
    "CREATE_OBSERVATION_GQL",
    "CREATE_ORGANIZATION_GQL",
    "CREATE_PERSON_GQL",
    "CREATE_PLACE_GQL",
    "CREATE_PRODUCT_GQL",
    "CREATE_REPO_GQL",
    "CREATE_SOFTWARE_GQL",
    "CREATE_SPECIFICATION_GQL",
    "CREATE_WORKFLOW_GQL",
    "DELETE_ALERTS_GQL",
    "DELETE_ALERT_GQL",
    "DELETE_ALL_ALERTS_GQL",
    "DELETE_ALL_CATEGORIES_GQL",
    "DELETE_ALL_COLLECTIONS_GQL",
    "DELETE_ALL_CONTENTS_GQL",
    "DELETE_ALL_CONVERSATIONS_GQL",
    "DELETE_ALL_EVENTS_GQL",
    "DELETE_ALL_FEEDS_GQL",
    "DELETE_ALL_LABELS_GQL",
    "DELETE_ALL_MEDICAL_CONDITIONS_GQL",
    "DELETE_ALL_MEDICAL_CONTRAINDICATIONS_GQL",
    "DELETE_ALL_MEDICAL_DEVICES_GQL",
    "DELETE_ALL_MEDICAL_DRUGS_GQL",
    "DELETE_ALL_MEDICAL_DRUG_CLASSES_GQL",
    "DELETE_ALL_MEDICAL_GUIDELINES_GQL",
    "DELETE_ALL_MEDICAL_INDICATIONS_GQL",
    "DELETE_ALL_MEDICAL_PROCEDURES_GQL",
    "DELETE_ALL_MEDICAL_STUDIES_GQL",
    "DELETE_ALL_MEDICAL_TESTS_GQL",
    "DELETE_ALL_MEDICAL_THERAPIES_GQL",
    "DELETE_ALL_ORGANIZATIONS_GQL",
    "DELETE_ALL_PERSONS_GQL",
    "DELETE_ALL_PLACES_GQL",
    "DELETE_ALL_PRODUCTS_GQL",
    "DELETE_ALL_REPOS_GQL",
    "DELETE_ALL_SOFTWARES_GQL",
    "DELETE_ALL_SPECIFICATIONS_GQL",
    "DELETE_ALL_WORKFLOWS_GQL",
    "DELETE_CATEGORIES_GQL",
    "DELETE_CATEGORY_GQL",
    "DELETE_COLLECTIONS_GQL",
    "DELETE_COLLECTION_GQL",
    "DELETE_CONTENTS_GQL",
    "DELETE_CONTENT_GQL",
    "DELETE_CONVERSATIONS_GQL",
    "DELETE_CONVERSATION_GQL",
    "DELETE_EVENTS_GQL",
    "DELETE_EVENT_GQL",
    "DELETE_FEEDS_GQL",
    "DELETE_FEED_GQL",
    "DELETE_LABELS_GQL",
    "DELETE_LABEL_GQL",
    "DELETE_MEDICAL_CONDITIONS_GQL",
    "DELETE_MEDICAL_CONDITION_GQL",
    "DELETE_MEDICAL_CONTRAINDICATIONS_GQL",
    "DELETE_MEDICAL_CONTRAINDICATION_GQL",
    "DELETE_MEDICAL_DEVICES_GQL",
    "DELETE_MEDICAL_DEVICE_GQL",
    "DELETE_MEDICAL_DRUGS_GQL",
    "DELETE_MEDICAL_DRUG_CLASSES_GQL",
    "DELETE_MEDICAL_DRUG_CLASS_GQL",
    "DELETE_MEDICAL_DRUG_GQL",
    "DELETE_MEDICAL_GUIDELINES_GQL",
    "DELETE_MEDICAL_GUIDELINE_GQL",
    "DELETE_MEDICAL_INDICATIONS_GQL",
    "DELETE_MEDICAL_INDICATION_GQL",
    "DELETE_MEDICAL_PROCEDURES_GQL",
    "DELETE_MEDICAL_PROCEDURE_GQL",
    "DELETE_MEDICAL_STUDIES_GQL",
    "DELETE_MEDICAL_STUDY_GQL",
    "DELETE_MEDICAL_TESTS_GQL",
    "DELETE_MEDICAL_TEST_GQL",
    "DELETE_MEDICAL_THERAPIES_GQL",
    "DELETE_MEDICAL_THERAPY_GQL",
    "DELETE_OBSERVATION_GQL",
    "DELETE_ORGANIZATIONS_GQL",
    "DELETE_ORGANIZATION_GQL",
    "DELETE_PERSONS_GQL",
    "DELETE_PERSON_GQL",
    "DELETE_PLACES_GQL",
    "DELETE_PLACE_GQL",
    "DELETE_PRODUCTS_GQL",
    "DELETE_PRODUCT_GQL",
    "DELETE_REPOS_GQL",
    "DELETE_REPO_GQL",
    "DELETE_SOFTWARES_GQL",
    "DELETE_SOFTWARE_GQL",
    "DELETE_SPECIFICATIONS_GQL",
    "DELETE_SPECIFICATION_GQL",
    "DELETE_WORKFLOWS_GQL",
    "DELETE_WORKFLOW_GQL",
    "DESCRIBE_ENCODED_IMAGE_GQL",
    "DESCRIBE_IMAGE_GQL",
    "DISABLE_ALERT_GQL",
    "DISABLE_FEED_GQL",
    "ENABLE_ALERT_GQL",
    "ENABLE_FEED_GQL",
    "EXTRACT_CONTENTS_GQL",
    "EXTRACT_TEXT_GQL",
    "FORMAT_CONVERSATION_GQL",
    "GET_ALERT_GQL",
    "GET_CATEGORY_GQL",
    "GET_COLLECTION_GQL",
    "GET_CONTENT_GQL",
    "GET_CONVERSATION_GQL",
    "GET_EVENT_GQL",
    "GET_FEED_GQL",
    "GET_LABEL_GQL",
    "GET_MEDICAL_CONDITION_GQL",
    "GET_MEDICAL_CONTRAINDICATION_GQL",
    "GET_MEDICAL_DEVICE_GQL",
    "GET_MEDICAL_DRUG_CLASS_GQL",
    "GET_MEDICAL_DRUG_GQL",
    "GET_MEDICAL_GUIDELINE_GQL",
    "GET_MEDICAL_INDICATION_GQL",
    "GET_MEDICAL_PROCEDURE_GQL",
    "GET_MEDICAL_STUDY_GQL",
    "GET_MEDICAL_TEST_GQL",
    "GET_MEDICAL_THERAPY_GQL",
    "GET_ORGANIZATION_GQL",
    "GET_PERSON_GQL",
    "GET_PLACE_GQL",
    "GET_PRODUCT_GQL",
    "GET_PROJECT_GQL",
    "GET_REPO_GQL",
    "GET_SHARE_POINT_CONSENT_URI_GQL",
    "GET_SOFTWARE_GQL",
    "GET_SPECIFICATION_GQL",
    "GET_WORKFLOW_GQL",
    "INGEST_BATCH_GQL",
    "INGEST_ENCODED_FILE_GQL",
    "INGEST_TEXT_BATCH_GQL",
    "INGEST_TEXT_GQL",
    "INGEST_URI_GQL",
    "IS_CONTENT_DONE_GQL",
    "IS_FEED_DONE_GQL",
    "LOOKUP_CREDITS_GQL",
    "LOOKUP_USAGE_GQL",
    "MAP_WEB_GQL",
    "PROMPT_CONVERSATION_GQL",
    "PROMPT_GQL",
    "PROMPT_SPECIFICATIONS_GQL",
    "PUBLISH_CONTENTS_GQL",
    "PUBLISH_CONVERSATION_GQL",
    "PUBLISH_TEXT_GQL",
    "QUERY_ALERTS_GQL",
    "QUERY_CATEGORIES_GQL",
    "QUERY_COLLECTIONS_GQL",
    "QUERY_CONTENTS_FACETS_GQL",
    "QUERY_CONTENTS_GQL",
    "QUERY_CONTENTS_GRAPH_GQL",
    "QUERY_CONVERSATIONS_GQL",
    "QUERY_CREDITS_GQL",
    "QUERY_EVENTS_GQL",
    "QUERY_FEEDS_GQL",
    "QUERY_LABELS_GQL",
    "QUERY_MEDICAL_CONDITIONS_GQL",
    "QUERY_MEDICAL_CONTRAINDICATIONS_GQL",
    "QUERY_MEDICAL_DEVICES_GQL",
    "QUERY_MEDICAL_DRUGS_GQL",
    "QUERY_MEDICAL_DRUG_CLASSES_GQL",
    "QUERY_MEDICAL_GUIDELINES_GQL",
    "QUERY_MEDICAL_INDICATIONS_GQL",
    "QUERY_MEDICAL_PROCEDURES_GQL",
    "QUERY_MEDICAL_STUDIES_GQL",
    "QUERY_MEDICAL_TESTS_GQL",
    "QUERY_MEDICAL_THERAPIES_GQL",
    "QUERY_MICROSOFT_TEAMS_CHANNELS_GQL",
    "QUERY_MICROSOFT_TEAMS_TEAMS_GQL",
    "QUERY_ONE_DRIVE_FOLDERS_GQL",
    "QUERY_ORGANIZATIONS_GQL",
    "QUERY_PERSONS_GQL",
    "QUERY_PLACES_GQL",
    "QUERY_PRODUCTS_GQL",
    "QUERY_REPOS_GQL",
    "QUERY_SHARE_POINT_FOLDERS_GQL",
    "QUERY_SHARE_POINT_LIBRARIES_GQL",
    "QUERY_SOFTWARES_GQL",
    "QUERY_SPECIFICATIONS_GQL",
    "QUERY_USAGE_GQL",
    "QUERY_WORKFLOWS_GQL",
    "REMOVE_CONTENTS_FROM_COLLECTION_GQL",
    "REVISE_CONTENT_GQL",
    "REVISE_ENCODED_IMAGE_GQL",
    "REVISE_IMAGE_GQL",
    "REVISE_TEXT_GQL",
    "SCREENSHOT_PAGE_GQL",
    "SEARCH_WEB_GQL",
    "SUGGEST_CONVERSATION_GQL",
    "SUMMARIZE_CONTENTS_GQL",
    "SUMMARIZE_TEXT_GQL",
    "UPDATE_ALERT_GQL",
    "UPDATE_CATEGORY_GQL",
    "UPDATE_COLLECTION_GQL",
    "UPDATE_CONTENT_GQL",
    "UPDATE_CONVERSATION_GQL",
    "UPDATE_EVENT_GQL",
    "UPDATE_FEED_GQL",
    "UPDATE_LABEL_GQL",
    "UPDATE_MEDICAL_CONDITION_GQL",
    "UPDATE_MEDICAL_CONTRAINDICATION_GQL",
    "UPDATE_MEDICAL_DEVICE_GQL",
    "UPDATE_MEDICAL_DRUG_CLASS_GQL",
    "UPDATE_MEDICAL_DRUG_GQL",
    "UPDATE_MEDICAL_GUIDELINE_GQL",
    "UPDATE_MEDICAL_INDICATION_GQL",
    "UPDATE_MEDICAL_PROCEDURE_GQL",
    "UPDATE_MEDICAL_STUDY_GQL",
    "UPDATE_MEDICAL_TEST_GQL",
    "UPDATE_MEDICAL_THERAPY_GQL",
    "UPDATE_OBSERVATION_GQL",
    "UPDATE_ORGANIZATION_GQL",
    "UPDATE_PERSON_GQL",
    "UPDATE_PLACE_GQL",
    "UPDATE_PRODUCT_GQL",
    "UPDATE_PROJECT_GQL",
    "UPDATE_REPO_GQL",
    "UPDATE_SOFTWARE_GQL",
    "UPDATE_SPECIFICATION_GQL",
    "UPDATE_WORKFLOW_GQL",
]

COUNT_ALERTS_GQL = """
query CountAlerts($filter: AlertFilter) {
  countAlerts(filter: $filter) {
    count
  }
}
"""

CREATE_ALERT_GQL = """
mutation CreateAlert($alert: AlertInput!, $correlationId: String) {
  createAlert(alert: $alert, correlationId: $correlationId) {
    id
    name
    state
    type
  }
}
"""

DELETE_ALERT_GQL = """
mutation DeleteAlert($id: ID!) {
  deleteAlert(id: $id) {
    id
    state
  }
}
"""

DELETE_ALERTS_GQL = """
mutation DeleteAlerts($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteAlerts(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

DELETE_ALL_ALERTS_GQL = """
mutation DeleteAllAlerts($filter: AlertFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllAlerts(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DISABLE_ALERT_GQL = """
mutation DisableAlert($id: ID!) {
  disableAlert(id: $id) {
    id
    state
  }
}
"""

ENABLE_ALERT_GQL = """
mutation EnableAlert($id: ID!) {
  enableAlert(id: $id) {
    id
    state
  }
}
"""

GET_ALERT_GQL = """
query GetAlert($id: ID!) {
  alert(id: $id) {
    id
    name
    creationDate
    relevance
    owner {
      id
    }
    state
    correlationId
    type
    summaryPrompt
    publishPrompt
    filter {
      dateRange {
        from
        to
      }
      creationDateRange {
        from
        to
      }
      types
      fileTypes
      contents {
        id
      }
      feeds {
        id
      }
      workflows {
        id
      }
      collections {
        id
      }
      observations {
        type
        observable {
          id
        }
        states
      }
      or {
        feeds {
          id
        }
        workflows {
          id
        }
        collections {
          id
        }
        observations {
          type
          observable {
            id
          }
          states
        }
      }
      and {
        feeds {
          id
        }
        workflows {
          id
        }
        collections {
          id
        }
        observations {
          type
          observable {
            id
          }
          states
        }
      }
    }
    integration {
      type
      uri
      slack {
        token
        channel
      }
    }
    publishing {
      type
      elevenLabs {
        model
        voice
      }
    }
    summarySpecification {
      id
    }
    publishSpecification {
      id
    }
    lastAlertDate
  }
}
"""

QUERY_ALERTS_GQL = """
query QueryAlerts($filter: AlertFilter) {
  alerts(filter: $filter) {
    results {
      id
      name
      creationDate
      relevance
      owner {
        id
      }
      state
      correlationId
      type
      summaryPrompt
      publishPrompt
      filter {
        dateRange {
          from
          to
        }
        creationDateRange {
          from
          to
        }
        types
        fileTypes
        contents {
          id
        }
        feeds {
          id
        }
        workflows {
          id
        }
        collections {
          id
        }
        observations {
          type
          observable {
            id
          }
          states
        }
        or {
          feeds {
            id
          }
          workflows {
            id
          }
          collections {
            id
          }
          observations {
            type
            observable {
              id
            }
            states
          }
        }
        and {
          feeds {
            id
          }
          workflows {
            id
          }
          collections {
            id
          }
          observations {
            type
            observable {
              id
            }
            states
          }
        }
      }
      integration {
        type
        uri
        slack {
          token
          channel
        }
      }
      publishing {
        type
        elevenLabs {
          model
          voice
        }
      }
      summarySpecification {
        id
      }
      publishSpecification {
        id
      }
      lastAlertDate
    }
  }
}
"""

UPDATE_ALERT_GQL = """
mutation UpdateAlert($alert: AlertUpdateInput!) {
  updateAlert(alert: $alert) {
    id
    name
    state
    type
  }
}
"""

COUNT_CATEGORIES_GQL = """
query CountCategories($filter: CategoryFilter) {
  countCategories(filter: $filter) {
    count
  }
}
"""

CREATE_CATEGORY_GQL = """
mutation CreateCategory($category: CategoryInput!) {
  createCategory(category: $category) {
    id
    name
  }
}
"""

DELETE_ALL_CATEGORIES_GQL = """
mutation DeleteAllCategories($filter: CategoryFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllCategories(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_CATEGORIES_GQL = """
mutation DeleteCategories($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteCategories(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

DELETE_CATEGORY_GQL = """
mutation DeleteCategory($id: ID!) {
  deleteCategory(id: $id) {
    id
    state
  }
}
"""

GET_CATEGORY_GQL = """
query GetCategory($id: ID!) {
  category(id: $id) {
    id
    name
    description
    creationDate
    relevance
  }
}
"""

QUERY_CATEGORIES_GQL = """
query QueryCategories($filter: CategoryFilter) {
  categories(filter: $filter) {
    results {
      id
      name
      description
      creationDate
      relevance
    }
  }
}
"""

UPDATE_CATEGORY_GQL = """
mutation UpdateCategory($category: CategoryUpdateInput!) {
  updateCategory(category: $category) {
    id
    name
  }
}
"""

ADD_CONTENTS_TO_COLLECTIONS_GQL = """
mutation AddContentsToCollections($contents: [EntityReferenceInput!]!, $collections: [EntityReferenceInput!]!) {
  addContentsToCollections(contents: $contents, collections: $collections) {
    id
    name
    state
    type
    contents {
      id
      name
    }
  }
}
"""

COUNT_COLLECTIONS_GQL = """
query CountCollections($filter: CollectionFilter) {
  countCollections(filter: $filter) {
    count
  }
}
"""

CREATE_COLLECTION_GQL = """
mutation CreateCollection($collection: CollectionInput!) {
  createCollection(collection: $collection) {
    id
    name
    state
    type
  }
}
"""

DELETE_ALL_COLLECTIONS_GQL = """
mutation DeleteAllCollections($filter: CollectionFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllCollections(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_COLLECTION_GQL = """
mutation DeleteCollection($id: ID!) {
  deleteCollection(id: $id) {
    id
    state
  }
}
"""

DELETE_COLLECTIONS_GQL = """
mutation DeleteCollections($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteCollections(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_COLLECTION_GQL = """
query GetCollection($id: ID!) {
  collection(id: $id) {
    id
    name
    creationDate
    relevance
    owner {
      id
    }
    state
    type
    contents {
      id
      name
    }
  }
}
"""

QUERY_COLLECTIONS_GQL = """
query QueryCollections($filter: CollectionFilter) {
  collections(filter: $filter) {
    results {
      id
      name
      creationDate
      relevance
      owner {
        id
      }
      state
      type
      contents {
        id
        name
      }
    }
  }
}
"""

REMOVE_CONTENTS_FROM_COLLECTION_GQL = """
mutation RemoveContentsFromCollection($contents: [EntityReferenceInput!]!, $collection: EntityReferenceInput!) {
  removeContentsFromCollection(contents: $contents, collection: $collection) {
    id
    name
    state
    type
    contents {
      id
      name
    }
  }
}
"""

UPDATE_COLLECTION_GQL = """
mutation UpdateCollection($collection: CollectionUpdateInput!) {
  updateCollection(collection: $collection) {
    id
    name
    state
    type
  }
}
"""

COUNT_CONTENTS_GQL = """
query CountContents($filter: ContentFilter) {
  countContents(filter: $filter) {
    count
  }
}
"""

DELETE_ALL_CONTENTS_GQL = """
mutation DeleteAllContents($filter: ContentFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllContents(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_CONTENT_GQL = """
mutation DeleteContent($id: ID!) {
  deleteContent(id: $id) {
    id
    state
  }
}
"""

DELETE_CONTENTS_GQL = """
mutation DeleteContents($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteContents(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

DESCRIBE_ENCODED_IMAGE_GQL = """
mutation DescribeEncodedImage($prompt: String!, $mimeType: String!, $data: String!, $specification: EntityReferenceInput, $correlationId: String) {
  describeEncodedImage(
    prompt: $prompt
    mimeType: $mimeType
    data: $data
    specification: $specification
    correlationId: $correlationId
  ) {
    role
    author
    message
    citations {
      content {
        id
        name
        state
        originalDate
        identifier
        uri
        type
        fileType
        mimeType
        format
        formatName
        fileExtension
        fileName
        fileSize
        masterUri
        imageUri
        textUri
        audioUri
        transcriptUri
        summary
        customSummary
        keywords
        bullets
        headlines
        posts
        chapters
        questions
        video {
          width
          height
          duration
          make
          model
          software
          title
          description
          keywords
          author
        }
        audio {
          keywords
          author
          series
          episode
          episodeType
          season
          publisher
          copyright
          genre
          title
          description
          bitrate
          channels
          sampleRate
          bitsPerSample
          duration
        }
        image {
          width
          height
          resolutionX
          resolutionY
          bitsPerComponent
          components
          projectionType
          orientation
          description
          make
          model
          software
          lens
          focalLength
          exposureTime
          fNumber
          iso
          heading
          pitch
        }
        document {
          title
          subject
          summary
          author
          publisher
          description
          keywords
          pageCount
          worksheetCount
          slideCount
          wordCount
          lineCount
          paragraphCount
          isEncrypted
          hasDigitalSignature
        }
      }
      index
      text
      startTime
      endTime
      pageNumber
      frameNumber
    }
    toolCalls {
      id
      name
      arguments
    }
    tokens
    throughput
    completionTime
    timestamp
    modelService
    model
  }
}
"""

DESCRIBE_IMAGE_GQL = """
mutation DescribeImage($prompt: String!, $uri: URL!, $specification: EntityReferenceInput, $correlationId: String) {
  describeImage(
    prompt: $prompt
    uri: $uri
    specification: $specification
    correlationId: $correlationId
  ) {
    role
    author
    message
    citations {
      content {
        id
        name
        state
        originalDate
        identifier
        uri
        type
        fileType
        mimeType
        format
        formatName
        fileExtension
        fileName
        fileSize
        masterUri
        imageUri
        textUri
        audioUri
        transcriptUri
        summary
        customSummary
        keywords
        bullets
        headlines
        posts
        chapters
        questions
        video {
          width
          height
          duration
          make
          model
          software
          title
          description
          keywords
          author
        }
        audio {
          keywords
          author
          series
          episode
          episodeType
          season
          publisher
          copyright
          genre
          title
          description
          bitrate
          channels
          sampleRate
          bitsPerSample
          duration
        }
        image {
          width
          height
          resolutionX
          resolutionY
          bitsPerComponent
          components
          projectionType
          orientation
          description
          make
          model
          software
          lens
          focalLength
          exposureTime
          fNumber
          iso
          heading
          pitch
        }
        document {
          title
          subject
          summary
          author
          publisher
          description
          keywords
          pageCount
          worksheetCount
          slideCount
          wordCount
          lineCount
          paragraphCount
          isEncrypted
          hasDigitalSignature
        }
      }
      index
      text
      startTime
      endTime
      pageNumber
      frameNumber
    }
    toolCalls {
      id
      name
      arguments
    }
    tokens
    throughput
    completionTime
    timestamp
    modelService
    model
  }
}
"""

EXTRACT_CONTENTS_GQL = """
mutation ExtractContents($prompt: String!, $filter: ContentFilter, $specification: EntityReferenceInput, $tools: [ToolDefinitionInput!]!, $correlationId: String) {
  extractContents(
    prompt: $prompt
    filter: $filter
    specification: $specification
    tools: $tools
    correlationId: $correlationId
  ) {
    specification {
      id
    }
    content {
      id
    }
    name
    value
    startTime
    endTime
    pageNumber
    error
  }
}
"""

EXTRACT_TEXT_GQL = """
mutation ExtractText($prompt: String!, $text: String!, $textType: TextTypes, $specification: EntityReferenceInput, $tools: [ToolDefinitionInput!]!, $correlationId: String) {
  extractText(
    prompt: $prompt
    text: $text
    textType: $textType
    specification: $specification
    tools: $tools
    correlationId: $correlationId
  ) {
    specification {
      id
    }
    content {
      id
    }
    name
    value
    startTime
    endTime
    pageNumber
    error
  }
}
"""

GET_CONTENT_GQL = """
query GetContent($id: ID!) {
  content(id: $id) {
    id
    name
    creationDate
    relevance
    owner {
      id
    }
    state
    originalDate
    finishedDate
    workflowDuration
    uri
    description
    identifier
    markdown
    address {
      streetAddress
      city
      region
      country
      postalCode
    }
    location {
      latitude
      longitude
    }
    type
    fileType
    mimeType
    fileName
    fileSize
    masterUri
    imageUri
    textUri
    audioUri
    transcriptUri
    summary
    customSummary
    keywords
    bullets
    headlines
    posts
    chapters
    questions
    video {
      width
      height
      duration
      make
      model
      software
      title
      description
      keywords
      author
    }
    audio {
      keywords
      author
      series
      episode
      episodeType
      season
      publisher
      copyright
      genre
      title
      description
      bitrate
      channels
      sampleRate
      bitsPerSample
      duration
    }
    image {
      width
      height
      resolutionX
      resolutionY
      bitsPerComponent
      components
      projectionType
      orientation
      description
      make
      model
      software
      lens
      focalLength
      exposureTime
      fNumber
      iso
      heading
      pitch
    }
    document {
      title
      subject
      summary
      author
      publisher
      description
      keywords
      pageCount
      worksheetCount
      slideCount
      wordCount
      lineCount
      paragraphCount
      isEncrypted
      hasDigitalSignature
    }
    email {
      identifier
      subject
      labels
      sensitivity
      priority
      importance
      from {
        name
        email
        givenName
        familyName
      }
      to {
        name
        email
        givenName
        familyName
      }
      cc {
        name
        email
        givenName
        familyName
      }
      bcc {
        name
        email
        givenName
        familyName
      }
    }
    issue {
      identifier
      title
      project
      team
      status
      priority
      type
      labels
    }
    package {
      fileCount
      folderCount
      isEncrypted
    }
    language {
      languages
    }
    parent {
      id
      name
    }
    children {
      id
      name
    }
    feed {
      id
      name
    }
    collections {
      id
      name
    }
    links {
      uri
      linkType
    }
    observations {
      id
      type
      observable {
        id
        name
      }
      related {
        id
        name
      }
      relatedType
      relation
      occurrences {
        type
        confidence
        startTime
        endTime
        pageIndex
        boundingBox {
          left
          top
          width
          height
        }
      }
      state
    }
    workflow {
      id
      name
    }
    pages {
      index
      relevance
      chunks {
        index
        pageIndex
        rowIndex
        columnIndex
        confidence
        text
        role
        relevance
      }
    }
    segments {
      startTime
      endTime
      text
      relevance
    }
    frames {
      index
      description
      text
      relevance
    }
    error
  }
}
"""

INGEST_BATCH_GQL = """
mutation IngestBatch($uris: [URL!]!, $workflow: EntityReferenceInput, $collections: [EntityReferenceInput!], $correlationId: String) {
  ingestBatch(
    uris: $uris
    workflow: $workflow
    collections: $collections
    correlationId: $correlationId
  ) {
    id
    name
    state
    type
    fileType
    mimeType
    uri
    collections {
      id
      name
    }
  }
}
"""

INGEST_ENCODED_FILE_GQL = """
mutation IngestEncodedFile($name: String!, $data: String!, $mimeType: String!, $id: ID, $isSynchronous: Boolean, $collections: [EntityReferenceInput!], $workflow: EntityReferenceInput, $correlationId: String) {
  ingestEncodedFile(
    name: $name
    data: $data
    mimeType: $mimeType
    id: $id
    isSynchronous: $isSynchronous
    collections: $collections
    workflow: $workflow
    correlationId: $correlationId
  ) {
    id
    name
    state
    type
    fileType
    mimeType
    uri
    collections {
      id
      name
    }
  }
}
"""

INGEST_TEXT_GQL = """
mutation IngestText($name: String!, $text: String!, $textType: TextTypes, $uri: URL, $id: ID, $isSynchronous: Boolean, $workflow: EntityReferenceInput, $collections: [EntityReferenceInput!], $correlationId: String) {
  ingestText(
    name: $name
    text: $text
    textType: $textType
    uri: $uri
    id: $id
    isSynchronous: $isSynchronous
    workflow: $workflow
    collections: $collections
    correlationId: $correlationId
  ) {
    id
    name
    state
    type
    fileType
    mimeType
    uri
    collections {
      id
      name
    }
  }
}
"""

INGEST_TEXT_BATCH_GQL = """
mutation IngestTextBatch($batch: [TextContentInput!]!, $textType: TextTypes, $workflow: EntityReferenceInput, $collections: [EntityReferenceInput!], $correlationId: String) {
  ingestTextBatch(
    batch: $batch
    workflow: $workflow
    textType: $textType
    collections: $collections
    correlationId: $correlationId
  ) {
    id
    name
    state
    type
    fileType
    mimeType
    uri
    collections {
      id
      name
    }
  }
}
"""

INGEST_URI_GQL = """
mutation IngestUri($name: String, $uri: URL!, $id: ID, $isSynchronous: Boolean, $workflow: EntityReferenceInput, $collections: [EntityReferenceInput!], $correlationId: String) {
  ingestUri(
    name: $name
    uri: $uri
    id: $id
    workflow: $workflow
    collections: $collections
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    name
    state
    type
    fileType
    mimeType
    uri
    collections {
      id
      name
    }
  }
}
"""

IS_CONTENT_DONE_GQL = """
query IsContentDone($id: ID!) {
  isContentDone(id: $id) {
    result
  }
}
"""

PUBLISH_CONTENTS_GQL = """
mutation PublishContents($summaryPrompt: String, $publishPrompt: String!, $connector: ContentPublishingConnectorInput!, $filter: ContentFilter, $isSynchronous: Boolean, $correlationId: String, $name: String, $summarySpecification: EntityReferenceInput, $publishSpecification: EntityReferenceInput, $workflow: EntityReferenceInput) {
  publishContents(
    summaryPrompt: $summaryPrompt
    publishPrompt: $publishPrompt
    connector: $connector
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
    name: $name
    summarySpecification: $summarySpecification
    publishSpecification: $publishSpecification
    workflow: $workflow
  ) {
    id
    name
    state
    type
    fileType
    mimeType
    uri
    collections {
      id
      name
    }
    textUri
    audioUri
    markdown
  }
}
"""

PUBLISH_TEXT_GQL = """
mutation PublishText($text: String!, $textType: TextTypes, $connector: ContentPublishingConnectorInput!, $isSynchronous: Boolean, $correlationId: String, $name: String, $workflow: EntityReferenceInput) {
  publishText(
    text: $text
    textType: $textType
    connector: $connector
    isSynchronous: $isSynchronous
    correlationId: $correlationId
    name: $name
    workflow: $workflow
  ) {
    id
    name
    state
    type
    fileType
    mimeType
    uri
    collections {
      id
      name
    }
    textUri
    audioUri
    markdown
  }
}
"""

QUERY_CONTENTS_GQL = """
query QueryContents($filter: ContentFilter) {
  contents(filter: $filter) {
    results {
      id
      name
      creationDate
      relevance
      owner {
        id
      }
      state
      originalDate
      finishedDate
      workflowDuration
      uri
      description
      identifier
      markdown
      address {
        streetAddress
        city
        region
        country
        postalCode
      }
      location {
        latitude
        longitude
      }
      type
      fileType
      mimeType
      fileName
      fileSize
      masterUri
      imageUri
      textUri
      audioUri
      transcriptUri
      summary
      customSummary
      keywords
      bullets
      headlines
      posts
      chapters
      questions
      video {
        width
        height
        duration
        make
        model
        software
        title
        description
        keywords
        author
      }
      audio {
        keywords
        author
        series
        episode
        episodeType
        season
        publisher
        copyright
        genre
        title
        description
        bitrate
        channels
        sampleRate
        bitsPerSample
        duration
      }
      image {
        width
        height
        resolutionX
        resolutionY
        bitsPerComponent
        components
        projectionType
        orientation
        description
        make
        model
        software
        lens
        focalLength
        exposureTime
        fNumber
        iso
        heading
        pitch
      }
      document {
        title
        subject
        summary
        author
        publisher
        description
        keywords
        pageCount
        worksheetCount
        slideCount
        wordCount
        lineCount
        paragraphCount
        isEncrypted
        hasDigitalSignature
      }
      email {
        identifier
        subject
        labels
        sensitivity
        priority
        importance
        from {
          name
          email
          givenName
          familyName
        }
        to {
          name
          email
          givenName
          familyName
        }
        cc {
          name
          email
          givenName
          familyName
        }
        bcc {
          name
          email
          givenName
          familyName
        }
      }
      issue {
        identifier
        title
        project
        team
        status
        priority
        type
        labels
      }
      package {
        fileCount
        folderCount
        isEncrypted
      }
      language {
        languages
      }
      parent {
        id
        name
      }
      children {
        id
        name
      }
      feed {
        id
        name
      }
      collections {
        id
        name
      }
      links {
        uri
        linkType
      }
      observations {
        id
        type
        observable {
          id
          name
        }
        related {
          id
          name
        }
        relatedType
        relation
        occurrences {
          type
          confidence
          startTime
          endTime
          pageIndex
          boundingBox {
            left
            top
            width
            height
          }
        }
        state
      }
      workflow {
        id
        name
      }
      pages {
        index
        relevance
        chunks {
          index
          pageIndex
          rowIndex
          columnIndex
          confidence
          text
          role
          relevance
        }
      }
      segments {
        startTime
        endTime
        text
        relevance
      }
      frames {
        index
        description
        text
        relevance
      }
      error
    }
  }
}
"""

QUERY_CONTENTS_FACETS_GQL = """
query QueryContentsFacets($filter: ContentFilter, $facets: [ContentFacetInput!]) {
  contents(filter: $filter, facets: $facets) {
    results {
      id
      name
      creationDate
      relevance
      owner {
        id
      }
      state
      originalDate
      finishedDate
      workflowDuration
      uri
      description
      identifier
      markdown
      address {
        streetAddress
        city
        region
        country
        postalCode
      }
      location {
        latitude
        longitude
      }
      type
      fileType
      mimeType
      fileName
      fileSize
      masterUri
      imageUri
      textUri
      audioUri
      transcriptUri
      summary
      customSummary
      keywords
      bullets
      headlines
      posts
      chapters
      questions
      video {
        width
        height
        duration
        make
        model
        software
        title
        description
        keywords
        author
      }
      audio {
        keywords
        author
        series
        episode
        episodeType
        season
        publisher
        copyright
        genre
        title
        description
        bitrate
        channels
        sampleRate
        bitsPerSample
        duration
      }
      image {
        width
        height
        resolutionX
        resolutionY
        bitsPerComponent
        components
        projectionType
        orientation
        description
        make
        model
        software
        lens
        focalLength
        exposureTime
        fNumber
        iso
        heading
        pitch
      }
      document {
        title
        subject
        summary
        author
        publisher
        description
        keywords
        pageCount
        worksheetCount
        slideCount
        wordCount
        lineCount
        paragraphCount
        isEncrypted
        hasDigitalSignature
      }
      email {
        identifier
        subject
        labels
        sensitivity
        priority
        importance
        from {
          name
          email
          givenName
          familyName
        }
        to {
          name
          email
          givenName
          familyName
        }
        cc {
          name
          email
          givenName
          familyName
        }
        bcc {
          name
          email
          givenName
          familyName
        }
      }
      issue {
        identifier
        title
        project
        team
        status
        priority
        type
        labels
      }
      package {
        fileCount
        folderCount
        isEncrypted
      }
      language {
        languages
      }
      parent {
        id
        name
      }
      children {
        id
        name
      }
      feed {
        id
        name
      }
      collections {
        id
        name
      }
      links {
        uri
        linkType
      }
      observations {
        id
        type
        observable {
          id
          name
        }
        related {
          id
          name
        }
        relatedType
        relation
        occurrences {
          type
          confidence
          startTime
          endTime
          pageIndex
          boundingBox {
            left
            top
            width
            height
          }
        }
        state
      }
      workflow {
        id
        name
      }
      pages {
        index
        relevance
        chunks {
          index
          pageIndex
          rowIndex
          columnIndex
          confidence
          text
          role
          relevance
        }
      }
      segments {
        startTime
        endTime
        text
        relevance
      }
      frames {
        index
        description
        text
        relevance
      }
      error
    }
    facets {
      facet
      count
      type
      value
      range {
        from
        to
      }
      observable {
        type
        observable {
          id
          name
        }
      }
    }
  }
}
"""

QUERY_CONTENTS_GRAPH_GQL = """
query QueryContentsGraph($filter: ContentFilter, $graph: ContentGraphInput) {
  contents(filter: $filter, graph: $graph) {
    graph {
      nodes {
        id
        name
        type
        metadata
      }
      edges {
        from
        to
        relation
      }
    }
  }
}
"""

SCREENSHOT_PAGE_GQL = """
mutation ScreenshotPage($uri: URL!, $maximumHeight: Int, $isSynchronous: Boolean, $workflow: EntityReferenceInput, $collections: [EntityReferenceInput!], $correlationId: String) {
  screenshotPage(
    uri: $uri
    maximumHeight: $maximumHeight
    workflow: $workflow
    collections: $collections
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    name
    state
    type
    fileType
    mimeType
    uri
    collections {
      id
      name
    }
  }
}
"""

SUMMARIZE_CONTENTS_GQL = """
mutation SummarizeContents($summarizations: [SummarizationStrategyInput!]!, $filter: ContentFilter, $correlationId: String) {
  summarizeContents(
    summarizations: $summarizations
    filter: $filter
    correlationId: $correlationId
  ) {
    specification {
      id
    }
    content {
      id
    }
    type
    items {
      text
      tokens
      summarizationTime
    }
    error
  }
}
"""

SUMMARIZE_TEXT_GQL = """
mutation SummarizeText($summarization: SummarizationStrategyInput!, $text: String!, $textType: TextTypes, $correlationId: String) {
  summarizeText(
    summarization: $summarization
    text: $text
    textType: $textType
    correlationId: $correlationId
  ) {
    specification {
      id
    }
    content {
      id
    }
    type
    items {
      text
      tokens
      summarizationTime
    }
    error
  }
}
"""

UPDATE_CONTENT_GQL = """
mutation UpdateContent($content: ContentUpdateInput!) {
  updateContent(content: $content) {
    id
    name
    state
    type
    fileType
    mimeType
    uri
    collections {
      id
      name
    }
  }
}
"""

CLEAR_CONVERSATION_GQL = """
mutation ClearConversation($id: ID!) {
  clearConversation(id: $id) {
    id
    name
    state
    type
  }
}
"""

CLOSE_CONVERSATION_GQL = """
mutation CloseConversation($id: ID!) {
  closeConversation(id: $id) {
    id
    name
    state
    type
  }
}
"""

COMPLETE_CONVERSATION_GQL = """
mutation CompleteConversation($completion: String!, $id: ID!, $correlationId: String) {
  completeConversation(
    completion: $completion
    id: $id
    correlationId: $correlationId
  ) {
    conversation {
      id
    }
    message {
      role
      author
      message
      citations {
        content {
          id
          name
          state
          originalDate
          identifier
          uri
          type
          fileType
          mimeType
          format
          formatName
          fileExtension
          fileName
          fileSize
          masterUri
          imageUri
          textUri
          audioUri
          transcriptUri
          summary
          customSummary
          keywords
          bullets
          headlines
          posts
          chapters
          questions
          video {
            width
            height
            duration
            make
            model
            software
            title
            description
            keywords
            author
          }
          audio {
            keywords
            author
            series
            episode
            episodeType
            season
            publisher
            copyright
            genre
            title
            description
            bitrate
            channels
            sampleRate
            bitsPerSample
            duration
          }
          image {
            width
            height
            resolutionX
            resolutionY
            bitsPerComponent
            components
            projectionType
            orientation
            description
            make
            model
            software
            lens
            focalLength
            exposureTime
            fNumber
            iso
            heading
            pitch
          }
          document {
            title
            subject
            summary
            author
            publisher
            description
            keywords
            pageCount
            worksheetCount
            slideCount
            wordCount
            lineCount
            paragraphCount
            isEncrypted
            hasDigitalSignature
          }
        }
        index
        text
        startTime
        endTime
        pageNumber
        frameNumber
      }
      toolCalls {
        id
        name
        arguments
      }
      tokens
      throughput
      completionTime
      timestamp
      modelService
      model
    }
    messageCount
    facets {
      type
      value
      range {
        from
        to
      }
      count
      facet
      observable {
        type
        observable {
          id
          name
        }
      }
    }
    graph {
      nodes {
        id
        name
        type
        metadata
      }
      edges {
        from
        to
        relation
      }
    }
    details {
      modelService
      model
      supportsToolCalling
      sourceCount
      observableCount
      toolCount
      renderedSourceCount
      renderedObservableCount
      renderedToolCount
      rankedSourceCount
      rankedObservableCount
      rankedToolCount
      tokenLimit
      completionTokenLimit
      sources
      formattedSources
      formattedObservables
      formattedInstructions
      formattedTools
      messages {
        role
        author
        message
        citations {
          content {
            id
            name
            state
            originalDate
            identifier
            uri
            type
            fileType
            mimeType
            format
            formatName
            fileExtension
            fileName
            fileSize
            masterUri
            imageUri
            textUri
            audioUri
            transcriptUri
            summary
            customSummary
            keywords
            bullets
            headlines
            posts
            chapters
            questions
            video {
              width
              height
              duration
              make
              model
              software
              title
              description
              keywords
              author
            }
            audio {
              keywords
              author
              series
              episode
              episodeType
              season
              publisher
              copyright
              genre
              title
              description
              bitrate
              channels
              sampleRate
              bitsPerSample
              duration
            }
            image {
              width
              height
              resolutionX
              resolutionY
              bitsPerComponent
              components
              projectionType
              orientation
              description
              make
              model
              software
              lens
              focalLength
              exposureTime
              fNumber
              iso
              heading
              pitch
            }
            document {
              title
              subject
              summary
              author
              publisher
              description
              keywords
              pageCount
              worksheetCount
              slideCount
              wordCount
              lineCount
              paragraphCount
              isEncrypted
              hasDigitalSignature
            }
          }
          index
          text
          startTime
          endTime
          pageNumber
          frameNumber
        }
        toolCalls {
          id
          name
          arguments
        }
        tokens
        throughput
        completionTime
        timestamp
        modelService
        model
      }
    }
  }
}
"""

CONTINUE_CONVERSATION_GQL = """
mutation ContinueConversation($id: ID!, $responses: [ConversationToolResponseInput!]!, $correlationId: String) {
  continueConversation(
    id: $id
    responses: $responses
    correlationId: $correlationId
  ) {
    conversation {
      id
    }
    message {
      role
      author
      message
      citations {
        content {
          id
          name
          state
          originalDate
          identifier
          uri
          type
          fileType
          mimeType
          format
          formatName
          fileExtension
          fileName
          fileSize
          masterUri
          imageUri
          textUri
          audioUri
          transcriptUri
          summary
          customSummary
          keywords
          bullets
          headlines
          posts
          chapters
          questions
          video {
            width
            height
            duration
            make
            model
            software
            title
            description
            keywords
            author
          }
          audio {
            keywords
            author
            series
            episode
            episodeType
            season
            publisher
            copyright
            genre
            title
            description
            bitrate
            channels
            sampleRate
            bitsPerSample
            duration
          }
          image {
            width
            height
            resolutionX
            resolutionY
            bitsPerComponent
            components
            projectionType
            orientation
            description
            make
            model
            software
            lens
            focalLength
            exposureTime
            fNumber
            iso
            heading
            pitch
          }
          document {
            title
            subject
            summary
            author
            publisher
            description
            keywords
            pageCount
            worksheetCount
            slideCount
            wordCount
            lineCount
            paragraphCount
            isEncrypted
            hasDigitalSignature
          }
        }
        index
        text
        startTime
        endTime
        pageNumber
        frameNumber
      }
      toolCalls {
        id
        name
        arguments
      }
      tokens
      throughput
      completionTime
      timestamp
      modelService
      model
    }
    messageCount
    facets {
      type
      value
      range {
        from
        to
      }
      count
      facet
      observable {
        type
        observable {
          id
          name
        }
      }
    }
    graph {
      nodes {
        id
        name
        type
        metadata
      }
      edges {
        from
        to
        relation
      }
    }
    details {
      modelService
      model
      supportsToolCalling
      sourceCount
      observableCount
      toolCount
      renderedSourceCount
      renderedObservableCount
      renderedToolCount
      rankedSourceCount
      rankedObservableCount
      rankedToolCount
      tokenLimit
      completionTokenLimit
      sources
      formattedSources
      formattedObservables
      formattedInstructions
      formattedTools
      messages {
        role
        author
        message
        citations {
          content {
            id
            name
            state
            originalDate
            identifier
            uri
            type
            fileType
            mimeType
            format
            formatName
            fileExtension
            fileName
            fileSize
            masterUri
            imageUri
            textUri
            audioUri
            transcriptUri
            summary
            customSummary
            keywords
            bullets
            headlines
            posts
            chapters
            questions
            video {
              width
              height
              duration
              make
              model
              software
              title
              description
              keywords
              author
            }
            audio {
              keywords
              author
              series
              episode
              episodeType
              season
              publisher
              copyright
              genre
              title
              description
              bitrate
              channels
              sampleRate
              bitsPerSample
              duration
            }
            image {
              width
              height
              resolutionX
              resolutionY
              bitsPerComponent
              components
              projectionType
              orientation
              description
              make
              model
              software
              lens
              focalLength
              exposureTime
              fNumber
              iso
              heading
              pitch
            }
            document {
              title
              subject
              summary
              author
              publisher
              description
              keywords
              pageCount
              worksheetCount
              slideCount
              wordCount
              lineCount
              paragraphCount
              isEncrypted
              hasDigitalSignature
            }
          }
          index
          text
          startTime
          endTime
          pageNumber
          frameNumber
        }
        toolCalls {
          id
          name
          arguments
        }
        tokens
        throughput
        completionTime
        timestamp
        modelService
        model
      }
    }
  }
}
"""

COUNT_CONVERSATIONS_GQL = """
query CountConversations($filter: ConversationFilter) {
  countConversations(filter: $filter) {
    count
  }
}
"""

CREATE_CONVERSATION_GQL = """
mutation CreateConversation($conversation: ConversationInput!, $correlationId: String) {
  createConversation(conversation: $conversation, correlationId: $correlationId) {
    id
    name
    state
    type
  }
}
"""

DELETE_ALL_CONVERSATIONS_GQL = """
mutation DeleteAllConversations($filter: ConversationFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllConversations(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_CONVERSATION_GQL = """
mutation DeleteConversation($id: ID!) {
  deleteConversation(id: $id) {
    id
    state
  }
}
"""

DELETE_CONVERSATIONS_GQL = """
mutation DeleteConversations($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteConversations(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

FORMAT_CONVERSATION_GQL = """
mutation FormatConversation($prompt: String!, $id: ID, $specification: EntityReferenceInput, $includeDetails: Boolean, $correlationId: String) {
  formatConversation(
    prompt: $prompt
    id: $id
    specification: $specification
    includeDetails: $includeDetails
    correlationId: $correlationId
  ) {
    conversation {
      id
    }
    message {
      role
      author
      message
      citations {
        content {
          id
          name
          state
          originalDate
          identifier
          uri
          type
          fileType
          mimeType
          format
          formatName
          fileExtension
          fileName
          fileSize
          masterUri
          imageUri
          textUri
          audioUri
          transcriptUri
          summary
          customSummary
          keywords
          bullets
          headlines
          posts
          chapters
          questions
          video {
            width
            height
            duration
            make
            model
            software
            title
            description
            keywords
            author
          }
          audio {
            keywords
            author
            series
            episode
            episodeType
            season
            publisher
            copyright
            genre
            title
            description
            bitrate
            channels
            sampleRate
            bitsPerSample
            duration
          }
          image {
            width
            height
            resolutionX
            resolutionY
            bitsPerComponent
            components
            projectionType
            orientation
            description
            make
            model
            software
            lens
            focalLength
            exposureTime
            fNumber
            iso
            heading
            pitch
          }
          document {
            title
            subject
            summary
            author
            publisher
            description
            keywords
            pageCount
            worksheetCount
            slideCount
            wordCount
            lineCount
            paragraphCount
            isEncrypted
            hasDigitalSignature
          }
        }
        index
        text
        startTime
        endTime
        pageNumber
        frameNumber
      }
      toolCalls {
        id
        name
        arguments
      }
      tokens
      throughput
      completionTime
      timestamp
      modelService
      model
    }
    messageCount
    facets {
      type
      value
      range {
        from
        to
      }
      count
      facet
      observable {
        type
        observable {
          id
          name
        }
      }
    }
    graph {
      nodes {
        id
        name
        type
        metadata
      }
      edges {
        from
        to
        relation
      }
    }
    details {
      modelService
      model
      supportsToolCalling
      sourceCount
      observableCount
      toolCount
      renderedSourceCount
      renderedObservableCount
      renderedToolCount
      rankedSourceCount
      rankedObservableCount
      rankedToolCount
      tokenLimit
      completionTokenLimit
      sources
      formattedSources
      formattedObservables
      formattedInstructions
      formattedTools
      messages {
        role
        author
        message
        citations {
          content {
            id
            name
            state
            originalDate
            identifier
            uri
            type
            fileType
            mimeType
            format
            formatName
            fileExtension
            fileName
            fileSize
            masterUri
            imageUri
            textUri
            audioUri
            transcriptUri
            summary
            customSummary
            keywords
            bullets
            headlines
            posts
            chapters
            questions
            video {
              width
              height
              duration
              make
              model
              software
              title
              description
              keywords
              author
            }
            audio {
              keywords
              author
              series
              episode
              episodeType
              season
              publisher
              copyright
              genre
              title
              description
              bitrate
              channels
              sampleRate
              bitsPerSample
              duration
            }
            image {
              width
              height
              resolutionX
              resolutionY
              bitsPerComponent
              components
              projectionType
              orientation
              description
              make
              model
              software
              lens
              focalLength
              exposureTime
              fNumber
              iso
              heading
              pitch
            }
            document {
              title
              subject
              summary
              author
              publisher
              description
              keywords
              pageCount
              worksheetCount
              slideCount
              wordCount
              lineCount
              paragraphCount
              isEncrypted
              hasDigitalSignature
            }
          }
          index
          text
          startTime
          endTime
          pageNumber
          frameNumber
        }
        toolCalls {
          id
          name
          arguments
        }
        tokens
        throughput
        completionTime
        timestamp
        modelService
        model
      }
    }
  }
}
"""

GET_CONVERSATION_GQL = """
query GetConversation($id: ID!) {
  conversation(id: $id) {
    id
    name
    creationDate
    relevance
    owner {
      id
    }
    state
    correlationId
    type
    messages {
      role
      author
      message
      citations {
        content {
          id
          name
          state
          originalDate
          identifier
          uri
          type
          fileType
          mimeType
          format
          formatName
          fileExtension
          fileName
          fileSize
          masterUri
          imageUri
          textUri
          audioUri
          transcriptUri
          summary
          customSummary
          keywords
          bullets
          headlines
          posts
          chapters
          questions
          video {
            width
            height
            duration
            make
            model
            software
            title
            description
            keywords
            author
          }
          audio {
            keywords
            author
            series
            episode
            episodeType
            season
            publisher
            copyright
            genre
            title
            description
            bitrate
            channels
            sampleRate
            bitsPerSample
            duration
          }
          image {
            width
            height
            resolutionX
            resolutionY
            bitsPerComponent
            components
            projectionType
            orientation
            description
            make
            model
            software
            lens
            focalLength
            exposureTime
            fNumber
            iso
            heading
            pitch
          }
          document {
            title
            subject
            summary
            author
            publisher
            description
            keywords
            pageCount
            worksheetCount
            slideCount
            wordCount
            lineCount
            paragraphCount
            isEncrypted
            hasDigitalSignature
          }
        }
        index
        text
        startTime
        endTime
        pageNumber
        frameNumber
      }
      toolCalls {
        id
        name
        arguments
      }
      tokens
      throughput
      completionTime
      timestamp
      modelService
      model
    }
    specification {
      id
      name
    }
    filter {
      dateRange {
        from
        to
      }
      creationDateRange {
        from
        to
      }
      types
      fileTypes
      contents {
        id
      }
      feeds {
        id
      }
      workflows {
        id
      }
      collections {
        id
      }
      observations {
        type
        observable {
          id
        }
        states
      }
      or {
        feeds {
          id
        }
        workflows {
          id
        }
        collections {
          id
        }
        observations {
          type
          observable {
            id
          }
          states
        }
      }
      and {
        feeds {
          id
        }
        workflows {
          id
        }
        collections {
          id
        }
        observations {
          type
          observable {
            id
          }
          states
        }
      }
    }
    augmentedFilter {
      dateRange {
        from
        to
      }
      creationDateRange {
        from
        to
      }
      types
      fileTypes
      contents {
        id
      }
      feeds {
        id
      }
      workflows {
        id
      }
      collections {
        id
      }
      observations {
        type
        observable {
          id
        }
        states
      }
      or {
        feeds {
          id
        }
        workflows {
          id
        }
        collections {
          id
        }
        observations {
          type
          observable {
            id
          }
          states
        }
      }
      and {
        feeds {
          id
        }
        workflows {
          id
        }
        collections {
          id
        }
        observations {
          type
          observable {
            id
          }
          states
        }
      }
    }
  }
}
"""

PROMPT_GQL = """
mutation Prompt($prompt: String!, $specification: EntityReferenceInput, $messages: [ConversationMessageInput!], $correlationId: String) {
  prompt(
    prompt: $prompt
    specification: $specification
    messages: $messages
    correlationId: $correlationId
  ) {
    specification {
      id
    }
    messages {
      role
      author
      message
      citations {
        content {
          id
          name
          state
          originalDate
          identifier
          uri
          type
          fileType
          mimeType
          format
          formatName
          fileExtension
          fileName
          fileSize
          masterUri
          imageUri
          textUri
          audioUri
          transcriptUri
          summary
          customSummary
          keywords
          bullets
          headlines
          posts
          chapters
          questions
          video {
            width
            height
            duration
            make
            model
            software
            title
            description
            keywords
            author
          }
          audio {
            keywords
            author
            series
            episode
            episodeType
            season
            publisher
            copyright
            genre
            title
            description
            bitrate
            channels
            sampleRate
            bitsPerSample
            duration
          }
          image {
            width
            height
            resolutionX
            resolutionY
            bitsPerComponent
            components
            projectionType
            orientation
            description
            make
            model
            software
            lens
            focalLength
            exposureTime
            fNumber
            iso
            heading
            pitch
          }
          document {
            title
            subject
            summary
            author
            publisher
            description
            keywords
            pageCount
            worksheetCount
            slideCount
            wordCount
            lineCount
            paragraphCount
            isEncrypted
            hasDigitalSignature
          }
        }
        index
        text
        startTime
        endTime
        pageNumber
        frameNumber
      }
      toolCalls {
        id
        name
        arguments
      }
      tokens
      throughput
      completionTime
      timestamp
      modelService
      model
    }
    error
  }
}
"""

PROMPT_CONVERSATION_GQL = """
mutation PromptConversation($prompt: String!, $id: ID, $specification: EntityReferenceInput, $tools: [ToolDefinitionInput!], $requireTool: Boolean, $includeDetails: Boolean, $correlationId: String) {
  promptConversation(
    prompt: $prompt
    id: $id
    specification: $specification
    tools: $tools
    requireTool: $requireTool
    includeDetails: $includeDetails
    correlationId: $correlationId
  ) {
    conversation {
      id
    }
    message {
      role
      author
      message
      citations {
        content {
          id
          name
          state
          originalDate
          identifier
          uri
          type
          fileType
          mimeType
          format
          formatName
          fileExtension
          fileName
          fileSize
          masterUri
          imageUri
          textUri
          audioUri
          transcriptUri
          summary
          customSummary
          keywords
          bullets
          headlines
          posts
          chapters
          questions
          video {
            width
            height
            duration
            make
            model
            software
            title
            description
            keywords
            author
          }
          audio {
            keywords
            author
            series
            episode
            episodeType
            season
            publisher
            copyright
            genre
            title
            description
            bitrate
            channels
            sampleRate
            bitsPerSample
            duration
          }
          image {
            width
            height
            resolutionX
            resolutionY
            bitsPerComponent
            components
            projectionType
            orientation
            description
            make
            model
            software
            lens
            focalLength
            exposureTime
            fNumber
            iso
            heading
            pitch
          }
          document {
            title
            subject
            summary
            author
            publisher
            description
            keywords
            pageCount
            worksheetCount
            slideCount
            wordCount
            lineCount
            paragraphCount
            isEncrypted
            hasDigitalSignature
          }
        }
        index
        text
        startTime
        endTime
        pageNumber
        frameNumber
      }
      toolCalls {
        id
        name
        arguments
      }
      tokens
      throughput
      completionTime
      timestamp
      modelService
      model
    }
    messageCount
    facets {
      type
      value
      range {
        from
        to
      }
      count
      facet
      observable {
        type
        observable {
          id
          name
        }
      }
    }
    graph {
      nodes {
        id
        name
        type
        metadata
      }
      edges {
        from
        to
        relation
      }
    }
    details {
      modelService
      model
      supportsToolCalling
      sourceCount
      observableCount
      toolCount
      renderedSourceCount
      renderedObservableCount
      renderedToolCount
      rankedSourceCount
      rankedObservableCount
      rankedToolCount
      tokenLimit
      completionTokenLimit
      sources
      formattedSources
      formattedObservables
      formattedInstructions
      formattedTools
      messages {
        role
        author
        message
        citations {
          content {
            id
            name
            state
            originalDate
            identifier
            uri
            type
            fileType
            mimeType
            format
            formatName
            fileExtension
            fileName
            fileSize
            masterUri
            imageUri
            textUri
            audioUri
            transcriptUri
            summary
            customSummary
            keywords
            bullets
            headlines
            posts
            chapters
            questions
            video {
              width
              height
              duration
              make
              model
              software
              title
              description
              keywords
              author
            }
            audio {
              keywords
              author
              series
              episode
              episodeType
              season
              publisher
              copyright
              genre
              title
              description
              bitrate
              channels
              sampleRate
              bitsPerSample
              duration
            }
            image {
              width
              height
              resolutionX
              resolutionY
              bitsPerComponent
              components
              projectionType
              orientation
              description
              make
              model
              software
              lens
              focalLength
              exposureTime
              fNumber
              iso
              heading
              pitch
            }
            document {
              title
              subject
              summary
              author
              publisher
              description
              keywords
              pageCount
              worksheetCount
              slideCount
              wordCount
              lineCount
              paragraphCount
              isEncrypted
              hasDigitalSignature
            }
          }
          index
          text
          startTime
          endTime
          pageNumber
          frameNumber
        }
        toolCalls {
          id
          name
          arguments
        }
        tokens
        throughput
        completionTime
        timestamp
        modelService
        model
      }
    }
  }
}
"""

PUBLISH_CONVERSATION_GQL = """
mutation PublishConversation($id: ID!, $connector: ContentPublishingConnectorInput!, $name: String, $isSynchronous: Boolean, $workflow: EntityReferenceInput, $correlationId: String) {
  publishConversation(
    id: $id
    connector: $connector
    name: $name
    isSynchronous: $isSynchronous
    workflow: $workflow
    correlationId: $correlationId
  ) {
    id
    name
    state
    type
    fileType
    mimeType
    uri
    collections {
      id
      name
    }
    textUri
    audioUri
    markdown
  }
}
"""

QUERY_CONVERSATIONS_GQL = """
query QueryConversations($filter: ConversationFilter) {
  conversations(filter: $filter) {
    results {
      id
      name
      creationDate
      relevance
      owner {
        id
      }
      state
      correlationId
      type
      messages {
        role
        author
        message
        citations {
          content {
            id
            name
            state
            originalDate
            identifier
            uri
            type
            fileType
            mimeType
            format
            formatName
            fileExtension
            fileName
            fileSize
            masterUri
            imageUri
            textUri
            audioUri
            transcriptUri
            summary
            customSummary
            keywords
            bullets
            headlines
            posts
            chapters
            questions
            video {
              width
              height
              duration
              make
              model
              software
              title
              description
              keywords
              author
            }
            audio {
              keywords
              author
              series
              episode
              episodeType
              season
              publisher
              copyright
              genre
              title
              description
              bitrate
              channels
              sampleRate
              bitsPerSample
              duration
            }
            image {
              width
              height
              resolutionX
              resolutionY
              bitsPerComponent
              components
              projectionType
              orientation
              description
              make
              model
              software
              lens
              focalLength
              exposureTime
              fNumber
              iso
              heading
              pitch
            }
            document {
              title
              subject
              summary
              author
              publisher
              description
              keywords
              pageCount
              worksheetCount
              slideCount
              wordCount
              lineCount
              paragraphCount
              isEncrypted
              hasDigitalSignature
            }
          }
          index
          text
          startTime
          endTime
          pageNumber
          frameNumber
        }
        toolCalls {
          id
          name
          arguments
        }
        tokens
        throughput
        completionTime
        timestamp
        modelService
        model
      }
      specification {
        id
        name
      }
      filter {
        dateRange {
          from
          to
        }
        creationDateRange {
          from
          to
        }
        types
        fileTypes
        contents {
          id
        }
        feeds {
          id
        }
        workflows {
          id
        }
        collections {
          id
        }
        observations {
          type
          observable {
            id
          }
          states
        }
        or {
          feeds {
            id
          }
          workflows {
            id
          }
          collections {
            id
          }
          observations {
            type
            observable {
              id
            }
            states
          }
        }
        and {
          feeds {
            id
          }
          workflows {
            id
          }
          collections {
            id
          }
          observations {
            type
            observable {
              id
            }
            states
          }
        }
      }
      augmentedFilter {
        dateRange {
          from
          to
        }
        creationDateRange {
          from
          to
        }
        types
        fileTypes
        contents {
          id
        }
        feeds {
          id
        }
        workflows {
          id
        }
        collections {
          id
        }
        observations {
          type
          observable {
            id
          }
          states
        }
        or {
          feeds {
            id
          }
          workflows {
            id
          }
          collections {
            id
          }
          observations {
            type
            observable {
              id
            }
            states
          }
        }
        and {
          feeds {
            id
          }
          workflows {
            id
          }
          collections {
            id
          }
          observations {
            type
            observable {
              id
            }
            states
          }
        }
      }
    }
  }
}
"""

REVISE_CONTENT_GQL = """
mutation ReviseContent($prompt: String!, $content: EntityReferenceInput!, $id: ID, $specification: EntityReferenceInput, $correlationId: String) {
  reviseContent(
    prompt: $prompt
    content: $content
    id: $id
    specification: $specification
    correlationId: $correlationId
  ) {
    conversation {
      id
    }
    message {
      role
      author
      message
      citations {
        content {
          id
          name
          state
          originalDate
          identifier
          uri
          type
          fileType
          mimeType
          format
          formatName
          fileExtension
          fileName
          fileSize
          masterUri
          imageUri
          textUri
          audioUri
          transcriptUri
          summary
          customSummary
          keywords
          bullets
          headlines
          posts
          chapters
          questions
          video {
            width
            height
            duration
            make
            model
            software
            title
            description
            keywords
            author
          }
          audio {
            keywords
            author
            series
            episode
            episodeType
            season
            publisher
            copyright
            genre
            title
            description
            bitrate
            channels
            sampleRate
            bitsPerSample
            duration
          }
          image {
            width
            height
            resolutionX
            resolutionY
            bitsPerComponent
            components
            projectionType
            orientation
            description
            make
            model
            software
            lens
            focalLength
            exposureTime
            fNumber
            iso
            heading
            pitch
          }
          document {
            title
            subject
            summary
            author
            publisher
            description
            keywords
            pageCount
            worksheetCount
            slideCount
            wordCount
            lineCount
            paragraphCount
            isEncrypted
            hasDigitalSignature
          }
        }
        index
        text
        startTime
        endTime
        pageNumber
        frameNumber
      }
      toolCalls {
        id
        name
        arguments
      }
      tokens
      throughput
      completionTime
      timestamp
      modelService
      model
    }
    messageCount
  }
}
"""

REVISE_ENCODED_IMAGE_GQL = """
mutation ReviseEncodedImage($prompt: String!, $mimeType: String!, $data: String!, $id: ID, $specification: EntityReferenceInput, $correlationId: String) {
  reviseEncodedImage(
    prompt: $prompt
    mimeType: $mimeType
    data: $data
    id: $id
    specification: $specification
    correlationId: $correlationId
  ) {
    conversation {
      id
    }
    message {
      role
      author
      message
      citations {
        content {
          id
          name
          state
          originalDate
          identifier
          uri
          type
          fileType
          mimeType
          format
          formatName
          fileExtension
          fileName
          fileSize
          masterUri
          imageUri
          textUri
          audioUri
          transcriptUri
          summary
          customSummary
          keywords
          bullets
          headlines
          posts
          chapters
          questions
          video {
            width
            height
            duration
            make
            model
            software
            title
            description
            keywords
            author
          }
          audio {
            keywords
            author
            series
            episode
            episodeType
            season
            publisher
            copyright
            genre
            title
            description
            bitrate
            channels
            sampleRate
            bitsPerSample
            duration
          }
          image {
            width
            height
            resolutionX
            resolutionY
            bitsPerComponent
            components
            projectionType
            orientation
            description
            make
            model
            software
            lens
            focalLength
            exposureTime
            fNumber
            iso
            heading
            pitch
          }
          document {
            title
            subject
            summary
            author
            publisher
            description
            keywords
            pageCount
            worksheetCount
            slideCount
            wordCount
            lineCount
            paragraphCount
            isEncrypted
            hasDigitalSignature
          }
        }
        index
        text
        startTime
        endTime
        pageNumber
        frameNumber
      }
      toolCalls {
        id
        name
        arguments
      }
      tokens
      throughput
      completionTime
      timestamp
      modelService
      model
    }
    messageCount
  }
}
"""

REVISE_IMAGE_GQL = """
mutation ReviseImage($prompt: String!, $uri: URL!, $id: ID, $specification: EntityReferenceInput, $correlationId: String) {
  reviseImage(
    prompt: $prompt
    uri: $uri
    id: $id
    specification: $specification
    correlationId: $correlationId
  ) {
    conversation {
      id
    }
    message {
      role
      author
      message
      citations {
        content {
          id
          name
          state
          originalDate
          identifier
          uri
          type
          fileType
          mimeType
          format
          formatName
          fileExtension
          fileName
          fileSize
          masterUri
          imageUri
          textUri
          audioUri
          transcriptUri
          summary
          customSummary
          keywords
          bullets
          headlines
          posts
          chapters
          questions
          video {
            width
            height
            duration
            make
            model
            software
            title
            description
            keywords
            author
          }
          audio {
            keywords
            author
            series
            episode
            episodeType
            season
            publisher
            copyright
            genre
            title
            description
            bitrate
            channels
            sampleRate
            bitsPerSample
            duration
          }
          image {
            width
            height
            resolutionX
            resolutionY
            bitsPerComponent
            components
            projectionType
            orientation
            description
            make
            model
            software
            lens
            focalLength
            exposureTime
            fNumber
            iso
            heading
            pitch
          }
          document {
            title
            subject
            summary
            author
            publisher
            description
            keywords
            pageCount
            worksheetCount
            slideCount
            wordCount
            lineCount
            paragraphCount
            isEncrypted
            hasDigitalSignature
          }
        }
        index
        text
        startTime
        endTime
        pageNumber
        frameNumber
      }
      toolCalls {
        id
        name
        arguments
      }
      tokens
      throughput
      completionTime
      timestamp
      modelService
      model
    }
    messageCount
  }
}
"""

REVISE_TEXT_GQL = """
mutation ReviseText($prompt: String!, $text: String!, $id: ID, $specification: EntityReferenceInput, $correlationId: String) {
  reviseText(
    prompt: $prompt
    text: $text
    id: $id
    specification: $specification
    correlationId: $correlationId
  ) {
    conversation {
      id
    }
    message {
      role
      author
      message
      citations {
        content {
          id
          name
          state
          originalDate
          identifier
          uri
          type
          fileType
          mimeType
          format
          formatName
          fileExtension
          fileName
          fileSize
          masterUri
          imageUri
          textUri
          audioUri
          transcriptUri
          summary
          customSummary
          keywords
          bullets
          headlines
          posts
          chapters
          questions
          video {
            width
            height
            duration
            make
            model
            software
            title
            description
            keywords
            author
          }
          audio {
            keywords
            author
            series
            episode
            episodeType
            season
            publisher
            copyright
            genre
            title
            description
            bitrate
            channels
            sampleRate
            bitsPerSample
            duration
          }
          image {
            width
            height
            resolutionX
            resolutionY
            bitsPerComponent
            components
            projectionType
            orientation
            description
            make
            model
            software
            lens
            focalLength
            exposureTime
            fNumber
            iso
            heading
            pitch
          }
          document {
            title
            subject
            summary
            author
            publisher
            description
            keywords
            pageCount
            worksheetCount
            slideCount
            wordCount
            lineCount
            paragraphCount
            isEncrypted
            hasDigitalSignature
          }
        }
        index
        text
        startTime
        endTime
        pageNumber
        frameNumber
      }
      toolCalls {
        id
        name
        arguments
      }
      tokens
      throughput
      completionTime
      timestamp
      modelService
      model
    }
    messageCount
  }
}
"""

SUGGEST_CONVERSATION_GQL = """
mutation SuggestConversation($id: ID!, $count: Int, $prompt: String, $correlationId: String) {
  suggestConversation(
    id: $id
    count: $count
    prompt: $prompt
    correlationId: $correlationId
  ) {
    prompts
  }
}
"""

UPDATE_CONVERSATION_GQL = """
mutation UpdateConversation($conversation: ConversationUpdateInput!) {
  updateConversation(conversation: $conversation) {
    id
    name
    state
    type
  }
}
"""

COUNT_EVENTS_GQL = """
query CountEvents($filter: EventFilter) {
  countEvents(filter: $filter) {
    count
  }
}
"""

CREATE_EVENT_GQL = """
mutation CreateEvent($event: EventInput!) {
  createEvent(event: $event) {
    id
    name
  }
}
"""

DELETE_ALL_EVENTS_GQL = """
mutation DeleteAllEvents($filter: EventFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllEvents(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_EVENT_GQL = """
mutation DeleteEvent($id: ID!) {
  deleteEvent(id: $id) {
    id
    state
  }
}
"""

DELETE_EVENTS_GQL = """
mutation DeleteEvents($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteEvents(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_EVENT_GQL = """
query GetEvent($id: ID!) {
  event(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
    address {
      streetAddress
      city
      region
      country
      postalCode
    }
    startDate
    endDate
    availabilityStartDate
    availabilityEndDate
    price
    minPrice
    maxPrice
    priceCurrency
    isAccessibleForFree
    typicalAgeRange
  }
}
"""

QUERY_EVENTS_GQL = """
query QueryEvents($filter: EventFilter) {
  events(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
      address {
        streetAddress
        city
        region
        country
        postalCode
      }
      startDate
      endDate
      availabilityStartDate
      availabilityEndDate
      price
      minPrice
      maxPrice
      priceCurrency
      isAccessibleForFree
      typicalAgeRange
    }
  }
}
"""

UPDATE_EVENT_GQL = """
mutation UpdateEvent($event: EventUpdateInput!) {
  updateEvent(event: $event) {
    id
    name
  }
}
"""

COUNT_FEEDS_GQL = """
query CountFeeds($filter: FeedFilter) {
  countFeeds(filter: $filter) {
    count
  }
}
"""

CREATE_FEED_GQL = """
mutation CreateFeed($feed: FeedInput!, $correlationId: String) {
  createFeed(feed: $feed, correlationId: $correlationId) {
    id
    name
    state
    type
  }
}
"""

DELETE_ALL_FEEDS_GQL = """
mutation DeleteAllFeeds($filter: FeedFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllFeeds(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_FEED_GQL = """
mutation DeleteFeed($id: ID!) {
  deleteFeed(id: $id) {
    id
    state
  }
}
"""

DELETE_FEEDS_GQL = """
mutation DeleteFeeds($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteFeeds(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

DISABLE_FEED_GQL = """
mutation DisableFeed($id: ID!) {
  disableFeed(id: $id) {
    id
    state
  }
}
"""

ENABLE_FEED_GQL = """
mutation EnableFeed($id: ID!) {
  enableFeed(id: $id) {
    id
    state
  }
}
"""

GET_FEED_GQL = """
query GetFeed($id: ID!) {
  feed(id: $id) {
    id
    name
    creationDate
    relevance
    owner {
      id
    }
    state
    correlationId
    type
    site {
      siteType
      type
      isRecursive
      s3 {
        accessKey
        secretAccessKey
        bucketName
        prefix
        region
      }
      azureBlob {
        storageAccessKey
        accountName
        containerName
        prefix
      }
      azureFile {
        storageAccessKey
        accountName
        shareName
        prefix
      }
      google {
        credentials
        containerName
        prefix
      }
      sharePoint {
        authenticationType
        accountName
        libraryId
        folderId
        tenantId
        clientId
        clientSecret
        refreshToken
      }
      oneDrive {
        folderId
        clientId
        clientSecret
        refreshToken
      }
      googleDrive {
        folderId
        refreshToken
        clientId
        clientSecret
      }
      github {
        uri
        repositoryOwner
        repositoryName
        refreshToken
        personalAccessToken
      }
      readLimit
    }
    email {
      type
      includeAttachments
      google {
        type
        refreshToken
        clientId
        clientSecret
      }
      microsoft {
        type
        refreshToken
        clientId
        clientSecret
      }
      readLimit
    }
    issue {
      type
      includeAttachments
      jira {
        uri
        project
        email
        token
        offset
      }
      linear {
        key
        project
      }
      github {
        uri
        repositoryOwner
        repositoryName
        refreshToken
        personalAccessToken
      }
      readLimit
    }
    rss {
      readLimit
      uri
    }
    web {
      readLimit
      uri
      includeFiles
      allowedPaths
      excludedPaths
    }
    search {
      readLimit
      type
      text
    }
    reddit {
      readLimit
      subredditName
    }
    notion {
      readLimit
      token
      identifiers
      type
    }
    youtube {
      readLimit
      type
      videoName
      videoIdentifiers
      channelIdentifier
      playlistIdentifier
    }
    slack {
      readLimit
      type
      token
      channel
      includeAttachments
    }
    microsoftTeams {
      readLimit
      type
      clientId
      clientSecret
      refreshToken
      teamId
      channelId
    }
    discord {
      readLimit
      type
      token
      channel
      includeAttachments
    }
    error
    lastPostDate
    lastReadDate
    readCount
    workflow {
      id
      name
    }
    schedulePolicy {
      recurrenceType
      repeatInterval
    }
  }
}
"""

GET_SHARE_POINT_CONSENT_URI_GQL = """
query GetSharePointConsentUri($tenantId: ID!) {
  sharePointConsentUri(tenantId: $tenantId) {
    uri
  }
}
"""

IS_FEED_DONE_GQL = """
query IsFeedDone($id: ID!) {
  isFeedDone(id: $id) {
    result
  }
}
"""

QUERY_FEEDS_GQL = """
query QueryFeeds($filter: FeedFilter) {
  feeds(filter: $filter) {
    results {
      id
      name
      creationDate
      relevance
      owner {
        id
      }
      state
      correlationId
      type
      site {
        siteType
        type
        isRecursive
        s3 {
          accessKey
          secretAccessKey
          bucketName
          prefix
          region
        }
        azureBlob {
          storageAccessKey
          accountName
          containerName
          prefix
        }
        azureFile {
          storageAccessKey
          accountName
          shareName
          prefix
        }
        google {
          credentials
          containerName
          prefix
        }
        sharePoint {
          authenticationType
          accountName
          libraryId
          folderId
          tenantId
          clientId
          clientSecret
          refreshToken
        }
        oneDrive {
          folderId
          clientId
          clientSecret
          refreshToken
        }
        googleDrive {
          folderId
          refreshToken
          clientId
          clientSecret
        }
        github {
          uri
          repositoryOwner
          repositoryName
          refreshToken
          personalAccessToken
        }
        readLimit
      }
      email {
        type
        includeAttachments
        google {
          type
          refreshToken
          clientId
          clientSecret
        }
        microsoft {
          type
          refreshToken
          clientId
          clientSecret
        }
        readLimit
      }
      issue {
        type
        includeAttachments
        jira {
          uri
          project
          email
          token
          offset
        }
        linear {
          key
          project
        }
        github {
          uri
          repositoryOwner
          repositoryName
          refreshToken
          personalAccessToken
        }
        readLimit
      }
      rss {
        readLimit
        uri
      }
      web {
        readLimit
        uri
        includeFiles
        allowedPaths
        excludedPaths
      }
      search {
        readLimit
        type
        text
      }
      reddit {
        readLimit
        subredditName
      }
      notion {
        readLimit
        token
        identifiers
        type
      }
      youtube {
        readLimit
        type
        videoName
        videoIdentifiers
        channelIdentifier
        playlistIdentifier
      }
      slack {
        readLimit
        type
        token
        channel
        includeAttachments
      }
      microsoftTeams {
        readLimit
        type
        clientId
        clientSecret
        refreshToken
        teamId
        channelId
      }
      discord {
        readLimit
        type
        token
        channel
        includeAttachments
      }
      error
      lastPostDate
      lastReadDate
      readCount
      workflow {
        id
        name
      }
      schedulePolicy {
        recurrenceType
        repeatInterval
      }
    }
  }
}
"""

QUERY_MICROSOFT_TEAMS_CHANNELS_GQL = """
query QueryMicrosoftTeamsChannels($properties: MicrosoftTeamsChannelsInput!, $teamId: ID!) {
  microsoftTeamsChannels(properties: $properties, teamId: $teamId) {
    results {
      channelName
      channelId
    }
  }
}
"""

QUERY_MICROSOFT_TEAMS_TEAMS_GQL = """
query QueryMicrosoftTeamsTeams($properties: MicrosoftTeamsTeamsInput!) {
  microsoftTeamsTeams(properties: $properties) {
    results {
      teamName
      teamId
    }
  }
}
"""

QUERY_ONE_DRIVE_FOLDERS_GQL = """
query QueryOneDriveFolders($properties: OneDriveFoldersInput!, $folderId: ID) {
  oneDriveFolders(properties: $properties, folderId: $folderId) {
    results {
      folderName
      folderId
    }
  }
}
"""

QUERY_SHARE_POINT_FOLDERS_GQL = """
query QuerySharePointFolders($properties: SharePointFoldersInput!, $driveId: ID!, $folderId: ID) {
  sharePointFolders(
    properties: $properties
    driveId: $driveId
    folderId: $folderId
  ) {
    accountName
    results {
      folderName
      folderId
    }
  }
}
"""

QUERY_SHARE_POINT_LIBRARIES_GQL = """
query QuerySharePointLibraries($properties: SharePointLibrariesInput!) {
  sharePointLibraries(properties: $properties) {
    accountName
    results {
      libraryName
      libraryId
      siteName
      siteId
    }
  }
}
"""

UPDATE_FEED_GQL = """
mutation UpdateFeed($feed: FeedUpdateInput!) {
  updateFeed(feed: $feed) {
    id
    name
    state
    type
  }
}
"""

COUNT_LABELS_GQL = """
query CountLabels($filter: LabelFilter) {
  countLabels(filter: $filter) {
    count
  }
}
"""

CREATE_LABEL_GQL = """
mutation CreateLabel($label: LabelInput!) {
  createLabel(label: $label) {
    id
    name
  }
}
"""

DELETE_ALL_LABELS_GQL = """
mutation DeleteAllLabels($filter: LabelFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllLabels(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_LABEL_GQL = """
mutation DeleteLabel($id: ID!) {
  deleteLabel(id: $id) {
    id
    state
  }
}
"""

DELETE_LABELS_GQL = """
mutation DeleteLabels($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteLabels(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_LABEL_GQL = """
query GetLabel($id: ID!) {
  label(id: $id) {
    id
    name
    description
    creationDate
    relevance
  }
}
"""

QUERY_LABELS_GQL = """
query QueryLabels($filter: LabelFilter) {
  labels(filter: $filter) {
    results {
      id
      name
      description
      creationDate
      relevance
    }
  }
}
"""

UPDATE_LABEL_GQL = """
mutation UpdateLabel($label: LabelUpdateInput!) {
  updateLabel(label: $label) {
    id
    name
  }
}
"""

COUNT_MEDICAL_CONDITIONS_GQL = """
query CountMedicalConditions($filter: MedicalConditionFilter) {
  countMedicalConditions(filter: $filter) {
    count
  }
}
"""

CREATE_MEDICAL_CONDITION_GQL = """
mutation CreateMedicalCondition($medicalCondition: MedicalConditionInput!) {
  createMedicalCondition(medicalCondition: $medicalCondition) {
    id
    name
  }
}
"""

DELETE_ALL_MEDICAL_CONDITIONS_GQL = """
mutation DeleteAllMedicalConditions($filter: MedicalConditionFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllMedicalConditions(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_MEDICAL_CONDITION_GQL = """
mutation DeleteMedicalCondition($id: ID!) {
  deleteMedicalCondition(id: $id) {
    id
    state
  }
}
"""

DELETE_MEDICAL_CONDITIONS_GQL = """
mutation DeleteMedicalConditions($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteMedicalConditions(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_MEDICAL_CONDITION_GQL = """
query GetMedicalCondition($id: ID!) {
  medicalCondition(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
  }
}
"""

QUERY_MEDICAL_CONDITIONS_GQL = """
query QueryMedicalConditions($filter: MedicalConditionFilter) {
  medicalConditions(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
    }
  }
}
"""

UPDATE_MEDICAL_CONDITION_GQL = """
mutation UpdateMedicalCondition($medicalCondition: MedicalConditionUpdateInput!) {
  updateMedicalCondition(medicalCondition: $medicalCondition) {
    id
    name
  }
}
"""

COUNT_MEDICAL_CONTRAINDICATIONS_GQL = """
query CountMedicalContraindications($filter: MedicalContraindicationFilter) {
  countMedicalContraindications(filter: $filter) {
    count
  }
}
"""

CREATE_MEDICAL_CONTRAINDICATION_GQL = """
mutation CreateMedicalContraindication($medicalContraindication: MedicalContraindicationInput!) {
  createMedicalContraindication(medicalContraindication: $medicalContraindication) {
    id
    name
  }
}
"""

DELETE_ALL_MEDICAL_CONTRAINDICATIONS_GQL = """
mutation DeleteAllMedicalContraindications($filter: MedicalContraindicationFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllMedicalContraindications(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_MEDICAL_CONTRAINDICATION_GQL = """
mutation DeleteMedicalContraindication($id: ID!) {
  deleteMedicalContraindication(id: $id) {
    id
    state
  }
}
"""

DELETE_MEDICAL_CONTRAINDICATIONS_GQL = """
mutation DeleteMedicalContraindications($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteMedicalContraindications(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_MEDICAL_CONTRAINDICATION_GQL = """
query GetMedicalContraindication($id: ID!) {
  medicalContraindication(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
  }
}
"""

QUERY_MEDICAL_CONTRAINDICATIONS_GQL = """
query QueryMedicalContraindications($filter: MedicalContraindicationFilter) {
  medicalContraindications(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
    }
  }
}
"""

UPDATE_MEDICAL_CONTRAINDICATION_GQL = """
mutation UpdateMedicalContraindication($medicalContraindication: MedicalContraindicationUpdateInput!) {
  updateMedicalContraindication(medicalContraindication: $medicalContraindication) {
    id
    name
  }
}
"""

COUNT_MEDICAL_DEVICES_GQL = """
query CountMedicalDevices($filter: MedicalDeviceFilter) {
  countMedicalDevices(filter: $filter) {
    count
  }
}
"""

CREATE_MEDICAL_DEVICE_GQL = """
mutation CreateMedicalDevice($medicalDevice: MedicalDeviceInput!) {
  createMedicalDevice(medicalDevice: $medicalDevice) {
    id
    name
  }
}
"""

DELETE_ALL_MEDICAL_DEVICES_GQL = """
mutation DeleteAllMedicalDevices($filter: MedicalDeviceFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllMedicalDevices(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_MEDICAL_DEVICE_GQL = """
mutation DeleteMedicalDevice($id: ID!) {
  deleteMedicalDevice(id: $id) {
    id
    state
  }
}
"""

DELETE_MEDICAL_DEVICES_GQL = """
mutation DeleteMedicalDevices($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteMedicalDevices(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_MEDICAL_DEVICE_GQL = """
query GetMedicalDevice($id: ID!) {
  medicalDevice(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
  }
}
"""

QUERY_MEDICAL_DEVICES_GQL = """
query QueryMedicalDevices($filter: MedicalDeviceFilter) {
  medicalDevices(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
    }
  }
}
"""

UPDATE_MEDICAL_DEVICE_GQL = """
mutation UpdateMedicalDevice($medicalDevice: MedicalDeviceUpdateInput!) {
  updateMedicalDevice(medicalDevice: $medicalDevice) {
    id
    name
  }
}
"""

COUNT_MEDICAL_DRUGS_GQL = """
query CountMedicalDrugs($filter: MedicalDrugFilter) {
  countMedicalDrugs(filter: $filter) {
    count
  }
}
"""

CREATE_MEDICAL_DRUG_GQL = """
mutation CreateMedicalDrug($medicalDrug: MedicalDrugInput!) {
  createMedicalDrug(medicalDrug: $medicalDrug) {
    id
    name
  }
}
"""

DELETE_ALL_MEDICAL_DRUGS_GQL = """
mutation DeleteAllMedicalDrugs($filter: MedicalDrugFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllMedicalDrugs(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_MEDICAL_DRUG_GQL = """
mutation DeleteMedicalDrug($id: ID!) {
  deleteMedicalDrug(id: $id) {
    id
    state
  }
}
"""

DELETE_MEDICAL_DRUGS_GQL = """
mutation DeleteMedicalDrugs($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteMedicalDrugs(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_MEDICAL_DRUG_GQL = """
query GetMedicalDrug($id: ID!) {
  medicalDrug(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
  }
}
"""

QUERY_MEDICAL_DRUGS_GQL = """
query QueryMedicalDrugs($filter: MedicalDrugFilter) {
  medicalDrugs(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
    }
  }
}
"""

UPDATE_MEDICAL_DRUG_GQL = """
mutation UpdateMedicalDrug($medicalDrug: MedicalDrugUpdateInput!) {
  updateMedicalDrug(medicalDrug: $medicalDrug) {
    id
    name
  }
}
"""

COUNT_MEDICAL_DRUG_CLASSES_GQL = """
query CountMedicalDrugClasses($filter: MedicalDrugClassFilter) {
  countMedicalDrugClasses(filter: $filter) {
    count
  }
}
"""

CREATE_MEDICAL_DRUG_CLASS_GQL = """
mutation CreateMedicalDrugClass($medicalDrugClass: MedicalDrugClassInput!) {
  createMedicalDrugClass(medicalDrugClass: $medicalDrugClass) {
    id
    name
  }
}
"""

DELETE_ALL_MEDICAL_DRUG_CLASSES_GQL = """
mutation DeleteAllMedicalDrugClasses($filter: MedicalDrugClassFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllMedicalDrugClasses(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_MEDICAL_DRUG_CLASS_GQL = """
mutation DeleteMedicalDrugClass($id: ID!) {
  deleteMedicalDrugClass(id: $id) {
    id
    state
  }
}
"""

DELETE_MEDICAL_DRUG_CLASSES_GQL = """
mutation DeleteMedicalDrugClasses($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteMedicalDrugClasses(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_MEDICAL_DRUG_CLASS_GQL = """
query GetMedicalDrugClass($id: ID!) {
  medicalDrugClass(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
  }
}
"""

QUERY_MEDICAL_DRUG_CLASSES_GQL = """
query QueryMedicalDrugClasses($filter: MedicalDrugClassFilter) {
  medicalDrugClasses(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
    }
  }
}
"""

UPDATE_MEDICAL_DRUG_CLASS_GQL = """
mutation UpdateMedicalDrugClass($medicalDrugClass: MedicalDrugClassUpdateInput!) {
  updateMedicalDrugClass(medicalDrugClass: $medicalDrugClass) {
    id
    name
  }
}
"""

COUNT_MEDICAL_GUIDELINES_GQL = """
query CountMedicalGuidelines($filter: MedicalGuidelineFilter) {
  countMedicalGuidelines(filter: $filter) {
    count
  }
}
"""

CREATE_MEDICAL_GUIDELINE_GQL = """
mutation CreateMedicalGuideline($medicalGuideline: MedicalGuidelineInput!) {
  createMedicalGuideline(medicalGuideline: $medicalGuideline) {
    id
    name
  }
}
"""

DELETE_ALL_MEDICAL_GUIDELINES_GQL = """
mutation DeleteAllMedicalGuidelines($filter: MedicalGuidelineFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllMedicalGuidelines(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_MEDICAL_GUIDELINE_GQL = """
mutation DeleteMedicalGuideline($id: ID!) {
  deleteMedicalGuideline(id: $id) {
    id
    state
  }
}
"""

DELETE_MEDICAL_GUIDELINES_GQL = """
mutation DeleteMedicalGuidelines($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteMedicalGuidelines(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_MEDICAL_GUIDELINE_GQL = """
query GetMedicalGuideline($id: ID!) {
  medicalGuideline(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
  }
}
"""

QUERY_MEDICAL_GUIDELINES_GQL = """
query QueryMedicalGuidelines($filter: MedicalGuidelineFilter) {
  medicalGuidelines(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
    }
  }
}
"""

UPDATE_MEDICAL_GUIDELINE_GQL = """
mutation UpdateMedicalGuideline($medicalGuideline: MedicalGuidelineUpdateInput!) {
  updateMedicalGuideline(medicalGuideline: $medicalGuideline) {
    id
    name
  }
}
"""

COUNT_MEDICAL_INDICATIONS_GQL = """
query CountMedicalIndications($filter: MedicalIndicationFilter) {
  countMedicalIndications(filter: $filter) {
    count
  }
}
"""

CREATE_MEDICAL_INDICATION_GQL = """
mutation CreateMedicalIndication($medicalIndication: MedicalIndicationInput!) {
  createMedicalIndication(medicalIndication: $medicalIndication) {
    id
    name
  }
}
"""

DELETE_ALL_MEDICAL_INDICATIONS_GQL = """
mutation DeleteAllMedicalIndications($filter: MedicalIndicationFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllMedicalIndications(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_MEDICAL_INDICATION_GQL = """
mutation DeleteMedicalIndication($id: ID!) {
  deleteMedicalIndication(id: $id) {
    id
    state
  }
}
"""

DELETE_MEDICAL_INDICATIONS_GQL = """
mutation DeleteMedicalIndications($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteMedicalIndications(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_MEDICAL_INDICATION_GQL = """
query GetMedicalIndication($id: ID!) {
  medicalIndication(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
  }
}
"""

QUERY_MEDICAL_INDICATIONS_GQL = """
query QueryMedicalIndications($filter: MedicalIndicationFilter) {
  medicalIndications(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
    }
  }
}
"""

UPDATE_MEDICAL_INDICATION_GQL = """
mutation UpdateMedicalIndication($medicalIndication: MedicalIndicationUpdateInput!) {
  updateMedicalIndication(medicalIndication: $medicalIndication) {
    id
    name
  }
}
"""

COUNT_MEDICAL_PROCEDURES_GQL = """
query CountMedicalProcedures($filter: MedicalProcedureFilter) {
  countMedicalProcedures(filter: $filter) {
    count
  }
}
"""

CREATE_MEDICAL_PROCEDURE_GQL = """
mutation CreateMedicalProcedure($medicalProcedure: MedicalProcedureInput!) {
  createMedicalProcedure(medicalProcedure: $medicalProcedure) {
    id
    name
  }
}
"""

DELETE_ALL_MEDICAL_PROCEDURES_GQL = """
mutation DeleteAllMedicalProcedures($filter: MedicalProcedureFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllMedicalProcedures(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_MEDICAL_PROCEDURE_GQL = """
mutation DeleteMedicalProcedure($id: ID!) {
  deleteMedicalProcedure(id: $id) {
    id
    state
  }
}
"""

DELETE_MEDICAL_PROCEDURES_GQL = """
mutation DeleteMedicalProcedures($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteMedicalProcedures(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_MEDICAL_PROCEDURE_GQL = """
query GetMedicalProcedure($id: ID!) {
  medicalProcedure(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
  }
}
"""

QUERY_MEDICAL_PROCEDURES_GQL = """
query QueryMedicalProcedures($filter: MedicalProcedureFilter) {
  medicalProcedures(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
    }
  }
}
"""

UPDATE_MEDICAL_PROCEDURE_GQL = """
mutation UpdateMedicalProcedure($medicalProcedure: MedicalProcedureUpdateInput!) {
  updateMedicalProcedure(medicalProcedure: $medicalProcedure) {
    id
    name
  }
}
"""

COUNT_MEDICAL_STUDIES_GQL = """
query CountMedicalStudies($filter: MedicalStudyFilter) {
  countMedicalStudies(filter: $filter) {
    count
  }
}
"""

CREATE_MEDICAL_STUDY_GQL = """
mutation CreateMedicalStudy($medicalStudy: MedicalStudyInput!) {
  createMedicalStudy(medicalStudy: $medicalStudy) {
    id
    name
  }
}
"""

DELETE_ALL_MEDICAL_STUDIES_GQL = """
mutation DeleteAllMedicalStudies($filter: MedicalStudyFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllMedicalStudies(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_MEDICAL_STUDIES_GQL = """
mutation DeleteMedicalStudies($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteMedicalStudies(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

DELETE_MEDICAL_STUDY_GQL = """
mutation DeleteMedicalStudy($id: ID!) {
  deleteMedicalStudy(id: $id) {
    id
    state
  }
}
"""

GET_MEDICAL_STUDY_GQL = """
query GetMedicalStudy($id: ID!) {
  medicalStudy(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
    address {
      streetAddress
      city
      region
      country
      postalCode
    }
  }
}
"""

QUERY_MEDICAL_STUDIES_GQL = """
query QueryMedicalStudies($filter: MedicalStudyFilter) {
  medicalStudies(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
      address {
        streetAddress
        city
        region
        country
        postalCode
      }
    }
  }
}
"""

UPDATE_MEDICAL_STUDY_GQL = """
mutation UpdateMedicalStudy($medicalStudy: MedicalStudyUpdateInput!) {
  updateMedicalStudy(medicalStudy: $medicalStudy) {
    id
    name
  }
}
"""

COUNT_MEDICAL_TESTS_GQL = """
query CountMedicalTests($filter: MedicalTestFilter) {
  countMedicalTests(filter: $filter) {
    count
  }
}
"""

CREATE_MEDICAL_TEST_GQL = """
mutation CreateMedicalTest($medicalTest: MedicalTestInput!) {
  createMedicalTest(medicalTest: $medicalTest) {
    id
    name
  }
}
"""

DELETE_ALL_MEDICAL_TESTS_GQL = """
mutation DeleteAllMedicalTests($filter: MedicalTestFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllMedicalTests(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_MEDICAL_TEST_GQL = """
mutation DeleteMedicalTest($id: ID!) {
  deleteMedicalTest(id: $id) {
    id
    state
  }
}
"""

DELETE_MEDICAL_TESTS_GQL = """
mutation DeleteMedicalTests($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteMedicalTests(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_MEDICAL_TEST_GQL = """
query GetMedicalTest($id: ID!) {
  medicalTest(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
  }
}
"""

QUERY_MEDICAL_TESTS_GQL = """
query QueryMedicalTests($filter: MedicalTestFilter) {
  medicalTests(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
    }
  }
}
"""

UPDATE_MEDICAL_TEST_GQL = """
mutation UpdateMedicalTest($medicalTest: MedicalTestUpdateInput!) {
  updateMedicalTest(medicalTest: $medicalTest) {
    id
    name
  }
}
"""

COUNT_MEDICAL_THERAPIES_GQL = """
query CountMedicalTherapies($filter: MedicalTherapyFilter) {
  countMedicalTherapies(filter: $filter) {
    count
  }
}
"""

CREATE_MEDICAL_THERAPY_GQL = """
mutation CreateMedicalTherapy($medicalTherapy: MedicalTherapyInput!) {
  createMedicalTherapy(medicalTherapy: $medicalTherapy) {
    id
    name
  }
}
"""

DELETE_ALL_MEDICAL_THERAPIES_GQL = """
mutation DeleteAllMedicalTherapies($filter: MedicalTherapyFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllMedicalTherapies(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_MEDICAL_THERAPIES_GQL = """
mutation DeleteMedicalTherapies($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteMedicalTherapies(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

DELETE_MEDICAL_THERAPY_GQL = """
mutation DeleteMedicalTherapy($id: ID!) {
  deleteMedicalTherapy(id: $id) {
    id
    state
  }
}
"""

GET_MEDICAL_THERAPY_GQL = """
query GetMedicalTherapy($id: ID!) {
  medicalTherapy(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
  }
}
"""

QUERY_MEDICAL_THERAPIES_GQL = """
query QueryMedicalTherapies($filter: MedicalTherapyFilter) {
  medicalTherapies(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
    }
  }
}
"""

UPDATE_MEDICAL_THERAPY_GQL = """
mutation UpdateMedicalTherapy($medicalTherapy: MedicalTherapyUpdateInput!) {
  updateMedicalTherapy(medicalTherapy: $medicalTherapy) {
    id
    name
  }
}
"""

CREATE_OBSERVATION_GQL = """
mutation CreateObservation($observation: ObservationInput!) {
  createObservation(observation: $observation) {
    id
    state
  }
}
"""

DELETE_OBSERVATION_GQL = """
mutation DeleteObservation($id: ID!) {
  deleteObservation(id: $id) {
    id
    state
  }
}
"""

UPDATE_OBSERVATION_GQL = """
mutation UpdateObservation($observation: ObservationUpdateInput!) {
  updateObservation(observation: $observation) {
    id
    state
  }
}
"""

COUNT_ORGANIZATIONS_GQL = """
query CountOrganizations($filter: OrganizationFilter) {
  countOrganizations(filter: $filter) {
    count
  }
}
"""

CREATE_ORGANIZATION_GQL = """
mutation CreateOrganization($organization: OrganizationInput!) {
  createOrganization(organization: $organization) {
    id
    name
  }
}
"""

DELETE_ALL_ORGANIZATIONS_GQL = """
mutation DeleteAllOrganizations($filter: OrganizationFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllOrganizations(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_ORGANIZATION_GQL = """
mutation DeleteOrganization($id: ID!) {
  deleteOrganization(id: $id) {
    id
    state
  }
}
"""

DELETE_ORGANIZATIONS_GQL = """
mutation DeleteOrganizations($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteOrganizations(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_ORGANIZATION_GQL = """
query GetOrganization($id: ID!) {
  organization(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
    address {
      streetAddress
      city
      region
      country
      postalCode
    }
    foundingDate
    industries
    revenue
    revenueCurrency
    investment
    investmentCurrency
  }
}
"""

QUERY_ORGANIZATIONS_GQL = """
query QueryOrganizations($filter: OrganizationFilter) {
  organizations(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
      address {
        streetAddress
        city
        region
        country
        postalCode
      }
      foundingDate
      industries
      revenue
      revenueCurrency
      investment
      investmentCurrency
    }
  }
}
"""

UPDATE_ORGANIZATION_GQL = """
mutation UpdateOrganization($organization: OrganizationUpdateInput!) {
  updateOrganization(organization: $organization) {
    id
    name
  }
}
"""

COUNT_PERSONS_GQL = """
query CountPersons($filter: PersonFilter) {
  countPersons(filter: $filter) {
    count
  }
}
"""

CREATE_PERSON_GQL = """
mutation CreatePerson($person: PersonInput!) {
  createPerson(person: $person) {
    id
    name
  }
}
"""

DELETE_ALL_PERSONS_GQL = """
mutation DeleteAllPersons($filter: PersonFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllPersons(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_PERSON_GQL = """
mutation DeletePerson($id: ID!) {
  deletePerson(id: $id) {
    id
    state
  }
}
"""

DELETE_PERSONS_GQL = """
mutation DeletePersons($ids: [ID!]!, $isSynchronous: Boolean) {
  deletePersons(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_PERSON_GQL = """
query GetPerson($id: ID!) {
  person(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
    address {
      streetAddress
      city
      region
      country
      postalCode
    }
    email
    givenName
    familyName
    phoneNumber
    birthDate
    title
    occupation
    education
  }
}
"""

QUERY_PERSONS_GQL = """
query QueryPersons($filter: PersonFilter) {
  persons(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
      address {
        streetAddress
        city
        region
        country
        postalCode
      }
      email
      givenName
      familyName
      phoneNumber
      birthDate
      title
      occupation
      education
    }
  }
}
"""

UPDATE_PERSON_GQL = """
mutation UpdatePerson($person: PersonUpdateInput!) {
  updatePerson(person: $person) {
    id
    name
  }
}
"""

COUNT_PLACES_GQL = """
query CountPlaces($filter: PlaceFilter) {
  countPlaces(filter: $filter) {
    count
  }
}
"""

CREATE_PLACE_GQL = """
mutation CreatePlace($place: PlaceInput!) {
  createPlace(place: $place) {
    id
    name
  }
}
"""

DELETE_ALL_PLACES_GQL = """
mutation DeleteAllPlaces($filter: PlaceFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllPlaces(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_PLACE_GQL = """
mutation DeletePlace($id: ID!) {
  deletePlace(id: $id) {
    id
    state
  }
}
"""

DELETE_PLACES_GQL = """
mutation DeletePlaces($ids: [ID!]!, $isSynchronous: Boolean) {
  deletePlaces(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_PLACE_GQL = """
query GetPlace($id: ID!) {
  place(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
    address {
      streetAddress
      city
      region
      country
      postalCode
    }
  }
}
"""

QUERY_PLACES_GQL = """
query QueryPlaces($filter: PlaceFilter) {
  places(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
      address {
        streetAddress
        city
        region
        country
        postalCode
      }
    }
  }
}
"""

UPDATE_PLACE_GQL = """
mutation UpdatePlace($place: PlaceUpdateInput!) {
  updatePlace(place: $place) {
    id
    name
  }
}
"""

COUNT_PRODUCTS_GQL = """
query CountProducts($filter: ProductFilter) {
  countProducts(filter: $filter) {
    count
  }
}
"""

CREATE_PRODUCT_GQL = """
mutation CreateProduct($product: ProductInput!) {
  createProduct(product: $product) {
    id
    name
  }
}
"""

DELETE_ALL_PRODUCTS_GQL = """
mutation DeleteAllProducts($filter: ProductFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllProducts(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_PRODUCT_GQL = """
mutation DeleteProduct($id: ID!) {
  deleteProduct(id: $id) {
    id
    state
  }
}
"""

DELETE_PRODUCTS_GQL = """
mutation DeleteProducts($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteProducts(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_PRODUCT_GQL = """
query GetProduct($id: ID!) {
  product(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
    address {
      streetAddress
      city
      region
      country
      postalCode
    }
    manufacturer
    model
    brand
    upc
    sku
    releaseDate
    productionDate
  }
}
"""

QUERY_PRODUCTS_GQL = """
query QueryProducts($filter: ProductFilter) {
  products(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
      address {
        streetAddress
        city
        region
        country
        postalCode
      }
      manufacturer
      model
      brand
      upc
      sku
      releaseDate
      productionDate
    }
  }
}
"""

UPDATE_PRODUCT_GQL = """
mutation UpdateProduct($product: ProductUpdateInput!) {
  updateProduct(product: $product) {
    id
    name
  }
}
"""

GET_PROJECT_GQL = """
query GetProject {
  project {
    id
    name
    creationDate
    modifiedDate
    state
    environmentType
    platform
    region
    credits
    lastCreditsDate
    workflow {
      id
      name
    }
    specification {
      id
      name
    }
    embeddings {
      textSpecification {
        id
      }
      imageSpecification {
        id
      }
    }
    quota {
      storage
      contents
      credits
      feeds
      posts
      conversations
    }
    callbackUri
  }
}
"""

LOOKUP_CREDITS_GQL = """
query LookupCredits($correlationId: String!) {
  lookupCredits(correlationId: $correlationId) {
    correlationId
    ownerId
    credits
    storageRatio
    computeRatio
    embeddingRatio
    completionRatio
    ingestionRatio
    indexingRatio
    preparationRatio
    extractionRatio
    enrichmentRatio
    publishingRatio
    searchRatio
    conversationRatio
  }
}
"""

LOOKUP_USAGE_GQL = """
query LookupUsage($correlationId: String!) {
  lookupUsage(correlationId: $correlationId) {
    id
    correlationId
    date
    credits
    name
    metric
    workflow
    entityType
    entityId
    projectId
    ownerId
    uri
    duration
    throughput
    contentType
    fileType
    modelService
    modelName
    processorName
    prompt
    promptTokens
    completion
    completionTokens
    tokens
    count
    operation
    operationType
    request
    variables
    response
  }
}
"""

QUERY_CREDITS_GQL = """
query QueryCredits($startDate: DateTime!, $duration: TimeSpan!) {
  credits(startDate: $startDate, duration: $duration) {
    correlationId
    ownerId
    credits
    storageRatio
    computeRatio
    embeddingRatio
    completionRatio
    ingestionRatio
    indexingRatio
    preparationRatio
    extractionRatio
    enrichmentRatio
    publishingRatio
    searchRatio
    conversationRatio
  }
}
"""

QUERY_USAGE_GQL = """
query QueryUsage($startDate: DateTime!, $duration: TimeSpan!, $names: [String!], $offset: Int, $limit: Int) {
  usage(
    startDate: $startDate
    duration: $duration
    names: $names
    offset: $offset
    limit: $limit
  ) {
    id
    correlationId
    date
    credits
    name
    metric
    workflow
    entityType
    entityId
    projectId
    ownerId
    uri
    duration
    throughput
    contentType
    fileType
    modelService
    modelName
    processorName
    prompt
    promptTokens
    completion
    completionTokens
    tokens
    count
    operation
    operationType
    request
    variables
    response
  }
}
"""

UPDATE_PROJECT_GQL = """
mutation UpdateProject($project: ProjectUpdateInput!) {
  updateProject(project: $project) {
    id
    name
  }
}
"""

COUNT_REPOS_GQL = """
query CountRepos($filter: RepoFilter) {
  countRepos(filter: $filter) {
    count
  }
}
"""

CREATE_REPO_GQL = """
mutation CreateRepo($repo: RepoInput!) {
  createRepo(repo: $repo) {
    id
    name
  }
}
"""

DELETE_ALL_REPOS_GQL = """
mutation DeleteAllRepos($filter: RepoFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllRepos(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_REPO_GQL = """
mutation DeleteRepo($id: ID!) {
  deleteRepo(id: $id) {
    id
    state
  }
}
"""

DELETE_REPOS_GQL = """
mutation DeleteRepos($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteRepos(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_REPO_GQL = """
query GetRepo($id: ID!) {
  repo(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
  }
}
"""

QUERY_REPOS_GQL = """
query QueryRepos($filter: RepoFilter) {
  repos(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
    }
  }
}
"""

UPDATE_REPO_GQL = """
mutation UpdateRepo($repo: RepoUpdateInput!) {
  updateRepo(repo: $repo) {
    id
    name
  }
}
"""

MAP_WEB_GQL = """
query MapWeb($uri: URL!, $allowedPaths: [String!], $excludedPaths: [String!], $correlationId: String) {
  mapWeb(
    uri: $uri
    allowedPaths: $allowedPaths
    excludedPaths: $excludedPaths
    correlationId: $correlationId
  ) {
    results
  }
}
"""

SEARCH_WEB_GQL = """
query SearchWeb($text: String!, $service: SearchServiceTypes, $limit: Int, $correlationId: String) {
  searchWeb(
    text: $text
    service: $service
    limit: $limit
    correlationId: $correlationId
  ) {
    results {
      uri
      text
      title
      score
    }
  }
}
"""

COUNT_SOFTWARES_GQL = """
query CountSoftwares($filter: SoftwareFilter) {
  countSoftwares(filter: $filter) {
    count
  }
}
"""

CREATE_SOFTWARE_GQL = """
mutation CreateSoftware($software: SoftwareInput!) {
  createSoftware(software: $software) {
    id
    name
  }
}
"""

DELETE_ALL_SOFTWARES_GQL = """
mutation DeleteAllSoftwares($filter: SoftwareFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllSoftwares(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_SOFTWARE_GQL = """
mutation DeleteSoftware($id: ID!) {
  deleteSoftware(id: $id) {
    id
    state
  }
}
"""

DELETE_SOFTWARES_GQL = """
mutation DeleteSoftwares($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteSoftwares(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_SOFTWARE_GQL = """
query GetSoftware($id: ID!) {
  software(id: $id) {
    id
    name
    alternateNames
    creationDate
    uri
    description
    identifier
    thing
    relevance
    releaseDate
    developer
  }
}
"""

QUERY_SOFTWARES_GQL = """
query QuerySoftwares($filter: SoftwareFilter) {
  softwares(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      uri
      description
      identifier
      thing
      relevance
      releaseDate
      developer
    }
  }
}
"""

UPDATE_SOFTWARE_GQL = """
mutation UpdateSoftware($software: SoftwareUpdateInput!) {
  updateSoftware(software: $software) {
    id
    name
  }
}
"""

COUNT_SPECIFICATIONS_GQL = """
query CountSpecifications($filter: SpecificationFilter) {
  countSpecifications(filter: $filter) {
    count
  }
}
"""

CREATE_SPECIFICATION_GQL = """
mutation CreateSpecification($specification: SpecificationInput!) {
  createSpecification(specification: $specification) {
    id
    name
    state
    type
    serviceType
  }
}
"""

DELETE_ALL_SPECIFICATIONS_GQL = """
mutation DeleteAllSpecifications($filter: SpecificationFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllSpecifications(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_SPECIFICATION_GQL = """
mutation DeleteSpecification($id: ID!) {
  deleteSpecification(id: $id) {
    id
    state
  }
}
"""

DELETE_SPECIFICATIONS_GQL = """
mutation DeleteSpecifications($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteSpecifications(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_SPECIFICATION_GQL = """
query GetSpecification($id: ID!) {
  specification(id: $id) {
    id
    name
    creationDate
    relevance
    owner {
      id
    }
    state
    type
    serviceType
    systemPrompt
    customGuidance
    customInstructions
    searchType
    numberSimilar
    strategy {
      type
      messageLimit
      embedCitations
      flattenCitations
      enableFacets
      disableGuardrails
      messagesWeight
      contentsWeight
    }
    promptStrategy {
      type
    }
    retrievalStrategy {
      type
      contentLimit
      disableFallback
    }
    rerankingStrategy {
      serviceType
      threshold
    }
    graphStrategy {
      type
      generateGraph
      observableLimit
    }
    revisionStrategy {
      type
      customRevision
      count
    }
    azureAI {
      tokenLimit
      completionTokenLimit
      key
      endpoint
      temperature
      probability
      chunkTokenLimit
    }
    openAI {
      tokenLimit
      completionTokenLimit
      model
      key
      endpoint
      modelName
      temperature
      probability
      chunkTokenLimit
    }
    azureOpenAI {
      tokenLimit
      completionTokenLimit
      model
      key
      endpoint
      deploymentName
      temperature
      probability
      chunkTokenLimit
    }
    cohere {
      tokenLimit
      completionTokenLimit
      model
      key
      modelName
      temperature
      probability
      chunkTokenLimit
    }
    anthropic {
      tokenLimit
      completionTokenLimit
      model
      key
      modelName
      temperature
      probability
    }
    google {
      tokenLimit
      completionTokenLimit
      model
      key
      modelName
      temperature
      probability
      chunkTokenLimit
    }
    replicate {
      tokenLimit
      completionTokenLimit
      model
      key
      modelName
      temperature
      probability
    }
    mistral {
      tokenLimit
      completionTokenLimit
      model
      key
      modelName
      endpoint
      temperature
      probability
      chunkTokenLimit
    }
    groq {
      tokenLimit
      completionTokenLimit
      model
      key
      modelName
      endpoint
      temperature
      probability
    }
    cerebras {
      tokenLimit
      completionTokenLimit
      model
      key
      modelName
      endpoint
      temperature
      probability
    }
    deepseek {
      tokenLimit
      completionTokenLimit
      model
      key
      modelName
      temperature
      probability
    }
    jina {
      model
      key
      modelName
      chunkTokenLimit
    }
    voyage {
      model
      key
      modelName
      chunkTokenLimit
    }
  }
}
"""

PROMPT_SPECIFICATIONS_GQL = """
mutation PromptSpecifications($prompt: String!, $ids: [ID!]!) {
  promptSpecifications(prompt: $prompt, ids: $ids) {
    specification {
      id
    }
    messages {
      role
      author
      message
      citations {
        content {
          id
          name
          state
          originalDate
          identifier
          uri
          type
          fileType
          mimeType
          format
          formatName
          fileExtension
          fileName
          fileSize
          masterUri
          imageUri
          textUri
          audioUri
          transcriptUri
          summary
          customSummary
          keywords
          bullets
          headlines
          posts
          chapters
          questions
          video {
            width
            height
            duration
            make
            model
            software
            title
            description
            keywords
            author
          }
          audio {
            keywords
            author
            series
            episode
            episodeType
            season
            publisher
            copyright
            genre
            title
            description
            bitrate
            channels
            sampleRate
            bitsPerSample
            duration
          }
          image {
            width
            height
            resolutionX
            resolutionY
            bitsPerComponent
            components
            projectionType
            orientation
            description
            make
            model
            software
            lens
            focalLength
            exposureTime
            fNumber
            iso
            heading
            pitch
          }
          document {
            title
            subject
            summary
            author
            publisher
            description
            keywords
            pageCount
            worksheetCount
            slideCount
            wordCount
            lineCount
            paragraphCount
            isEncrypted
            hasDigitalSignature
          }
        }
        index
        text
        startTime
        endTime
        pageNumber
        frameNumber
      }
      toolCalls {
        id
        name
        arguments
      }
      tokens
      throughput
      completionTime
      timestamp
      modelService
      model
    }
    error
  }
}
"""

QUERY_SPECIFICATIONS_GQL = """
query QuerySpecifications($filter: SpecificationFilter) {
  specifications(filter: $filter) {
    results {
      id
      name
      creationDate
      relevance
      owner {
        id
      }
      state
      type
      serviceType
      systemPrompt
      customGuidance
      customInstructions
      searchType
      numberSimilar
      strategy {
        type
        messageLimit
        embedCitations
        flattenCitations
        enableFacets
        disableGuardrails
        messagesWeight
        contentsWeight
      }
      promptStrategy {
        type
      }
      retrievalStrategy {
        type
        contentLimit
        disableFallback
      }
      rerankingStrategy {
        serviceType
        threshold
      }
      graphStrategy {
        type
        generateGraph
        observableLimit
      }
      revisionStrategy {
        type
        customRevision
        count
      }
      azureAI {
        tokenLimit
        completionTokenLimit
        key
        endpoint
        temperature
        probability
        chunkTokenLimit
      }
      openAI {
        tokenLimit
        completionTokenLimit
        model
        key
        endpoint
        modelName
        temperature
        probability
        chunkTokenLimit
      }
      azureOpenAI {
        tokenLimit
        completionTokenLimit
        model
        key
        endpoint
        deploymentName
        temperature
        probability
        chunkTokenLimit
      }
      cohere {
        tokenLimit
        completionTokenLimit
        model
        key
        modelName
        temperature
        probability
        chunkTokenLimit
      }
      anthropic {
        tokenLimit
        completionTokenLimit
        model
        key
        modelName
        temperature
        probability
      }
      google {
        tokenLimit
        completionTokenLimit
        model
        key
        modelName
        temperature
        probability
        chunkTokenLimit
      }
      replicate {
        tokenLimit
        completionTokenLimit
        model
        key
        modelName
        temperature
        probability
      }
      mistral {
        tokenLimit
        completionTokenLimit
        model
        key
        modelName
        endpoint
        temperature
        probability
        chunkTokenLimit
      }
      groq {
        tokenLimit
        completionTokenLimit
        model
        key
        modelName
        endpoint
        temperature
        probability
      }
      cerebras {
        tokenLimit
        completionTokenLimit
        model
        key
        modelName
        endpoint
        temperature
        probability
      }
      deepseek {
        tokenLimit
        completionTokenLimit
        model
        key
        modelName
        temperature
        probability
      }
      jina {
        model
        key
        modelName
        chunkTokenLimit
      }
      voyage {
        model
        key
        modelName
        chunkTokenLimit
      }
    }
  }
}
"""

UPDATE_SPECIFICATION_GQL = """
mutation UpdateSpecification($specification: SpecificationUpdateInput!) {
  updateSpecification(specification: $specification) {
    id
    name
    state
    type
    serviceType
  }
}
"""

COUNT_WORKFLOWS_GQL = """
query CountWorkflows($filter: WorkflowFilter) {
  countWorkflows(filter: $filter) {
    count
  }
}
"""

CREATE_WORKFLOW_GQL = """
mutation CreateWorkflow($workflow: WorkflowInput!) {
  createWorkflow(workflow: $workflow) {
    id
    name
    state
    ingestion {
      if {
        types
        fileTypes
        allowedPaths
        excludedPaths
      }
      collections {
        id
      }
    }
    indexing {
      jobs {
        connector {
          type
          contentType
          fileType
        }
      }
    }
    preparation {
      disableSmartCapture
      summarizations {
        type
        specification {
          id
        }
        tokens
        items
        prompt
      }
      jobs {
        connector {
          type
          fileTypes
          azureDocument {
            version
            model
            endpoint
            key
          }
          deepgram {
            model
            key
            enableRedaction
            enableSpeakerDiarization
            detectLanguage
            language
          }
          document {
            includeImages
          }
          email {
            includeAttachments
          }
          modelDocument {
            specification {
              id
            }
          }
        }
      }
    }
    extraction {
      jobs {
        connector {
          type
          contentTypes
          fileTypes
          extractedTypes
          extractedCount
          azureText {
            confidenceThreshold
            enablePII
          }
          azureImage {
            confidenceThreshold
          }
          modelImage {
            specification {
              id
            }
          }
          modelText {
            specification {
              id
            }
          }
        }
      }
    }
    enrichment {
      link {
        enableCrawling
        allowedDomains
        excludedDomains
        allowedPaths
        excludedPaths
        allowedLinks
        excludedLinks
        allowedFiles
        excludedFiles
        allowContentDomain
        maximumLinks
      }
      jobs {
        connector {
          type
          enrichedTypes
          fhir {
            endpoint
          }
        }
      }
    }
    actions {
      connector {
        type
        uri
        slack {
          token
          channel
        }
      }
    }
  }
}
"""

DELETE_ALL_WORKFLOWS_GQL = """
mutation DeleteAllWorkflows($filter: WorkflowFilter, $isSynchronous: Boolean, $correlationId: String) {
  deleteAllWorkflows(
    filter: $filter
    isSynchronous: $isSynchronous
    correlationId: $correlationId
  ) {
    id
    state
  }
}
"""

DELETE_WORKFLOW_GQL = """
mutation DeleteWorkflow($id: ID!) {
  deleteWorkflow(id: $id) {
    id
    state
  }
}
"""

DELETE_WORKFLOWS_GQL = """
mutation DeleteWorkflows($ids: [ID!]!, $isSynchronous: Boolean) {
  deleteWorkflows(ids: $ids, isSynchronous: $isSynchronous) {
    id
    state
  }
}
"""

GET_WORKFLOW_GQL = """
query GetWorkflow($id: ID!) {
  workflow(id: $id) {
    id
    name
    creationDate
    relevance
    owner {
      id
    }
    state
    ingestion {
      if {
        types
        fileTypes
        allowedPaths
        excludedPaths
      }
      collections {
        id
      }
    }
    indexing {
      jobs {
        connector {
          type
          contentType
          fileType
        }
      }
    }
    preparation {
      disableSmartCapture
      summarizations {
        type
        specification {
          id
        }
        tokens
        items
        prompt
      }
      jobs {
        connector {
          type
          fileTypes
          azureDocument {
            version
            model
            endpoint
            key
          }
          deepgram {
            model
            key
            enableRedaction
            enableSpeakerDiarization
            detectLanguage
            language
          }
          document {
            includeImages
          }
          email {
            includeAttachments
          }
          modelDocument {
            specification {
              id
            }
          }
        }
      }
    }
    extraction {
      jobs {
        connector {
          type
          contentTypes
          fileTypes
          extractedTypes
          extractedCount
          azureText {
            confidenceThreshold
            enablePII
          }
          azureImage {
            confidenceThreshold
          }
          modelImage {
            specification {
              id
            }
          }
          modelText {
            specification {
              id
            }
          }
        }
      }
    }
    enrichment {
      link {
        enableCrawling
        allowedDomains
        excludedDomains
        allowedPaths
        excludedPaths
        allowedLinks
        excludedLinks
        allowedFiles
        excludedFiles
        allowContentDomain
        maximumLinks
      }
      jobs {
        connector {
          type
          enrichedTypes
          fhir {
            endpoint
          }
        }
      }
    }
    actions {
      connector {
        type
        uri
        slack {
          token
          channel
        }
      }
    }
  }
}
"""

QUERY_WORKFLOWS_GQL = """
query QueryWorkflows($filter: WorkflowFilter) {
  workflows(filter: $filter) {
    results {
      id
      name
      creationDate
      relevance
      owner {
        id
      }
      state
      ingestion {
        if {
          types
          fileTypes
          allowedPaths
          excludedPaths
        }
        collections {
          id
        }
      }
      indexing {
        jobs {
          connector {
            type
            contentType
            fileType
          }
        }
      }
      preparation {
        disableSmartCapture
        summarizations {
          type
          specification {
            id
          }
          tokens
          items
          prompt
        }
        jobs {
          connector {
            type
            fileTypes
            azureDocument {
              version
              model
              endpoint
              key
            }
            deepgram {
              model
              key
              enableRedaction
              enableSpeakerDiarization
              detectLanguage
              language
            }
            document {
              includeImages
            }
            email {
              includeAttachments
            }
            modelDocument {
              specification {
                id
              }
            }
          }
        }
      }
      extraction {
        jobs {
          connector {
            type
            contentTypes
            fileTypes
            extractedTypes
            extractedCount
            azureText {
              confidenceThreshold
              enablePII
            }
            azureImage {
              confidenceThreshold
            }
            modelImage {
              specification {
                id
              }
            }
            modelText {
              specification {
                id
              }
            }
          }
        }
      }
      enrichment {
        link {
          enableCrawling
          allowedDomains
          excludedDomains
          allowedPaths
          excludedPaths
          allowedLinks
          excludedLinks
          allowedFiles
          excludedFiles
          allowContentDomain
          maximumLinks
        }
        jobs {
          connector {
            type
            enrichedTypes
            fhir {
              endpoint
            }
          }
        }
      }
      actions {
        connector {
          type
          uri
          slack {
            token
            channel
          }
        }
      }
    }
  }
}
"""

UPDATE_WORKFLOW_GQL = """
mutation UpdateWorkflow($workflow: WorkflowUpdateInput!) {
  updateWorkflow(workflow: $workflow) {
    id
    name
    state
    ingestion {
      if {
        types
        fileTypes
        allowedPaths
        excludedPaths
      }
      collections {
        id
      }
    }
    indexing {
      jobs {
        connector {
          type
          contentType
          fileType
        }
      }
    }
    preparation {
      disableSmartCapture
      summarizations {
        type
        specification {
          id
        }
        tokens
        items
        prompt
      }
      jobs {
        connector {
          type
          fileTypes
          azureDocument {
            version
            model
            endpoint
            key
          }
          deepgram {
            model
            key
            enableRedaction
            enableSpeakerDiarization
            detectLanguage
            language
          }
          document {
            includeImages
          }
          email {
            includeAttachments
          }
          modelDocument {
            specification {
              id
            }
          }
        }
      }
    }
    extraction {
      jobs {
        connector {
          type
          contentTypes
          fileTypes
          extractedTypes
          extractedCount
          azureText {
            confidenceThreshold
            enablePII
          }
          azureImage {
            confidenceThreshold
          }
          modelImage {
            specification {
              id
            }
          }
          modelText {
            specification {
              id
            }
          }
        }
      }
    }
    enrichment {
      link {
        enableCrawling
        allowedDomains
        excludedDomains
        allowedPaths
        excludedPaths
        allowedLinks
        excludedLinks
        allowedFiles
        excludedFiles
        allowContentDomain
        maximumLinks
      }
      jobs {
        connector {
          type
          enrichedTypes
          fhir {
            endpoint
          }
        }
      }
    }
    actions {
      connector {
        type
        uri
        slack {
          token
          channel
        }
      }
    }
  }
}
"""
