Skip to content

Commit 6c9ce18

Browse files
committed
SDK regeneration
1 parent 6906d0e commit 6c9ce18

160 files changed

Lines changed: 19279 additions & 8522 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.fern/metadata.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"cliVersion": "3.56.8",
2+
"cliVersion": "5.4.3",
33
"generatorName": "fernapi/fern-typescript-sdk",
4-
"generatorVersion": "3.43.0",
4+
"generatorVersion": "3.65.5",
55
"generatorConfig": {
66
"namespaceExport": "IcePanel",
77
"enableInlineTypes": false,
@@ -13,5 +13,10 @@
1313
"nanoid": "^5.1.6"
1414
}
1515
},
16-
"sdkVersion": "0.1.6"
16+
"originGitCommit": "b9b5c4c40c190f0ff43bcd167f81ec1fb0f50507",
17+
"originGitCommitIsDirty": true,
18+
"invokedBy": "manual",
19+
"requestedVersion": null,
20+
"ciProvider": null,
21+
"sdkVersion": "0.1.7"
1722
}

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: ci
22

33
on: [push]
44

5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: false
8+
59
jobs:
610
compile:
711
runs-on: ubuntu-latest
@@ -74,5 +78,13 @@ jobs:
7478
elif [[ ${GITHUB_REF} == *beta* ]]; then
7579
publish --access public --tag beta
7680
else
77-
publish --access public
81+
PKG_NAME=$(node -p "require('./package.json').name")
82+
PKG_VERSION=$(node -p "require('./package.json').version")
83+
CURRENT_LATEST=$(npm view "${PKG_NAME}" dist-tags.latest 2>/dev/null || echo "0.0.0")
84+
if npx -y semver "${PKG_VERSION}" -r "<${CURRENT_LATEST}" > /dev/null 2>&1; then
85+
echo "Publishing ${PKG_VERSION} with --tag backport (current latest is ${CURRENT_LATEST})"
86+
publish --access public --tag backport
87+
else
88+
publish --access public
89+
fi
7890
fi

README.md

Lines changed: 74 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,20 @@ The IcePanel TypeScript library provides convenient access to the IcePanel APIs
1010
- [Installation](#installation)
1111
- [Reference](#reference)
1212
- [Getting Started](#getting-started)
13+
- [Environments](#environments)
1314
- [Request and Response Types](#request-and-response-types)
1415
- [Exception Handling](#exception-handling)
16+
- [Pagination](#pagination)
1517
- [Advanced](#advanced)
18+
- [Subpackage Exports](#subpackage-exports)
1619
- [Additional Headers](#additional-headers)
1720
- [Additional Query String Parameters](#additional-query-string-parameters)
1821
- [Retries](#retries)
1922
- [Timeouts](#timeouts)
2023
- [Aborting Requests](#aborting-requests)
2124
- [Access Raw Response Data](#access-raw-response-data)
2225
- [Logging](#logging)
26+
- [Custom Fetch](#custom-fetch)
2327
- [Runtime Compatibility](#runtime-compatibility)
2428
- [Contributing](#contributing)
2529

@@ -52,6 +56,18 @@ await client.model.objects.list({
5256
```
5357

5458

59+
## Environments
60+
61+
This SDK allows you to configure different environments for API requests.
62+
63+
```typescript
64+
import { IcePanelClient, IcePanelEnvironment } from "@icepanel/sdk";
65+
66+
const client = new IcePanelClient({
67+
environment: IcePanelEnvironment.ApiV1,
68+
});
69+
```
70+
5571
## Request and Response Types
5672

5773
The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
@@ -85,8 +101,45 @@ try {
85101
}
86102
```
87103

104+
## Pagination
105+
106+
List endpoints are paginated. The SDK provides an iterator so that you can simply loop over the items:
107+
108+
```typescript
109+
import { IcePanelClient } from "@icepanel/sdk";
110+
111+
const client = new IcePanelClient({ apiKey: "YOUR_API_KEY", token: "YOUR_TOKEN" });
112+
const pageableResponse = await client.versions.list({
113+
landscapeId: "landscapeId"
114+
});
115+
for await (const item of pageableResponse) {
116+
console.log(item);
117+
}
118+
119+
// Or you can manually iterate page-by-page
120+
let page = await client.versions.list({
121+
landscapeId: "landscapeId"
122+
});
123+
while (page.hasNextPage()) {
124+
page = page.getNextPage();
125+
}
126+
127+
// You can also access the underlying response
128+
const response = page.response;
129+
```
130+
88131
## Advanced
89132

133+
### Subpackage Exports
134+
135+
This SDK supports direct imports of subpackage clients, which allows JavaScript bundlers to tree-shake and include only the imported subpackage code. This results in much smaller bundle sizes.
136+
137+
```typescript
138+
import { CommentsClient } from '@icepanel/sdk/comments';
139+
140+
const client = new CommentsClient({...});
141+
```
142+
90143
### Additional Headers
91144

92145
If you would like to send additional headers as part of the request, use the `headers` request option.
@@ -237,6 +290,26 @@ const logger: logging.ILogger = {
237290
</details>
238291

239292

293+
### Custom Fetch
294+
295+
The SDK provides a low-level `fetch` method for making custom HTTP requests while still
296+
benefiting from SDK-level configuration like authentication, retries, timeouts, and logging.
297+
This is useful for calling API endpoints not yet supported in the SDK.
298+
299+
```typescript
300+
const response = await client.fetch("/v1/custom/endpoint", {
301+
method: "GET",
302+
}, {
303+
timeoutInSeconds: 30,
304+
maxRetries: 3,
305+
headers: {
306+
"X-Custom-Header": "custom-value",
307+
},
308+
});
309+
310+
const data = await response.json();
311+
```
312+
240313
### Runtime Compatibility
241314

242315

@@ -251,19 +324,6 @@ The SDK works in the following runtimes:
251324
- Bun 1.0+
252325
- React Native
253326

254-
### Customizing Fetch Client
255-
256-
The SDK provides a way for you to customize the underlying HTTP client / Fetch function. If you're running in an
257-
unsupported environment, this provides a way for you to break glass and ensure the SDK works.
258-
259-
```typescript
260-
import { IcePanelClient } from "@icepanel/sdk";
261-
262-
const client = new IcePanelClient({
263-
...
264-
fetcher: // provide your implementation here
265-
});
266-
```
267327

268328
## Contributing
269329

@@ -273,4 +333,4 @@ otherwise they would be overwritten upon the next generated release. Feel free t
273333
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
274334
an issue first to discuss with us!
275335

276-
On the other hand, contributions to the README are always very welcome!
336+
On the other hand, contributions to the README are always very welcome!

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.3.1/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.4.10/schema.json",
33
"root": true,
44
"vcs": {
55
"enabled": false

0 commit comments

Comments
 (0)