@icepanel/sdk 0.0.41 → 0.1.0
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 +7 -5
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/IcePanelClient.js +4 -10
- package/dist/cjs/api/requests/requests.d.ts +14 -48
- package/dist/cjs/api/resources/diagrams/client/Client.d.ts +12 -8
- package/dist/cjs/api/resources/diagrams/client/Client.js +14 -10
- package/dist/cjs/api/types/types.d.ts +23 -0
- 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 +4 -10
- package/dist/esm/api/requests/requests.d.mts +14 -48
- package/dist/esm/api/resources/diagrams/client/Client.d.mts +12 -8
- package/dist/esm/api/resources/diagrams/client/Client.mjs +14 -10
- package/dist/esm/api/types/types.d.mts +23 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +12 -8
package/README.md
CHANGED
|
@@ -9,8 +9,7 @@ The IcePanel TypeScript library provides convenient access to the IcePanel APIs
|
|
|
9
9
|
|
|
10
10
|
- [Installation](#installation)
|
|
11
11
|
- [Reference](#reference)
|
|
12
|
-
- [
|
|
13
|
-
- [Usage](#usage)
|
|
12
|
+
- [Getting Started](#getting-started)
|
|
14
13
|
- [Request and Response Types](#request-and-response-types)
|
|
15
14
|
- [Exception Handling](#exception-handling)
|
|
16
15
|
- [Advanced](#advanced)
|
|
@@ -27,29 +26,32 @@ The IcePanel TypeScript library provides convenient access to the IcePanel APIs
|
|
|
27
26
|
## Installation
|
|
28
27
|
|
|
29
28
|
```sh
|
|
30
|
-
npm i @icepanel/sdk
|
|
29
|
+
npm i -s @icepanel/sdk
|
|
31
30
|
```
|
|
32
31
|
|
|
33
32
|
## Reference
|
|
34
33
|
|
|
35
34
|
A full reference for this library is available [here](https://github.com/IcePanel/icepanel-js/blob/HEAD/./reference.md).
|
|
36
35
|
|
|
37
|
-
##
|
|
36
|
+
## Getting Started
|
|
38
37
|
|
|
39
38
|
Use the following constant to specify the latest version.
|
|
40
39
|
```typescript
|
|
41
40
|
import { IcePanelClient, LandscapeVersion } from "@icepanel/sdk";
|
|
42
41
|
|
|
42
|
+
const landscapeId = "YOUR_LANDSCAPE_ID";
|
|
43
|
+
|
|
43
44
|
const client = new IcePanelClient({
|
|
44
45
|
apiKey: "YOUR_API_KEY",
|
|
45
46
|
apiVersion: "v1"
|
|
46
47
|
});
|
|
47
48
|
await client.model.objects.list({
|
|
48
|
-
landscapeId
|
|
49
|
+
landscapeId,
|
|
49
50
|
versionId: LandscapeVersion.Latest
|
|
50
51
|
});
|
|
51
52
|
```
|
|
52
53
|
|
|
54
|
+
|
|
53
55
|
## Request and Response Types
|
|
54
56
|
|
|
55
57
|
The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
|
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.43",
|
|
47
|
+
"User-Agent": "@icepanel/sdk/0.0.43",
|
|
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,22 +51,16 @@ 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
|
-
|
|
55
|
-
url.pathname = `/${options.apiVersion}`;
|
|
56
|
-
return url.toString();
|
|
54
|
+
return `${baseUrl}/${options.apiVersion}`;
|
|
57
55
|
}
|
|
58
56
|
const environment = options.environment ? yield core.Supplier.get(options.environment) : undefined;
|
|
59
57
|
if (environment) {
|
|
60
|
-
|
|
61
|
-
url.pathname = `/${options.apiVersion}`;
|
|
62
|
-
return url.toString();
|
|
58
|
+
return `https://api.${environment}.icepanel.cloud/${options.apiVersion}`;
|
|
63
59
|
}
|
|
64
|
-
|
|
65
|
-
url.pathname = `/${options.apiVersion}`;
|
|
66
|
-
return url.toString();
|
|
60
|
+
return `https://api.icepanel.io/${options.apiVersion}`;
|
|
67
61
|
});
|
|
68
62
|
if (options.apiKey) {
|
|
69
|
-
updatedOptions.headers = Object.assign(Object.assign({}, updatedOptions.headers), { 'Authorization': options.apiKey });
|
|
63
|
+
updatedOptions.headers = Object.assign(Object.assign({}, updatedOptions.headers), { 'Authorization': `ApiKey ${options.apiKey}` });
|
|
70
64
|
}
|
|
71
65
|
if (options.authorization) {
|
|
72
66
|
updatedOptions.headers = Object.assign(Object.assign({}, updatedOptions.headers), { Authorization: options.authorization });
|
|
@@ -110,36 +110,19 @@ export interface DiagramsListRequest {
|
|
|
110
110
|
* {
|
|
111
111
|
* landscapeId: "landscapeId",
|
|
112
112
|
* versionId: "versionId",
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
113
|
+
* body: {
|
|
114
|
+
* index: 1.1,
|
|
115
|
+
* modelId: "modelId",
|
|
116
|
+
* name: "name",
|
|
117
|
+
* type: "app-diagram"
|
|
118
|
+
* }
|
|
117
119
|
* }
|
|
118
120
|
*/
|
|
119
121
|
export interface DiagramCreateRequest {
|
|
120
122
|
landscapeId: string;
|
|
121
123
|
versionId: string;
|
|
122
124
|
updateViewedAt?: boolean;
|
|
123
|
-
|
|
124
|
-
description?: string;
|
|
125
|
-
groupId?: string | null;
|
|
126
|
-
index: number;
|
|
127
|
-
labels?: Record<string, string>;
|
|
128
|
-
/** model object id this object belongs to */
|
|
129
|
-
modelId: string;
|
|
130
|
-
name: string;
|
|
131
|
-
parentId?: string | null;
|
|
132
|
-
pinned?: boolean;
|
|
133
|
-
pinnedAt?: string;
|
|
134
|
-
pinnedIndex?: number;
|
|
135
|
-
status?: IcePanel.DiagramStatus;
|
|
136
|
-
/** Custom zoom levels for specific model objects within the diagram. The key is the modelObjectId and the value is the diagram id. */
|
|
137
|
-
zoomOverrides?: Record<string, string | null> | null;
|
|
138
|
-
handleId?: string;
|
|
139
|
-
type: IcePanel.DiagramType;
|
|
140
|
-
comments?: Record<string, IcePanel.DiagramComment>;
|
|
141
|
-
connections?: Record<string, IcePanel.DiagramConnection>;
|
|
142
|
-
objects?: Record<string, IcePanel.DiagramObject>;
|
|
125
|
+
body: IcePanel.DiagramCreate;
|
|
143
126
|
}
|
|
144
127
|
/**
|
|
145
128
|
* @example
|
|
@@ -161,10 +144,12 @@ export interface DiagramFindRequest {
|
|
|
161
144
|
* landscapeId: "landscapeId",
|
|
162
145
|
* versionId: "versionId",
|
|
163
146
|
* diagramId: "diagramId",
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
147
|
+
* body: {
|
|
148
|
+
* index: 1.1,
|
|
149
|
+
* modelId: "modelId",
|
|
150
|
+
* name: "name",
|
|
151
|
+
* type: "app-diagram"
|
|
152
|
+
* }
|
|
168
153
|
* }
|
|
169
154
|
*/
|
|
170
155
|
export interface DiagramUpsertRequest {
|
|
@@ -172,26 +157,7 @@ export interface DiagramUpsertRequest {
|
|
|
172
157
|
versionId: string;
|
|
173
158
|
diagramId: string;
|
|
174
159
|
updateViewedAt?: boolean;
|
|
175
|
-
|
|
176
|
-
description?: string;
|
|
177
|
-
groupId?: string | null;
|
|
178
|
-
index: number;
|
|
179
|
-
labels?: Record<string, string>;
|
|
180
|
-
/** model object id this object belongs to */
|
|
181
|
-
modelId: string;
|
|
182
|
-
name: string;
|
|
183
|
-
parentId?: string | null;
|
|
184
|
-
pinned?: boolean;
|
|
185
|
-
pinnedAt?: string;
|
|
186
|
-
pinnedIndex?: number;
|
|
187
|
-
status?: IcePanel.DiagramStatus;
|
|
188
|
-
/** Custom zoom levels for specific model objects within the diagram. The key is the modelObjectId and the value is the diagram id. */
|
|
189
|
-
zoomOverrides?: Record<string, string | null> | null;
|
|
190
|
-
handleId?: string;
|
|
191
|
-
type: IcePanel.DiagramType;
|
|
192
|
-
comments?: Record<string, IcePanel.DiagramComment>;
|
|
193
|
-
connections?: Record<string, IcePanel.DiagramConnection>;
|
|
194
|
-
objects?: Record<string, IcePanel.DiagramObject>;
|
|
160
|
+
body: IcePanel.DiagramCreate;
|
|
195
161
|
}
|
|
196
162
|
/**
|
|
197
163
|
* @example
|
|
@@ -49,10 +49,12 @@ export declare class DiagramsClient {
|
|
|
49
49
|
* await client.diagrams.create({
|
|
50
50
|
* landscapeId: "landscapeId",
|
|
51
51
|
* versionId: "versionId",
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
52
|
+
* body: {
|
|
53
|
+
* index: 1.1,
|
|
54
|
+
* modelId: "modelId",
|
|
55
|
+
* name: "name",
|
|
56
|
+
* type: "app-diagram"
|
|
57
|
+
* }
|
|
56
58
|
* })
|
|
57
59
|
*/
|
|
58
60
|
create(request: IcePanel.DiagramCreateRequest, requestOptions?: DiagramsClient.RequestOptions): core.HttpResponsePromise<IcePanel.DiagramsCreateResponse>;
|
|
@@ -91,10 +93,12 @@ export declare class DiagramsClient {
|
|
|
91
93
|
* landscapeId: "landscapeId",
|
|
92
94
|
* versionId: "versionId",
|
|
93
95
|
* diagramId: "diagramId",
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
96
|
+
* body: {
|
|
97
|
+
* index: 1.1,
|
|
98
|
+
* modelId: "modelId",
|
|
99
|
+
* name: "name",
|
|
100
|
+
* type: "app-diagram"
|
|
101
|
+
* }
|
|
98
102
|
* })
|
|
99
103
|
*/
|
|
100
104
|
upsert(request: IcePanel.DiagramUpsertRequest, requestOptions?: DiagramsClient.RequestOptions): core.HttpResponsePromise<IcePanel.DiagramsUpsertResponse>;
|
|
@@ -157,10 +157,12 @@ class DiagramsClient {
|
|
|
157
157
|
* await client.diagrams.create({
|
|
158
158
|
* landscapeId: "landscapeId",
|
|
159
159
|
* versionId: "versionId",
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
160
|
+
* body: {
|
|
161
|
+
* index: 1.1,
|
|
162
|
+
* modelId: "modelId",
|
|
163
|
+
* name: "name",
|
|
164
|
+
* type: "app-diagram"
|
|
165
|
+
* }
|
|
164
166
|
* })
|
|
165
167
|
*/
|
|
166
168
|
create(request, requestOptions) {
|
|
@@ -169,7 +171,7 @@ class DiagramsClient {
|
|
|
169
171
|
__create(request, requestOptions) {
|
|
170
172
|
return __awaiter(this, void 0, void 0, function* () {
|
|
171
173
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
172
|
-
const { landscapeId, versionId, updateViewedAt
|
|
174
|
+
const { landscapeId, versionId, updateViewedAt, body: _body } = request;
|
|
173
175
|
const _queryParams = {};
|
|
174
176
|
if (updateViewedAt != null) {
|
|
175
177
|
_queryParams.updateViewedAt = updateViewedAt.toString();
|
|
@@ -294,10 +296,12 @@ class DiagramsClient {
|
|
|
294
296
|
* landscapeId: "landscapeId",
|
|
295
297
|
* versionId: "versionId",
|
|
296
298
|
* diagramId: "diagramId",
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
-
*
|
|
299
|
+
* body: {
|
|
300
|
+
* index: 1.1,
|
|
301
|
+
* modelId: "modelId",
|
|
302
|
+
* name: "name",
|
|
303
|
+
* type: "app-diagram"
|
|
304
|
+
* }
|
|
301
305
|
* })
|
|
302
306
|
*/
|
|
303
307
|
upsert(request, requestOptions) {
|
|
@@ -306,7 +310,7 @@ class DiagramsClient {
|
|
|
306
310
|
__upsert(request, requestOptions) {
|
|
307
311
|
return __awaiter(this, void 0, void 0, function* () {
|
|
308
312
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
309
|
-
const { landscapeId, versionId, diagramId, updateViewedAt
|
|
313
|
+
const { landscapeId, versionId, diagramId, updateViewedAt, body: _body } = request;
|
|
310
314
|
const _queryParams = {};
|
|
311
315
|
if (updateViewedAt != null) {
|
|
312
316
|
_queryParams.updateViewedAt = updateViewedAt.toString();
|
|
@@ -1999,6 +1999,28 @@ export interface Diagram {
|
|
|
1999
1999
|
version: number;
|
|
2000
2000
|
versionId: string;
|
|
2001
2001
|
}
|
|
2002
|
+
export interface DiagramCreate {
|
|
2003
|
+
commit?: number;
|
|
2004
|
+
description?: string;
|
|
2005
|
+
groupId?: string | null;
|
|
2006
|
+
index: number;
|
|
2007
|
+
labels?: Record<string, string>;
|
|
2008
|
+
/** model object id this object belongs to */
|
|
2009
|
+
modelId: string;
|
|
2010
|
+
name: string;
|
|
2011
|
+
parentId?: string | null;
|
|
2012
|
+
pinned?: boolean;
|
|
2013
|
+
pinnedAt?: string;
|
|
2014
|
+
pinnedIndex?: number;
|
|
2015
|
+
status?: IcePanel.DiagramStatus;
|
|
2016
|
+
/** Custom zoom levels for specific model objects within the diagram. The key is the modelObjectId and the value is the diagram id. */
|
|
2017
|
+
zoomOverrides?: Record<string, string | null> | null;
|
|
2018
|
+
handleId?: string;
|
|
2019
|
+
type: IcePanel.DiagramType;
|
|
2020
|
+
comments?: Record<string, IcePanel.DiagramComment>;
|
|
2021
|
+
connections?: Record<string, IcePanel.DiagramConnection>;
|
|
2022
|
+
objects?: Record<string, IcePanel.DiagramObject>;
|
|
2023
|
+
}
|
|
2002
2024
|
export declare const DiagramObjectShape: {
|
|
2003
2025
|
readonly Area: "area";
|
|
2004
2026
|
readonly Box: "box";
|
|
@@ -4402,6 +4424,7 @@ export type SearchResultData = IcePanel.ModelObject | IcePanel.ModelConnection |
|
|
|
4402
4424
|
export interface SearchResult {
|
|
4403
4425
|
data?: IcePanel.SearchResultData;
|
|
4404
4426
|
id: string;
|
|
4427
|
+
name: string;
|
|
4405
4428
|
score: number;
|
|
4406
4429
|
type: IcePanel.SearchIndexType;
|
|
4407
4430
|
}
|
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.43";
|
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.43",
|
|
10
|
+
"User-Agent": "@icepanel/sdk/0.0.43",
|
|
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,22 +15,16 @@ 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
|
-
|
|
19
|
-
url.pathname = `/${options.apiVersion}`;
|
|
20
|
-
return url.toString();
|
|
18
|
+
return `${baseUrl}/${options.apiVersion}`;
|
|
21
19
|
}
|
|
22
20
|
const environment = options.environment ? yield core.Supplier.get(options.environment) : undefined;
|
|
23
21
|
if (environment) {
|
|
24
|
-
|
|
25
|
-
url.pathname = `/${options.apiVersion}`;
|
|
26
|
-
return url.toString();
|
|
22
|
+
return `https://api.${environment}.icepanel.cloud/${options.apiVersion}`;
|
|
27
23
|
}
|
|
28
|
-
|
|
29
|
-
url.pathname = `/${options.apiVersion}`;
|
|
30
|
-
return url.toString();
|
|
24
|
+
return `https://api.icepanel.io/${options.apiVersion}`;
|
|
31
25
|
});
|
|
32
26
|
if (options.apiKey) {
|
|
33
|
-
updatedOptions.headers = Object.assign(Object.assign({}, updatedOptions.headers), { 'Authorization': options.apiKey });
|
|
27
|
+
updatedOptions.headers = Object.assign(Object.assign({}, updatedOptions.headers), { 'Authorization': `ApiKey ${options.apiKey}` });
|
|
34
28
|
}
|
|
35
29
|
if (options.authorization) {
|
|
36
30
|
updatedOptions.headers = Object.assign(Object.assign({}, updatedOptions.headers), { Authorization: options.authorization });
|
|
@@ -110,36 +110,19 @@ export interface DiagramsListRequest {
|
|
|
110
110
|
* {
|
|
111
111
|
* landscapeId: "landscapeId",
|
|
112
112
|
* versionId: "versionId",
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
113
|
+
* body: {
|
|
114
|
+
* index: 1.1,
|
|
115
|
+
* modelId: "modelId",
|
|
116
|
+
* name: "name",
|
|
117
|
+
* type: "app-diagram"
|
|
118
|
+
* }
|
|
117
119
|
* }
|
|
118
120
|
*/
|
|
119
121
|
export interface DiagramCreateRequest {
|
|
120
122
|
landscapeId: string;
|
|
121
123
|
versionId: string;
|
|
122
124
|
updateViewedAt?: boolean;
|
|
123
|
-
|
|
124
|
-
description?: string;
|
|
125
|
-
groupId?: string | null;
|
|
126
|
-
index: number;
|
|
127
|
-
labels?: Record<string, string>;
|
|
128
|
-
/** model object id this object belongs to */
|
|
129
|
-
modelId: string;
|
|
130
|
-
name: string;
|
|
131
|
-
parentId?: string | null;
|
|
132
|
-
pinned?: boolean;
|
|
133
|
-
pinnedAt?: string;
|
|
134
|
-
pinnedIndex?: number;
|
|
135
|
-
status?: IcePanel.DiagramStatus;
|
|
136
|
-
/** Custom zoom levels for specific model objects within the diagram. The key is the modelObjectId and the value is the diagram id. */
|
|
137
|
-
zoomOverrides?: Record<string, string | null> | null;
|
|
138
|
-
handleId?: string;
|
|
139
|
-
type: IcePanel.DiagramType;
|
|
140
|
-
comments?: Record<string, IcePanel.DiagramComment>;
|
|
141
|
-
connections?: Record<string, IcePanel.DiagramConnection>;
|
|
142
|
-
objects?: Record<string, IcePanel.DiagramObject>;
|
|
125
|
+
body: IcePanel.DiagramCreate;
|
|
143
126
|
}
|
|
144
127
|
/**
|
|
145
128
|
* @example
|
|
@@ -161,10 +144,12 @@ export interface DiagramFindRequest {
|
|
|
161
144
|
* landscapeId: "landscapeId",
|
|
162
145
|
* versionId: "versionId",
|
|
163
146
|
* diagramId: "diagramId",
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
147
|
+
* body: {
|
|
148
|
+
* index: 1.1,
|
|
149
|
+
* modelId: "modelId",
|
|
150
|
+
* name: "name",
|
|
151
|
+
* type: "app-diagram"
|
|
152
|
+
* }
|
|
168
153
|
* }
|
|
169
154
|
*/
|
|
170
155
|
export interface DiagramUpsertRequest {
|
|
@@ -172,26 +157,7 @@ export interface DiagramUpsertRequest {
|
|
|
172
157
|
versionId: string;
|
|
173
158
|
diagramId: string;
|
|
174
159
|
updateViewedAt?: boolean;
|
|
175
|
-
|
|
176
|
-
description?: string;
|
|
177
|
-
groupId?: string | null;
|
|
178
|
-
index: number;
|
|
179
|
-
labels?: Record<string, string>;
|
|
180
|
-
/** model object id this object belongs to */
|
|
181
|
-
modelId: string;
|
|
182
|
-
name: string;
|
|
183
|
-
parentId?: string | null;
|
|
184
|
-
pinned?: boolean;
|
|
185
|
-
pinnedAt?: string;
|
|
186
|
-
pinnedIndex?: number;
|
|
187
|
-
status?: IcePanel.DiagramStatus;
|
|
188
|
-
/** Custom zoom levels for specific model objects within the diagram. The key is the modelObjectId and the value is the diagram id. */
|
|
189
|
-
zoomOverrides?: Record<string, string | null> | null;
|
|
190
|
-
handleId?: string;
|
|
191
|
-
type: IcePanel.DiagramType;
|
|
192
|
-
comments?: Record<string, IcePanel.DiagramComment>;
|
|
193
|
-
connections?: Record<string, IcePanel.DiagramConnection>;
|
|
194
|
-
objects?: Record<string, IcePanel.DiagramObject>;
|
|
160
|
+
body: IcePanel.DiagramCreate;
|
|
195
161
|
}
|
|
196
162
|
/**
|
|
197
163
|
* @example
|
|
@@ -49,10 +49,12 @@ export declare class DiagramsClient {
|
|
|
49
49
|
* await client.diagrams.create({
|
|
50
50
|
* landscapeId: "landscapeId",
|
|
51
51
|
* versionId: "versionId",
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
52
|
+
* body: {
|
|
53
|
+
* index: 1.1,
|
|
54
|
+
* modelId: "modelId",
|
|
55
|
+
* name: "name",
|
|
56
|
+
* type: "app-diagram"
|
|
57
|
+
* }
|
|
56
58
|
* })
|
|
57
59
|
*/
|
|
58
60
|
create(request: IcePanel.DiagramCreateRequest, requestOptions?: DiagramsClient.RequestOptions): core.HttpResponsePromise<IcePanel.DiagramsCreateResponse>;
|
|
@@ -91,10 +93,12 @@ export declare class DiagramsClient {
|
|
|
91
93
|
* landscapeId: "landscapeId",
|
|
92
94
|
* versionId: "versionId",
|
|
93
95
|
* diagramId: "diagramId",
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
96
|
+
* body: {
|
|
97
|
+
* index: 1.1,
|
|
98
|
+
* modelId: "modelId",
|
|
99
|
+
* name: "name",
|
|
100
|
+
* type: "app-diagram"
|
|
101
|
+
* }
|
|
98
102
|
* })
|
|
99
103
|
*/
|
|
100
104
|
upsert(request: IcePanel.DiagramUpsertRequest, requestOptions?: DiagramsClient.RequestOptions): core.HttpResponsePromise<IcePanel.DiagramsUpsertResponse>;
|
|
@@ -121,10 +121,12 @@ export class DiagramsClient {
|
|
|
121
121
|
* await client.diagrams.create({
|
|
122
122
|
* landscapeId: "landscapeId",
|
|
123
123
|
* versionId: "versionId",
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
124
|
+
* body: {
|
|
125
|
+
* index: 1.1,
|
|
126
|
+
* modelId: "modelId",
|
|
127
|
+
* name: "name",
|
|
128
|
+
* type: "app-diagram"
|
|
129
|
+
* }
|
|
128
130
|
* })
|
|
129
131
|
*/
|
|
130
132
|
create(request, requestOptions) {
|
|
@@ -133,7 +135,7 @@ export class DiagramsClient {
|
|
|
133
135
|
__create(request, requestOptions) {
|
|
134
136
|
return __awaiter(this, void 0, void 0, function* () {
|
|
135
137
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
136
|
-
const { landscapeId, versionId, updateViewedAt
|
|
138
|
+
const { landscapeId, versionId, updateViewedAt, body: _body } = request;
|
|
137
139
|
const _queryParams = {};
|
|
138
140
|
if (updateViewedAt != null) {
|
|
139
141
|
_queryParams.updateViewedAt = updateViewedAt.toString();
|
|
@@ -258,10 +260,12 @@ export class DiagramsClient {
|
|
|
258
260
|
* landscapeId: "landscapeId",
|
|
259
261
|
* versionId: "versionId",
|
|
260
262
|
* diagramId: "diagramId",
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
263
|
+
* body: {
|
|
264
|
+
* index: 1.1,
|
|
265
|
+
* modelId: "modelId",
|
|
266
|
+
* name: "name",
|
|
267
|
+
* type: "app-diagram"
|
|
268
|
+
* }
|
|
265
269
|
* })
|
|
266
270
|
*/
|
|
267
271
|
upsert(request, requestOptions) {
|
|
@@ -270,7 +274,7 @@ export class DiagramsClient {
|
|
|
270
274
|
__upsert(request, requestOptions) {
|
|
271
275
|
return __awaiter(this, void 0, void 0, function* () {
|
|
272
276
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
273
|
-
const { landscapeId, versionId, diagramId, updateViewedAt
|
|
277
|
+
const { landscapeId, versionId, diagramId, updateViewedAt, body: _body } = request;
|
|
274
278
|
const _queryParams = {};
|
|
275
279
|
if (updateViewedAt != null) {
|
|
276
280
|
_queryParams.updateViewedAt = updateViewedAt.toString();
|
|
@@ -1999,6 +1999,28 @@ export interface Diagram {
|
|
|
1999
1999
|
version: number;
|
|
2000
2000
|
versionId: string;
|
|
2001
2001
|
}
|
|
2002
|
+
export interface DiagramCreate {
|
|
2003
|
+
commit?: number;
|
|
2004
|
+
description?: string;
|
|
2005
|
+
groupId?: string | null;
|
|
2006
|
+
index: number;
|
|
2007
|
+
labels?: Record<string, string>;
|
|
2008
|
+
/** model object id this object belongs to */
|
|
2009
|
+
modelId: string;
|
|
2010
|
+
name: string;
|
|
2011
|
+
parentId?: string | null;
|
|
2012
|
+
pinned?: boolean;
|
|
2013
|
+
pinnedAt?: string;
|
|
2014
|
+
pinnedIndex?: number;
|
|
2015
|
+
status?: IcePanel.DiagramStatus;
|
|
2016
|
+
/** Custom zoom levels for specific model objects within the diagram. The key is the modelObjectId and the value is the diagram id. */
|
|
2017
|
+
zoomOverrides?: Record<string, string | null> | null;
|
|
2018
|
+
handleId?: string;
|
|
2019
|
+
type: IcePanel.DiagramType;
|
|
2020
|
+
comments?: Record<string, IcePanel.DiagramComment>;
|
|
2021
|
+
connections?: Record<string, IcePanel.DiagramConnection>;
|
|
2022
|
+
objects?: Record<string, IcePanel.DiagramObject>;
|
|
2023
|
+
}
|
|
2002
2024
|
export declare const DiagramObjectShape: {
|
|
2003
2025
|
readonly Area: "area";
|
|
2004
2026
|
readonly Box: "box";
|
|
@@ -4402,6 +4424,7 @@ export type SearchResultData = IcePanel.ModelObject | IcePanel.ModelConnection |
|
|
|
4402
4424
|
export interface SearchResult {
|
|
4403
4425
|
data?: IcePanel.SearchResultData;
|
|
4404
4426
|
id: string;
|
|
4427
|
+
name: string;
|
|
4405
4428
|
score: number;
|
|
4406
4429
|
type: IcePanel.SearchIndexType;
|
|
4407
4430
|
}
|
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.43";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.
|
|
1
|
+
export const SDK_VERSION = "0.0.43";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -398,10 +398,12 @@ await client.diagrams.list({
|
|
|
398
398
|
await client.diagrams.create({
|
|
399
399
|
landscapeId: "landscapeId",
|
|
400
400
|
versionId: "versionId",
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
401
|
+
body: {
|
|
402
|
+
index: 1.1,
|
|
403
|
+
modelId: "modelId",
|
|
404
|
+
name: "name",
|
|
405
|
+
type: "app-diagram"
|
|
406
|
+
}
|
|
405
407
|
});
|
|
406
408
|
|
|
407
409
|
```
|
|
@@ -508,10 +510,12 @@ await client.diagrams.upsert({
|
|
|
508
510
|
landscapeId: "landscapeId",
|
|
509
511
|
versionId: "versionId",
|
|
510
512
|
diagramId: "diagramId",
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
513
|
+
body: {
|
|
514
|
+
index: 1.1,
|
|
515
|
+
modelId: "modelId",
|
|
516
|
+
name: "name",
|
|
517
|
+
type: "app-diagram"
|
|
518
|
+
}
|
|
515
519
|
});
|
|
516
520
|
|
|
517
521
|
```
|