@qlik/sdk

The Qlik Platform SDKs are a suite of tools, libraries and, documentations that simplifies building high-quality and performant applications on top of the Qlik Sense Platform.

Usage no npm install needed!

<script type="module">
  import qlikSdk from 'https://cdn.skypack.dev/@qlik/sdk';
</script>

README

qlik-sdk-typescript

The Qlik Platform SDKs are a suite of tools, libraries and, documentations that simplifies building high-quality and performant applications on top of the Qlik Sense Platform.



Install

npm i @qlik/sdk
### or yarn
yarn add @qlik/sdk

List of modules

module name description
Auth Authenticates / authorizes users or machines

Getting started

import { Auth, AuthType, Config } from '@qlik/sdk';

const config: Config =  {
  authType: AuthType.WebIntegration,
  host: 'my-tenant.qlikcloud.com',
  webIntegrationId: '<webintegrationId>',
  autoRedirect: false
};

const auth = new Auth(config);

if(!auth.isAuthenticated()){
  auth.authenticate();
}

const me = await auth.restClient.get('/users/me')
status.innerText = `Logged in as: ${me.data.name}`

Authentication options

API keys

An API key is a token representing a user in your tenant. Anyone may interact with the platform programmatically using the API key. The token contains the user context, respecting the access control privileges the user has in your tenant. More info can be found on Qlik Dev Portal.

For a step-by-step guide on how to get an API key for your tenant, check this tutorial.

Web integration ID

A web integration ID will allow you to handle CORS requests in Qlik Sense SaaS, which by default does not allow third-party domains to interact with your tenant APIs. More info on Qlik Dev Portal.

For a step-by-step guide on how to get a web integration ID for your tenant, check Qlik Help.

Changelog

Detailed changes for each release are documented in the release notes.

Contributing

Please make sure to read and follow our Code of conduct

Bugs

Bugs can be reported by adding issues in the repository. Please use the Bug Report template.

Features

Features can also be reported by adding issues in the repository. Please use the Feature Request template.

Developing

# install dependencies
yarn

# lint - also includes TSDoc linting (warn)
yarn lint
# lint with auto fix
yarn lint:fix 

# run tests
yarn test
yarn test:unit
yarn test:integration

# generate documentation (typedoc) under `/docs`
yarn docs

# run build
yarn build
# re-build on file change - useful during development
yarn build:watch 

Test

To run specific jest test files use testRegex

Releasing

As a repo admin, on main branch: 1 - check first that the documentation is updated (run yarn docs) - if not, create new PR from a separate branch 2 - check if CHANGELOG.md has been updated - if not, please create new PR with the changes 3 - npm version x.x.x - minor for small changes / patch for bugfixes / major only for breaking changes! 4 - git push && git push --tags - the Github action publish workflow should trigger automatically and publish to npm