type MutationResult {
  operationDone: Boolean
}

scalar UUID

type Query {
  getEmailDraft(
    teamId: ID!
    instructor: Boolean!
    emailThreadId: ID
  ): EmailDraftType
  getEmailDrafts(teamId: ID!, instructor: Boolean!): [EmailDraftType]
}

type Mutation {
  setEmailDraft(emailDraft: EmailDraftInput!): EmailDraftType
  deleteEmailDraft(
    teamId: ID!
    instructor: Boolean!
    emailThreadId: ID
  ): MutationResult
}

type EmailDraftType {
  teamId: String!
  instructor: Boolean!
  emailThreadId: String
  senderAddress: String
  content: String
  activateMilestone: String
  deactivateMilestone: String
  fileId: UUID
  selectedContacts: [String]
  subject: String
  templateId: String
}

input EmailDraftInput {
  teamId: String!
  instructor: Boolean!
  emailThreadId: String
  senderAddress: String
  content: String
  activateMilestone: String
  deactivateMilestone: String
  fileId: UUID
  selectedContacts: [String]
  subject: String
  templateId: String
}
