Skip to content

Releases: iTwin/itwins-client

v3.0.0

21 Apr 18:56
3e50793

Choose a tag to compare

Major Changes

3.0.0 - 2026-04-21

Use strict graphics provider unions and plain string public identifiers

BREAKING CHANGE: RepositoryClass, RepositorySubClass, and GraphicsContentType
are now plain string aliases instead of string unions.

BREAKING CHANGE: GraphicsProvider is now a discriminated union keyed by
provider name, and GraphicsProviderOptions is now a union of the
provider-specific option interfaces instead of a merged superset interface.

This also removes the remaining repository resource response literals that previously narrowed
repository class values to a smaller fixed set.

Before:

type RepositoryClass =
  | "iModels"
  | "Storage"
  | "Forms"
  | "RealityData"
  | "GeographicInformationSystem";

type RepositorySubClass = "WebMapService" | "WebMapTileService" | "ArcGIS";

type GraphicsContentType =
  | "3DTILES"
  | "GLTF"
  | "IMAGERY"
  | "TERRAIN"
  | "KML"
  | "CZML"
  | "GEOJSON"
  | "OAPIF+GEOJSON";

interface GraphicsProviderOptions {
  tilingScheme?: string;
  bounds?: [number, number, number, number];
  credit?: string;
  mapType?: string;
  url?: string;
  session?: string;
  tileWidth?: number;
  tileHeight?: number;
  imageFormat?: string;
  [key: string]: unknown;
}

interface GraphicsProvider {
  name: string;
  options: GraphicsProviderOptions;
}

After:

type RepositoryClass = string;
type RepositorySubClass = string;
type GraphicsContentType = string;

type GraphicsProvider = UrlTemplateImageryProvider | Google2DImageryProvider;

type GraphicsProviderOptions =
  | UrlTemplateImageryProviderOptions
  | Google2DImageryProviderOptions;

Migration:

  • Existing calls that already pass string literals continue to work unchanged.
  • Code that relied on exhaustive autocomplete or literal-union narrowing for repository
    class, subClass, and graphics type values should now treat those values as API-provided strings.
  • Narrow GraphicsProvider by name before reading provider-specific option fields.
  • Code that extended GraphicsProviderOptions should switch to one of the concrete option interfaces
    or use composition instead of interface inheritance.

Minor Changes

2.6.0 - 2026-04-21

Add Global Repositories endpoint methods

Added new @beta methods for the Global Repositories Technical Preview APIs:

  • getGlobalRepositories
  • getGlobalRepository
  • getGlobalRepositoryResource
  • getGlobalRepositoryResources
  • getGlobalResourceGraphics

The implementation reuses the existing repository and repository-resource response types,
and expands the shared graphics provider options model to cover the Google provider
metadata returned by the global graphics endpoint.

Patch Changes

2.5.5 - 2026-04-21

Fixed audit issue with lodash by adding a package resolution

2.5.5 - 2026-04-21

Fixed audit issue coming from changesets cli

v2.5.4

26 Mar 17:11
5310433

Choose a tag to compare

Patch Changes

2.5.4 - 2026-03-26

Fixed audit issue coming from changesets cli

v2.5.3

19 Mar 15:52
8d27dfb

Choose a tag to compare

Patch Changes

2.5.3 - 2026-03-19

Fixed audit issues with dev packages

v2.5.2

16 Feb 17:20
e98f44a

Choose a tag to compare

Patch Changes

2.5.2 - 2026-02-16

Updated repository interface to make subclass optional and move properties into resource object for GetRepositoryResourceRepresentationResponse

v2.5.1

13 Feb 17:17
6e6c234

Choose a tag to compare

Patch Changes

2.5.1 - 2026-02-12

Added browser support for redirects. Previously we only supported node enviroment

v2.5.0

29 Jan 16:29
ba2179c

Choose a tag to compare

Minor Changes

2.5.0 - 2026-01-28

Added 3 New Methods To Itwins Client To Support Federated Architecture Support:

  • getRepositoryResourcesByUri() - Retrieve multiple resources with OData support

  • getRepositoryResourceByUri() - Retrieve single resource

  • getResourceGraphicsByUri() - Retrieve graphics metadata

Added support for redirects in the following methods :

  • getRepositoryResource()

  • getRepositoryResources()

  • getResourceGraphics()

  • All URI-based methods

v2.4.0

12 Jan 21:31
5c10ce0

Choose a tag to compare

Minor Changes

2.4.0 - 2026-01-09

Added new repo class "SensorData" to string union for repo classes

v2.3.0

05 Nov 22:16
0c5acca

Choose a tag to compare

Minor Changes

2.3.0 - 2025-11-05

API Method: Added deleteRepositoryResource() method to iTwinsClient class for deleting repository resources

v2.2.0

15 Oct 15:31
d855cae

Choose a tag to compare

Minor Changes

2.2.0 - 2025-10-15

Enhanced type safety with conditional return types

Added conditional return types to methods that support both minimal and representation responses. Return types now automatically infer based on the resultMode parameter, providing better IntelliSense and compile-time type checking.

**Enhanced Methods:**

- getFavoritesITwins

- getRecentUsedITwins

- getITwins

- getITwin

- getRepositoryResource

- getRepositoryResources

- getITwinAccount

**Before:**

const result = await client.getITwin(token, "id", "representation");

// Type: BentleyAPIResponse<ITwinMinimalResponse | ITwinRepresentationResponse>

const result = await client.getITwin(token, "id", "representation");

// Type: BentleyAPIResponse<ITwinRepresentationResponse>

v2.1.0

13 Oct 18:52
e4c9c57

Choose a tag to compare

Minor Changes

2.1.0 - 2025-10-13

feat: update repository interface and capabilities, and fix esm module compatibility with nodeNext

- Modified the Repository interface to make 'id' and 'displayName' required fields.

- Added 'capabilities' field to the Repository interface to define supported operations.

- Updated NewRepositoryConfig to reflect changes in the Repository interface.

- Changed exports in itwins-client.ts to include .js extensions for compatibility.

- Updated TypeScript configuration to target ES2022 and enable synthetic default imports.