export type ParentKey = {
  parentType: string
  parentId: string
}

export type MessageAuthorType = 'staff' | 'customer' | 'system'

export type PostMessageInput = {
  authorType: MessageAuthorType
  body: string
  visibility?: string
}

export type SupportMessage = {
  id: string
  parentType: string
  parentId: string
  authorType: string
  body: string
  visibility: string | null
  createdAt: Date
}

export type AppendTransitionInput = {
  fromStatus: string
  toStatus: string
  actorId: string
  reason?: string
  at?: Date
}

export type SupportStateTransition = {
  id: string
  parentType: string
  parentId: string
  fromStatus: string
  toStatus: string
  actorId: string
  reason: string | null
  at: Date
}

export type AddAttachmentInput = {
  objectKey: string
  fileName?: string
  mimeType?: string
}

export type SupportAttachment = {
  id: string
  parentType: string
  parentId: string
  objectKey: string
  fileName: string | null
  mimeType: string | null
  createdAt: Date
}
