@@ -76,7 +76,7 @@ following namespace:
7676``` typescript
7777import { IcePanel } from " @icepanel/sdk" ;
7878
79- const request: IcePanel .CommentsListRequest = {
79+ const request: IcePanel .AdrsListRequest = {
8080 ...
8181};
8282```
@@ -109,16 +109,18 @@ List endpoints are paginated. The SDK provides an iterator so that you can simpl
109109import { IcePanelClient } from " @icepanel/sdk" ;
110110
111111const client = new IcePanelClient ({ apiKey: " YOUR_API_KEY" , token: " YOUR_TOKEN" });
112- const pageableResponse = await client .versions .list ({
113- landscapeId: " landscapeId"
112+ const pageableResponse = await client .adrs .list ({
113+ landscapeId: " landscapeId" ,
114+ versionId: " latest"
114115});
115116for await (const item of pageableResponse ) {
116117 console .log (item );
117118}
118119
119120// Or you can manually iterate page-by-page
120- let page = await client .versions .list ({
121- landscapeId: " landscapeId"
121+ let page = await client .adrs .list ({
122+ landscapeId: " landscapeId" ,
123+ versionId: " latest"
122124});
123125while (page .hasNextPage ()) {
124126 page = page .getNextPage ();
@@ -135,9 +137,9 @@ const response = page.response;
135137This 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.
136138
137139``` typescript
138- import { CommentsClient } from ' @icepanel/sdk/comments ' ;
140+ import { AdrsClient } from ' @icepanel/sdk/adrs ' ;
139141
140- const client = new CommentsClient ({... });
142+ const client = new AdrsClient ({... });
141143```
142144
143145### Additional Headers
@@ -179,11 +181,19 @@ The SDK is instrumented with automatic retries with exponential backoff. A reque
179181as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
180182retry limit (default: 2).
181183
182- A request is deemed retryable when any of the following HTTP status codes is returned :
184+ Which status codes are retried depends on the ` retryStatusCodes ` generator configuration :
183185
186+ ** ` legacy ` ** (current default): retries on
184187- [ 408] ( https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408 ) (Timeout)
185188- [ 429] ( https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429 ) (Too Many Requests)
186- - [ 5XX] ( https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500 ) (Internal Server Errors)
189+ - [ 5XX] ( https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#server_error_responses ) (All server errors, including 500)
190+
191+ ** ` recommended ` ** : retries on
192+ - [ 408] ( https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408 ) (Timeout)
193+ - [ 429] ( https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429 ) (Too Many Requests)
194+ - [ 502] ( https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502 ) (Bad Gateway)
195+ - [ 503] ( https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503 ) (Service Unavailable)
196+ - [ 504] ( https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504 ) (Gateway Timeout)
187197
188198Use the ` maxRetries ` request option to configure this behavior.
189199
0 commit comments