Skip to content

Commit d855cae

Browse files
Release packages [publish docs] (#62)
Co-authored-by: imodeljs-admin <imodeljs-admin@users.noreply.github.com>
1 parent 3d9822b commit d855cae

3 files changed

Lines changed: 39 additions & 36 deletions

File tree

.changeset/good-words-fetch.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# Change Log - @itwin/itwins-client
22

3+
## 2.2.0
4+
5+
### Minor Changes
6+
7+
#### [2.2.0](https://www.npmjs.com/package/@itwin/itwins-client/v/2.2.0) - 2025-10-15
8+
9+
Enhanced type safety with conditional return types
10+
11+
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.
12+
13+
\*\*Enhanced Methods:\*\*
14+
15+
\- `getFavoritesITwins`
16+
17+
\- `getRecentUsedITwins`
18+
19+
\- `getITwins`
20+
21+
\- `getITwin`
22+
23+
\- `getRepositoryResource`
24+
25+
\- `getRepositoryResources`
26+
27+
\- `getITwinAccount`
28+
29+
\*\*Before:\*\*
30+
31+
```typescript
32+
const result = await client.getITwin(token, "id", "representation");
33+
34+
// Type: BentleyAPIResponse<ITwinMinimalResponse | ITwinRepresentationResponse>
35+
36+
const result = await client.getITwin(token, "id", "representation");
37+
38+
// Type: BentleyAPIResponse<ITwinRepresentationResponse>
39+
```
40+
341
## 2.1.0
442

543
### Minor Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@itwin/itwins-client",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"description": "iTwins client for the iTwin platform",
55
"main": "./lib/cjs/itwins-client.js",
66
"module": "./lib/esm/itwins-client.js",

0 commit comments

Comments
 (0)