teamwire_api/notifications¶
Notification event payload objects for Teamwire SDK events.
NotificationInfoBase¶
Base DTO for notification events.
ChatMemberChangeInfo¶
It contains information about changes to the members of a chat
It is used with the following events:
Events.CHAT_JOINED: the bot was added to a chatEvents.CHAT_MEMBERS_ADDED: direct users, circles or roles were added to a chatEvents.CHAT_MEMBERS_REMOVED: direct users, circles or roles were removed from a chatEvents.CIRCLES_DELETED: circles were deleted and removed from the chatEvents.ROLES_JOINED: a user joined one or more roles in the chatEvents.ROLES_LEFT: a user left one or more roles in the chatEvents.ROLE_USERS_REMOVED: users were removed from a role in the chatEvents.ROLES_DELETED: roles were deleted and removed from the chatEvents.CHAT_DELETED: the bot lost access to the chat
Attributes
chat: Chat object. The chat this event refers tousers: list of User objects. The users affected by the eventcircles: list of Group objects. The circles affected by the eventroles: list of Role objects. The roles affected by the eventeditor: User object. The user who initiated the operation
CircleMemberUpdateInfo¶
It contains information about changes to the members of a circle
It is used with the following events:
Events.CIRCLE_USERS_ADDED: users were added to a circle that is a member of the chatEvents.CIRCLE_USERS_REMOVED: users were removed from a circle that is a member of the chat
Attributes
chat: Chat object. The chat this event refers tousers: list of User objects. The users affected by the eventcircles: one-element list of Group objects. The affected circle
ChatChangeInfo¶
It contains information about chat creation, or changes to the title or administrators of a chat
It is used with the following events:
Events.CHAT_CREATED: Event triggered when a new chat is created. Thechatattribute will contain the newly created chatEvents.CHAT_TITLE_CHANGED: Event triggered when the title of the chat has been changed. The 'title' attribute will contain the new title of the chatEvents.CHAT_ADMINS_CHANGED: Event triggered when the administrators list of the chat has been changed. Theadded_adminsand theremoved_adminsattributes will respectively contain the lists of users that bacame admins or that were removed from adminsEvents.CHAT_ALLOW_SENDING_CHANGED: Event triggered when theallow_sendingproperty of the chat has been changed. Theallow_sendingattribute will contain the new valueEvents.CHAT_IS_CLOSED_CHANGED: Event triggered when theis_closedproperty of the chat has been changed. Theis_closedattribute will contain the new value
Attributes
chat: Chat object. The chat this event refers totitle: unicode (None if not present). The new title of the chatadded_admins: list of User objects. The users that were made chat administratorsremoved_admins: list of User objects. The users that were removed from the chat administratorsallow_sending: boolean. Whether other members of the chat can send messagesis_closed: boolean. Whether the chat has been closed or reopenededitor: User object. The user who initiated the operation
MessageDeletedInfo¶
It contains information about the deletion of a message
It is used with the following events:
Events.MESSAGE_DELETED: Event triggered when a message is deleted from a chat
Attributes
chat: Chat object. The chat this event refers tomessage_id: unicode. The id of the deleted messageeditor: User object. The chat admin who deleted the message, or None if the message was deleted by its sender
MessageReadInfo¶
It contains information about a read-receipt update
It is used with the following events:
Events.MESSAGE_READ: Event triggered when someone has read the latest messages in a chat
Attributes