Core SDK for the CSAS WebApi
$ cnpm install cs-core-sdk 
SYNC missed versions from official npm registry.


JavaScript library of core functionalities shared by other SDKs of Česká spořitelna a.s.


  • [x] WebApi Framework - Greatly simplifies the task of writing JavaScript SDKs that communicate with WebApi.



You would normally use CoreSDK with other CSAS SDKs.

If you just want to use the SDK, there are compiled files ready to be used in the /dist folder.

You can just copy these files directly from the repository or preferably, use npm to install it into your project:

npm install cs-core-sdk --save

Usage in browser

For usage in browser, pickup the following files from the /dist folder:

  • cs-core-sdk.sfx.js - CSCoreSDK packaged for browsers
  • cs-core-sdk.sfx.d.ts - CSCoreSDK typings for browsers
  • cs-core-sdk.sfx.js.map - CSCoreSDK sourcemap for browsers

Include the cs-core-sdk.sfx.js in your page before any other CSAS SDKs:

  <script src="../node_modules/cs-core-sdk/dist/cs-core-sdk.sfx.js"></script>

The SDK will be available in global variable CSCoreSDK.

IMPORTANT! CSAS SDKs depend on a native ES6 Promise implementation to be supported. If your environment doesn't support ES6 Promises, you can polyfill.

Usage in node

For usage in node, install it through npm (see above). You can then require it by:

var CSCoreSDK = require('cs-core-sdk');


Before using any CSAS SDKs in your application, you need to initialize CSCoreSDK by providing it your WebApiKey.

CSCoreSDK.useWebApiKey( "YourApiKey" )
//You may use the CSAS SDKs now.

See configuration guide for all the available configuration options.


The SDK itself is written in TypeScript, packaged by webpack, tested by jasmine & karma and distributed thorugh npm. It uses tsd for TypeScript definitions.

In order to to develop upon this SDK, you will need the following installed globally:

  • node & npm
  • webpack - For packaging
  • karma - For testing
  • tsd - For downloading typescript definitions


After cloning the repo, run the following command to initialize the repository for development:

npm install && tsd install

You can verify everything worked as expected by running:

npm test

Directory structure

This project uses the following directory structure:

  • dist - Packaged version of this SDK ready for use.
  • build - Build artifacts (not checked in repository)
  • lib - The SDK itself
  • spec - Tests for the SDK
  • typings - Typings used by the SDK
  • tooling - Commands for building and packaging

Development commands

  • npm run clean - cleans build and dist folders
  • npm run build - performs clean and builds the SDK into bulid folder. It also generates .d.ts files using generate-tsd command.
  • npm run dist - performs build command and copies the packaged SDK files into dist folder
  • npm run test - performs build and runs tests in node and browser.
  • npm run test-browser - performs tests only in browser
  • npm run test-node - performs tests only in node
  • npm version [major|minor|patch] - releases new version of the SDK. Requires write access to repository. See npm-version for more details.


Contributions are more than welcome!

Please read our contribution guide to learn how to contribute to this project.

Terms & conditions

Please read our terms & conditions.

Current Tags

  • 1.3.4                                ...           latest (6 months ago)

9 Versions

  • 1.3.4                                ...           6 months ago
  • 1.3.2                                ...           2 years ago
  • 1.3.1                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.2                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
Maintainers (1)
Today 0
This Week 0
This Month 4
Last Day 0
Last Week 4
Last Month 9
Dependencies (16)
Dev Dependencies (17)

Copyright 2014 - 2017 © taobao.org |