Skip to content

[Feature in SDK]: add support for im scope #422

@mesilov

Description

@mesilov

Description

Add SDK support for the im REST API scope: https://apidocs.bitrix24.com/api-reference/chats/index.html

Below is the full list of im.* methods grouped by proposed services at
src/Services/IM/<SubScope>/Service/<Name>.php. Already implemented in the SDK is checked.

Total methods: 61. Implemented: 6. Remaining: 55.

IM\Chat\Service\Chat — 8 methods

  • im.chat.add — create a new chat
  • im.chat.get — get chat id by related object type and id
  • im.chat.leave — remove the current user from the chat
  • im.chat.mute — mute/unmute notifications in a chat
  • im.chat.setOwner — change chat owner
  • im.chat.updateAvatar — update chat avatar
  • im.chat.updateColor — update chat color (mobile app)
  • im.chat.updateTitle — update chat title

IM\Chat\Service\ChatUser — 3 methods

  • im.chat.user.add — add participants to a chat
  • im.chat.user.delete — remove a participant from a chat
  • im.chat.user.list — list participant ids of a chat

IM\Dialog\Service\Dialog — 8 methods

  • im.dialog.get — get chat/dialog information
  • im.dialog.messages.get — get messages of a dialog
  • im.dialog.messages.search — search messages in a chat
  • im.dialog.read — mark as read up to a given message
  • im.dialog.read.all — mark all chats of the current user as read
  • im.dialog.unread — mark as unread starting from a given message
  • im.dialog.users.list — list dialog participants with pagination
  • im.dialog.writing — send the "user is typing" indicator

IM\Message\Service\Message — 6 methods

  • im.message.add — send a message
  • im.message.command — invoke a chat-bot command in the context of a message
  • im.message.delete — delete a message
  • im.message.like — toggle the "Like" mark on a message
  • im.message.share — create an object based on a message
  • im.message.update — edit text and parameters of a message

IM\Recent\Service\Recent — 5 methods

  • im.recent.get — list the user's recent chats
  • im.recent.hide — hide a dialog from the list
  • im.recent.list — list recent dialogs with pagination
  • im.recent.pin — pin/unpin a dialog
  • im.recent.unread — toggle the "read" mark on a chat

IM\Notify\Service\Notify — 12 methods (6 already implemented)

  • im.notify.system.add — send a system notification
  • im.notify.personal.add — send a personal notification
  • im.notify.delete — delete a notification
  • im.notify.read — mark a notification read/unread
  • im.notify.confirm — reply via a notification button
  • im.notify.answer — send a text reply to a notification
  • im.notify — send a notification (application context only)
  • im.notify.get — list notifications paginated by LAST_ID/LAST_TYPE
  • im.notify.history.search — search the notification history
  • im.notify.read.all — mark all notifications as read
  • im.notify.read.list — mark a list of notifications as read/unread
  • im.notify.schema.get — schema of available notification types per module

IM\User\Service\User — 2 methods

  • im.user.get — get data for the current user or by id
  • im.user.list.get — get data for a list of user ids

IM\User\Service\UserStatus — 4 methods

  • im.user.status.get — get the current user's status
  • im.user.status.set — set a custom user status
  • im.user.status.idle.start — enable the automatic "Away" status
  • im.user.status.idle.end — disable the automatic "Away" status

IM\Search\Service\Search — 6 methods

  • im.search.chat.list — search chats accessible to the current user
  • im.search.user.list — search users by name, position, department
  • im.search.department.list — search departments by title
  • im.search.last.add — add a dialog to the last-search history (legacy)
  • im.search.last.get — get the last-search history (legacy)
  • im.search.last.delete — remove a dialog from the last-search history (legacy)

IM\Department\Service\Department — 4 methods

  • im.department.get — get department data by ids
  • im.department.colleagues.list — list colleagues of the current user
  • im.department.employees.get — list employees of given departments
  • im.department.managers.get — list managers of given departments

IM\Counters\Service\Counters — 1 method

  • im.counters.get — unread message and notification counters

IM\Revision\Service\Revision — 1 method

  • im.revision.get — IM module API revisions for compatibility checks

IM\Disk\Service\Disk — 1 method

  • im.disk.folder.get — id of the folder where chat files are stored

Example

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions