@icepanel/sdk 0.0.37 → 0.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -22
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/IcePanelClient.js +3 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/IcePanelClient.mjs +3 -3
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ The IcePanel TypeScript library provides convenient access to the IcePanel APIs
|
|
|
9
9
|
|
|
10
10
|
- [Installation](#installation)
|
|
11
11
|
- [Reference](#reference)
|
|
12
|
-
- [
|
|
12
|
+
- [Helpers](#helpers)
|
|
13
13
|
- [Usage](#usage)
|
|
14
14
|
- [Request and Response Types](#request-and-response-types)
|
|
15
15
|
- [Exception Handling](#exception-handling)
|
|
@@ -27,40 +27,26 @@ The IcePanel TypeScript library provides convenient access to the IcePanel APIs
|
|
|
27
27
|
## Installation
|
|
28
28
|
|
|
29
29
|
```sh
|
|
30
|
-
npm i
|
|
30
|
+
npm i @icepanel/sdk
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
## Reference
|
|
34
34
|
|
|
35
35
|
A full reference for this library is available [here](https://github.com/IcePanel/icepanel-js/blob/HEAD/./reference.md).
|
|
36
36
|
|
|
37
|
-
##
|
|
37
|
+
## Usage
|
|
38
38
|
|
|
39
39
|
Use the following constant to specify the latest version.
|
|
40
40
|
```typescript
|
|
41
41
|
import { IcePanelClient, LandscapeVersion } from "@icepanel/sdk";
|
|
42
42
|
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
await client.model.objects.list({
|
|
47
|
-
landscapeId,
|
|
48
|
-
versionId: LandscapeVersion.Latest
|
|
43
|
+
const client = new IcePanelClient({
|
|
44
|
+
apiKey: "YOUR_API_KEY",
|
|
45
|
+
apiVersion: "v1"
|
|
49
46
|
});
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## Usage
|
|
54
|
-
|
|
55
|
-
Instantiate and use the client with the following:
|
|
56
|
-
|
|
57
|
-
```typescript
|
|
58
|
-
import { IcePanelClient } from "@icepanel/sdk";
|
|
59
|
-
|
|
60
|
-
const client = new IcePanelClient({ apiKey: "YOUR_API_KEY", authorization: "YOUR_AUTHORIZATION" });
|
|
61
47
|
await client.model.objects.list({
|
|
62
|
-
|
|
63
|
-
|
|
48
|
+
landscapeId: "YOUR_LANDSCAPE_ID",
|
|
49
|
+
versionId: LandscapeVersion.Latest
|
|
64
50
|
});
|
|
65
51
|
```
|
|
66
52
|
|
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@icepanel/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "0.0.
|
|
47
|
-
"User-Agent": "@icepanel/sdk/0.0.
|
|
46
|
+
"X-Fern-SDK-Version": "0.0.38",
|
|
47
|
+
"User-Agent": "@icepanel/sdk/0.0.38",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -51,13 +51,13 @@ class IcePanelClient extends Client_1.IcePanelClient {
|
|
|
51
51
|
updatedOptions.baseUrl = () => __awaiter(this, void 0, void 0, function* () {
|
|
52
52
|
const baseUrl = options.baseUrl ? yield core.Supplier.get(options.baseUrl) : undefined;
|
|
53
53
|
if (baseUrl) {
|
|
54
|
-
return
|
|
54
|
+
return `https://${baseUrl}/${options.apiVersion}`;
|
|
55
55
|
}
|
|
56
56
|
const environment = options.environment ? yield core.Supplier.get(options.environment) : undefined;
|
|
57
57
|
if (environment) {
|
|
58
|
-
return `api.${environment}.icepanel.cloud/${options.apiVersion}`;
|
|
58
|
+
return `https://api.${environment}.icepanel.cloud/${options.apiVersion}`;
|
|
59
59
|
}
|
|
60
|
-
return `api.icepanel.io/${options.apiVersion}`;
|
|
60
|
+
return `https://api.icepanel.io/${options.apiVersion}`;
|
|
61
61
|
});
|
|
62
62
|
if (options.apiKey) {
|
|
63
63
|
updatedOptions.headers = Object.assign(Object.assign({}, updatedOptions.headers), { 'X-API-Key': options.apiKey });
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.38";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@icepanel/sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "0.0.
|
|
10
|
-
"User-Agent": "@icepanel/sdk/0.0.
|
|
9
|
+
"X-Fern-SDK-Version": "0.0.38",
|
|
10
|
+
"User-Agent": "@icepanel/sdk/0.0.38",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -15,13 +15,13 @@ export class IcePanelClient extends Client {
|
|
|
15
15
|
updatedOptions.baseUrl = () => __awaiter(this, void 0, void 0, function* () {
|
|
16
16
|
const baseUrl = options.baseUrl ? yield core.Supplier.get(options.baseUrl) : undefined;
|
|
17
17
|
if (baseUrl) {
|
|
18
|
-
return
|
|
18
|
+
return `https://${baseUrl}/${options.apiVersion}`;
|
|
19
19
|
}
|
|
20
20
|
const environment = options.environment ? yield core.Supplier.get(options.environment) : undefined;
|
|
21
21
|
if (environment) {
|
|
22
|
-
return `api.${environment}.icepanel.cloud/${options.apiVersion}`;
|
|
22
|
+
return `https://api.${environment}.icepanel.cloud/${options.apiVersion}`;
|
|
23
23
|
}
|
|
24
|
-
return `api.icepanel.io/${options.apiVersion}`;
|
|
24
|
+
return `https://api.icepanel.io/${options.apiVersion}`;
|
|
25
25
|
});
|
|
26
26
|
if (options.apiKey) {
|
|
27
27
|
updatedOptions.headers = Object.assign(Object.assign({}, updatedOptions.headers), { 'X-API-Key': options.apiKey });
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.38";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.
|
|
1
|
+
export const SDK_VERSION = "0.0.38";
|