import BaseAPI from './BaseAPI' ; export default class Chat extends BaseAPI { public delete_ ( channel , ts , as_user = null , extraArgs = { } ) { const args = { channel , ts , as_user , ... extraArgs } ; return this . _post ( 'chat.delete' , args ) ; } public deleteScheduledMessage ( channel , scheduled_message_id , as_user = null , extraArgs = { } ) { const args = { channel , scheduled_message_id , as_user , ... extraArgs } ; return this . _post ( 'chat.deleteScheduledMessage' , args ) ; } public getPermalink ( channel , message_ts , extraArgs = { } ) { const args = { channel , message_ts , ... extraArgs } ; return this . _get ( 'chat.getPermalink' , args ) ; } public meMessage ( channel , text , extraArgs = { } ) { const args = { channel , text , ... extraArgs } ; return this . _post ( 'chat.meMessage' , args ) ; } public postEphemeral ( channel , text , user , blocks = null , icon_emoji = null , icon_url = null , link_names = false , parse = 'none' , thread_ts = null , username = null , extraArgs = { } ) { const args = { channel , text , user , blocks , icon_emoji , icon_url , link_names , parse , thread_ts , username , ... extraArgs } ; return this . _post ( 'chat.postEphemeral' , args ) ; } public postMessage ( channel , text , as_user = null , attachements = null , blocks = null , icon_emoji = null , icon_url = null , link_names = false , mrkdwn = true , parse = 'none' , reply_broadcast = true , thread_ts = null , unfurl_links = null , unfurl_media = null , username = null , extraArgs = { } ) { const args = { channel , text , as_user , attachements , blocks , icon_emoji , icon_url , link_names , mrkdwn , parse , reply_broadcast , thread_ts , unfurl_links , unfurl_media , username , ... extraArgs } ; return this . _post ( 'chat.postMessage' , args ) ; } public scheduleMessage ( channel , post_at , text , as_user = null , attachements = null , blocks = null , link_names = false , mrkdwn = true , parse = 'none' , reply_broadcast = true , thread_ts = null , unfurl_links = null , unfurl_media = null , username = null , extraArgs = { } ) { const args = { channel , post_at , text , as_user , attachements , blocks , link_names , mrkdwn , parse , reply_broadcast , thread_ts , unfurl_links , unfurl_media , username , ... extraArgs } ; return this . _post ( 'chat.scheduleMessage' , args ) ; } public unfurl ( channel , ts , unfurls , user_auth_message = null , user_auth_required = '0' , user_auth_url = null , extraArgs = { } ) { const args = { channel , ts , unfurls , user_auth_message , user_auth_required , user_auth_url , ... extraArgs } ; return this . _post ( 'chat.unfurl' , args ) ; } public update ( channel , text , ts , as_user = null , blocks = null , attachements = null , link_names = false , parse = 'none' , extraArgs = { } ) { const args = { channel , text , ts , as_user , blocks , attachements , link_names , parse , ... extraArgs } ; return this . _post ( 'chat.update' , args ) ; } }