# Comment events are generated by staff members of a shop.
# They are created when a staff member adds a comment to the timeline of an order, draft order, customer, or transfer.
type CommentEvent implements Event&Node {
    # The name of the app that created the event.
    appTitle: String

    # The attachments associated with the comment event.
    attachments: [CommentEventAttachment!]!

    # Whether the event was created by an app.
    attributeToApp: Boolean!

    # Whether the event was caused by an admin user.
    attributeToUser: Boolean!

    # The name of the user that authored the comment event.
    author: StaffMember!

    # Whether the comment event can be deleted. If true, then the comment event can be deleted.
    canDelete: Boolean!

    # Whether the comment event can be edited. If true, then the comment event can be edited.
    canEdit: Boolean!

    # The date and time when the event was created.
    createdAt: DateTime!

    # Whether the event is critical.
    criticalAlert: Boolean!

    # Whether the comment event has been edited. If true, then the comment event has been edited.
    edited: Boolean!

    # The object reference associated with the comment event. For example, a product or discount).
    embed: CommentEventEmbed

    # A globally-unique identifier.
    id: ID!

    # Human readable text that describes the event.
    message: FormattedString!

    # The raw body of the comment event.
    rawMessage: String!

    # The parent subject to which the comment event belongs.
    subject: CommentEventSubject!
}

# A file attachment associated to a comment event.
type CommentEventAttachment {
    # The file extension of the comment event attachment, indicating the file format.
    fileExtension: String

    # A globally-unique identifier.
    id: ID!

    # The image attached to the comment event.
    image: Image

    # The filename of the comment event attachment.
    name: String!

    # The size of the attachment.
    size: Int!

    # The URL of the attachment.
    url: URL!
}
