Insights client for the iTwin platform
npm install @itwin/insights-clientCopyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.
iTwin.js is an open source platform for creating, querying, modifying, and displaying Infrastructure Digital Twins. To learn more about the iTwin Platform and its APIs, visit the iTwin developer portal.
If you have questions, or wish to contribute to iTwin.js, see our Contributing guide.
Contains the @itwin/insights-client package that wraps sending requests to the reporting service. Visit the Insights API and Carbon calculation API for more documentation on the insights service.
- Create .env file and configure the following variables:
```
TEST_ITWIN_NAME=
TEST_IMODEL_NAME=
AUTH_AUTHORITY="https://ims.bentley.com"
AUTH_CLIENT_ID=
AUTH_CLIENT_SECRET=
AUTH_REDIRECT_URL=
AUTH_SCOPES=itwin-platform
APIS_REPORTING_BASE_URL=https://api.bentley.com/insights/reporting
APIS_CARBONCALCULATION_BASE_URL=https://api.bentley.com/insights/carbon-calculation
APIS_GROUPING_AND_MAPPING_BASE_URL=https://api.bentley.com/grouping-and-mapping
APIS_NAMED_GROUPS_BASE_URL=https://api.bentley.com/named-groups
APIS_IMODELS_BASE_URL=https://api.bentley.com/imodels
APIS_IMODELS_VERSION=itwin-platform.v2
APIS_ITWINS_BASE_URL=https://api.bentley.com/itwins
TEST_USERS_ADMIN1_EMAIL=
TEST_USERS_ADMIN1_PASSWORD=
TEST_BEHAVIOR_OPTIONS_RECREATE_IMODEL=<1 to recreate iModel for each test suite run>
- Test project and imodel will be created automatically with provided names.
- You can then run npm run test:integration.oneClickLcaClient
- There are currently no tests for
Install dependencies and build source
``
npm install
npm run build
Run tests
``
npm run test
Run linters
``
npm run lint
.githooks
- copyright-linter
To use custom hooks, run the command:
```
git config --local core.hooksPath .githooks/