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

__all__ = [
    "ADD_CONTENTS_TO_COLLECTIONS_GQL",
    "CLEAR_CONVERSATION_GQL",
    "CLOSE_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_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_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_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_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",
    "DISABLE_ALERT_GQL",
    "DISABLE_FEED_GQL",
    "ENABLE_ALERT_GQL",
    "ENABLE_FEED_GQL",
    "EXTRACT_CONTENTS_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_ORGANIZATION_GQL",
    "GET_PERSON_GQL",
    "GET_PLACE_GQL",
    "GET_PRODUCT_GQL",
    "GET_PROJECT_GQL",
    "GET_REPO_GQL",
    "GET_SOFTWARE_GQL",
    "GET_SPECIFICATION_GQL",
    "GET_WORKFLOW_GQL",
    "INGEST_ENCODED_FILE_GQL",
    "INGEST_TEXT_GQL",
    "INGEST_URI_GQL",
    "IS_CONTENT_DONE_GQL",
    "IS_FEED_DONE_GQL",
    "LOOKUP_CREDITS_GQL",
    "LOOKUP_USAGE_GQL",
    "PROMPT_CONVERSATION_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_ORGANIZATIONS_GQL",
    "QUERY_PERSONS_GQL",
    "QUERY_PLACES_GQL",
    "QUERY_PRODUCTS_GQL",
    "QUERY_REPOS_GQL",
    "QUERY_SOFTWARES_GQL",
    "QUERY_SPECIFICATIONS_GQL",
    "QUERY_USAGE_GQL",
    "QUERY_WORKFLOWS_GQL",
    "REMOVE_CONTENTS_FROM_COLLECTION_GQL",
    "SUGGEST_CONVERSATION_GQL",
    "SUMMARIZE_CONTENTS_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_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
    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
      }
    }
    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
      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
        }
      }
      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
  }
}
"""

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

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
    owner {
      id
    }
    state
    type
    contents {
      id
      name
    }
  }
}
"""

QUERY_COLLECTIONS_GQL = """
query QueryCollections($filter: CollectionFilter) {
  collections(filter: $filter) {
    results {
      id
      name
      creationDate
      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
  }
}
"""

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

GET_CONTENT_GQL = """
query GetContent($id: ID!) {
  content(id: $id) {
    id
    name
    creationDate
    owner {
      id
    }
    state
    originalDate
    finishedDate
    workflowDuration
    uri
    description
    markdown
    address {
      streetAddress
      city
      region
      country
      postalCode
    }
    location {
      latitude
      longitude
    }
    type
    fileType
    mimeType
    fileName
    fileSize
    masterUri
    imageUri
    textUri
    audioUri
    transcriptUri
    video {
      width
      height
      duration
      make
      model
      software
      title
      description
      keywords
      author
    }
    audio {
      keywords
      author
      series
      episode
      episodeType
      season
      publisher
      copyright
      language
      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
    }
    parent {
      id
      name
    }
    children {
      id
      name
    }
    feed {
      id
      name
    }
    collections {
      id
      name
    }
    links {
      uri
      linkType
    }
    observations {
      id
      type
      observable {
        id
        name
      }
      occurrences {
        type
        confidence
        startTime
        endTime
        pageIndex
        boundingBox {
          left
          top
          width
          height
        }
      }
      state
    }
    workflow {
      id
      name
    }
    pages {
      index
      chunks {
        index
        pageIndex
        rowIndex
        columnIndex
        confidence
        text
        role
        relevance
      }
    }
    segments {
      startTime
      endTime
      text
      relevance
    }
    error
  }
}
"""

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_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
      owner {
        id
      }
      state
      originalDate
      finishedDate
      workflowDuration
      uri
      description
      markdown
      address {
        streetAddress
        city
        region
        country
        postalCode
      }
      location {
        latitude
        longitude
      }
      type
      fileType
      mimeType
      fileName
      fileSize
      masterUri
      imageUri
      textUri
      audioUri
      transcriptUri
      video {
        width
        height
        duration
        make
        model
        software
        title
        description
        keywords
        author
      }
      audio {
        keywords
        author
        series
        episode
        episodeType
        season
        publisher
        copyright
        language
        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
      }
      parent {
        id
        name
      }
      children {
        id
        name
      }
      feed {
        id
        name
      }
      collections {
        id
        name
      }
      links {
        uri
        linkType
      }
      observations {
        id
        type
        observable {
          id
          name
        }
        occurrences {
          type
          confidence
          startTime
          endTime
          pageIndex
          boundingBox {
            left
            top
            width
            height
          }
        }
        state
      }
      workflow {
        id
        name
      }
      pages {
        index
        chunks {
          index
          pageIndex
          rowIndex
          columnIndex
          confidence
          text
          role
          relevance
        }
      }
      segments {
        startTime
        endTime
        text
        relevance
      }
      error
    }
  }
}
"""

QUERY_CONTENTS_FACETS_GQL = """
query QueryContentsFacets($filter: ContentFilter!, $facets: [ContentFacetInput!]) {
  contents(filter: $filter, facets: $facets) {
    results {
      id
      name
      creationDate
      owner {
        id
      }
      state
      originalDate
      finishedDate
      workflowDuration
      uri
      description
      markdown
      address {
        streetAddress
        city
        region
        country
        postalCode
      }
      location {
        latitude
        longitude
      }
      type
      fileType
      mimeType
      fileName
      fileSize
      masterUri
      imageUri
      textUri
      audioUri
      transcriptUri
      video {
        width
        height
        duration
        make
        model
        software
        title
        description
        keywords
        author
      }
      audio {
        keywords
        author
        series
        episode
        episodeType
        season
        publisher
        copyright
        language
        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
      }
      parent {
        id
        name
      }
      children {
        id
        name
      }
      feed {
        id
        name
      }
      collections {
        id
        name
      }
      links {
        uri
        linkType
      }
      observations {
        id
        type
        observable {
          id
          name
        }
        occurrences {
          type
          confidence
          startTime
          endTime
          pageIndex
          boundingBox {
            left
            top
            width
            height
          }
        }
        state
      }
      workflow {
        id
        name
      }
      pages {
        index
        chunks {
          index
          pageIndex
          rowIndex
          columnIndex
          confidence
          text
          role
          relevance
        }
      }
      segments {
        startTime
        endTime
        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
      }
    }
  }
}
"""

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
  }
}
"""

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
  }
}
"""

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
  }
}
"""

GET_CONVERSATION_GQL = """
query GetConversation($id: ID!) {
  conversation(id: $id) {
    id
    name
    creationDate
    owner {
      id
    }
    state
    correlationId
    type
    messages {
      role
      author
      message
      citations {
        content {
          id
          name
          state
          type
          fileType
          fileName
          originalDate
          uri
        }
        index
        text
        startTime
        endTime
        pageNumber
        frameNumber
      }
      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
      }
    }
  }
}
"""

PROMPT_CONVERSATION_GQL = """
mutation PromptConversation($prompt: String!, $id: ID, $correlationId: String) {
  promptConversation(prompt: $prompt, id: $id, correlationId: $correlationId) {
    conversation {
      id
    }
    message {
      role
      author
      message
      citations {
        content {
          id
          name
          state
          type
          fileType
          fileName
          originalDate
          uri
        }
        index
        text
        startTime
        endTime
        pageNumber
        frameNumber
      }
      tokens
      throughput
      completionTime
      timestamp
      modelService
      model
    }
    messageCount
    facets {
      type
      value
      range {
        from
        to
      }
      count
      facet
      observable {
        type
        observable {
          id
          name
        }
      }
    }
  }
}
"""

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
      owner {
        id
      }
      state
      correlationId
      type
      messages {
        role
        author
        message
        citations {
          content {
            id
            name
            state
            type
            fileType
            fileName
            originalDate
            uri
          }
          index
          text
          startTime
          endTime
          pageNumber
          frameNumber
        }
        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
        }
      }
    }
  }
}
"""

SUGGEST_CONVERSATION_GQL = """
mutation SuggestConversation($id: ID!, $count: Int, $correlationId: String) {
  suggestConversation(id: $id, count: $count, 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
    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
      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
    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
        tenantId
        refreshToken
      }
      oneDrive {
        folderId
        refreshToken
      }
      googleDrive {
        folderId
        refreshToken
      }
    }
    email {
      type
      includeAttachments
      google {
        type
        refreshToken
      }
      microsoft {
        type
        tenantId
        refreshToken
      }
    }
    issue {
      type
      includeAttachments
      jira {
        uri
        project
        email
        token
      }
      linear {
        key
        project
      }
      github {
        uri
        repositoryOwner
        repositoryName
        refreshToken
        personalAccessToken
      }
    }
    rss {
      readLimit
      uri
    }
    web {
      readLimit
      uri
      includeFiles
    }
    reddit {
      readLimit
      subredditName
    }
    notion {
      readLimit
      token
      identifiers
      type
    }
    youtube {
      readLimit
      type
      videoName
      videoIdentifiers
      channelIdentifier
      playlistIdentifier
    }
    slack {
      readLimit
      type
      token
      channel
      includeAttachments
    }
    discord {
      readLimit
      type
      token
      channel
      includeAttachments
    }
    error
    lastPostDate
    lastReadDate
    readCount
    workflow {
      id
      name
    }
    schedulePolicy {
      recurrenceType
      repeatInterval
    }
  }
}
"""

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
      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
          tenantId
          refreshToken
        }
        oneDrive {
          folderId
          refreshToken
        }
        googleDrive {
          folderId
          refreshToken
        }
      }
      email {
        type
        includeAttachments
        google {
          type
          refreshToken
        }
        microsoft {
          type
          tenantId
          refreshToken
        }
      }
      issue {
        type
        includeAttachments
        jira {
          uri
          project
          email
          token
        }
        linear {
          key
          project
        }
        github {
          uri
          repositoryOwner
          repositoryName
          refreshToken
          personalAccessToken
        }
      }
      rss {
        readLimit
        uri
      }
      web {
        readLimit
        uri
        includeFiles
      }
      reddit {
        readLimit
        subredditName
      }
      notion {
        readLimit
        token
        identifiers
        type
      }
      youtube {
        readLimit
        type
        videoName
        videoIdentifiers
        channelIdentifier
        playlistIdentifier
      }
      slack {
        readLimit
        type
        token
        channel
        includeAttachments
      }
      discord {
        readLimit
        type
        token
        channel
        includeAttachments
      }
      error
      lastPostDate
      lastReadDate
      readCount
      workflow {
        id
        name
      }
      schedulePolicy {
        recurrenceType
        repeatInterval
      }
    }
  }
}
"""

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
  }
}
"""

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

UPDATE_LABEL_GQL = """
mutation UpdateLabel($label: LabelUpdateInput!) {
  updateLabel(label: $label) {
    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
    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
      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
    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
      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
    address {
      streetAddress
      city
      region
      country
      postalCode
    }
  }
}
"""

QUERY_PLACES_GQL = """
query QueryPlaces($filter: PlaceFilter) {
  places(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      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
    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
      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
    workflow {
      id
      name
    }
    specification {
      id
      name
    }
    quota {
      storage
      contents
      feeds
      posts
      conversations
    }
    callbackUri
  }
}
"""

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

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

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

QUERY_USAGE_GQL = """
query QueryUsage($startDate: DateTime!, $duration: TimeSpan!) {
  usage(startDate: $startDate, duration: $duration) {
    correlationId
    date
    credits
    name
    metric
    workflow
    entityType
    entityId
    projectId
    ownerId
    uri
    duration
    throughput
    contentType
    fileType
    modelService
    modelName
    processorName
    prompt
    promptTokens
    completion
    completionTokens
    tokens
    count
    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
  }
}
"""

QUERY_REPOS_GQL = """
query QueryRepos($filter: RepoFilter) {
  repos(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
    }
  }
}
"""

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

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
    releaseDate
    developer
  }
}
"""

QUERY_SOFTWARES_GQL = """
query QuerySoftwares($filter: SoftwareFilter) {
  softwares(filter: $filter) {
    results {
      id
      name
      alternateNames
      creationDate
      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
    owner {
      id
    }
    state
    type
    serviceType
    systemPrompt
    customGuidance
    customInstructions
    searchType
    numberSimilar
    strategy {
      type
      messageLimit
      embedCitations
      enableFacets
      messagesWeight
      contentsWeight
    }
    promptStrategy {
      type
    }
    retrievalStrategy {
      type
      contentLimit
    }
    rerankingStrategy {
      serviceType
    }
    openAI {
      tokenLimit
      completionTokenLimit
      model
      key
      modelName
      temperature
      probability
    }
    azureOpenAI {
      tokenLimit
      completionTokenLimit
      model
      key
      endpoint
      deploymentName
      temperature
      probability
    }
    cohere {
      tokenLimit
      completionTokenLimit
      model
      key
      modelName
      temperature
      probability
    }
    anthropic {
      tokenLimit
      completionTokenLimit
      model
      key
      modelName
      temperature
      probability
    }
    replicate {
      tokenLimit
      completionTokenLimit
      model
      key
      modelName
      temperature
      probability
    }
    tools {
      name
      description
      schema
      uri
    }
  }
}
"""

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
          type
          fileType
          fileName
          originalDate
          uri
        }
        index
        text
        startTime
        endTime
        pageNumber
        frameNumber
      }
      tokens
      throughput
      completionTime
      timestamp
      modelService
      model
    }
    error
  }
}
"""

QUERY_SPECIFICATIONS_GQL = """
query QuerySpecifications($filter: SpecificationFilter) {
  specifications(filter: $filter) {
    results {
      id
      name
      creationDate
      owner {
        id
      }
      state
      type
      serviceType
      systemPrompt
      customGuidance
      customInstructions
      searchType
      numberSimilar
      strategy {
        type
        messageLimit
        embedCitations
        enableFacets
        messagesWeight
        contentsWeight
      }
      promptStrategy {
        type
      }
      retrievalStrategy {
        type
        contentLimit
      }
      rerankingStrategy {
        serviceType
      }
      openAI {
        tokenLimit
        completionTokenLimit
        model
        key
        modelName
        temperature
        probability
      }
      azureOpenAI {
        tokenLimit
        completionTokenLimit
        model
        key
        endpoint
        deploymentName
        temperature
        probability
      }
      cohere {
        tokenLimit
        completionTokenLimit
        model
        key
        modelName
        temperature
        probability
      }
      anthropic {
        tokenLimit
        completionTokenLimit
        model
        key
        modelName
        temperature
        probability
      }
      replicate {
        tokenLimit
        completionTokenLimit
        model
        key
        modelName
        temperature
        probability
      }
      tools {
        name
        description
        schema
        uri
      }
    }
  }
}
"""

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
      }
      collections {
        id
      }
    }
    preparation {
      disableSmartCapture
      summarizations {
        type
        specification {
          id
        }
        tokens
        items
      }
      jobs {
        connector {
          type
          fileTypes
          azureDocument {
            model
          }
          deepgram {
            model
            key
            enableRedaction
            enableSpeakerDiarization
          }
          document {
            includeImages
          }
          email {
            includeAttachments
          }
        }
      }
    }
    extraction {
      jobs {
        connector {
          type
          contentTypes
          fileTypes
          extractedTypes
          azureText {
            confidenceThreshold
            enablePII
          }
          azureImage {
            confidenceThreshold
          }
          openAIImage {
            confidenceThreshold
            detailLevel
            customInstructions
          }
          modelText {
            specification {
              id
            }
          }
        }
      }
    }
    enrichment {
      link {
        enableCrawling
        allowedDomains
        excludedDomains
        allowedLinks
        excludedLinks
        allowedFiles
        excludedFiles
        allowContentDomain
        maximumLinks
      }
      jobs {
        connector {
          type
          enrichedTypes
        }
      }
    }
    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
    owner {
      id
    }
    state
    ingestion {
      if {
        types
        fileTypes
      }
      collections {
        id
      }
    }
    preparation {
      disableSmartCapture
      summarizations {
        type
        specification {
          id
        }
        tokens
        items
      }
      jobs {
        connector {
          type
          fileTypes
          azureDocument {
            model
          }
          deepgram {
            model
            key
            enableRedaction
            enableSpeakerDiarization
          }
          document {
            includeImages
          }
          email {
            includeAttachments
          }
        }
      }
    }
    extraction {
      jobs {
        connector {
          type
          contentTypes
          fileTypes
          extractedTypes
          azureText {
            confidenceThreshold
            enablePII
          }
          azureImage {
            confidenceThreshold
          }
          openAIImage {
            confidenceThreshold
            detailLevel
            customInstructions
          }
          modelText {
            specification {
              id
            }
          }
        }
      }
    }
    enrichment {
      link {
        enableCrawling
        allowedDomains
        excludedDomains
        allowedLinks
        excludedLinks
        allowedFiles
        excludedFiles
        allowContentDomain
        maximumLinks
      }
      jobs {
        connector {
          type
          enrichedTypes
        }
      }
    }
    actions {
      connector {
        type
        uri
        slack {
          token
          channel
        }
      }
    }
  }
}
"""

QUERY_WORKFLOWS_GQL = """
query QueryWorkflows($filter: WorkflowFilter) {
  workflows(filter: $filter) {
    results {
      id
      name
      creationDate
      owner {
        id
      }
      state
      ingestion {
        if {
          types
          fileTypes
        }
        collections {
          id
        }
      }
      preparation {
        disableSmartCapture
        summarizations {
          type
          specification {
            id
          }
          tokens
          items
        }
        jobs {
          connector {
            type
            fileTypes
            azureDocument {
              model
            }
            deepgram {
              model
              key
              enableRedaction
              enableSpeakerDiarization
            }
            document {
              includeImages
            }
            email {
              includeAttachments
            }
          }
        }
      }
      extraction {
        jobs {
          connector {
            type
            contentTypes
            fileTypes
            extractedTypes
            azureText {
              confidenceThreshold
              enablePII
            }
            azureImage {
              confidenceThreshold
            }
            openAIImage {
              confidenceThreshold
              detailLevel
              customInstructions
            }
            modelText {
              specification {
                id
              }
            }
          }
        }
      }
      enrichment {
        link {
          enableCrawling
          allowedDomains
          excludedDomains
          allowedLinks
          excludedLinks
          allowedFiles
          excludedFiles
          allowContentDomain
          maximumLinks
        }
        jobs {
          connector {
            type
            enrichedTypes
          }
        }
      }
      actions {
        connector {
          type
          uri
          slack {
            token
            channel
          }
        }
      }
    }
  }
}
"""

UPDATE_WORKFLOW_GQL = """
mutation UpdateWorkflow($workflow: WorkflowUpdateInput!) {
  updateWorkflow(workflow: $workflow) {
    id
    name
    state
    ingestion {
      if {
        types
        fileTypes
      }
      collections {
        id
      }
    }
    preparation {
      disableSmartCapture
      summarizations {
        type
        specification {
          id
        }
        tokens
        items
      }
      jobs {
        connector {
          type
          fileTypes
          azureDocument {
            model
          }
          deepgram {
            model
            key
            enableRedaction
            enableSpeakerDiarization
          }
          document {
            includeImages
          }
          email {
            includeAttachments
          }
        }
      }
    }
    extraction {
      jobs {
        connector {
          type
          contentTypes
          fileTypes
          extractedTypes
          azureText {
            confidenceThreshold
            enablePII
          }
          azureImage {
            confidenceThreshold
          }
          openAIImage {
            confidenceThreshold
            detailLevel
            customInstructions
          }
          modelText {
            specification {
              id
            }
          }
        }
      }
    }
    enrichment {
      link {
        enableCrawling
        allowedDomains
        excludedDomains
        allowedLinks
        excludedLinks
        allowedFiles
        excludedFiles
        allowContentDomain
        maximumLinks
      }
      jobs {
        connector {
          type
          enrichedTypes
        }
      }
    }
    actions {
      connector {
        type
        uri
        slack {
          token
          channel
        }
      }
    }
  }
}
"""
