From c773e7462b300d1f724a8f664267a22183f75c25 Mon Sep 17 00:00:00 2001 From: fmvilas Date: Fri, 11 Jan 2019 19:33:50 +0100 Subject: [PATCH 1/4] Add support for events in Markdown template --- lib/beautifier.js | 8 +- package-lock.json | 6 +- package.json | 6 +- templates/markdown/.partials/content.md | 6 + templates/markdown/.partials/events.md | 21 + templates/markdown/.partials/message.md | 4 +- templates/markdown/asyncapi.md | 2 + test/docs/slack-rtm.yml | 877 ++++++++++++++++++++++++ 8 files changed, 920 insertions(+), 10 deletions(-) create mode 100644 templates/markdown/.partials/events.md create mode 100644 test/docs/slack-rtm.yml diff --git a/lib/beautifier.js b/lib/beautifier.js index 005e1dc55..13f3813bd 100644 --- a/lib/beautifier.js +++ b/lib/beautifier.js @@ -160,9 +160,11 @@ module.exports = (asyncapi) => { beautifySchema(schema); }); - const commonPrefix = sharedStart(Object.keys(asyncapi.topics)); - const levels = commonPrefix.split('.').length - 1; - asyncapi.__commonPrefix = commonPrefix.split('.').slice(0, levels).join('.'); + if (asyncapi.topics) { + const commonPrefix = sharedStart(Object.keys(asyncapi.topics)); + const levels = commonPrefix.split('.').length - 1; + asyncapi.__commonPrefix = commonPrefix.split('.').slice(0, levels).join('.'); + } return asyncapi; }; diff --git a/package-lock.json b/package-lock.json index 7ca9a3d2a..39ed76c45 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,9 +33,9 @@ "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, "asyncapi": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/asyncapi/-/asyncapi-2.0.2.tgz", - "integrity": "sha512-iKgKWs2Ox+f9pFvnRjtnHOPXo5hU4GhkWK44Rw6lKYn/Um9eEx50VCayjCJBNT3cvzn7CSVFMZiioRAFwRGz4g==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/asyncapi/-/asyncapi-2.1.0.tgz", + "integrity": "sha512-k4x3yz8wIHYVnuM/mDfDCSy0IaDZfQkivvX6Du1npXX2vNpcc2DPYMcHMg/kRt7B+O7alpxeGfzy+2PEbsFApg==" }, "balanced-match": { "version": "1.0.0", diff --git a/package.json b/package.json index daf06248c..264a9b395 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ }, "homepage": "https://github.com/asyncapi/generator", "dependencies": { - "asyncapi": "^2.0.2", + "asyncapi": "^2.1.0", "commander": "^2.12.2", "fs.extra": "^1.3.2", "handlebars": "^4.0.6", @@ -35,11 +35,11 @@ "json-schema-ref-parser": "^5.1.0", "lodash": "^4.17.4", "markdown-it": "^8.4.1", + "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "openapi-sampler": "^1.0.0-beta.9", "project-name-generator": "^2.1.5", - "z-schema": "^3.18.2", - "minimatch": "^3.0.4" + "z-schema": "^3.18.2" }, "devDependencies": {} } diff --git a/templates/markdown/.partials/content.md b/templates/markdown/.partials/content.md index fdf592440..3ea8bd5cf 100644 --- a/templates/markdown/.partials/content.md +++ b/templates/markdown/.partials/content.md @@ -2,7 +2,13 @@ {{> security}} +{{#if asyncapi.topics}} {{> topics }} +{{/if}} + +{{#if asyncapi.events}} +{{> events }} +{{/if}} {{> messages}} diff --git a/templates/markdown/.partials/events.md b/templates/markdown/.partials/events.md new file mode 100644 index 000000000..8a98a986c --- /dev/null +++ b/templates/markdown/.partials/events.md @@ -0,0 +1,21 @@ +## Events + +### Events a client can receive: +{{#each asyncapi.events.receive as |event index|}} +{{#if event.x-title}} +#### {{event.x-title}} {{#if message.deprecated}} (**deprecated**){{/if}} +{{else}} +#### Event #{{index}} {{#if message.deprecated}} (**deprecated**){{/if}} +{{/if}} +{{> message message=event hideTitle=true}} +{{/each}} + +### Events a client can send: +{{#each asyncapi.events.send as |event index|}} +{{#if event.x-title}} +#### {{event.x-title}} {{#if message.deprecated}} (**deprecated**){{/if}} +{{else}} +#### Event #{{index}} {{#if message.deprecated}} (**deprecated**){{/if}} +{{/if}} +{{> message message=event hideTitle=true}} +{{/each}} diff --git a/templates/markdown/.partials/message.md b/templates/markdown/.partials/message.md index 732ccc4e9..dca23f5d7 100644 --- a/templates/markdown/.partials/message.md +++ b/templates/markdown/.partials/message.md @@ -1,4 +1,6 @@ -### {{messageName}} {{#if message.deprecated}} (**deprecated**){{/if}} +{{#unless hideTitle}} +### {{messageName}} {{#if message.deprecated}} (**deprecated**){{/if}} +{{/unless}} {{#if message.summary}} {{{message.summary}}} diff --git a/templates/markdown/asyncapi.md b/templates/markdown/asyncapi.md index a419cef53..87117592a 100644 --- a/templates/markdown/asyncapi.md +++ b/templates/markdown/asyncapi.md @@ -19,6 +19,8 @@ {{/if}} {{#if asyncapi.events}} * [Events](#events) + - [Events a client can receive](#events-receive) + - [Events a client can send](#events-send) {{/if}} {{#if asyncapi.stream}} * [Stream](#stream) diff --git a/test/docs/slack-rtm.yml b/test/docs/slack-rtm.yml new file mode 100644 index 000000000..4d6fc0ed4 --- /dev/null +++ b/test/docs/slack-rtm.yml @@ -0,0 +1,877 @@ +asyncapi: '1.2.0' +info: + title: Slack Real Time Messaging API + version: '1.0.0' + +servers: + - url: https://slack.com/api/rtm.connect + scheme: https + schemeVersion: '1.1' + +security: + - token: [] + +events: + receive: + - $ref: '#/components/messages/hello' + - $ref: '#/components/messages/connectionError' + - $ref: '#/components/messages/accountsChanged' + - $ref: '#/components/messages/botAdded' + - $ref: '#/components/messages/botChanged' + - $ref: '#/components/messages/channelArchive' + - $ref: '#/components/messages/channelCreated' + - $ref: '#/components/messages/channelDeleted' + - $ref: '#/components/messages/channelHistoryChanged' + - $ref: '#/components/messages/channelJoined' + - $ref: '#/components/messages/channelLeft' + - $ref: '#/components/messages/channelMarked' + - $ref: '#/components/messages/channelRename' + - $ref: '#/components/messages/channelUnarchive' + - $ref: '#/components/messages/commandsChanged' + - $ref: '#/components/messages/dndUpdated' + - $ref: '#/components/messages/dndUpdatedUser' + - $ref: '#/components/messages/emailDomainChanged' + - $ref: '#/components/messages/emojiRemoved' + - $ref: '#/components/messages/emojiAdded' + - $ref: '#/components/messages/fileChange' + - $ref: '#/components/messages/fileCommentAdded' + - $ref: '#/components/messages/fileCommentDeleted' + - $ref: '#/components/messages/fileCommentEdited' + - $ref: '#/components/messages/fileCreated' + - $ref: '#/components/messages/fileDeleted' + - $ref: '#/components/messages/filePublic' + - $ref: '#/components/messages/fileShared' + - $ref: '#/components/messages/fileUnshared' + - $ref: '#/components/messages/goodbye' + - $ref: '#/components/messages/groupArchive' + - $ref: '#/components/messages/groupClose' + - $ref: '#/components/messages/groupHistoryChanged' + - $ref: '#/components/messages/groupJoined' + - $ref: '#/components/messages/groupLeft' + - $ref: '#/components/messages/groupMarked' + - $ref: '#/components/messages/groupOpen' + - $ref: '#/components/messages/groupRename' + - $ref: '#/components/messages/groupUnarchive' + - $ref: '#/components/messages/imClose' + - $ref: '#/components/messages/imCreated' + - $ref: '#/components/messages/imMarked' + - $ref: '#/components/messages/imOpen' + - $ref: '#/components/messages/manualPresenceChange' + - $ref: '#/components/messages/memberJoinedChannel' + - $ref: '#/components/messages/message' + send: + - $ref: '#/components/messages/outgoingMessage' + +components: + securitySchemes: + token: + type: httpApiKey + name: token + in: query + + schemas: + attachment: + type: object + properties: + fallback: + type: string + color: + type: string + pretext: + type: string + author_name: + type: string + author_link: + type: string + format: uri + author_icon: + type: string + format: uri + title: + type: string + title_link: + type: string + format: uri + text: + type: string + fields: + type: array + items: + type: object + properties: + title: + type: string + value: + type: string + short: + type: boolean + image_url: + type: string + format: uri + thumb_url: + type: string + format: uri + footer: + type: string + footer_icon: + type: string + format: uri + ts: + type: number + + messages: + hello: + x-title: Hello + summary: First event received upon connection. + payload: + type: object + properties: + type: + type: string + enum: ['hello'] + + connectionError: + summary: Event received when a connection error happens. + payload: + type: object + properties: + type: + type: string + enum: ['error'] + error: + type: object + properties: + code: + type: number + msg: + type: string + + accountsChanged: + summary: The list of accounts a user is signed into has changed. + payload: + type: object + properties: + type: + type: string + enum: ['accounts_changed'] + + botAdded: + summary: A bot user was added. + payload: + type: object + properties: + type: + type: string + enum: ['bot_added'] + bot: + type: object + properties: + id: + type: string + app_id: + type: string + name: + type: string + icons: + type: object + additionalProperties: + type: string + + botChanged: + summary: A bot user was changed. + payload: + type: object + properties: + type: + type: string + enum: ['bot_added'] + bot: + type: object + properties: + id: + type: string + app_id: + type: string + name: + type: string + icons: + type: object + additionalProperties: + type: string + + channelArchive: + summary: A channel was archived. + payload: + type: object + properties: + type: + type: string + enum: ['channel_archive'] + channel: + type: string + user: + type: string + + channelCreated: + summary: A channel was created. + payload: + type: object + properties: + type: + type: string + enum: ['channel_created'] + channel: + type: object + properties: + id: + type: string + name: + type: string + created: + type: number + creator: + type: string + + channelDeleted: + summary: A channel was deleted. + payload: + type: object + properties: + type: + type: string + enum: ['channel_deleted'] + channel: + type: string + + channelHistoryChanged: + summary: Bulk updates were made to a channel's history. + payload: + type: object + properties: + type: + type: string + enum: ['channel_history_changed'] + latest: + type: string + ts: + type: string + event_ts: + type: string + + channelJoined: + summary: You joined a channel. + payload: + type: object + properties: + type: + type: string + enum: ['channel_joined'] + channel: + type: object + properties: + id: + type: string + name: + type: string + created: + type: number + creator: + type: string + + channelLeft: + summary: You left a channel. + payload: + type: object + properties: + type: + type: string + enum: ['channel_left'] + channel: + type: string + + channelMarked: + summary: Your channel read marker was updated. + payload: + type: object + properties: + type: + type: string + enum: ['channel_marked'] + channel: + type: string + ts: + type: string + + channelRename: + summary: A channel was renamed. + payload: + type: object + properties: + type: + type: string + enum: ['channel_rename'] + channel: + type: object + properties: + id: + type: string + name: + type: string + created: + type: number + + channelUnarchive: + summary: A channel was unarchived. + payload: + type: object + properties: + type: + type: string + enum: ['channel_unarchive'] + channel: + type: string + user: + type: string + + commandsChanged: + summary: A slash command has been added or changed. + payload: + type: object + properties: + type: + type: string + enum: ['commands_changed'] + event_ts: + type: string + + dndUpdated: + summary: Do not Disturb settings changed for the current user. + payload: + type: object + properties: + type: + type: string + enum: ['dnd_updated'] + user: + type: string + dnd_status: + type: object + properties: + dnd_enabled: + type: boolean + next_dnd_start_ts: + type: number + next_dnd_end_ts: + type: number + snooze_enabled: + type: boolean + snooze_endtime: + type: number + + dndUpdatedUser: + summary: Do not Disturb settings changed for a member. + payload: + type: object + properties: + type: + type: string + enum: ['dnd_updated_user'] + user: + type: string + dnd_status: + type: object + properties: + dnd_enabled: + type: boolean + next_dnd_start_ts: + type: number + next_dnd_end_ts: + type: number + + emailDomainChanged: + summary: The workspace email domain has changed. + payload: + type: object + properties: + type: + type: string + enum: ['email_domain_changed'] + email_domain: + type: string + event_ts: + type: string + + emojiRemoved: + summary: A custom emoji has been removed. + payload: + type: object + properties: + type: + type: string + enum: ['emoji_changed'] + subtype: + type: string + enum: ['remove'] + names: + type: array + items: + type: string + event_ts: + type: string + + emojiAdded: + summary: A custom emoji has been added. + payload: + type: object + properties: + type: + type: string + enum: ['emoji_changed'] + subtype: + type: string + enum: ['add'] + name: + type: string + value: + type: string + format: uri + event_ts: + type: string + + fileChange: + summary: A file was changed. + payload: + type: object + properties: + type: + type: string + enum: ['file_change'] + file_id: + type: string + file: + type: object + properties: + id: + type: string + + fileCommentAdded: + summary: A file comment was added. + payload: + type: object + properties: + type: + type: string + enum: ['file_comment_added'] + comment: {} + file_id: + type: string + file: + type: object + properties: + id: + type: string + + fileCommentDeleted: + summary: A file comment was deleted. + payload: + type: object + properties: + type: + type: string + enum: ['file_comment_deleted'] + comment: + type: string + file_id: + type: string + file: + type: object + properties: + id: + type: string + + fileCommentEdited: + summary: A file comment was edited. + payload: + type: object + properties: + type: + type: string + enum: ['file_comment_edited'] + comment: {} + file_id: + type: string + file: + type: object + properties: + id: + type: string + + fileCreated: + summary: A file was created. + payload: + type: object + properties: + type: + type: string + enum: ['file_created'] + file_id: + type: string + file: + type: object + properties: + id: + type: string + + fileDeleted: + summary: A file was deleted. + payload: + type: object + properties: + type: + type: string + enum: ['file_deleted'] + file_id: + type: string + event_ts: + type: string + + filePublic: + summary: A file was made public. + payload: + type: object + properties: + type: + type: string + enum: ['file_public'] + file_id: + type: string + file: + type: object + properties: + id: + type: string + + fileShared: + summary: A file was shared. + payload: + type: object + properties: + type: + type: string + enum: ['file_shared'] + file_id: + type: string + file: + type: object + properties: + id: + type: string + + fileUnshared: + summary: A file was unshared. + payload: + type: object + properties: + type: + type: string + enum: ['file_unshared'] + file_id: + type: string + file: + type: object + properties: + id: + type: string + + goodbye: + summary: The server intends to close the connection soon. + payload: + type: object + properties: + type: + type: string + enum: ['goodbye'] + + groupArchive: + summary: A private channel was archived. + payload: + type: object + properties: + type: + type: string + enum: ['group_archive'] + channel: + type: string + + groupClose: + summary: You closed a private channel. + payload: + type: object + properties: + type: + type: string + enum: ['group_close'] + user: + type: string + channel: + type: string + + groupHistoryChanged: + summary: Bulk updates were made to a private channel's history. + payload: + type: object + properties: + type: + type: string + enum: ['group_history_changed'] + latest: + type: string + ts: + type: string + event_ts: + type: string + + groupJoined: + summary: You joined a private channel. + payload: + type: object + properties: + type: + type: string + enum: ['group_joined'] + channel: + type: object + properties: + id: + type: string + name: + type: string + created: + type: number + creator: + type: string + + groupLeft: + summary: You left a private channel. + payload: + type: object + properties: + type: + type: string + enum: ['group_left'] + channel: + type: string + + groupMarked: + summary: A private channel read marker was updated. + payload: + type: object + properties: + type: + type: string + enum: ['group_marked'] + channel: + type: string + ts: + type: string + + groupOpen: + summary: You opened a private channel. + payload: + type: object + properties: + type: + type: string + enum: ['group_open'] + user: + type: string + channel: + type: string + + groupRename: + summary: A private channel was renamed. + payload: + type: object + properties: + type: + type: string + enum: ['group_rename'] + channel: + type: object + properties: + id: + type: string + name: + type: string + created: + type: number + + groupUnarchive: + summary: A private channel was unarchived. + payload: + type: object + properties: + type: + type: string + enum: ['group_unarchive'] + channel: + type: string + user: + type: string + + imClose: + summary: You closed a DM. + payload: + type: object + properties: + type: + type: string + enum: ['im_close'] + channel: + type: string + user: + type: string + + imCreated: + summary: A DM was created. + payload: + type: object + properties: + type: + type: string + enum: ['im_created'] + channel: + type: object + properties: + id: + type: string + name: + type: string + created: + type: number + creator: + type: string + user: + type: string + + imMarked: + summary: A direct message read marker was updated. + payload: + type: object + properties: + type: + type: string + enum: ['im_marked'] + channel: + type: string + ts: + type: string + + imOpen: + summary: You opened a DM. + payload: + type: object + properties: + type: + type: string + enum: ['im_open'] + channel: + type: string + user: + type: string + + manualPresenceChange: + summary: You manually updated your presence. + payload: + type: object + properties: + type: + type: string + enum: ['manual_presence_change'] + presence: + type: string + + memberJoinedChannel: + summary: A user joined a public or private channel. + payload: + type: object + properties: + type: + type: string + enum: ['member_joined_channel'] + user: + type: string + channel: + type: string + channel_type: + type: string + enum: + - C + - G + team: + type: string + inviter: + type: string + + memberLeftChannel: + summary: A user left a public or private channel. + payload: + type: object + properties: + type: + type: string + enum: ['member_left_channel'] + user: + type: string + channel: + type: string + channel_type: + type: string + enum: + - C + - G + team: + type: string + + message: + summary: A message was sent to a channel. + payload: + type: object + properties: + type: + type: string + enum: ['message'] + user: + type: string + channel: + type: string + text: + type: string + ts: + type: string + attachments: + type: array + items: + $ref: '#/components/schemas/attachment' + edited: + type: object + properties: + user: + type: string + ts: + type: string + + outgoingMessage: + summary: A message was sent to a channel. + payload: + type: object + properties: + id: + type: number + type: + type: string + enum: ['message'] + channel: + type: string + text: + type: string From 95231d455c7818e5eb37a7e42d7b8e35f5bb19ac Mon Sep 17 00:00:00 2001 From: fmvilas Date: Fri, 11 Jan 2019 19:36:49 +0100 Subject: [PATCH 2/4] Add test --- test/asyncapi.md | 6393 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 6393 insertions(+) create mode 100644 test/asyncapi.md diff --git a/test/asyncapi.md b/test/asyncapi.md new file mode 100644 index 000000000..f52ad3e07 --- /dev/null +++ b/test/asyncapi.md @@ -0,0 +1,6393 @@ +# Slack Real Time Messaging API 1.0.0 documentation + + + + +## Table of Contents + +* [Connection Details](#servers) +* [Events](#events) + - [Events a client can receive](#events-receive) + - [Events a client can send](#events-send) +* [Messages](#messages) +* [Schemas](#schemas) + + + +## Connection details + + + + + + + + + + + + + + + + + + +
URLSchemeDescription
https://slack.com/api/rtm.connecthttps
+ + +## Security + + + + + + + + + + + + + + + + + + + + + + +
TypeInNameSchemeFormatDescription
httpApiKeyquerytoken
+ + +## Events + +### Events a client can receive: +#### Hello +First event received upon connection. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + hello
+ + + +#### Event #1 +Event received when a connection error happens. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + error
error + object + Any
error.code + number + Any
error.msg + string + Any
+ + + +#### Event #2 +The list of accounts a user is signed into has changed. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + accounts_changed
+ + + +#### Event #3 +A bot user was added. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + bot_added
bot + object + Any
bot.id + string + Any
bot.app_id + string + Any
bot.name + string + Any
bot.icons + object + Any
+ + + +#### Event #4 +A bot user was changed. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + bot_added
bot + object + Any
bot.id + string + Any
bot.app_id + string + Any
bot.name + string + Any
bot.icons + object + Any
+ + + +#### Event #5 +A channel was archived. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_archive
channel + string + Any
user + string + Any
+ + + +#### Event #6 +A channel was created. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_created
channel + object + Any
channel.id + string + Any
channel.name + string + Any
channel.created + number + Any
channel.creator + string + Any
+ + + +#### Event #7 +A channel was deleted. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_deleted
channel + string + Any
+ + + +#### Event #8 +Bulk updates were made to a channel's history. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_history_changed
latest + string + Any
ts + string + Any
event_ts + string + Any
+ + + +#### Event #9 +You joined a channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_joined
channel + object + Any
channel.id + string + Any
channel.name + string + Any
channel.created + number + Any
channel.creator + string + Any
+ + + +#### Event #10 +You left a channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_left
channel + string + Any
+ + + +#### Event #11 +Your channel read marker was updated. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_marked
channel + string + Any
ts + string + Any
+ + + +#### Event #12 +A channel was renamed. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_rename
channel + object + Any
channel.id + string + Any
channel.name + string + Any
channel.created + number + Any
+ + + +#### Event #13 +A channel was unarchived. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_unarchive
channel + string + Any
user + string + Any
+ + + +#### Event #14 +A slash command has been added or changed. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + commands_changed
event_ts + string + Any
+ + + +#### Event #15 +Do not Disturb settings changed for the current user. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + dnd_updated
user + string + Any
dnd_status + object + Any
dnd_status.dnd_enabled + boolean + Any
dnd_status.next_dnd_start_ts + number + Any
dnd_status.next_dnd_end_ts + number + Any
dnd_status.snooze_enabled + boolean + Any
dnd_status.snooze_endtime + number + Any
+ + + +#### Event #16 +Do not Disturb settings changed for a member. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + dnd_updated_user
user + string + Any
dnd_status + object + Any
dnd_status.dnd_enabled + boolean + Any
dnd_status.next_dnd_start_ts + number + Any
dnd_status.next_dnd_end_ts + number + Any
+ + + +#### Event #17 +The workspace email domain has changed. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + email_domain_changed
email_domain + string + Any
event_ts + string + Any
+ + + +#### Event #18 +A custom emoji has been removed. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + emoji_changed
subtype + string + remove
names + array(string) + Any
event_ts + string + Any
+ + + +#### Event #19 +A custom emoji has been added. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + emoji_changed
subtype + string + add
name + string + Any
value + string + Any
event_ts + string + Any
+ + + +#### Event #20 +A file was changed. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_change
file_id + string + Any
file + object + Any
file.id + string + Any
+ + + +#### Event #21 +A file comment was added. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_comment_added
comment + + Any
file_id + string + Any
file + object + Any
file.id + string + Any
+ + + +#### Event #22 +A file comment was deleted. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_comment_deleted
comment + string + Any
file_id + string + Any
file + object + Any
file.id + string + Any
+ + + +#### Event #23 +A file comment was edited. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_comment_edited
comment + + Any
file_id + string + Any
file + object + Any
file.id + string + Any
+ + + +#### Event #24 +A file was created. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_created
file_id + string + Any
file + object + Any
file.id + string + Any
+ + + +#### Event #25 +A file was deleted. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_deleted
file_id + string + Any
event_ts + string + Any
+ + + +#### Event #26 +A file was made public. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_public
file_id + string + Any
file + object + Any
file.id + string + Any
+ + + +#### Event #27 +A file was shared. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_shared
file_id + string + Any
file + object + Any
file.id + string + Any
+ + + +#### Event #28 +A file was unshared. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_unshared
file_id + string + Any
file + object + Any
file.id + string + Any
+ + + +#### Event #29 +The server intends to close the connection soon. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + goodbye
+ + + +#### Event #30 +A private channel was archived. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_archive
channel + string + Any
+ + + +#### Event #31 +You closed a private channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_close
user + string + Any
channel + string + Any
+ + + +#### Event #32 +Bulk updates were made to a private channel's history. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_history_changed
latest + string + Any
ts + string + Any
event_ts + string + Any
+ + + +#### Event #33 +You joined a private channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_joined
channel + object + Any
channel.id + string + Any
channel.name + string + Any
channel.created + number + Any
channel.creator + string + Any
+ + + +#### Event #34 +You left a private channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_left
channel + string + Any
+ + + +#### Event #35 +A private channel read marker was updated. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_marked
channel + string + Any
ts + string + Any
+ + + +#### Event #36 +You opened a private channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_open
user + string + Any
channel + string + Any
+ + + +#### Event #37 +A private channel was renamed. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_rename
channel + object + Any
channel.id + string + Any
channel.name + string + Any
channel.created + number + Any
+ + + +#### Event #38 +A private channel was unarchived. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_unarchive
channel + string + Any
user + string + Any
+ + + +#### Event #39 +You closed a DM. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + im_close
channel + string + Any
user + string + Any
+ + + +#### Event #40 +A DM was created. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + im_created
channel + object + Any
channel.id + string + Any
channel.name + string + Any
channel.created + number + Any
channel.creator + string + Any
user + string + Any
+ + + +#### Event #41 +A direct message read marker was updated. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + im_marked
channel + string + Any
ts + string + Any
+ + + +#### Event #42 +You opened a DM. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + im_open
channel + string + Any
user + string + Any
+ + + +#### Event #43 +You manually updated your presence. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + manual_presence_change
presence + string + Any
+ + + +#### Event #44 +A user joined a public or private channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + member_joined_channel
user + string + Any
channel + string + Any
channel_type + string + C, G
team + string + Any
inviter + string + Any
+ + + +#### Event #45 +A message was sent to a channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + message
user + string + Any
channel + string + Any
text + string + Any
ts + string + Any
attachments + array(object) + Any
attachments.fallback + string + Any
attachments.color + string + Any
attachments.pretext + string + Any
attachments.author_name + string + Any
attachments.author_link + string + Any
attachments.author_icon + string + Any
attachments.title + string + Any
attachments.title_link + string + Any
attachments.text + string + Any
attachments.fields + array(object) + Any
attachments.fields.title + string + Any
attachments.fields.value + string + Any
attachments.fields.short + boolean + Any
attachments.image_url + string + Any
attachments.thumb_url + string + Any
attachments.footer + string + Any
attachments.footer_icon + string + Any
attachments.ts + number + Any
edited + object + Any
edited.user + string + Any
edited.ts + string + Any
+ + + + +###
Events a client can send: +#### Event #0 +A message was sent to a channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
id + number + Any
type + string + message
channel + string + Any
text + string + Any
+ + + + +## Messages + +### hello +First event received upon connection. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + hello
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "hello" +} +``` + +### connectionError +Event received when a connection error happens. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + error
error + object + Any
error.code + number + Any
error.msg + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "error", + "error": { + "code": 0, + "msg": "string" + } +} +``` + +### accountsChanged +The list of accounts a user is signed into has changed. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + accounts_changed
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "accounts_changed" +} +``` + +### botAdded +A bot user was added. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + bot_added
bot + object + Any
bot.id + string + Any
bot.app_id + string + Any
bot.name + string + Any
bot.icons + object + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "bot_added", + "bot": { + "id": "string", + "app_id": "string", + "name": "string", + "icons": { + "property1": "string", + "property2": "string" + } + } +} +``` + +### botChanged +A bot user was changed. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + bot_added
bot + object + Any
bot.id + string + Any
bot.app_id + string + Any
bot.name + string + Any
bot.icons + object + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "bot_added", + "bot": { + "id": "string", + "app_id": "string", + "name": "string", + "icons": { + "property1": "string", + "property2": "string" + } + } +} +``` + +### channelArchive +A channel was archived. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_archive
channel + string + Any
user + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "channel_archive", + "channel": "string", + "user": "string" +} +``` + +### channelCreated +A channel was created. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_created
channel + object + Any
channel.id + string + Any
channel.name + string + Any
channel.created + number + Any
channel.creator + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "channel_created", + "channel": { + "id": "string", + "name": "string", + "created": 0, + "creator": "string" + } +} +``` + +### channelDeleted +A channel was deleted. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_deleted
channel + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "channel_deleted", + "channel": "string" +} +``` + +### channelHistoryChanged +Bulk updates were made to a channel's history. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_history_changed
latest + string + Any
ts + string + Any
event_ts + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "channel_history_changed", + "latest": "string", + "ts": "string", + "event_ts": "string" +} +``` + +### channelJoined +You joined a channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_joined
channel + object + Any
channel.id + string + Any
channel.name + string + Any
channel.created + number + Any
channel.creator + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "channel_joined", + "channel": { + "id": "string", + "name": "string", + "created": 0, + "creator": "string" + } +} +``` + +### channelLeft +You left a channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_left
channel + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "channel_left", + "channel": "string" +} +``` + +### channelMarked +Your channel read marker was updated. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_marked
channel + string + Any
ts + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "channel_marked", + "channel": "string", + "ts": "string" +} +``` + +### channelRename +A channel was renamed. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_rename
channel + object + Any
channel.id + string + Any
channel.name + string + Any
channel.created + number + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "channel_rename", + "channel": { + "id": "string", + "name": "string", + "created": 0 + } +} +``` + +### channelUnarchive +A channel was unarchived. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + channel_unarchive
channel + string + Any
user + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "channel_unarchive", + "channel": "string", + "user": "string" +} +``` + +### commandsChanged +A slash command has been added or changed. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + commands_changed
event_ts + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "commands_changed", + "event_ts": "string" +} +``` + +### dndUpdated +Do not Disturb settings changed for the current user. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + dnd_updated
user + string + Any
dnd_status + object + Any
dnd_status.dnd_enabled + boolean + Any
dnd_status.next_dnd_start_ts + number + Any
dnd_status.next_dnd_end_ts + number + Any
dnd_status.snooze_enabled + boolean + Any
dnd_status.snooze_endtime + number + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "dnd_updated", + "user": "string", + "dnd_status": { + "dnd_enabled": true, + "next_dnd_start_ts": 0, + "next_dnd_end_ts": 0, + "snooze_enabled": true, + "snooze_endtime": 0 + } +} +``` + +### dndUpdatedUser +Do not Disturb settings changed for a member. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + dnd_updated_user
user + string + Any
dnd_status + object + Any
dnd_status.dnd_enabled + boolean + Any
dnd_status.next_dnd_start_ts + number + Any
dnd_status.next_dnd_end_ts + number + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "dnd_updated_user", + "user": "string", + "dnd_status": { + "dnd_enabled": true, + "next_dnd_start_ts": 0, + "next_dnd_end_ts": 0 + } +} +``` + +### emailDomainChanged +The workspace email domain has changed. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + email_domain_changed
email_domain + string + Any
event_ts + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "email_domain_changed", + "email_domain": "string", + "event_ts": "string" +} +``` + +### emojiRemoved +A custom emoji has been removed. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + emoji_changed
subtype + string + remove
names + array(string) + Any
event_ts + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "emoji_changed", + "subtype": "remove", + "names": [ + "string" + ], + "event_ts": "string" +} +``` + +### emojiAdded +A custom emoji has been added. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + emoji_changed
subtype + string + add
name + string + Any
value + string + Any
event_ts + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "emoji_changed", + "subtype": "add", + "name": "string", + "value": "http://example.com", + "event_ts": "string" +} +``` + +### fileChange +A file was changed. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_change
file_id + string + Any
file + object + Any
file.id + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "file_change", + "file_id": "string", + "file": { + "id": "string" + } +} +``` + +### fileCommentAdded +A file comment was added. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_comment_added
comment + + Any
file_id + string + Any
file + object + Any
file.id + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "file_comment_added", + "comment": null, + "file_id": "string", + "file": { + "id": "string" + } +} +``` + +### fileCommentDeleted +A file comment was deleted. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_comment_deleted
comment + string + Any
file_id + string + Any
file + object + Any
file.id + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "file_comment_deleted", + "comment": "string", + "file_id": "string", + "file": { + "id": "string" + } +} +``` + +### fileCommentEdited +A file comment was edited. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_comment_edited
comment + + Any
file_id + string + Any
file + object + Any
file.id + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "file_comment_edited", + "comment": null, + "file_id": "string", + "file": { + "id": "string" + } +} +``` + +### fileCreated +A file was created. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_created
file_id + string + Any
file + object + Any
file.id + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "file_created", + "file_id": "string", + "file": { + "id": "string" + } +} +``` + +### fileDeleted +A file was deleted. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_deleted
file_id + string + Any
event_ts + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "file_deleted", + "file_id": "string", + "event_ts": "string" +} +``` + +### filePublic +A file was made public. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_public
file_id + string + Any
file + object + Any
file.id + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "file_public", + "file_id": "string", + "file": { + "id": "string" + } +} +``` + +### fileShared +A file was shared. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_shared
file_id + string + Any
file + object + Any
file.id + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "file_shared", + "file_id": "string", + "file": { + "id": "string" + } +} +``` + +### fileUnshared +A file was unshared. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + file_unshared
file_id + string + Any
file + object + Any
file.id + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "file_unshared", + "file_id": "string", + "file": { + "id": "string" + } +} +``` + +### goodbye +The server intends to close the connection soon. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + goodbye
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "goodbye" +} +``` + +### groupArchive +A private channel was archived. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_archive
channel + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "group_archive", + "channel": "string" +} +``` + +### groupClose +You closed a private channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_close
user + string + Any
channel + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "group_close", + "user": "string", + "channel": "string" +} +``` + +### groupHistoryChanged +Bulk updates were made to a private channel's history. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_history_changed
latest + string + Any
ts + string + Any
event_ts + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "group_history_changed", + "latest": "string", + "ts": "string", + "event_ts": "string" +} +``` + +### groupJoined +You joined a private channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_joined
channel + object + Any
channel.id + string + Any
channel.name + string + Any
channel.created + number + Any
channel.creator + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "group_joined", + "channel": { + "id": "string", + "name": "string", + "created": 0, + "creator": "string" + } +} +``` + +### groupLeft +You left a private channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_left
channel + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "group_left", + "channel": "string" +} +``` + +### groupMarked +A private channel read marker was updated. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_marked
channel + string + Any
ts + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "group_marked", + "channel": "string", + "ts": "string" +} +``` + +### groupOpen +You opened a private channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_open
user + string + Any
channel + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "group_open", + "user": "string", + "channel": "string" +} +``` + +### groupRename +A private channel was renamed. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_rename
channel + object + Any
channel.id + string + Any
channel.name + string + Any
channel.created + number + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "group_rename", + "channel": { + "id": "string", + "name": "string", + "created": 0 + } +} +``` + +### groupUnarchive +A private channel was unarchived. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + group_unarchive
channel + string + Any
user + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "group_unarchive", + "channel": "string", + "user": "string" +} +``` + +### imClose +You closed a DM. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + im_close
channel + string + Any
user + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "im_close", + "channel": "string", + "user": "string" +} +``` + +### imCreated +A DM was created. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + im_created
channel + object + Any
channel.id + string + Any
channel.name + string + Any
channel.created + number + Any
channel.creator + string + Any
user + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "im_created", + "channel": { + "id": "string", + "name": "string", + "created": 0, + "creator": "string" + }, + "user": "string" +} +``` + +### imMarked +A direct message read marker was updated. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + im_marked
channel + string + Any
ts + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "im_marked", + "channel": "string", + "ts": "string" +} +``` + +### imOpen +You opened a DM. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + im_open
channel + string + Any
user + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "im_open", + "channel": "string", + "user": "string" +} +``` + +### manualPresenceChange +You manually updated your presence. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + manual_presence_change
presence + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "manual_presence_change", + "presence": "string" +} +``` + +### memberJoinedChannel +A user joined a public or private channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + member_joined_channel
user + string + Any
channel + string + Any
channel_type + string + C, G
team + string + Any
inviter + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "member_joined_channel", + "user": "string", + "channel": "string", + "channel_type": "C", + "team": "string", + "inviter": "string" +} +``` + +### memberLeftChannel +A user left a public or private channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + member_left_channel
user + string + Any
channel + string + Any
channel_type + string + C, G
team + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "member_left_channel", + "user": "string", + "channel": "string", + "channel_type": "C", + "team": "string" +} +``` + +### message +A message was sent to a channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
type + string + message
user + string + Any
channel + string + Any
text + string + Any
ts + string + Any
attachments + array(object) + Any
attachments.fallback + string + Any
attachments.color + string + Any
attachments.pretext + string + Any
attachments.author_name + string + Any
attachments.author_link + string + Any
attachments.author_icon + string + Any
attachments.title + string + Any
attachments.title_link + string + Any
attachments.text + string + Any
attachments.fields + array(object) + Any
attachments.fields.title + string + Any
attachments.fields.value + string + Any
attachments.fields.short + boolean + Any
attachments.image_url + string + Any
attachments.thumb_url + string + Any
attachments.footer + string + Any
attachments.footer_icon + string + Any
attachments.ts + number + Any
edited + object + Any
edited.user + string + Any
edited.ts + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "type": "message", + "user": "string", + "channel": "string", + "text": "string", + "ts": "string", + "attachments": [ + { + "fallback": "string", + "color": "string", + "pretext": "string", + "author_name": "string", + "author_link": "http://example.com", + "author_icon": "http://example.com", + "title": "string", + "title_link": "http://example.com", + "text": "string", + "fields": [ + { + "title": "string", + "value": "string", + "short": true + } + ], + "image_url": "http://example.com", + "thumb_url": "http://example.com", + "footer": "string", + "footer_icon": "http://example.com", + "ts": 0 + } + ], + "edited": { + "user": "string", + "ts": "string" + } +} +``` + +### outgoingMessage +A message was sent to a channel. + + + + +#### Payload + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
id + number + Any
type + string + message
channel + string + Any
text + string + Any
+ + +##### Example of payload _(generated)_ + +```json +{ + "id": 0, + "type": "message", + "channel": "string", + "text": "string" +} +``` + + +## Schemas + +#### attachment + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAccepted values
fallback + string + Any
color + string + Any
pretext + string + Any
author_name + string + Any
author_link + string + Any
author_icon + string + Any
title + string + Any
title_link + string + Any
text + string + Any
fields + array(object) + Any
fields.title + string + Any
fields.value + string + Any
fields.short + boolean + Any
image_url + string + Any
thumb_url + string + Any
footer + string + Any
footer_icon + string + Any
ts + number + Any
+ +##### Example _(generated)_ + +```json +{ + "fallback": "string", + "color": "string", + "pretext": "string", + "author_name": "string", + "author_link": "http://example.com", + "author_icon": "http://example.com", + "title": "string", + "title_link": "http://example.com", + "text": "string", + "fields": [ + { + "title": "string", + "value": "string", + "short": true + } + ], + "image_url": "http://example.com", + "thumb_url": "http://example.com", + "footer": "string", + "footer_icon": "http://example.com", + "ts": 0 +} +``` From 9b19ab6b525dfe0f636fc1f1c674639a20ab3dbd Mon Sep 17 00:00:00 2001 From: fmvilas Date: Fri, 11 Jan 2019 19:38:03 +0100 Subject: [PATCH 3/4] Remove test document --- test/asyncapi.md | 6393 ---------------------------------------------- 1 file changed, 6393 deletions(-) delete mode 100644 test/asyncapi.md diff --git a/test/asyncapi.md b/test/asyncapi.md deleted file mode 100644 index f52ad3e07..000000000 --- a/test/asyncapi.md +++ /dev/null @@ -1,6393 +0,0 @@ -# Slack Real Time Messaging API 1.0.0 documentation - - - - -## Table of Contents - -* [Connection Details](#servers) -* [Events](#events) - - [Events a client can receive](#events-receive) - - [Events a client can send](#events-send) -* [Messages](#messages) -* [Schemas](#schemas) - - -
-## Connection details - - - - - - - - - - - - - - - - - - -
URLSchemeDescription
https://slack.com/api/rtm.connecthttps
- - -## Security - - - - - - - - - - - - - - - - - - - - - - -
TypeInNameSchemeFormatDescription
httpApiKeyquerytoken
- - -## Events - -### Events a client can receive: -#### Hello -First event received upon connection. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - hello
- - - -#### Event #1 -Event received when a connection error happens. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - error
error - object - Any
error.code - number - Any
error.msg - string - Any
- - - -#### Event #2 -The list of accounts a user is signed into has changed. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - accounts_changed
- - - -#### Event #3 -A bot user was added. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - bot_added
bot - object - Any
bot.id - string - Any
bot.app_id - string - Any
bot.name - string - Any
bot.icons - object - Any
- - - -#### Event #4 -A bot user was changed. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - bot_added
bot - object - Any
bot.id - string - Any
bot.app_id - string - Any
bot.name - string - Any
bot.icons - object - Any
- - - -#### Event #5 -A channel was archived. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_archive
channel - string - Any
user - string - Any
- - - -#### Event #6 -A channel was created. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_created
channel - object - Any
channel.id - string - Any
channel.name - string - Any
channel.created - number - Any
channel.creator - string - Any
- - - -#### Event #7 -A channel was deleted. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_deleted
channel - string - Any
- - - -#### Event #8 -Bulk updates were made to a channel's history. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_history_changed
latest - string - Any
ts - string - Any
event_ts - string - Any
- - - -#### Event #9 -You joined a channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_joined
channel - object - Any
channel.id - string - Any
channel.name - string - Any
channel.created - number - Any
channel.creator - string - Any
- - - -#### Event #10 -You left a channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_left
channel - string - Any
- - - -#### Event #11 -Your channel read marker was updated. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_marked
channel - string - Any
ts - string - Any
- - - -#### Event #12 -A channel was renamed. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_rename
channel - object - Any
channel.id - string - Any
channel.name - string - Any
channel.created - number - Any
- - - -#### Event #13 -A channel was unarchived. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_unarchive
channel - string - Any
user - string - Any
- - - -#### Event #14 -A slash command has been added or changed. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - commands_changed
event_ts - string - Any
- - - -#### Event #15 -Do not Disturb settings changed for the current user. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - dnd_updated
user - string - Any
dnd_status - object - Any
dnd_status.dnd_enabled - boolean - Any
dnd_status.next_dnd_start_ts - number - Any
dnd_status.next_dnd_end_ts - number - Any
dnd_status.snooze_enabled - boolean - Any
dnd_status.snooze_endtime - number - Any
- - - -#### Event #16 -Do not Disturb settings changed for a member. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - dnd_updated_user
user - string - Any
dnd_status - object - Any
dnd_status.dnd_enabled - boolean - Any
dnd_status.next_dnd_start_ts - number - Any
dnd_status.next_dnd_end_ts - number - Any
- - - -#### Event #17 -The workspace email domain has changed. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - email_domain_changed
email_domain - string - Any
event_ts - string - Any
- - - -#### Event #18 -A custom emoji has been removed. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - emoji_changed
subtype - string - remove
names - array(string) - Any
event_ts - string - Any
- - - -#### Event #19 -A custom emoji has been added. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - emoji_changed
subtype - string - add
name - string - Any
value - string - Any
event_ts - string - Any
- - - -#### Event #20 -A file was changed. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_change
file_id - string - Any
file - object - Any
file.id - string - Any
- - - -#### Event #21 -A file comment was added. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_comment_added
comment - - Any
file_id - string - Any
file - object - Any
file.id - string - Any
- - - -#### Event #22 -A file comment was deleted. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_comment_deleted
comment - string - Any
file_id - string - Any
file - object - Any
file.id - string - Any
- - - -#### Event #23 -A file comment was edited. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_comment_edited
comment - - Any
file_id - string - Any
file - object - Any
file.id - string - Any
- - - -#### Event #24 -A file was created. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_created
file_id - string - Any
file - object - Any
file.id - string - Any
- - - -#### Event #25 -A file was deleted. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_deleted
file_id - string - Any
event_ts - string - Any
- - - -#### Event #26 -A file was made public. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_public
file_id - string - Any
file - object - Any
file.id - string - Any
- - - -#### Event #27 -A file was shared. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_shared
file_id - string - Any
file - object - Any
file.id - string - Any
- - - -#### Event #28 -A file was unshared. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_unshared
file_id - string - Any
file - object - Any
file.id - string - Any
- - - -#### Event #29 -The server intends to close the connection soon. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - goodbye
- - - -#### Event #30 -A private channel was archived. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_archive
channel - string - Any
- - - -#### Event #31 -You closed a private channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_close
user - string - Any
channel - string - Any
- - - -#### Event #32 -Bulk updates were made to a private channel's history. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_history_changed
latest - string - Any
ts - string - Any
event_ts - string - Any
- - - -#### Event #33 -You joined a private channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_joined
channel - object - Any
channel.id - string - Any
channel.name - string - Any
channel.created - number - Any
channel.creator - string - Any
- - - -#### Event #34 -You left a private channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_left
channel - string - Any
- - - -#### Event #35 -A private channel read marker was updated. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_marked
channel - string - Any
ts - string - Any
- - - -#### Event #36 -You opened a private channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_open
user - string - Any
channel - string - Any
- - - -#### Event #37 -A private channel was renamed. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_rename
channel - object - Any
channel.id - string - Any
channel.name - string - Any
channel.created - number - Any
- - - -#### Event #38 -A private channel was unarchived. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_unarchive
channel - string - Any
user - string - Any
- - - -#### Event #39 -You closed a DM. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - im_close
channel - string - Any
user - string - Any
- - - -#### Event #40 -A DM was created. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - im_created
channel - object - Any
channel.id - string - Any
channel.name - string - Any
channel.created - number - Any
channel.creator - string - Any
user - string - Any
- - - -#### Event #41 -A direct message read marker was updated. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - im_marked
channel - string - Any
ts - string - Any
- - - -#### Event #42 -You opened a DM. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - im_open
channel - string - Any
user - string - Any
- - - -#### Event #43 -You manually updated your presence. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - manual_presence_change
presence - string - Any
- - - -#### Event #44 -A user joined a public or private channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - member_joined_channel
user - string - Any
channel - string - Any
channel_type - string - C, G
team - string - Any
inviter - string - Any
- - - -#### Event #45 -A message was sent to a channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - message
user - string - Any
channel - string - Any
text - string - Any
ts - string - Any
attachments - array(object) - Any
attachments.fallback - string - Any
attachments.color - string - Any
attachments.pretext - string - Any
attachments.author_name - string - Any
attachments.author_link - string - Any
attachments.author_icon - string - Any
attachments.title - string - Any
attachments.title_link - string - Any
attachments.text - string - Any
attachments.fields - array(object) - Any
attachments.fields.title - string - Any
attachments.fields.value - string - Any
attachments.fields.short - boolean - Any
attachments.image_url - string - Any
attachments.thumb_url - string - Any
attachments.footer - string - Any
attachments.footer_icon - string - Any
attachments.ts - number - Any
edited - object - Any
edited.user - string - Any
edited.ts - string - Any
- - - - -###
Events a client can send: -#### Event #0 -A message was sent to a channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
id - number - Any
type - string - message
channel - string - Any
text - string - Any
- - - - -## Messages - -### hello -First event received upon connection. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - hello
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "hello" -} -``` - -### connectionError -Event received when a connection error happens. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - error
error - object - Any
error.code - number - Any
error.msg - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "error", - "error": { - "code": 0, - "msg": "string" - } -} -``` - -### accountsChanged -The list of accounts a user is signed into has changed. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - accounts_changed
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "accounts_changed" -} -``` - -### botAdded -A bot user was added. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - bot_added
bot - object - Any
bot.id - string - Any
bot.app_id - string - Any
bot.name - string - Any
bot.icons - object - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "bot_added", - "bot": { - "id": "string", - "app_id": "string", - "name": "string", - "icons": { - "property1": "string", - "property2": "string" - } - } -} -``` - -### botChanged -A bot user was changed. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - bot_added
bot - object - Any
bot.id - string - Any
bot.app_id - string - Any
bot.name - string - Any
bot.icons - object - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "bot_added", - "bot": { - "id": "string", - "app_id": "string", - "name": "string", - "icons": { - "property1": "string", - "property2": "string" - } - } -} -``` - -### channelArchive -A channel was archived. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_archive
channel - string - Any
user - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "channel_archive", - "channel": "string", - "user": "string" -} -``` - -### channelCreated -A channel was created. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_created
channel - object - Any
channel.id - string - Any
channel.name - string - Any
channel.created - number - Any
channel.creator - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "channel_created", - "channel": { - "id": "string", - "name": "string", - "created": 0, - "creator": "string" - } -} -``` - -### channelDeleted -A channel was deleted. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_deleted
channel - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "channel_deleted", - "channel": "string" -} -``` - -### channelHistoryChanged -Bulk updates were made to a channel's history. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_history_changed
latest - string - Any
ts - string - Any
event_ts - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "channel_history_changed", - "latest": "string", - "ts": "string", - "event_ts": "string" -} -``` - -### channelJoined -You joined a channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_joined
channel - object - Any
channel.id - string - Any
channel.name - string - Any
channel.created - number - Any
channel.creator - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "channel_joined", - "channel": { - "id": "string", - "name": "string", - "created": 0, - "creator": "string" - } -} -``` - -### channelLeft -You left a channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_left
channel - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "channel_left", - "channel": "string" -} -``` - -### channelMarked -Your channel read marker was updated. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_marked
channel - string - Any
ts - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "channel_marked", - "channel": "string", - "ts": "string" -} -``` - -### channelRename -A channel was renamed. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_rename
channel - object - Any
channel.id - string - Any
channel.name - string - Any
channel.created - number - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "channel_rename", - "channel": { - "id": "string", - "name": "string", - "created": 0 - } -} -``` - -### channelUnarchive -A channel was unarchived. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - channel_unarchive
channel - string - Any
user - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "channel_unarchive", - "channel": "string", - "user": "string" -} -``` - -### commandsChanged -A slash command has been added or changed. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - commands_changed
event_ts - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "commands_changed", - "event_ts": "string" -} -``` - -### dndUpdated -Do not Disturb settings changed for the current user. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - dnd_updated
user - string - Any
dnd_status - object - Any
dnd_status.dnd_enabled - boolean - Any
dnd_status.next_dnd_start_ts - number - Any
dnd_status.next_dnd_end_ts - number - Any
dnd_status.snooze_enabled - boolean - Any
dnd_status.snooze_endtime - number - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "dnd_updated", - "user": "string", - "dnd_status": { - "dnd_enabled": true, - "next_dnd_start_ts": 0, - "next_dnd_end_ts": 0, - "snooze_enabled": true, - "snooze_endtime": 0 - } -} -``` - -### dndUpdatedUser -Do not Disturb settings changed for a member. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - dnd_updated_user
user - string - Any
dnd_status - object - Any
dnd_status.dnd_enabled - boolean - Any
dnd_status.next_dnd_start_ts - number - Any
dnd_status.next_dnd_end_ts - number - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "dnd_updated_user", - "user": "string", - "dnd_status": { - "dnd_enabled": true, - "next_dnd_start_ts": 0, - "next_dnd_end_ts": 0 - } -} -``` - -### emailDomainChanged -The workspace email domain has changed. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - email_domain_changed
email_domain - string - Any
event_ts - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "email_domain_changed", - "email_domain": "string", - "event_ts": "string" -} -``` - -### emojiRemoved -A custom emoji has been removed. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - emoji_changed
subtype - string - remove
names - array(string) - Any
event_ts - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "emoji_changed", - "subtype": "remove", - "names": [ - "string" - ], - "event_ts": "string" -} -``` - -### emojiAdded -A custom emoji has been added. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - emoji_changed
subtype - string - add
name - string - Any
value - string - Any
event_ts - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "emoji_changed", - "subtype": "add", - "name": "string", - "value": "http://example.com", - "event_ts": "string" -} -``` - -### fileChange -A file was changed. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_change
file_id - string - Any
file - object - Any
file.id - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "file_change", - "file_id": "string", - "file": { - "id": "string" - } -} -``` - -### fileCommentAdded -A file comment was added. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_comment_added
comment - - Any
file_id - string - Any
file - object - Any
file.id - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "file_comment_added", - "comment": null, - "file_id": "string", - "file": { - "id": "string" - } -} -``` - -### fileCommentDeleted -A file comment was deleted. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_comment_deleted
comment - string - Any
file_id - string - Any
file - object - Any
file.id - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "file_comment_deleted", - "comment": "string", - "file_id": "string", - "file": { - "id": "string" - } -} -``` - -### fileCommentEdited -A file comment was edited. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_comment_edited
comment - - Any
file_id - string - Any
file - object - Any
file.id - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "file_comment_edited", - "comment": null, - "file_id": "string", - "file": { - "id": "string" - } -} -``` - -### fileCreated -A file was created. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_created
file_id - string - Any
file - object - Any
file.id - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "file_created", - "file_id": "string", - "file": { - "id": "string" - } -} -``` - -### fileDeleted -A file was deleted. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_deleted
file_id - string - Any
event_ts - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "file_deleted", - "file_id": "string", - "event_ts": "string" -} -``` - -### filePublic -A file was made public. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_public
file_id - string - Any
file - object - Any
file.id - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "file_public", - "file_id": "string", - "file": { - "id": "string" - } -} -``` - -### fileShared -A file was shared. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_shared
file_id - string - Any
file - object - Any
file.id - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "file_shared", - "file_id": "string", - "file": { - "id": "string" - } -} -``` - -### fileUnshared -A file was unshared. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - file_unshared
file_id - string - Any
file - object - Any
file.id - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "file_unshared", - "file_id": "string", - "file": { - "id": "string" - } -} -``` - -### goodbye -The server intends to close the connection soon. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - goodbye
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "goodbye" -} -``` - -### groupArchive -A private channel was archived. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_archive
channel - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "group_archive", - "channel": "string" -} -``` - -### groupClose -You closed a private channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_close
user - string - Any
channel - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "group_close", - "user": "string", - "channel": "string" -} -``` - -### groupHistoryChanged -Bulk updates were made to a private channel's history. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_history_changed
latest - string - Any
ts - string - Any
event_ts - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "group_history_changed", - "latest": "string", - "ts": "string", - "event_ts": "string" -} -``` - -### groupJoined -You joined a private channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_joined
channel - object - Any
channel.id - string - Any
channel.name - string - Any
channel.created - number - Any
channel.creator - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "group_joined", - "channel": { - "id": "string", - "name": "string", - "created": 0, - "creator": "string" - } -} -``` - -### groupLeft -You left a private channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_left
channel - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "group_left", - "channel": "string" -} -``` - -### groupMarked -A private channel read marker was updated. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_marked
channel - string - Any
ts - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "group_marked", - "channel": "string", - "ts": "string" -} -``` - -### groupOpen -You opened a private channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_open
user - string - Any
channel - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "group_open", - "user": "string", - "channel": "string" -} -``` - -### groupRename -A private channel was renamed. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_rename
channel - object - Any
channel.id - string - Any
channel.name - string - Any
channel.created - number - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "group_rename", - "channel": { - "id": "string", - "name": "string", - "created": 0 - } -} -``` - -### groupUnarchive -A private channel was unarchived. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - group_unarchive
channel - string - Any
user - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "group_unarchive", - "channel": "string", - "user": "string" -} -``` - -### imClose -You closed a DM. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - im_close
channel - string - Any
user - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "im_close", - "channel": "string", - "user": "string" -} -``` - -### imCreated -A DM was created. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - im_created
channel - object - Any
channel.id - string - Any
channel.name - string - Any
channel.created - number - Any
channel.creator - string - Any
user - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "im_created", - "channel": { - "id": "string", - "name": "string", - "created": 0, - "creator": "string" - }, - "user": "string" -} -``` - -### imMarked -A direct message read marker was updated. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - im_marked
channel - string - Any
ts - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "im_marked", - "channel": "string", - "ts": "string" -} -``` - -### imOpen -You opened a DM. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - im_open
channel - string - Any
user - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "im_open", - "channel": "string", - "user": "string" -} -``` - -### manualPresenceChange -You manually updated your presence. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - manual_presence_change
presence - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "manual_presence_change", - "presence": "string" -} -``` - -### memberJoinedChannel -A user joined a public or private channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - member_joined_channel
user - string - Any
channel - string - Any
channel_type - string - C, G
team - string - Any
inviter - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "member_joined_channel", - "user": "string", - "channel": "string", - "channel_type": "C", - "team": "string", - "inviter": "string" -} -``` - -### memberLeftChannel -A user left a public or private channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - member_left_channel
user - string - Any
channel - string - Any
channel_type - string - C, G
team - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "member_left_channel", - "user": "string", - "channel": "string", - "channel_type": "C", - "team": "string" -} -``` - -### message -A message was sent to a channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
type - string - message
user - string - Any
channel - string - Any
text - string - Any
ts - string - Any
attachments - array(object) - Any
attachments.fallback - string - Any
attachments.color - string - Any
attachments.pretext - string - Any
attachments.author_name - string - Any
attachments.author_link - string - Any
attachments.author_icon - string - Any
attachments.title - string - Any
attachments.title_link - string - Any
attachments.text - string - Any
attachments.fields - array(object) - Any
attachments.fields.title - string - Any
attachments.fields.value - string - Any
attachments.fields.short - boolean - Any
attachments.image_url - string - Any
attachments.thumb_url - string - Any
attachments.footer - string - Any
attachments.footer_icon - string - Any
attachments.ts - number - Any
edited - object - Any
edited.user - string - Any
edited.ts - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "type": "message", - "user": "string", - "channel": "string", - "text": "string", - "ts": "string", - "attachments": [ - { - "fallback": "string", - "color": "string", - "pretext": "string", - "author_name": "string", - "author_link": "http://example.com", - "author_icon": "http://example.com", - "title": "string", - "title_link": "http://example.com", - "text": "string", - "fields": [ - { - "title": "string", - "value": "string", - "short": true - } - ], - "image_url": "http://example.com", - "thumb_url": "http://example.com", - "footer": "string", - "footer_icon": "http://example.com", - "ts": 0 - } - ], - "edited": { - "user": "string", - "ts": "string" - } -} -``` - -### outgoingMessage -A message was sent to a channel. - - - - -#### Payload - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
id - number - Any
type - string - message
channel - string - Any
text - string - Any
- - -##### Example of payload _(generated)_ - -```json -{ - "id": 0, - "type": "message", - "channel": "string", - "text": "string" -} -``` - - -## Schemas - -#### attachment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionAccepted values
fallback - string - Any
color - string - Any
pretext - string - Any
author_name - string - Any
author_link - string - Any
author_icon - string - Any
title - string - Any
title_link - string - Any
text - string - Any
fields - array(object) - Any
fields.title - string - Any
fields.value - string - Any
fields.short - boolean - Any
image_url - string - Any
thumb_url - string - Any
footer - string - Any
footer_icon - string - Any
ts - number - Any
- -##### Example _(generated)_ - -```json -{ - "fallback": "string", - "color": "string", - "pretext": "string", - "author_name": "string", - "author_link": "http://example.com", - "author_icon": "http://example.com", - "title": "string", - "title_link": "http://example.com", - "text": "string", - "fields": [ - { - "title": "string", - "value": "string", - "short": true - } - ], - "image_url": "http://example.com", - "thumb_url": "http://example.com", - "footer": "string", - "footer_icon": "http://example.com", - "ts": 0 -} -``` From 91c05ff77efae91ddaa41e3f57a3c0f6d73feff9 Mon Sep 17 00:00:00 2001 From: fmvilas Date: Fri, 11 Jan 2019 19:43:55 +0100 Subject: [PATCH 4/4] Fix template --- templates/markdown/.partials/events.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/markdown/.partials/events.md b/templates/markdown/.partials/events.md index 8a98a986c..99541ed7a 100644 --- a/templates/markdown/.partials/events.md +++ b/templates/markdown/.partials/events.md @@ -3,9 +3,9 @@ ###
Events a client can receive: {{#each asyncapi.events.receive as |event index|}} {{#if event.x-title}} -#### {{event.x-title}} {{#if message.deprecated}} (**deprecated**){{/if}} +#### {{event.x-title}} {{#if event.deprecated}} (**deprecated**){{/if}} {{else}} -#### Event #{{index}} {{#if message.deprecated}} (**deprecated**){{/if}} +#### Event #{{index}} {{#if event.deprecated}} (**deprecated**){{/if}} {{/if}} {{> message message=event hideTitle=true}} {{/each}} @@ -13,9 +13,9 @@ ### Events a client can send: {{#each asyncapi.events.send as |event index|}} {{#if event.x-title}} -#### {{event.x-title}} {{#if message.deprecated}} (**deprecated**){{/if}} +#### {{event.x-title}} {{#if event.deprecated}} (**deprecated**){{/if}} {{else}} -#### Event #{{index}} {{#if message.deprecated}} (**deprecated**){{/if}} +#### Event #{{index}} {{#if event.deprecated}} (**deprecated**){{/if}} {{/if}} {{> message message=event hideTitle=true}} {{/each}}