scalar UUID
scalar DateTime
interface UnreadReceipt {
  teamId: ID!
  isUnread: Boolean
  id: ID!
}
type TeamChannelReceipt implements UnreadReceipt {
  teamId: ID!
  isUnread: Boolean
  id: ID!
}

type Query {
  readReceipt(id: ID!): ActionLogType
  channelId(channelId: ID!): DefinitionChannelType
  email(id: ID!): EmailType
}
type Mutation {
  writeReadReceipt(actionLogId: ID!): ActionLogType
  writeReadReceiptEmail(emailId: ID!): EmailType
  setIsUnreadChannel(
    channelId: ID!
    teamId: ID!
    isUnread: Boolean!
  ): DefinitionChannelType
}

type ActionLogType {
  id: ID!
  readReceipt: DateTime
}
type DefinitionChannelType {
  id: ID!
  readReceipt: [TeamChannelReceipt!]!
}
type EmailType {
  id: ID!
  readReceipt: DateTime
}
