Skip to content

Commit 716fc68

Browse files
SDK regeneration
1 parent 0e5a501 commit 716fc68

File tree

10 files changed

+148
-138
lines changed

10 files changed

+148
-138
lines changed

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ The IcePanel TypeScript library provides convenient access to the IcePanel APIs
99

1010
- [Installation](#installation)
1111
- [Reference](#reference)
12-
- [Helpers](#helpers)
1312
- [Usage](#usage)
1413
- [Request and Response Types](#request-and-response-types)
1514
- [Exception Handling](#exception-handling)
@@ -27,7 +26,7 @@ The IcePanel TypeScript library provides convenient access to the IcePanel APIs
2726
## Installation
2827

2928
```sh
30-
npm i @icepanel/sdk
29+
npm i -s @icepanel/sdk
3130
```
3231

3332
## Reference
@@ -36,17 +35,15 @@ A full reference for this library is available [here](https://github.com/IcePane
3635

3736
## Usage
3837

39-
Use the following constant to specify the latest version.
38+
Instantiate and use the client with the following:
39+
4040
```typescript
41-
import { IcePanelClient, LandscapeVersion } from "@icepanel/sdk";
41+
import { IcePanelClient } from "@icepanel/sdk";
4242

43-
const client = new IcePanelClient({
44-
apiKey: "YOUR_API_KEY",
45-
apiVersion: "v1"
46-
});
43+
const client = new IcePanelClient({ apiKey: "YOUR_API_KEY", authorization: "YOUR_AUTHORIZATION" });
4744
await client.model.objects.list({
48-
landscapeId: "YOUR_LANDSCAPE_ID",
49-
versionId: LandscapeVersion.Latest
45+
landscapeId: "landscapeId",
46+
versionId: "versionId"
5047
});
5148
```
5249

pnpm-lock.yaml

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reference.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -398,10 +398,12 @@ await client.diagrams.list({
398398
await client.diagrams.create({
399399
landscapeId: "landscapeId",
400400
versionId: "versionId",
401-
index: 1.1,
402-
modelId: "modelId",
403-
name: "name",
404-
type: "app-diagram"
401+
body: {
402+
index: 1.1,
403+
modelId: "modelId",
404+
name: "name",
405+
type: "app-diagram"
406+
}
405407
});
406408

407409
```
@@ -508,10 +510,12 @@ await client.diagrams.upsert({
508510
landscapeId: "landscapeId",
509511
versionId: "versionId",
510512
diagramId: "diagramId",
511-
index: 1.1,
512-
modelId: "modelId",
513-
name: "name",
514-
type: "app-diagram"
513+
body: {
514+
index: 1.1,
515+
modelId: "modelId",
516+
name: "name",
517+
type: "app-diagram"
518+
}
515519
});
516520

517521
```

src/BaseClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ export function normalizeClientOptions<T extends BaseClientOptions>(options: T):
5252
{
5353
"X-Fern-Language": "JavaScript",
5454
"X-Fern-SDK-Name": "@icepanel/sdk",
55-
"X-Fern-SDK-Version": "0.0.38",
56-
"User-Agent": "@icepanel/sdk/0.0.38",
55+
"X-Fern-SDK-Version": "0.0.43",
56+
"User-Agent": "@icepanel/sdk/0.0.43",
5757
"X-Fern-Runtime": core.RUNTIME.type,
5858
"X-Fern-Runtime-Version": core.RUNTIME.version,
5959
},

src/api/requests/requests.ts

Lines changed: 14 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -120,36 +120,19 @@ export interface DiagramsListRequest {
120120
* {
121121
* landscapeId: "landscapeId",
122122
* versionId: "versionId",
123-
* index: 1.1,
124-
* modelId: "modelId",
125-
* name: "name",
126-
* type: "app-diagram"
123+
* body: {
124+
* index: 1.1,
125+
* modelId: "modelId",
126+
* name: "name",
127+
* type: "app-diagram"
128+
* }
127129
* }
128130
*/
129131
export interface DiagramCreateRequest {
130132
landscapeId: string;
131133
versionId: string;
132134
updateViewedAt?: boolean;
133-
commit?: number;
134-
description?: string;
135-
groupId?: string | null;
136-
index: number;
137-
labels?: Record<string, string>;
138-
/** model object id this object belongs to */
139-
modelId: string;
140-
name: string;
141-
parentId?: string | null;
142-
pinned?: boolean;
143-
pinnedAt?: string;
144-
pinnedIndex?: number;
145-
status?: IcePanel.DiagramStatus;
146-
/** Custom zoom levels for specific model objects within the diagram. The key is the modelObjectId and the value is the diagram id. */
147-
zoomOverrides?: Record<string, string | null> | null;
148-
handleId?: string;
149-
type: IcePanel.DiagramType;
150-
comments?: Record<string, IcePanel.DiagramComment>;
151-
connections?: Record<string, IcePanel.DiagramConnection>;
152-
objects?: Record<string, IcePanel.DiagramObject>;
135+
body: IcePanel.DiagramCreate;
153136
}
154137

155138
/**
@@ -173,37 +156,20 @@ export interface DiagramFindRequest {
173156
* landscapeId: "landscapeId",
174157
* versionId: "versionId",
175158
* diagramId: "diagramId",
176-
* index: 1.1,
177-
* modelId: "modelId",
178-
* name: "name",
179-
* type: "app-diagram"
159+
* body: {
160+
* index: 1.1,
161+
* modelId: "modelId",
162+
* name: "name",
163+
* type: "app-diagram"
164+
* }
180165
* }
181166
*/
182167
export interface DiagramUpsertRequest {
183168
landscapeId: string;
184169
versionId: string;
185170
diagramId: string;
186171
updateViewedAt?: boolean;
187-
commit?: number;
188-
description?: string;
189-
groupId?: string | null;
190-
index: number;
191-
labels?: Record<string, string>;
192-
/** model object id this object belongs to */
193-
modelId: string;
194-
name: string;
195-
parentId?: string | null;
196-
pinned?: boolean;
197-
pinnedAt?: string;
198-
pinnedIndex?: number;
199-
status?: IcePanel.DiagramStatus;
200-
/** Custom zoom levels for specific model objects within the diagram. The key is the modelObjectId and the value is the diagram id. */
201-
zoomOverrides?: Record<string, string | null> | null;
202-
handleId?: string;
203-
type: IcePanel.DiagramType;
204-
comments?: Record<string, IcePanel.DiagramComment>;
205-
connections?: Record<string, IcePanel.DiagramConnection>;
206-
objects?: Record<string, IcePanel.DiagramObject>;
172+
body: IcePanel.DiagramCreate;
207173
}
208174

209175
/**

src/api/resources/diagrams/client/Client.ts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,12 @@ export class DiagramsClient {
134134
* await client.diagrams.create({
135135
* landscapeId: "landscapeId",
136136
* versionId: "versionId",
137-
* index: 1.1,
138-
* modelId: "modelId",
139-
* name: "name",
140-
* type: "app-diagram"
137+
* body: {
138+
* index: 1.1,
139+
* modelId: "modelId",
140+
* name: "name",
141+
* type: "app-diagram"
142+
* }
141143
* })
142144
*/
143145
public create(
@@ -151,7 +153,7 @@ export class DiagramsClient {
151153
request: IcePanel.DiagramCreateRequest,
152154
requestOptions?: DiagramsClient.RequestOptions,
153155
): Promise<core.WithRawResponse<IcePanel.DiagramsCreateResponse>> {
154-
const { landscapeId, versionId, updateViewedAt, ..._body } = request;
156+
const { landscapeId, versionId, updateViewedAt, body: _body } = request;
155157
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
156158
if (updateViewedAt != null) {
157159
_queryParams.updateViewedAt = updateViewedAt.toString();
@@ -307,10 +309,12 @@ export class DiagramsClient {
307309
* landscapeId: "landscapeId",
308310
* versionId: "versionId",
309311
* diagramId: "diagramId",
310-
* index: 1.1,
311-
* modelId: "modelId",
312-
* name: "name",
313-
* type: "app-diagram"
312+
* body: {
313+
* index: 1.1,
314+
* modelId: "modelId",
315+
* name: "name",
316+
* type: "app-diagram"
317+
* }
314318
* })
315319
*/
316320
public upsert(
@@ -324,7 +328,7 @@ export class DiagramsClient {
324328
request: IcePanel.DiagramUpsertRequest,
325329
requestOptions?: DiagramsClient.RequestOptions,
326330
): Promise<core.WithRawResponse<IcePanel.DiagramsUpsertResponse>> {
327-
const { landscapeId, versionId, diagramId, updateViewedAt, ..._body } = request;
331+
const { landscapeId, versionId, diagramId, updateViewedAt, body: _body } = request;
328332
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
329333
if (updateViewedAt != null) {
330334
_queryParams.updateViewedAt = updateViewedAt.toString();

src/api/types/types.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2467,6 +2467,29 @@ export interface Diagram {
24672467
versionId: string;
24682468
}
24692469

2470+
export interface DiagramCreate {
2471+
commit?: number;
2472+
description?: string;
2473+
groupId?: string | null;
2474+
index: number;
2475+
labels?: Record<string, string>;
2476+
/** model object id this object belongs to */
2477+
modelId: string;
2478+
name: string;
2479+
parentId?: string | null;
2480+
pinned?: boolean;
2481+
pinnedAt?: string;
2482+
pinnedIndex?: number;
2483+
status?: IcePanel.DiagramStatus;
2484+
/** Custom zoom levels for specific model objects within the diagram. The key is the modelObjectId and the value is the diagram id. */
2485+
zoomOverrides?: Record<string, string | null> | null;
2486+
handleId?: string;
2487+
type: IcePanel.DiagramType;
2488+
comments?: Record<string, IcePanel.DiagramComment>;
2489+
connections?: Record<string, IcePanel.DiagramConnection>;
2490+
objects?: Record<string, IcePanel.DiagramObject>;
2491+
}
2492+
24702493
export const DiagramObjectShape = {
24712494
Area: "area",
24722495
Box: "box",
@@ -5304,6 +5327,7 @@ export type SearchResultData = IcePanel.ModelObject | IcePanel.ModelConnection |
53045327
export interface SearchResult {
53055328
data?: IcePanel.SearchResultData;
53065329
id: string;
5330+
name: string;
53075331
score: number;
53085332
type: IcePanel.SearchIndexType;
53095333
}

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const SDK_VERSION = "0.0.38";
1+
export const SDK_VERSION = "0.0.43";

0 commit comments

Comments
 (0)