HERE Data SDK for TypeScript
The HERE Data SDK for TypeScript is a TypeScript client for the HERE platform.
Health Сheck
Build and Test
| Master | Node version | Status |
|---|---|---|
| Build/Test/Bundling/Typedoc | Node 12.13.0 (LTS) |
Test Coverage
| Platform | Status |
|---|---|
| Linux |
Why Use
The HERE Data SDK for TypeScript provides support for the core HERE platform use cases. The SDK is intended to save your time and effort on using HERE REST APIs. It provides a set of stable APIs that simplify complex platform operations and keeps up to date with the latest HERE REST API changes.
The Data SDK for TypeScrypt is a modern, lightweight, and modular SDK with minimal dependencies targeted towards a wide range of hardware platforms from embedded devices to desktops.
This SDK lets you:
- Authenticate to the HERE platform using client credentials.
- Read catalog and partition metadata.
- Retrieve data from layers.
- Publish data to a versioned layer.
Additionally, the SDK includes classes for work with geospatial tiling schemes that are used by most platform catalog layers.
Backward Compatibility
We try to develop and maintain our API in a way that preserves its compatibility with the existing applications. Changes in the Data SDK for TypeScript are greatly influenced by the Data API development. Data API introduces breaking changes 6 months in advance. Therefore, you may need to migrate to a new version of the Data SDK for TypeScript every half a year.
For more information on Data API, see its Developer Guide and API Reference.
When new API is introduced in the Data SDK for TypeScript, the old one is not deleted straight away. The standard API deprecation time is 6 months. It gives you time to switch to new code. However, we do not provide ABI backward compatibility.
All of the deprecated methods, functions, and parameters are documented in the Data SDK for TypeScript API Reference and changelog.
About This Repository
The HERE Data SDK for TypeScript repository is a monorepo that contains the core components of the platform SDK organized in the NPM workspace.
All components can be used stand-alone and are in the @here subdirectory.
Installation
You can install the SDK modules using npm or add compiled bundles to an HTML page.
To install the SDK modules using npm, run the following commands:
npm install @here/olp-sdk-authentication
npm install @here/olp-sdk-core
npm install @here/olp-sdk-dataservice-read
npm install @here/olp-sdk-dataservice-write
npm install @here/olp-sdk-dataservice-apiTo use the compiled bundles from the CDN, add the following files to an HTML page:
https://unpkg.com/@here/olp-sdk-authentication/bundle.umd.min.js
https://unpkg.com/@here/olp-sdk-core/bundle.umd.min.js
https://unpkg.com/@here/olp-sdk-dataservice-api/bundle.umd.min.js
https://unpkg.com/@here/olp-sdk-dataservice-read/bundle.umd.min.js
https://unpkg.com/@here/olp-sdk-dataservice-write/bundle.umd.min.js
https://unpkg.com/@here/olp-sdk-fetch/bundle.umd.min.js
To learn how to use the Data SDK for TypeScript, see the Getting Started Guide.
Development
Dependencies
The HERE Data SDK for TypeScript has the following dependencies:
- npm 6.0.0+ (for installation instructions, see npm)
- Node.js 10+ (for installation instructions, see Node.js)
- Lerna.js 3+ (for installation instructions, see Lerna.js)
- TypeDoc 0.15+ (for installation instructions, see TypeDoc)
Note: As an alternative to npm, you can also use Yarn 1+ (for installation instructions, see Yarn).
Download Dependencies
To bootstrap the packages in the current Lerna repository, install all interdependent packages, and link any cross-dependencies, run the following command:
yarn install && yarn bootstrapBuild the SDK
To build TypeScript source code into JavaScript code, run the following command:
npm run buildTest the SDK
You can test the build results using unit and integration tests.
To test the build results using unit tests, run the following command:
npm run testTo test the build results using integration tests, run the following command:
npm run integration-testTest Coverage
To run unit tests and generate test coverage reports, run the following command:
npm run coverageGenerate Documentation with TypeDoc
To generate documentation for all modules and classes, run the following command:
npm run typedocThe dist/doc folder is generated with documentation from the annotated source code.
Use the Bundle Functionality
If you want to have a compiled project, you can use bundle commands. After running each of the following commands, you get the .js bundled files from the root folder for each package:
@here/olp-sdk-authentication/bundle.umd.min.js
@here/olp-sdk-core/bundle.umd.min.js
@here/olp-sdk-dataservice-read/bundle.umd.min.js
@here/olp-sdk-dataservice-write/bundle.umd.min.js
@here/olp-sdk-dataservice-api/bundle.umd.min.js
@here/olp-sdk-fetch/bundle.umd.min.jsTo get the bundled .js files with sourcemaps files for all modules, run the following command:
npm run bundle:devTo get a minified version for production, run the following command:
npm run bundle:prodTo get the bundled and minified .js files, run the following command:
npm run bundleLICENSE
Copyright (C) 2019–2020 HERE Europe B.V.
For license details, see the LICENSE file in the root of this project.