Kinvey SDK Download

Version 3.10.2 - Mar 29, 2018
We recommend you use NPM to install the latest library.
npm install kinvey-angular2-sdk

Changelog

Want to see how the rest of your backend is evolving? Check out the timeline.

Our SDKs are now open source! If you'd like to contribute code, suggest improvements or just take a look at how things work, check out the source on github.

3.10.2
- Mar 29, 2018

  • Enhancement: Previously, a datastore instance would implicitly push pending entity changes before performing a request that would overwrite the local entity changes. This change removes the implicit push and will instead return an error stating that there are entities that need to be synced before you complete the action. #276
  • Enhancement: You can now provide a instanceId as a config option to init(). This will setup the backend and Mobile Identity Connect API urls to use your instanceId properly. #278
Kinvey.init({
  appKey: '<appKey>',
  appSecret: '<appSecret>'
  instanceId: '<my-subdomain>'
});
  • Fixed: Check that a value is an object before calling Object.keys() in Query.isSupportedOffline(). #245
  • Fixed: Use es6-promise for promises in live service related files instead of native promises. #272

3.10.1
- Mar 13, 2018

  • Enhancement: The default API version used by Mobile Identity Connect is now v3. #259 #268

  • Enhancement: Auto Pagination Support. #260

The Kinvey backend imposes a limit of 10,000 entities on data requests. If your app needs to pull a larger number of entities to the cache, you can request the SDK to "auto-paginate". The SDK will then retrieve the entire set of entities page by page. This feature only applies to Cache and Sync stores.

var dataStore = Kinvey.DataStore.collection('books', Kinvey.DataStoreType.Sync);

//Pull the entire collection page by page.
var promise = dataStore.pull(null, { autoPagination: true })
  .then(function onSuccess(count) {
    // "count" represents the number of entities retrieved
  }).catch(function onError(error) {
    // ...
  });

Breaking change: Previously, DataStore.pull() returned an array of the retrieved entities. With this release, the response of pull has changed to the count of retrieved entities.

If you need the array of entities retrieved by a pull in your app, you should call find after the pull has completed.

  • Fixed: The authorization header for Mobile Identity Connect token requests now uses the long-form OAuth Client ID. This fix is only relevant to apps that use multiple auth providers. A detailed discussion on OAuth Client IDs can be found in the Mobile Identity Connect guide. #263

3.10.0
- Feb 26, 2018

  • Enhancement: We've restructured our class hierarchy for working with data, to facilitate future performance improvements.
  • Enhancement: CacheStore methods create() and update() can now handle more concurrent requests.
  • Enhancement: CacheStore.delete() method now applies the same query both locally and against the backend, instead of making separate "by-id" requests for entities found in the cache.
  • Enhancement: The clear() method for a CacheStore or SyncStore now clears the sync queue.
  • Enhancement: Sync items found for entities which are no longer present in cache will be cleared when a sync push is performed to prevent errors.
  • Enhancement: Improved the throttling of requests when doing a sync push.
  • Fixed: Database connections to WebSQL are now cached. #241
  • Fixed: Some browsers don't support Number.isNaN() so we added a polyfill. #243
  • Fixed: Update typescript definitions to allow anonymouse user signup. #242
  • Fixed: Export LiveServiceFacade instead of LiveService. #254

3.9.10
- Feb 9, 2018

  • Use correct config property for setting storage providers #228
  • _id field not returned when specifying fields for a query #233

3.9.9
- Jan 26, 2018

  • Enhancement: You can now specify which storage provider to use to cache data. See the code snippet below for an example. #213
Kinvey.init({
  appKey: '<appKey>',
  appSecret: '<appSecret>'
  storage: Kinvey.StorageProvider.WebSQL // or [Kinvey.StorageProvider.WebSQL, Kinvey.StorageProvider.IndexedDB]
});

// Possible Values
enum StorageProvider {
  WebSQL,
  IndexedDB,
  LocalStorage,
  SessionStorage,
  Memory
}
  • Enhancement: You can now use a datastore to perform actions on a subset of data in a collection without providing a query each time to match that subset of data. See the code snippet below for an example. #220
var datastore = Kinvey.DataStore.collection('books', Kinvey.DataStore.Sync, { tag: 'Kinvey' }); // Tag the datastore
var query = new Kinvey.Query().equalTo('author', 'Kinvey');
datastore.pull(query)
  .then(function() {
    return datastore.find().toPromise();
  })
  .then(function(books) {
    // all of these books have Kinvey as their author
  });
  • Fixed: Correctly sort entities that have a null or undefined value for the sort field. #205
  • Fixed: Add polyfill for Object.prototype.assign(). #225

3.9.6
- Jan 12, 2018

  • Fixed: Subscribe for messages sent to user's personal collections channel #172
  • Fixed: Allow null and undefined values to be used in a equal and notEqual query #201
  • Fixed: Remove fileds when processing query after sorting data #202

3.9.4
- Dec 14, 2017

  • Improvement: Use PubNub 4.19.0 rather then our custom fork. #193
  • Improvement: We have updated the TypeScript definitions to support custom properties on a User instance. #183
  • Improvement: Adopt a mono repo style repository. This change has no impact on the SDK output. It restructures our codebase to make releases and open source contributions easier. #171

3.9.0
- Sep 24, 2017

  • Imporvement: Live Service is now EA (Early Adopter) for our Angular2 SDK. Please check our Live Service Guide.
  • Improvement: Support push notifications. Please see Push Guide.
  • Bugfix: Support mutiple MIC providers in a single app.
  • Bugfix: Data was not correctly synced with the backend when using the LocalStorageAdapter and SessionStorageAdapter.
  • Bugfix: Support webpack bundles.

3.8.0
- Aug 24, 2017

  • Added: Requests are logged using loglevel.
  • Added: Allow a micId to be added to the client_id value sent for a Mobile Identity Connect request.
  • Added: Replace native node modules with npm packages.
  • Fixed: The active user is now stored in local storage.
  • Fixed: Default to removing a user with hard equal to false.
  • Fixed: Queries will be properly encoding.
  • Fixed: Throw any errors encountered when trying to load a storage adapter.
  • Deprecated Kinvey.initialize(). Please use Kinvey.init() instead. If you use Kinvey.init() you might not have an active user even though you had already logged in. To fix this, use Kinvey.initialize() to move the active user to the correct storage. From then on you will be able to use Kinvey.init() and retrieve your active user. Kinvey.init() does not return a promise and is synchronous.
// Will return the shared client instance
Kinvey.init({
  appKey: '<appKey>',
  appSecret: '<appSecret>'
});

3.5.2
- Jul 8, 2017

  • Fixed: Allow special characters ('.', '$', '~', '>', '<', '!', '@') to be in the _id for an entity. #134
  • Fixed: Import es6-promise to prevent Promise Undefiend errors on environments that do not have a native promise implementation. #135
  • Fixed: Errors will now show the message property properly when logging errors to the console. #136
  • Fixed: Added a try/catch around openDatabase(). This allows any errors thrown when opening a new database connection to WebSQL be caught and used to reject the pending promise. #17

3.5.1
- Jun 30, 2017

  • Changed: https: will automatically be used when a custom hostname is missing a protocol. #129
  • Fixed: Prevent the active user from being null for a short period of time when setting the active user. #128

3.5.0
- May 2, 2017

  • Added: usePopupClass() as a static function to the User class for registering a popup class to be used for MIC authentication.
  • Added: operation property to results returned when pushing sync items to the backend. The property either be equal to Kinvey.SyncOperation.Create, Kinvey.SyncOperation.Update, or Kinvey.SyncOperation.Delete.
var store = Kinvey.DataStore.collection('books', Kinvey.DataStoreType.Sync);
var query = new Kinvey.Query().equalTo('title', 'Kinvey');
store.remove(query)
  .then(function(response) {
    // response.count contains the count of books removed matching the query
    return store.push();
  })
  .then(function(results) {
    // Results is an array of responses from the pushing the sync items.
    // Each result object now contains an operation set to Kinvey.SyncOperation.Delete
  })
  • Changed: Updated typescript definitions.
  • Changed: restore() static function on the User class to throw an error whenever it is called. This function required the master secret for an application. We strongly advise not to do this in your application.
  • Changed: All toJSON() functions have now been replaced by toPlainObject(). The returned result is the exact same.
  • Changed: save(), create(), and update() on datastore instances to no longer accept an array of entities. See the example below to see how to save an array of entities.
var books = [{ name: 'book1' }, { name: 'book2' }];
var store = Kinvey.DataStore.collection('books');
var promises = [];

// Loop through each of the books and save them one by one.
// You can now reference a book easily in the event an error
// occurs when saving a book.
books.forEach(function(book) {
  var promise = store.save(book)
    .catch(function(error) {
      console.log('Error saving book ' + book.name);
    });
  promises.push(promise);
});

// Using a third party library wait for all the promises to complete
RSVP.Promise.all(promises)
  .then(function(books) {
    // ...
  });
  • Changed: remove() and removeById() on datastore instances to now return the count of entities removed and not the actual entity removed.
var store = Kinvey.DataStore.collection('books');

// Remove books using a query
var query = new Kinvey.Query().equalTo('title', 'Kinvey');
store.remove(query)
  .then(function(response) {
    // response.count contains the count of books removed matching the query
  });

// Remove a book using an id
store.removeById('1')
  .then(function(response) {
    // response.count will equal 1 if the book was removed or 0 if the book was not removed
  });
  • Removed: init() static function on Kinvey namespace. This was deprecated with v3.3.3.
  • Removed: baseUrl, protocol, and host properties on a client instance. These were deprecated with v3.0.0.
  • Removed: syncCount() and purge() on CacheStore and SyncStore instances. These were deprecated with v3.2.0.
  • Removed Kinvey.Users and Kinvey.UserStore. These were deprecated with v3.2.0.

3.4.5
- Apr 13, 2017

  • Update type definitions for Kinvey.Files.
  • Add missing data property for Kinvey.User type definitions.
  • Share active user information with 1.x SDK. Just use version 3.4.5 to share active user information. No changes are needed to your 3.x application.
  • Use query to push a subset of sync entities to the backend. #120
  • Add more tests for query. #121
  • Allow multiple sync push operations to be in progress at the same time for difference collections.. Only one sync push operation is allowed to be in progress for the same collection. This fixes an issue caused with #117 that only allowed one sync push operation to be in progress regardless of the collection. #123

3.4.4
- Mar 27, 2017

  • Initial Release

Download Older Versions

We recommend using the latest version.

Version Download Date
3.10.2 Download Mar 29, 2018
3.10.1 Download Mar 13, 2018
3.10.0 Download Feb 26, 2018
3.9.10 Download Feb 9, 2018
3.9.9 Download Jan 26, 2018
3.9.6 Download Jan 12, 2018
3.9.4 Download Dec 14, 2017
3.9.0 Sep 24, 2017
3.8.0 Download Aug 24, 2017
3.5.2 Jul 8, 2017
3.5.1 Jun 30, 2017
3.5.0 Download May 2, 2017
3.4.5 Download Apr 13, 2017
3.4.4 Mar 27, 2017
Got a question?