open-index/open-npm huggingface dataset:
npm package: @itways/events-sdk
Description: Integral Ways Analytics SDK to send events to backend (React, Angular, JS, React Native compatible)
Author: Salah Atwa
Latest version: 1.2.5

# Frontend Analytics SDK

Send events from your frontend (React, Angular, plain JS) to your backend analytics platform.

## 🔧 Build SDK

```bash
# Install dependencies
npm install

# Clean old build (optional)
npm run clean

# Build (ESM + UMD formats)
npm run build
```

## Output

```bash
dist/
├── index.esm.js   ← For modern builds (ES Modules)
└── index.umd.js   ← For CDN/global browser use
```

## Publish 

```bash
npm login
npm publish --access public
```

## 🚀 Install

```bash
npm install @itways/events-sdk
```

## 🔧 Usage

```bash
import { init, trackEvent } from '@itways/events-sdk';

init({
  apiKey: 'your-api-key',
  secret: 'your-secret',
  endpoint: 'https://api.yourdomain.com/api/events'
});

trackEvent('pageview', { url: window.location.href });
```

``` bash
<script src="https://cdn.yourdomain.com/sdk/index.umd.js"></script>
<script>
  YourAnalytics.init({ apiKey: 'x', secret: 'y', endpoint: 'https://...' });
  YourAnalytics.trackEvent('click', { btn: 'save' });
</script>
```
## 🔐 Setup Your Secrets (once)
Go to your GitHub repo > Settings > Secrets and variables > Actions > New Repository Secret:

NPM_TOKEN: Your personal npm access token

Generate from https://www.npmjs.com/settings > Access Tokens (type: automation)

Use read & publish access

## Automation 
tag version should be changed every creation
> git tag v1.0.3
> git push origin v1.0.3
npm package: @itwhip/instant-ride-sdk
Description: Official ItWhip Instant Ride SDK for hotel property integration with GDS systems
Author: ItWhip Technologies
Latest version: 3.3.2

# ItWhip Instant Ride SDK

Official SDK for integrating ItWhip's instant luxury transportation.

## Installation

npm install @itwhip/instant-ride-sdk

## Documentation

https://developers.itwhip.com

## Support

support@itwhip.com
npm package: @itwin/appui-codemod
Description: Codemod scripts for AppUI.
Author: Bentley Systems, Inc.
Latest version: 0.1.0

# @itwin/appui-codemod

This package provides a tool that runs a collection of codemod scripts for use with [jscodeshift](https://github.com/facebook/jscodeshift) that help update projects using AppUI.

## Usage

```cmd
npx @itwin/appui-codemod <codemod> <paths...>

Applies an `@itwin/appui-codemod` to the specified paths

Positionals:
  codemod  The name of the codemod                                      [string]
  paths    Paths forwarded to `jscodeshift`                             [string]

Options:
  --version       Show version number                                  [boolean]
  --help          Show help                                            [boolean]
  --debug         Prints configuration used by `jscodeshift`.
                                                      [boolean] [default: false]
  --printOptions  Options that are passed down to recast's printer. See:
                  https://github.com/benjamn/recast/blob/master/lib/options.ts

Examples:
  npx @itwin/appui-codemod v4.0.0/full src  Apply all 4.0.0 transforms on `src`
                                            path.
  npx @itwin/appui-codemod                  Apply a specific transform on `src`
  v4.0.0/layout-react src                   path.
  npx @itwin/appui-codemod <codemod>        Pass additional options to recast's
  <paths...> --printOptions.quote="single"  printer.
  npx @itwin/appui-codemod <codemod>        Pass additional options to recast's
  <paths...> --printOptions='{\"lineTermin  printer as a string.
  ator\":\"\r\n\"}'

Additional options are passed down to `jsdcodeshift`.
```

### Available codemods

To update to **4.0.0** version of **AppUI** use `v4.0.0/full` codemod. Alternatively, distinct codemods can be found under [v4.0.0](./src/v4.0.0/) directory.

### Debug `jscodeshift` options

Use `--debug` to print options provided to `jscodeshift`.

### Recast options

Use `--printOptions` to pass down options to recast's printer. See: <https://github.com/benjamn/recast/blob/master/lib/options.ts>
npm package: @itwin/appui-layout-react
Description: iTwin.js Nine-zone React UI components
Author: Bentley Systems, Inc.
Latest version: 4.8.3

# @itwin/appui-layout-react

Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.

## Description

The **@itwin/appui-layout-react** package contains internal React components for the AppUI-react panels, widget UI and other purposes and is not expected to be used directly by applications.

## Documentation

See the [iTwin.js](https://www.itwinjs.org/learning/ui/) documentation for more information.

### Coding Guidelines

Look at the existing code and try to keep your code similar.

- Every component class name should follow nz-path-to-component-componentName naming style.

- Every inner class name should have nz- prefix.

- Import the Sass classnames with: `import "./YourComponent.scss";`

- Every component should accept `className?: string` and `style?: React.CSSProperties` props.

- Components that accept one or a list of children should use the `children?: React.ReactNode` prop.

### Advice

- Use [classnames](https://www.npmjs.com/package/classnames) function to create className strings for the elements.

- Use `const className` inside render for the root element className value.
npm package: @itwin/appui-react
Description: A react component library for AppUI framework
Author: Bentley Systems, Inc.
Latest version: 5.27.1

# @itwin/appui-react

Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.

## Description

The **@itwin/appui-react** package contains application fragments for View selection, and configuration of the application UI including the Backstage, Frontstages, Widgets, etc.

The AppUI React package is a portion of the iTwin.js User Interface library. It consists of major fragments of code that combine the
functionality from the `@itwin/core-frontend` with the core-react and imodel-components packages to implement substantial
functionality that can be used within an iTwin.js application.

The package makes use of React for rendering of the user interface, and uses react-redux and its concept of the state store for
actions using reducers.

There are a number of sub-frameworks, each which has a set of components, actions, and reducers, and contributes to the overall State. Each such
sub-framework is contained in a separate folder.

## Usage

To get started with the `@itwin/appui-react` package, simply import the necessary components and utilities:

```tsx
import {
  BackstageComposer,
  ConfigurableUiContent,
  ThemeManager,
} from "@itwin/appui-react";

export function App() {
  return (
    <ThemeManager>
      <ConfigurableUiContent appBackstage={<BackstageComposer />} />
    </ThemeManager>
  );
}
```

For more details, check out [Get Started](https://www.itwinjs.org/ui/appui/get-started/) guide or [@itwin/appui-react documentation](https://www.itwinjs.org/reference/appui-react/).
npm package: @itwin/cloud-agnostic-core
Description: Package that allows configuring components loaded by dependency injection
Author: Bentley Systems, Inc.
Latest version: 3.0.4

# @itwin/cloud-agnostic-core

Copyright © Bentley Systems, Incorporated. All rights reserved. See [LICENSE.md](./LICENSE.md) for license terms and full copyright notice.

## About this package

This is a core package that allows to load dependencies into an application based on the configuration using [`inversify`](https://www.npmjs.com/package/inversify) framework. It allows the user to define what dependencies are required and register specific implementations.
npm package: @itwin/components-react
Description: A react component library of iTwin.js UI data-oriented components
Author: Bentley Systems, Inc.
Latest version: 5.27.1

# @itwin/components-react

Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.

## Description

The **@itwin/components-react** package contains React components that are data-oriented, such as PropertyGrid and Tree.

## Usage

To get started with the `@itwin/components-react` package, simply import the necessary components and utilities:

```tsx
import { Panel, Title } from "@itwin/components-react";

function ListPanel() {
  return (
    <Panel>
      <Title>Panel title</Title>
    </Panel>
  );
}
```

For more details, check out the [@itwin/components-react documentation](https://www.itwinjs.org/reference/components-react/).
npm package: @itwin/core-react
Description: A react component library of iTwin.js UI general purpose components
Author: Bentley Systems, Inc.
Latest version: 5.27.1

# @itwin/core-react

Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.

## Description

The **@itwin/core-react** package contains general purpose React components, such as Dialog, MessageBox, SearchBox, RadialMenu.

## Usage

To get started with the `@itwin/core-react` package, simply import the necessary components and utilities:

```tsx
import { ContextMenu, ContextMenuItem } from "@itwin/core-react";

export function App() {
  return (
    <ContextMenu>
      <ContextMenuItem>Item 1</ContextMenuItem>
    </ContextMenu>
  );
}
```

For more details, check out the [@itwin/core-react documentation](https://www.itwinjs.org/reference/core-react/).
npm package: @itwin/cra-template-desktop-viewer
Description: The iTwin Viewer template for Create React App electron-based desktop applications.
Latest version: 5.0.0

# iTwin Viewer Create React App Template for Desktop

This is a template for desktop applications that are based on [Electron](https://www.electronjs.org/) and the [iTwin Viewer](https://github.com/itwin/viewer/tree/main/packages/modules/desktop-viewer-react) for [Create React App](https://github.com/facebook/create-react-app).

To use this template, add `--template @itwin/desktop-viewer` when creating a new app. You should also use the @bentley/react-scripts scripts version to compile your application.

For example:

```sh
npx create-react-app my-app-name --template @itwin/desktop-viewer --scripts-version @bentley/react-scripts
```

For more information, please refer to:

- [Getting Started](https://create-react-app.dev/docs/getting-started) – How to create a new app.
- [User Guide](https://create-react-app.dev) – How to develop apps that are bootstrapped with Create React App.
- [Developing applications with the iTwin Viewer Desktop Template](https://github.com/iTwin/viewer/blob/master/packages/modules/cra-template-desktop-viewer/template/README.md) - iTwin Viewer Template README
npm package: @itwin/cra-template-web-viewer
Description: The iTwin Viewer template for Create React App web applications.
Latest version: 5.0.0

# iTwin Viewer Create React App Template for Web

This is a template for web applications that are based on the [iTwin Viewer](https://github.com/itwin/viewer/tree/main/packages/modules/web-viewer-react) for [Create React App](https://github.com/facebook/create-react-app).

To use this template, add `--template @itwin/web-viewer` when creating a new app. You should also use the `@bentley/react-scripts` scripts version to compile your application.

For example:

```sh
npx create-react-app@latest my-app-name --template @itwin/web-viewer --scripts-version @bentley/react-scripts
```

For more information, please refer to:

- [Getting Started](https://create-react-app.dev/docs/getting-started) – How to create a new app.
- [User Guide](https://create-react-app.dev) – How to develop apps that are bootstrapped with Create React App.
- [Developing applications with the iTwin Viewer Template](https://github.com/iTwin/viewer/blob/master/packages/modules/cra-template-web-viewer/template/README.md) - iTwin Viewer Template README
npm package: @itwin/create-imodel-react
Description: Components to create or update an iModel.
Author: Bentley Systems, Inc.
Latest version: 2.2.1

# @itwin/create-imodel-react

## Description

Contains components to create or update an iModel.

## Development

When making changes to the src, run `rushx start` in the dev folder to enable source watching and rebuild, so the storybook dev-server will have access to updated code on successful code compilation.

## Changelog

See complete CHANGELOG [here](https://github.com/iTwin/admin-components-react/blob/main/packages/modules/create-imodel/CHANGELOG.md)
npm package: @itwin/delete-imodel-react
Description: Component to delete the selected iModel.
Author: Bentley Systems, Inc.
Latest version: 2.1.0

# @itwin/delete-imodel-react

## Description

Contains a component to delete an iModel.

## Development

When making changes to the src, run `rushx start` in the dev folder to enable source watching and rebuild, so the storybook dev-server will have access to updated code on successful code compilation.

## Changelog

See complete CHANGELOG [here](https://github.com/iTwin/admin-components-react/blob/main/packages/modules/delete-imodel/CHANGELOG.md)
npm package: @itwin/delete-itwin-react
Description: Component to delete the selected iTwin.
Author: Bentley Systems, Inc.
Latest version: 2.0.0

# @itwin/delete-itwin-react

## Description

Contains a component to delete an iTwin.

## Development

When making changes to the src, run `rushx start` in the dev folder to enable source watching and rebuild, so the storybook dev-server will have access to updated code on successful code compilation.

## Changelog

See complete CHANGELOG [here](https://github.com/iTwin/admin-components-react/blob/main/packages/modules/delete-itwin/CHANGELOG.md)
npm package: @itwin/ec3-widget-react
Description: An iTwin.js 3D Viewer Widget that interfaces with the EC3 Carbon Calculation.
Author: Bentley Systems, Inc.
Latest version: 0.10.2

# @itwin/ec3-widget-react

Copyright © Bentley Systems, Incorporated. All rights reserved.

The EC3 widget is a UI component for iTwin Viewer applications that simplifies how users (and developers) interface with the [Carbon Calculation EC3 APIs](https://developer.bentley.com/apis/carbon-calculation/overview/).
The ec3-widget-react package provides a UiProvider class, `EC3Provider`, which can be passed into the `uiProviders` prop of the iTwin Viewer's `<Viewer />` component.

## Getting Started

This is not a standalone UI and requires a parent iTwin Viewer application to work as intended.
A guide on how to create a basic iTwin Viewer application can be found [here](https://www.itwinjs.org/learning/tutorials/develop-web-viewer).
This package provides a viewer _widget_. Documentation on how to add a widget to your application can be found [here](https://developer.bentley.com/tutorials/itwin-viewer-hello-world/#2-your-first-ui-widget).

## Permissions and Scopes

The SPA client used by your iTwin viewer must have the `itwin-platform` scope.

Users must have the `carbon_calculate` and `insights_view` [permissions](https://developer.bentley.com/apis/carbon-calculation/operations/create-oneclicklca-job/#authorization) assigned at either the Project or iModel level. Additional instruction on how to create roles and assign permissions can be found in the [iTwin Platform Projects API documentation](https://developer.bentley.com/apis/projects/tutorials/).

## Sample usage

You first need to create an OAuth application in https://buildingtransparency.org/ec3/manage-apps/developers.
Add the EC3Provider to UI providers using your Client Id and Redirect URI in App.tsx.

```tsx
import { EC3Provider } from "@itwin/ec3-widget-react";
...

const overridenStrings = new Map()
  .set("defaultStringKey","customLocalizedString");

await EC3Widget.initialize({
  localization: IModelApp.localization,
  // this is an optional parameter to override the default strings
  localizationOverrides: overridenStrings
  });

<Viewer
  ...
  uiProviders={[
    new EC3Provider({
      clientId: "...",
      redirectUri: "...",
    }),
  ]}
/>
```

Then handle the redirect using the following code in Index.tsx.

```tsx
import { handleEC3AuthCallback } from "@itwin/ec3-widget-react";

} else if (window.location.pathname === "/callback") {
  handleEC3AuthCallback({
    clientId: "...",
    redirectUri: ".../callback",
  });
} else {
```
npm package: @itwin/error-handling-react
Description: iTwin Error Handling frontend components
Author: Bentley Systems, Inc.
Latest version: 2.0.1

# iTwin Error Handling React

Provides components for a uniform way of handling errors within iTwin applications.

## Development

When making changes to the src, run `npm start` in the package's root folder to enable source watching and rebuild, so the dev-server will have access to updated code on successful code compilation.
npm package: @itwin/extension-client
Description: iTwin.js Extension Client
Author: Bentley Systems, Inc.
Latest version: 0.6.0

# iTwin.js Extension Client

Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.

## Description

The __@itwin/extension-client__ package contains client wrappers for viewing, downloading, publishing, and updating iTwin.js Extensions from the iTwin.js Extension Service.

## Documentation

See the [iTwin.js](https://www.itwinjs.org) documentation for more information.
npm package: @itwin/geo-tools-react
Description: React Geospatial Tools
Author: Bentley Systems, Inc.
Latest version: 6.0.1

# @itwin/geo-tools-react

Copyright © Bentley Systems, Incorporated. All rights reserved.

The geo-tools-react provides various React components and iTwin.js tools to support GIS workflows.

## Usage

### What to add in your iTwin AppUI based application

With a few short lines, you can add the Geo Address Search tool to your app.

### Call GeoTools.initialize() **_before_** making use of the providers

```ts
import { GeoTools } from "@itwin/geo-tools-react";
...
await GeoTools.initialize(IModelApp.localization);
```

### Register Provider

```ts
import { UiItemsManager } from "@itwin/appui-abstract";
import { GeoToolsAddressSearchProvider } from "@itwin/geo-tools-react";
...
UiItemsManager.register(new GeoToolsAddressSearchProvider());
```
npm package: @itwin/geonames-extension
Description: Geolocation Extension
Author: Bentley Systems, Inc.
Latest version: 3.3.5

# Geonames Example Extension

Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.

An iTwin.js Extension that displays markers at locations of named geographic features from the [GeoNames](https://www.geonames.org/) geographical database. Hovering over a marker shows a tooltip containing the name of the location and its population.  Clicking a marker causes the view to zoom to that location.

This extension is an example of a extension that can be added to iTwin.js host applications. See <http://itwinjs.org> for comprehensive documentation on the iTwin.js API and the various constructs used in this sample.

## Development Setup

1. Select and prepare an iTwin.js host application. You can use the [Simple Viewer App](https://github.com/imodeljs/imodeljs-samples/tree/master/interactive-app/simple-viewer-app), for example.

2. The dependencies are installed as part of "rush install" in the iTwin.js monorepository.

3. Build the extension as part of the "rush build" in the iTwin.js monorepository, or separately build using the npm build command.

  ```sh
  npm run build
  ```

4. Copy all the output files in the lib/build directory tree to the host app's ./build/imjs_extensions/geoNames directory.

5. Start the host application - go to its directory and run:

  ```sh
  npm run start:servers
  ```

6. Open a web browser (e.g., Chrome or Edge), and browse to localhost:3000.
7. Add the following line to the app's startup method - `ExtensionTool.run("localhost:3000/geoNames");`.  Where `localhost:3000` is the location of the app locally
8. The following toolIds will be available: `GeoNamesOnTool`, `GeoNamesOffTool`, `GeoNamesUpdateTool`

## Contributing

[Contributing to iTwin.js](https://github.com/iTwin/itwinjs-core/blob/master/CONTRIBUTING.md)
npm package: @itwin/imodel-browser-react
Description: Components that let the user browse the iModels of a context and select one.
Author: Bentley Systems, Inc.
Latest version: 4.1.0

# @itwin/imodel-browser-react

## Description

Contains components that let the user browse the iModels of a context and select one.

## Development

When making changes to the src, run `rushx start` in the dev folder to enable source watching and rebuild, so the storybook dev-server will have access to updated code on successful code compilation.

## Changelog

See complete CHANGELOG [here](https://github.com/iTwin/admin-components-react/blob/main/packages/modules/imodel-browser/CHANGELOG.md)
npm package: @itwin/imodel-components-react
Description: A react component library of iTwin.js UI iModel components
Author: Bentley Systems, Inc.
Latest version: 5.27.1

# @itwin/imodel-components-react

Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.

## Description

The **@itwin/imodel-components-react** package contains React components that depend on the @itwin/core-frontend, @itwin/core-common or @itwin/core-quantity packages.

## Usage

To get started with the `@itwin/imodel-components-react` package, simply import the necessary components and utilities:

```tsx
import * as React from "react";
import { TimelineComponent } from "@itwin/imodel-components-react";

export function GetTimelineComponent() {
  return (
    <TimelineComponent startDate={new Date(2024, 8, 30)} endDate={new Date()} />
  );
}
```

For more details, check out the [@itwin/imodel-components-react documentation](https://www.itwinjs.org/reference/imodel-components-react/).
npm package: @itwin/imodels-access-backend
Description: Interoperability package between iModels API and iTwin.js library for backend.
Author: Bentley Systems, Inc.
Latest version: 6.1.0

# @itwin/imodels-access-backend

Copyright © Bentley Systems, Incorporated. All rights reserved. See [LICENSE.md](./LICENSE.md) for license terms and full copyright notice.

## About this package

This package contains an implementation of [`BackendHubAccess`](https://github.com/iTwin/itwinjs-core/blob/master/core/backend/src/BackendHubAccess.ts) interface. The implementation uses the [`@itwin/imodels-client-authoring`](../../clients/imodels-client-authoring/README.md) package and adapts it to the defined interface thus enabling the applications built using [iTwin.js](http://www.itwinjs.org) library to use [iModelHub service](https://developer.bentley.com/apis/imodels-v2/#imodelhubservice) as a repository for iModels.
npm package: @itwin/imodels-access-backend-tests
Description: Tests for iTwin platform and iModels API interoperability package - @itwin/imodels-access-backend.
Author: Bentley Systems, Inc.
Latest version: 1.0.1

# @itwin/imodels-access-backend-tests

Copyright © Bentley Systems, Incorporated. All rights reserved. See [LICENSE.md](./LICENSE.md) for license terms and full copyright notice.

## About this package

This package contains tests for various classes in the [`@itwin/imodels-access-backend`](../../itwin-platform-access/imodels-access-backend/README.md) package.

**Note:** This package is not intended for outside use - it is internal and meant to be consumed only in internal pipelines or locally to verify correct code behavior.
npm package: @itwin/imodels-access-common
Description: Common code package for @itwin/imodels-access-frontend and @itwin/imodels-access-backend.
Author: Bentley Systems, Inc.
Latest version: 6.1.0

# @itwin/imodels-access-common

Copyright © Bentley Systems, Incorporated. All rights reserved. See [LICENSE.md](./LICENSE.md) for license terms and full copyright notice.

## About this package

This package contains shared code for [`@itwin/imodels-access-frontend`](../imodels-access-frontend/README.md) and [`@itwin/imodels-access-backend`](../imodels-access-backend/README.md) packages.

**Note:** This package is not intended for outside use - it is internal and meant to be consumed only by [`@itwin/imodels-access-frontend`](../imodels-access-frontend/README.md) and [`@itwin/imodels-access-backend`](../imodels-access-backend/README.md) packages.
npm package: @itwin/imodels-access-frontend
Description: Interoperability package between iModels API and iTwin.js library for frontend.
Author: Bentley Systems, Inc.
Latest version: 6.1.0

# @itwin/imodels-access-frontend

Copyright © Bentley Systems, Incorporated. All rights reserved. See [LICENSE.md](./LICENSE.md) for license terms and full copyright notice.

## About this package

This package contains an implementation of [`FrontendHubAccess`](https://github.com/iTwin/itwinjs-core/blob/master/core/frontend/src/FrontendHubAccess.ts) interface. The implementation uses the [`@itwin/imodels-client-management`](../../clients/imodels-client-management/README.md) package and adapts it to the defined interface thus enabling the applications built using [iTwin.js](http://www.itwinjs.org) library to use [iModelHub service](https://developer.bentley.com/apis/imodels-v2/#imodelhubservice) as a repository for iModels.
npm package: @itwin/imodels-access-frontend-tests
Description: Tests for iTwin platform and iModels API interoperability package - @itwin/imodels-access-frontend.
Author: Bentley Systems, Inc.
Latest version: 1.0.1

# @itwin/imodels-access-frontend-tests

Copyright © Bentley Systems, Incorporated. All rights reserved. See [LICENSE.md](./LICENSE.md) for license terms and full copyright notice.

## About this package

This package contains tests for various classes in the [`@itwin/imodels-access-frontend`](../../itwin-platform-access/imodels-access-frontend/README.md) package.

**Note:** This package is not intended for outside use - it is internal and meant to be consumed only in internal pipelines or locally to verify correct code behavior.
npm package: @itwin/imodels-client-common-config
Description: Common configuration for iModels API client wrappers.
Author: Bentley Systems, Inc.
Latest version: 1.0.1

# @itwin/imodels-client-common-config

Copyright © Bentley Systems, Incorporated. All rights reserved. See [LICENSE.md](./LICENSE.md) for license terms and full copyright notice.

## About this package

This package groups development dependencies and contains various config files shared accross iModels API client packages. That includes but is not limited to linting, spell checking, TypeScript compilation configuration files and setup.

**Note:** This package is not intended for outside use - it is internal and meant to be consumed only by packages in this repository.
npm package: @itwin/imodels-client-test-utils
Description: Common utilities for iModels API client wrappers tests.
Latest version: 1.0.1

# @itwin/imodels-clients-test-utils

Copyright © Bentley Systems, Incorporated. All rights reserved. See [LICENSE.md](./LICENSE.md) for license terms and full copyright notice.

## About this package

This package contains shared utilities for testing iModels API client packages.

**Note:** This package is not intended for outside use - it is internal and meant to be consumed only in internal pipelines or locally to verify correct code behavior.
npm package: @itwin/imodels-clients-tests
Description: Tests for iModels API client wrappers
Author: Bentley Systems, Inc.
Latest version: 1.0.1

# @itwin/imodels-clients-tests

Copyright © Bentley Systems, Incorporated. All rights reserved. See [LICENSE.md](./LICENSE.md) for license terms and full copyright notice.

## About this package

This package contains tests for various classes in the [`@itwin/imodels-client-management`](../../clients/imodels-client-management/README.md) and [`@itwin/imodels-client-authoring`](../../clients/imodels-client-authoring/README.md) packages.

**Note:** This package is not intended for outside use - it is internal and meant to be consumed only in internal pipelines or locally to verify correct code behavior.
npm package: @itwin/insights-client
Description: Insights client for the iTwin platform
Author: Bentley Systems, Inc.
Latest version: 0.17.0

# Insights Client Library

Copyright © Bentley Systems, Incorporated. All rights reserved. See [LICENSE.md](./LICENSE.md) for license terms and full copyright notice.

[iTwin.js](http://www.itwinjs.org) 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](https://developer.bentley.com/).

If you have questions, or wish to contribute to iTwin.js, see our [Contributing guide](./CONTRIBUTING.md).

## About this Repository

Contains the **@itwin/insights-client** package that wraps sending requests to the reporting service. Visit the [Insights API](https://developer.bentley.com/apis/insights/) and [Carbon calculation API](https://developer.bentley.com/apis/carbon-calculation/) for more documentation on the insights service.

### Authorization for running tests

- Create .env file and configure the following variables:

```
TEST_ITWIN_NAME=<name to use for test iTwin>
TEST_IMODEL_NAME=<name to use for test iModel>
AUTH_AUTHORITY="https://ims.bentley.com"
AUTH_CLIENT_ID=<client id of a "Web App" client created in https://developer.bentley.com>
AUTH_CLIENT_SECRET=<client secret of a "Web App" client created in https://developer.bentley.com>
AUTH_REDIRECT_URL=<redirect url of a "Web App" client created in https://developer.bentley.com>
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=<email of your test user>
TEST_USERS_ADMIN1_PASSWORD=<password of your test user>
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`.
- There are currently no tests for `oneClickLcaClient`

## Build Instructions

Install dependencies and build source

```
npm install
npm run build
```

Run tests

```
npm run test
```

Run linters

```
npm run lint
```

## Helper files

.githooks

- copyright-linter

  To use custom hooks, run the command:

  ```
  git config --local core.hooksPath .githooks/
  ```