scalar UUID
scalar DateTime

type EmailThreadReceipt {
  threadId: ID!
  teamId: ID!
  isUnread: Boolean
}

type EmailReceipt {
  emailId: ID!
  readReceipt: DateTime
}

type ReadReceiptType {
  actionLogId: ID!
  readReceipt: DateTime
}

type ChannelReceipt {
  teamId: ID!
  isUnread: Boolean
  id: ID!
}

type MutationResult {
  operationDone: Boolean
}

type Query {
  noopReceipt: MutationResult
}

type Mutation {
  writeReadReceipt(actionLogId: ID!): ReadReceiptType
  writeReadReceiptEmail(emailId: ID!): EmailReceipt
  setIsUnreadEmailThread(
    threadId: ID!
    teamId: ID!
    isUnread: Boolean!
  ): MutationResult
  setIsUnreadChannel(
    channelId: ID!
    teamId: ID!
    isUnread: Boolean!
  ): MutationResult
}

type ActionLogType {
    readReceipt: DateTime
}
type DefinitionChannelType {
    readReceipt: [ChannelReceipt!]!
}
type EmailThreadType {
    readReceipt: [EmailThreadReceipt!]!
}
type EmailType {
    readReceipt: DateTime
}