From ca114a7eccdbf333c915127e8d37f70cbf091e6d Mon Sep 17 00:00:00 2001 From: Marc-Antoine Lemieux Date: Wed, 30 Sep 2015 13:52:01 -0400 Subject: [PATCH 1/2] added release notes for 1.0 and added login api docs --- README.md | 20 ++++++++++++++++++-- release_notes/v1.0.0.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 release_notes/v1.0.0.md diff --git a/README.md b/README.md index a02e8c5e..8f7bd960 100644 --- a/README.md +++ b/README.md @@ -102,9 +102,25 @@ Closes the conversation widget SupportKit.close(); ``` +#### login(userId [, jwt]) +Logs a user in the widget, retrieving the conversation that user already had on other browsers and/or devices. This will destroy and reinitialize the widget with the user's data. Note that you don't need to call this after `init`, it's already done internally. This returns a promise that resolves when the widget is ready again. +``` +SupportKit.login('some-id'); + +// in case you are using the jwt authentication +SupportKit.login('some-id', 'some-jwt'); + +``` + #### logout() -Removes deviceId cookie from the browser, effectively logging out the user. -Destroys the widget completely. Can be initiated again manually with `SupportKit.init(...)` +Logs out the current user and reinitialize the widget with an anonymous user.This returns a promise that resolves when the widget is ready again. + +``` +SupportKit.logout(); +``` + +#### destroy() +Destroys the widget and makes it disappear. The widget has to be reinitialized with `init` to be working again because it also clears up the app token from the widget. ``` SupportKit.logout(); diff --git a/release_notes/v1.0.0.md b/release_notes/v1.0.0.md new file mode 100644 index 00000000..cc1ade99 --- /dev/null +++ b/release_notes/v1.0.0.md @@ -0,0 +1,28 @@ +# Web SDK is now 1.0! + +We cooked up a big release for this milestone. We already had cool features like the actions buttons on our mobile SDKs, but now, you can also have them! We also packed this release with a lot of fixes and new things that will surely be useful to a lot of you guys. + +# Web SDK is seeing some action! +![SupportKit Web Action Buttons](http://docs.supportkit.io/images/action_button_web.png) + +The Web SDK now features Actions! +You can now send Actions along with messages to your users. This makes it easier to direct your users to some part of your website and help them find exactly what they need. + +See our [docs](http://docs.supportkit.io/javascript#sending-action-buttons) for all the details. + +# Login, Logout, JWT and your conversation everywhere + +You can now specify a `userId` and (optionally) a JSON Web Token (JWT) to securely log users in and out of your application. Every user session will hold its own conversation and properties. That same user is now able to log in into their iOS device, Android device, or on your website and retain their conversation! + +As usual, see our [docs](http://docs.supportkit.io/javascript#users-on-multiple-devices) for the details. + +# Fixes and improvements + +- We rewrote the whole communication layer to not rely on `jQuery.ajax`. This means no more problems with Authorization headers when you are using the JWT in your own app. +- You can now send links in your messages. We added a link detection feature that will render them correctly. It's currently pretty basic and will detect anything under the following format: `procotol://uri` so you could send a normal url or even some link to iTunes or the Play store if you wanted to. We are not detecting emails for now, but you could achieve that with action buttons! +- We worked hard on building a better experience on mobile. The widget should now use the whole screen when opened. +- A lot of CSS fixes + +# API Additions + +1. SupportKit global now has `login` and `logout`. Check out our [README](https://github.com/supportkit/supportkit-js) for a more complete API description. \ No newline at end of file From 5e6b23733368c3c2ac6c17d3086be3e33915fd92 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Lemieux Date: Wed, 30 Sep 2015 14:19:10 -0400 Subject: [PATCH 2/2] fix destroy example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f7bd960..93fe28a2 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ SupportKit.logout(); Destroys the widget and makes it disappear. The widget has to be reinitialized with `init` to be working again because it also clears up the app token from the widget. ``` -SupportKit.logout(); +SupportKit.destroy(); ``` #### sendMessage(text)