@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 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
- - [Latest Helper](#latest-helper)
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 -s @icepanel/sdk
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
- ## Latest Helper
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 landscapeId = "landscapeId";
44
-
45
- const client = new IcePanelClient({ apiKey: "YOUR_API_KEY", authorization: "YOUR_AUTHORIZATION" });
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
- landscapeId: "landscapeId",
63
- versionId: "versionId"
48
+ landscapeId: "YOUR_LANDSCAPE_ID",
49
+ versionId: LandscapeVersion.Latest
64
50
  });
65
51
  ```
66
52
 
@@ -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.37",
47
- "User-Agent": "@icepanel/sdk/0.0.37",
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 `${baseUrl}/${options.apiVersion}`;
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 });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.37";
1
+ export declare const SDK_VERSION = "0.0.38";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.37";
4
+ exports.SDK_VERSION = "0.0.38";
@@ -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.37",
10
- "User-Agent": "@icepanel/sdk/0.0.37",
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 `${baseUrl}/${options.apiVersion}`;
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 });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.37";
1
+ export declare const SDK_VERSION = "0.0.38";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.0.37";
1
+ export const SDK_VERSION = "0.0.38";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icepanel/sdk",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",