@uniformdev/project-map 17.5.1-alpha.7 → 17.6.1-alpha.60
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/dist/chunk-OIOFUJKY.mjs +1 -0
- package/dist/cli/cli.js +36 -36
- package/dist/cli/cli.mjs +36 -36
- package/dist/index.d.ts +197 -192
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +6 -6
- package/dist/chunk-4VJBTGFT.mjs +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,37 +1,23 @@
|
|
|
1
1
|
import { ApiClient } from '@uniformdev/context/api';
|
|
2
2
|
|
|
3
|
+
declare type ProjectMapNodeWithProjectMapReference = ProjectMapNodeWithId & {
|
|
4
|
+
projectMapId: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
3
7
|
/**
|
|
4
8
|
* This file was auto-generated by openapi-typescript.
|
|
5
9
|
* Do not make direct changes to the file.
|
|
6
10
|
*/
|
|
7
11
|
interface paths$1 {
|
|
8
|
-
"/api/v1/project-map
|
|
9
|
-
/** Called to
|
|
12
|
+
"/api/v1/project-map": {
|
|
13
|
+
/** Called to retrieve a list of project maps related to a project or a specific project map by id */
|
|
10
14
|
get: {
|
|
11
15
|
parameters: {
|
|
12
16
|
query: {
|
|
13
|
-
/** The project
|
|
14
|
-
projectMapId: string;
|
|
15
|
-
/** The project id that contains the project map tree that this node belongs to */
|
|
17
|
+
/** The project to fetch project map for */
|
|
16
18
|
projectId: string;
|
|
17
|
-
/** The id of the
|
|
18
|
-
|
|
19
|
-
/** The path of the root node to retrieve, cannot have both this parameter and Id */
|
|
20
|
-
path?: string;
|
|
21
|
-
/** Composition id to find associated sitemap nodes for */
|
|
22
|
-
compositionId?: string;
|
|
23
|
-
/** Limit the number or records returned by a number */
|
|
24
|
-
limit?: number;
|
|
25
|
-
/** Number of records to skip before returning nodes */
|
|
26
|
-
offset?: number;
|
|
27
|
-
/** Depth of the tree to fetch */
|
|
28
|
-
depth?: number;
|
|
29
|
-
/** should the data be returned as a json tree object */
|
|
30
|
-
tree?: boolean;
|
|
31
|
-
/** text search filter */
|
|
32
|
-
search?: string;
|
|
33
|
-
/** include expanded helper computed properties, includes isLeaf, parentPath, pathSegment */
|
|
34
|
-
expanded?: boolean;
|
|
19
|
+
/** The id of the project map to fetch */
|
|
20
|
+
projectMapId?: string;
|
|
35
21
|
};
|
|
36
22
|
};
|
|
37
23
|
responses: {
|
|
@@ -39,8 +25,7 @@ interface paths$1 {
|
|
|
39
25
|
200: {
|
|
40
26
|
content: {
|
|
41
27
|
"application/json": {
|
|
42
|
-
|
|
43
|
-
tree?: external$1["v1-project-map-tree.swagger.yml"]["components"]["schemas"]["ProjectMapTreeNodeDefinition"];
|
|
28
|
+
projectMaps: components$1["schemas"]["ProjectMapDefinition"][];
|
|
44
29
|
};
|
|
45
30
|
};
|
|
46
31
|
};
|
|
@@ -51,9 +36,20 @@ interface paths$1 {
|
|
|
51
36
|
500: external$1["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
|
52
37
|
};
|
|
53
38
|
};
|
|
54
|
-
/** Called to insert or update a node or nodes */
|
|
55
39
|
put: {
|
|
56
40
|
responses: {
|
|
41
|
+
/** OK */
|
|
42
|
+
200: {
|
|
43
|
+
content: {
|
|
44
|
+
"application/json": {
|
|
45
|
+
/**
|
|
46
|
+
* Format: uuid
|
|
47
|
+
* @description Id of the projectMap
|
|
48
|
+
*/
|
|
49
|
+
projectMapId: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
57
53
|
/** OK */
|
|
58
54
|
204: never;
|
|
59
55
|
400: external$1["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
|
@@ -65,29 +61,18 @@ interface paths$1 {
|
|
|
65
61
|
requestBody: {
|
|
66
62
|
content: {
|
|
67
63
|
"application/json": {
|
|
68
|
-
/** @description
|
|
69
|
-
|
|
70
|
-
node: components$1["schemas"]["ProjectMapNodeUpdate"];
|
|
71
|
-
/** @description The path of the node directly prior to the location where the current node is desired to go or undefined if there isn't one */
|
|
72
|
-
previousSibling?: string;
|
|
73
|
-
/** @description The path of the node directly after the location where the current node is desired to go or undefined if there isn't one */
|
|
74
|
-
nextSibling?: string;
|
|
75
|
-
}[];
|
|
64
|
+
/** @description Project map object to insert */
|
|
65
|
+
projectMap: components$1["schemas"]["ProjectMapDefinition"];
|
|
76
66
|
/**
|
|
77
67
|
* Format: uuid
|
|
78
|
-
* @description
|
|
68
|
+
* @description Project id to insert the projectMap into
|
|
79
69
|
*/
|
|
80
70
|
projectId: string;
|
|
81
|
-
/**
|
|
82
|
-
* Format: uuid
|
|
83
|
-
* @description The projectMap id that the changing or inserting nodes belong to
|
|
84
|
-
*/
|
|
85
|
-
projectMapId: string;
|
|
86
71
|
};
|
|
87
72
|
};
|
|
88
73
|
};
|
|
89
74
|
};
|
|
90
|
-
/** Called to delete a
|
|
75
|
+
/** Called to delete a projectMap */
|
|
91
76
|
delete: {
|
|
92
77
|
responses: {
|
|
93
78
|
/** OK */
|
|
@@ -103,39 +88,14 @@ interface paths$1 {
|
|
|
103
88
|
"application/json": {
|
|
104
89
|
/**
|
|
105
90
|
* Format: uuid
|
|
106
|
-
* @description Id of the projectMap
|
|
107
|
-
*/
|
|
108
|
-
nodeId?: string;
|
|
109
|
-
/** @description Path to the projectMap node to delete */
|
|
110
|
-
path: string;
|
|
111
|
-
/**
|
|
112
|
-
* Format: uuid
|
|
113
|
-
* @description Project map id that the node to delete belongs to
|
|
114
|
-
*/
|
|
115
|
-
projectMapId: string;
|
|
116
|
-
/**
|
|
117
|
-
* Format: uuid
|
|
118
|
-
* @description Project id that the project map belongs to
|
|
91
|
+
* @description Id of the project that this projectMap belongs to
|
|
119
92
|
*/
|
|
120
93
|
projectId: string;
|
|
121
|
-
} | {
|
|
122
|
-
/**
|
|
123
|
-
* Format: uuid
|
|
124
|
-
* @description Id of the projectMap node to delete
|
|
125
|
-
*/
|
|
126
|
-
nodeId: string;
|
|
127
|
-
/** @description Path to the projectMap node to delete */
|
|
128
|
-
path?: string;
|
|
129
94
|
/**
|
|
130
95
|
* Format: uuid
|
|
131
|
-
* @description
|
|
96
|
+
* @description Id of the projectMap to delete
|
|
132
97
|
*/
|
|
133
98
|
projectMapId: string;
|
|
134
|
-
/**
|
|
135
|
-
* Format: uuid
|
|
136
|
-
* @description Project id that the project map belongs to
|
|
137
|
-
*/
|
|
138
|
-
projectId: string;
|
|
139
99
|
};
|
|
140
100
|
};
|
|
141
101
|
};
|
|
@@ -144,69 +104,16 @@ interface paths$1 {
|
|
|
144
104
|
}
|
|
145
105
|
interface components$1 {
|
|
146
106
|
schemas: {
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Format: uuid
|
|
150
|
-
* @description The id of the projectMap entry
|
|
151
|
-
*/
|
|
152
|
-
id: string;
|
|
153
|
-
/** @description Dot delimited path representing the path to the current node */
|
|
154
|
-
path: string;
|
|
155
|
-
/** @description Ordering of the node, higher numbers go after lower numbers. */
|
|
156
|
-
order?: number;
|
|
157
|
-
/** @description Data associated with this projectMap node */
|
|
158
|
-
data?: {
|
|
159
|
-
[key: string]: unknown;
|
|
160
|
-
};
|
|
161
|
-
/** @description The name of the projectMap entry */
|
|
162
|
-
name: string;
|
|
163
|
-
/**
|
|
164
|
-
* @description The type of the projectMap entry
|
|
165
|
-
* @enum {string}
|
|
166
|
-
*/
|
|
167
|
-
type: "composition" | "redirect" | "placeholder";
|
|
168
|
-
/**
|
|
169
|
-
* Format: uuid
|
|
170
|
-
* @description The composition id related to the projectMap entry
|
|
171
|
-
*/
|
|
172
|
-
compositionId?: string;
|
|
173
|
-
/** @description Description of the projectMap node */
|
|
174
|
-
description?: string;
|
|
175
|
-
/** @description Parent path of the current node, only included if requested with the expanded flag */
|
|
176
|
-
parentPath?: string;
|
|
177
|
-
/** @description Last segment of the url, only included if requested with the expanded flag */
|
|
178
|
-
pathSegment?: string;
|
|
179
|
-
/** @description returns true if the node is a leaf node, meaning having no children, only included if requested with the expanded flag */
|
|
180
|
-
isLeaf?: boolean;
|
|
181
|
-
};
|
|
182
|
-
ProjectMapNodeUpdate: {
|
|
183
|
-
/**
|
|
184
|
-
* Format: uuid
|
|
185
|
-
* @description The id of the projectMap entry
|
|
186
|
-
*/
|
|
107
|
+
ProjectMapDefinition: {
|
|
108
|
+
/** @description The id of the projectMap node */
|
|
187
109
|
id?: string;
|
|
188
|
-
/** @description
|
|
189
|
-
path: string;
|
|
190
|
-
/** @description Ordering of the node, higher numbers go after lower numbers. */
|
|
191
|
-
order?: number;
|
|
192
|
-
/** @description Data associated with this projectMap node */
|
|
193
|
-
data?: {
|
|
194
|
-
[key: string]: unknown;
|
|
195
|
-
};
|
|
196
|
-
/** @description The name of the projectMap entry */
|
|
110
|
+
/** @description The name of the projectMap node */
|
|
197
111
|
name: string;
|
|
198
|
-
/**
|
|
199
|
-
* @description The type of the projectMap entry
|
|
200
|
-
* @enum {string}
|
|
201
|
-
*/
|
|
202
|
-
type: "composition" | "redirect" | "placeholder";
|
|
203
|
-
/**
|
|
204
|
-
* Format: uuid
|
|
205
|
-
* @description The composition id related to the projectMap entry
|
|
206
|
-
*/
|
|
207
|
-
compositionId?: string;
|
|
208
112
|
/** @description Description of the projectMap node */
|
|
209
113
|
description?: string;
|
|
114
|
+
/** @description The prefix of the url generated by this projectMap */
|
|
115
|
+
baseUrl?: string;
|
|
116
|
+
default?: boolean;
|
|
210
117
|
};
|
|
211
118
|
};
|
|
212
119
|
}
|
|
@@ -253,20 +160,6 @@ interface external$1 {
|
|
|
253
160
|
};
|
|
254
161
|
operations: {};
|
|
255
162
|
};
|
|
256
|
-
"v1-project-map-tree.swagger.yml": {
|
|
257
|
-
paths: {};
|
|
258
|
-
components: {
|
|
259
|
-
schemas: {
|
|
260
|
-
ProjectMapTreeNodeDefinition: components$1["schemas"]["ProjectMapNodeDefinition"] & {
|
|
261
|
-
/** @description Children of the node */
|
|
262
|
-
children?: external$1["v1-project-map-tree.swagger.yml"]["components"]["schemas"]["ProjectMapTreeNodeDefinition"][];
|
|
263
|
-
} & {
|
|
264
|
-
name: unknown;
|
|
265
|
-
};
|
|
266
|
-
};
|
|
267
|
-
};
|
|
268
|
-
operations: {};
|
|
269
|
-
};
|
|
270
163
|
}
|
|
271
164
|
|
|
272
165
|
/**
|
|
@@ -274,15 +167,33 @@ interface external$1 {
|
|
|
274
167
|
* Do not make direct changes to the file.
|
|
275
168
|
*/
|
|
276
169
|
interface paths {
|
|
277
|
-
"/api/v1/project-map": {
|
|
278
|
-
/** Called to
|
|
170
|
+
"/api/v1/project-map-nodes": {
|
|
171
|
+
/** Called to get a list of nodes belonging to a specific path or Id */
|
|
279
172
|
get: {
|
|
280
173
|
parameters: {
|
|
281
174
|
query: {
|
|
282
|
-
/** The project
|
|
175
|
+
/** The project map id that the desired nodes belong */
|
|
176
|
+
projectMapId: string;
|
|
177
|
+
/** The project id that contains the project map tree that this node belongs to */
|
|
283
178
|
projectId: string;
|
|
284
|
-
/** The id of the
|
|
285
|
-
|
|
179
|
+
/** The id of the node to retrieve, cannot have both this parameter and Path */
|
|
180
|
+
id?: string;
|
|
181
|
+
/** The path of the root node to retrieve, cannot have both this parameter and Id */
|
|
182
|
+
path?: string;
|
|
183
|
+
/** Composition id to find associated sitemap nodes for */
|
|
184
|
+
compositionId?: string;
|
|
185
|
+
/** Limit the number or records returned by a number */
|
|
186
|
+
limit?: number;
|
|
187
|
+
/** Number of records to skip before returning nodes */
|
|
188
|
+
offset?: number;
|
|
189
|
+
/** Depth of the tree to fetch */
|
|
190
|
+
depth?: number;
|
|
191
|
+
/** should the data be returned as a json tree object */
|
|
192
|
+
tree?: boolean;
|
|
193
|
+
/** text search filter */
|
|
194
|
+
search?: string;
|
|
195
|
+
/** include expanded helper computed properties, includes isLeaf, parentPath, pathSegment */
|
|
196
|
+
expanded?: boolean;
|
|
286
197
|
};
|
|
287
198
|
};
|
|
288
199
|
responses: {
|
|
@@ -290,7 +201,8 @@ interface paths {
|
|
|
290
201
|
200: {
|
|
291
202
|
content: {
|
|
292
203
|
"application/json": {
|
|
293
|
-
|
|
204
|
+
nodes?: components["schemas"]["ProjectMapNodeDefinition"][];
|
|
205
|
+
tree?: external["v1-project-map-tree.swagger.yml"]["components"]["schemas"]["ProjectMapTreeNodeDefinition"];
|
|
294
206
|
};
|
|
295
207
|
};
|
|
296
208
|
};
|
|
@@ -301,20 +213,9 @@ interface paths {
|
|
|
301
213
|
500: external["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
|
302
214
|
};
|
|
303
215
|
};
|
|
216
|
+
/** Called to insert or update a node or nodes */
|
|
304
217
|
put: {
|
|
305
218
|
responses: {
|
|
306
|
-
/** OK */
|
|
307
|
-
200: {
|
|
308
|
-
content: {
|
|
309
|
-
"application/json": {
|
|
310
|
-
/**
|
|
311
|
-
* Format: uuid
|
|
312
|
-
* @description Id of the projectMap
|
|
313
|
-
*/
|
|
314
|
-
projectMapId: string;
|
|
315
|
-
};
|
|
316
|
-
};
|
|
317
|
-
};
|
|
318
219
|
/** OK */
|
|
319
220
|
204: never;
|
|
320
221
|
400: external["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
|
@@ -326,18 +227,29 @@ interface paths {
|
|
|
326
227
|
requestBody: {
|
|
327
228
|
content: {
|
|
328
229
|
"application/json": {
|
|
329
|
-
/** @description
|
|
330
|
-
|
|
230
|
+
/** @description An array of projectMap node objects to be updated or inserted */
|
|
231
|
+
nodes: {
|
|
232
|
+
node: components["schemas"]["ProjectMapNodeUpdate"];
|
|
233
|
+
/** @description The path of the node directly prior to the location where the current node is desired to go or undefined if there isn't one */
|
|
234
|
+
previousSibling?: string;
|
|
235
|
+
/** @description The path of the node directly after the location where the current node is desired to go or undefined if there isn't one */
|
|
236
|
+
nextSibling?: string;
|
|
237
|
+
}[];
|
|
331
238
|
/**
|
|
332
239
|
* Format: uuid
|
|
333
|
-
* @description
|
|
240
|
+
* @description The project id of the project that the projectMap belongs to
|
|
334
241
|
*/
|
|
335
242
|
projectId: string;
|
|
243
|
+
/**
|
|
244
|
+
* Format: uuid
|
|
245
|
+
* @description The projectMap id that the changing or inserting nodes belong to
|
|
246
|
+
*/
|
|
247
|
+
projectMapId: string;
|
|
336
248
|
};
|
|
337
249
|
};
|
|
338
250
|
};
|
|
339
251
|
};
|
|
340
|
-
/** Called to delete a projectMap */
|
|
252
|
+
/** Called to delete a particular projectMap node by id or path */
|
|
341
253
|
delete: {
|
|
342
254
|
responses: {
|
|
343
255
|
/** OK */
|
|
@@ -353,14 +265,39 @@ interface paths {
|
|
|
353
265
|
"application/json": {
|
|
354
266
|
/**
|
|
355
267
|
* Format: uuid
|
|
356
|
-
* @description Id of the
|
|
268
|
+
* @description Id of the projectMap node to delete
|
|
269
|
+
*/
|
|
270
|
+
nodeId?: string;
|
|
271
|
+
/** @description Path to the projectMap node to delete */
|
|
272
|
+
path: string;
|
|
273
|
+
/**
|
|
274
|
+
* Format: uuid
|
|
275
|
+
* @description Project map id that the node to delete belongs to
|
|
276
|
+
*/
|
|
277
|
+
projectMapId: string;
|
|
278
|
+
/**
|
|
279
|
+
* Format: uuid
|
|
280
|
+
* @description Project id that the project map belongs to
|
|
357
281
|
*/
|
|
358
282
|
projectId: string;
|
|
283
|
+
} | {
|
|
359
284
|
/**
|
|
360
285
|
* Format: uuid
|
|
361
|
-
* @description Id of the projectMap to delete
|
|
286
|
+
* @description Id of the projectMap node to delete
|
|
287
|
+
*/
|
|
288
|
+
nodeId: string;
|
|
289
|
+
/** @description Path to the projectMap node to delete */
|
|
290
|
+
path?: string;
|
|
291
|
+
/**
|
|
292
|
+
* Format: uuid
|
|
293
|
+
* @description Project map id that the node to delete belongs to
|
|
362
294
|
*/
|
|
363
295
|
projectMapId: string;
|
|
296
|
+
/**
|
|
297
|
+
* Format: uuid
|
|
298
|
+
* @description Project id that the project map belongs to
|
|
299
|
+
*/
|
|
300
|
+
projectId: string;
|
|
364
301
|
};
|
|
365
302
|
};
|
|
366
303
|
};
|
|
@@ -369,16 +306,69 @@ interface paths {
|
|
|
369
306
|
}
|
|
370
307
|
interface components {
|
|
371
308
|
schemas: {
|
|
372
|
-
|
|
373
|
-
/**
|
|
309
|
+
ProjectMapNodeDefinition: {
|
|
310
|
+
/**
|
|
311
|
+
* Format: uuid
|
|
312
|
+
* @description The id of the projectMap entry
|
|
313
|
+
*/
|
|
314
|
+
id: string;
|
|
315
|
+
/** @description Dot delimited path representing the path to the current node */
|
|
316
|
+
path: string;
|
|
317
|
+
/** @description Ordering of the node, higher numbers go after lower numbers. */
|
|
318
|
+
order?: number;
|
|
319
|
+
/** @description Data associated with this projectMap node */
|
|
320
|
+
data?: {
|
|
321
|
+
[key: string]: unknown;
|
|
322
|
+
};
|
|
323
|
+
/** @description The name of the projectMap entry */
|
|
324
|
+
name: string;
|
|
325
|
+
/**
|
|
326
|
+
* @description The type of the projectMap entry
|
|
327
|
+
* @enum {string}
|
|
328
|
+
*/
|
|
329
|
+
type: "composition" | "redirect" | "placeholder";
|
|
330
|
+
/**
|
|
331
|
+
* Format: uuid
|
|
332
|
+
* @description The composition id related to the projectMap entry
|
|
333
|
+
*/
|
|
334
|
+
compositionId?: string;
|
|
335
|
+
/** @description Description of the projectMap node */
|
|
336
|
+
description?: string;
|
|
337
|
+
/** @description Parent path of the current node, only included if requested with the expanded flag */
|
|
338
|
+
parentPath?: string;
|
|
339
|
+
/** @description Last segment of the url, only included if requested with the expanded flag */
|
|
340
|
+
pathSegment?: string;
|
|
341
|
+
/** @description returns true if the node is a leaf node, meaning having no children, only included if requested with the expanded flag */
|
|
342
|
+
isLeaf?: boolean;
|
|
343
|
+
};
|
|
344
|
+
ProjectMapNodeUpdate: {
|
|
345
|
+
/**
|
|
346
|
+
* Format: uuid
|
|
347
|
+
* @description The id of the projectMap entry
|
|
348
|
+
*/
|
|
374
349
|
id?: string;
|
|
375
|
-
/** @description
|
|
350
|
+
/** @description Dot delimited path representing the path to the current node */
|
|
351
|
+
path: string;
|
|
352
|
+
/** @description Ordering of the node, higher numbers go after lower numbers. */
|
|
353
|
+
order?: number;
|
|
354
|
+
/** @description Data associated with this projectMap node */
|
|
355
|
+
data?: {
|
|
356
|
+
[key: string]: unknown;
|
|
357
|
+
};
|
|
358
|
+
/** @description The name of the projectMap entry */
|
|
376
359
|
name: string;
|
|
360
|
+
/**
|
|
361
|
+
* @description The type of the projectMap entry
|
|
362
|
+
* @enum {string}
|
|
363
|
+
*/
|
|
364
|
+
type: "composition" | "redirect" | "placeholder";
|
|
365
|
+
/**
|
|
366
|
+
* Format: uuid
|
|
367
|
+
* @description The composition id related to the projectMap entry
|
|
368
|
+
*/
|
|
369
|
+
compositionId?: string;
|
|
377
370
|
/** @description Description of the projectMap node */
|
|
378
371
|
description?: string;
|
|
379
|
-
/** @description The prefix of the url generated by this projectMap */
|
|
380
|
-
baseUrl?: string;
|
|
381
|
-
default?: boolean;
|
|
382
372
|
};
|
|
383
373
|
};
|
|
384
374
|
}
|
|
@@ -425,26 +415,36 @@ interface external {
|
|
|
425
415
|
};
|
|
426
416
|
operations: {};
|
|
427
417
|
};
|
|
418
|
+
"v1-project-map-tree.swagger.yml": {
|
|
419
|
+
paths: {};
|
|
420
|
+
components: {
|
|
421
|
+
schemas: {
|
|
422
|
+
ProjectMapTreeNodeDefinition: components["schemas"]["ProjectMapNodeDefinition"] & {
|
|
423
|
+
/** @description Children of the node */
|
|
424
|
+
children?: external["v1-project-map-tree.swagger.yml"]["components"]["schemas"]["ProjectMapTreeNodeDefinition"][];
|
|
425
|
+
} & {
|
|
426
|
+
name: unknown;
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
operations: {};
|
|
431
|
+
};
|
|
428
432
|
}
|
|
429
433
|
|
|
430
|
-
declare type
|
|
431
|
-
projectMapId: string;
|
|
432
|
-
};
|
|
433
|
-
|
|
434
|
-
declare type ProjectMapNodeUpsertRequest = paths$1['/api/v1/project-map-nodes']['put']['requestBody']['content']['application/json'];
|
|
434
|
+
declare type ProjectMapNodeUpsertRequest = paths['/api/v1/project-map-nodes']['put']['requestBody']['content']['application/json'];
|
|
435
435
|
declare type ProjectMapNodeUpsertRequestNode = ProjectMapNodeUpsertRequest['nodes'][0]['node'];
|
|
436
|
-
declare type ProjectMapNodeDeleteRequest = paths
|
|
437
|
-
declare type ProjectMapNodeGetRequest = paths
|
|
438
|
-
declare type ProjectMapNodeGetResponse = paths
|
|
436
|
+
declare type ProjectMapNodeDeleteRequest = paths['/api/v1/project-map-nodes']['delete']['requestBody']['content']['application/json'];
|
|
437
|
+
declare type ProjectMapNodeGetRequest = paths['/api/v1/project-map-nodes']['get']['parameters']['query'];
|
|
438
|
+
declare type ProjectMapNodeGetResponse = paths['/api/v1/project-map-nodes']['get']['responses']['200']['content']['application/json'];
|
|
439
439
|
declare type ProjectMapNode = NonNullable<ProjectMapNodeGetResponse['nodes']>[0];
|
|
440
440
|
declare type ProjectMapNodeWithId = ProjectMapNode & Required<Pick<ProjectMapNode, 'id' | 'name'>>;
|
|
441
|
-
declare type ProjectMapGetRequest = paths['/api/v1/project-map']['get']['parameters']['query'];
|
|
442
|
-
declare type ProjectMapGetResponse = paths['/api/v1/project-map']['get']['responses']['200']['content']['application/json'];
|
|
443
|
-
declare type ProjectMapUpsertRequest = paths['/api/v1/project-map']['put']['requestBody']['content']['application/json'];
|
|
444
|
-
declare type ProjectMapDeleteRequest = paths['/api/v1/project-map']['delete']['requestBody']['content']['application/json'];
|
|
441
|
+
declare type ProjectMapGetRequest = paths$1['/api/v1/project-map']['get']['parameters']['query'];
|
|
442
|
+
declare type ProjectMapGetResponse = paths$1['/api/v1/project-map']['get']['responses']['200']['content']['application/json'];
|
|
443
|
+
declare type ProjectMapUpsertRequest = paths$1['/api/v1/project-map']['put']['requestBody']['content']['application/json'];
|
|
444
|
+
declare type ProjectMapDeleteRequest = paths$1['/api/v1/project-map']['delete']['requestBody']['content']['application/json'];
|
|
445
445
|
declare type ProjectMapDefinition = ProjectMapGetResponse['projectMaps'][0];
|
|
446
446
|
declare type ProjectMapDefinitionWithId = ProjectMapDefinition & Required<Pick<ProjectMapDefinition, 'id'>>;
|
|
447
|
-
declare type ProjectMapUpsertResponse = paths['/api/v1/project-map']['put']['responses']['200']['content']['application/json'];
|
|
447
|
+
declare type ProjectMapUpsertResponse = paths$1['/api/v1/project-map']['put']['responses']['200']['content']['application/json'];
|
|
448
448
|
declare type NodeType = 'placeholder' | 'composition' | 'redirect';
|
|
449
449
|
declare type ProjectMapDefinitions = {
|
|
450
450
|
projectMaps: ProjectMapDefinitionWithId[];
|
|
@@ -459,6 +459,8 @@ declare type ProjectMapClientOptions = {
|
|
|
459
459
|
apiKey?: string | undefined;
|
|
460
460
|
/** The Uniform bearer token to use. Internal use. */
|
|
461
461
|
bearerToken?: string | undefined;
|
|
462
|
+
/** The Uniform project ID to connect to */
|
|
463
|
+
projectId?: string | null;
|
|
462
464
|
/** Specify a fetch implementation to use when fetching data. Useful if you want to only polyfill selectively. */
|
|
463
465
|
fetch?: typeof fetch;
|
|
464
466
|
/** Specify whether caching is disabled. */
|
|
@@ -470,9 +472,12 @@ declare type ProjectMapSubtree = ProjectMapNode & {
|
|
|
470
472
|
previousSibling?: ProjectMapSubtree | undefined;
|
|
471
473
|
nextSibling?: ProjectMapSubtree | undefined;
|
|
472
474
|
};
|
|
475
|
+
declare type WithoutProjectId<T extends {
|
|
476
|
+
projectId: string;
|
|
477
|
+
}> = Omit<T, 'projectId'>;
|
|
473
478
|
declare class ProjectMapClient extends ApiClient<ProjectMapClientOptions> {
|
|
474
479
|
constructor(options: ProjectMapClientOptions);
|
|
475
|
-
getProjectMapDefinitions: (
|
|
480
|
+
getProjectMapDefinitions: () => Promise<{
|
|
476
481
|
projectMaps: {
|
|
477
482
|
id?: string | undefined;
|
|
478
483
|
name: string;
|
|
@@ -481,7 +486,7 @@ declare class ProjectMapClient extends ApiClient<ProjectMapClientOptions> {
|
|
|
481
486
|
default?: boolean | undefined;
|
|
482
487
|
}[];
|
|
483
488
|
}>;
|
|
484
|
-
getProjectMapDefinition: (options: ProjectMapGetRequest) => Promise<{
|
|
489
|
+
getProjectMapDefinition: (options: WithoutProjectId<ProjectMapGetRequest>) => Promise<{
|
|
485
490
|
projectMaps: {
|
|
486
491
|
id?: string | undefined;
|
|
487
492
|
name: string;
|
|
@@ -490,12 +495,12 @@ declare class ProjectMapClient extends ApiClient<ProjectMapClientOptions> {
|
|
|
490
495
|
default?: boolean | undefined;
|
|
491
496
|
}[];
|
|
492
497
|
}>;
|
|
493
|
-
upsertProjectMap: (options: ProjectMapUpsertRequest) => Promise<string>;
|
|
494
|
-
deleteProjectMap: (options: ProjectMapDeleteRequest) => Promise<void>;
|
|
495
|
-
upsertProjectMapNodes: (options: ProjectMapNodeUpsertRequest) => Promise<void>;
|
|
496
|
-
deleteProjectMapNode: (options: ProjectMapNodeDeleteRequest) => Promise<void>;
|
|
497
|
-
getSubtree: (options: ProjectMapNodeGetRequest) => Promise<ProjectMapSubtree | undefined>;
|
|
498
|
-
getNodes: (options: ProjectMapNodeGetRequest) => Promise<ProjectMapNodeGetResponse>;
|
|
498
|
+
upsertProjectMap: (options: WithoutProjectId<ProjectMapUpsertRequest>) => Promise<string>;
|
|
499
|
+
deleteProjectMap: (options: WithoutProjectId<ProjectMapDeleteRequest>) => Promise<void>;
|
|
500
|
+
upsertProjectMapNodes: (options: WithoutProjectId<ProjectMapNodeUpsertRequest>) => Promise<void>;
|
|
501
|
+
deleteProjectMapNode: (options: WithoutProjectId<ProjectMapNodeDeleteRequest>) => Promise<void>;
|
|
502
|
+
getSubtree: (options: WithoutProjectId<ProjectMapNodeGetRequest>) => Promise<ProjectMapSubtree | undefined>;
|
|
503
|
+
getNodes: (options: WithoutProjectId<ProjectMapNodeGetRequest>) => Promise<ProjectMapNodeGetResponse>;
|
|
499
504
|
private cleanProjectMapNode;
|
|
500
505
|
private validatePath;
|
|
501
506
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as o,h as r,i as e}from"./chunk-
|
|
1
|
+
import{g as o,h as r,i as e}from"./chunk-OIOFUJKY.mjs";export{r as ProjectMapClient,o as ROOT_NODE_PATH,e as UncachedProjectMapClient};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var h=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var N=(o,i)=>{for(var e in i)h(o,e,{get:i[e],enumerable:!0})},g=(o,i,e,r)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of m(i))!I.call(o,t)&&t!==e&&h(o,t,{get:()=>i[t],enumerable:!(r=M(i,t))||r.enumerable});return o};var R=o=>g(h({},"__esModule",{value:!0}),o);var U={};N(U,{ProjectMapClient:()=>d,ROOT_NODE_PATH:()=>y,UncachedProjectMapClient:()=>j});module.exports=R(U);var l=require("@uniformdev/context/api"),y="/",d=class extends l.ApiClient{constructor(e){super(e);this.getProjectMapDefinitions=async()=>{let{projectId:e}=this.options,r=this.createUrl("/api/v1/project-map",{projectId:e});return await this.apiClient(r)};this.getProjectMapDefinition=async e=>{let{projectId:r}=this.options,t=this.createUrl("/api/v1/project-map",{...e,projectId:r});return await this.apiClient(t)};this.upsertProjectMap=async e=>{let{projectId:r}=this.options,t=this.createUrl("/api/v1/project-map");return(await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:r})})).projectMapId};this.deleteProjectMap=async e=>{let{projectId:r}=this.options,t=this.createUrl("/api/v1/project-map");await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:r}),expectNoContent:!0})};this.upsertProjectMapNodes=async e=>{let{projectId:r}=this.options,t=this.createUrl("/api/v1/project-map-nodes");await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:r,nodes:e.nodes.map(c=>({...c,node:{...this.cleanProjectMapNode(c.node)}}))}),expectNoContent:!0})};this.deleteProjectMapNode=async e=>{let{projectId:r}=this.options,t=this.createUrl("/api/v1/project-map-nodes");(!e.path||this.validatePath(e.path))&&await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:r}),expectNoContent:!0})};this.getSubtree=async e=>{var f;let{projectId:r}=this.options,t={projectId:r,projectMapId:e.projectMapId};e.search?t.search=e.search:e.id?t.id=e.id:e.path&&this.validatePath(e.path)?t.path=e.path:e.compositionId&&(t.compositionId=e.compositionId),e.depth&&(t.depth=e.depth.toString()),e.expanded&&(t.expanded="true"),t.tree="true";let c=this.createUrl("/api/v1/project-map-nodes",t),P={...(await this.apiClient(c)).tree},s=[P];for(;s&&s.length>0;){let p=s.pop(),n;(f=p==null?void 0:p.children)==null||f.forEach(a=>{a.parent=u(p),a.previousSibling=u(n),n&&(n.nextSibling=u(a)),n=a,s.push(a)})}return P};this.getNodes=async e=>{let{projectId:r}=this.options,t={projectId:r};e.projectMapId&&(t.projectMapId=e.projectMapId),e.search?t.search=e.search:e.id?t.id=e.id:e.path&&this.validatePath(e.path)?t.path=e.path:e.compositionId&&(t.compositionId=e.compositionId),e.limit&&(t.limit=e.limit.toString()),e.offset&&(t.offset=e.offset.toString()),e.expanded&&(t.expanded="true");let c=this.createUrl("/api/v1/project-map-nodes",t);return await this.apiClient(c)}}cleanProjectMapNode(e){var r,t,c;return{id:((c=(t=(r=e.id)==null?void 0:r.match(/^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i))==null?void 0:t.length)!=null?c:0)==1?e.id:void 0,path:e.path,name:e.name,type:e.type,compositionId:e.compositionId,description:e.description}}validatePath(e){let r=/[*%!&@]/g;if(e==null?void 0:e.match(r))throw"Path cannot contain reserved characters * % ! & @";return!0}},j=class extends d{constructor(i){super({...i,bypassCache:!0})}},u=o=>o?{...o,parent:void 0,children:void 0}:void 0;0&&(module.exports={ProjectMapClient,ROOT_NODE_PATH,UncachedProjectMapClient});
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as o,h as r,i as e}from"./chunk-
|
|
1
|
+
import{g as o,h as r,i as e}from"./chunk-OIOFUJKY.mjs";export{r as ProjectMapClient,o as ROOT_NODE_PATH,e as UncachedProjectMapClient};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/project-map",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.6.1-alpha.60+dce2049a1",
|
|
4
4
|
"description": "Uniform Project Map",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
"/dist"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@uniformdev/canvas": "^17.
|
|
50
|
-
"@uniformdev/context": "^17.
|
|
49
|
+
"@uniformdev/canvas": "^17.6.1-alpha.60+dce2049a1",
|
|
50
|
+
"@uniformdev/context": "^17.6.1-alpha.60+dce2049a1",
|
|
51
51
|
"p-limit": "^3.1.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@types/yargs": "17.0.
|
|
55
|
-
"@uniformdev/cli": "^17.
|
|
54
|
+
"@types/yargs": "17.0.15",
|
|
55
|
+
"@uniformdev/cli": "^17.6.1-alpha.60+dce2049a1",
|
|
56
56
|
"yargs": "17.6.2"
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "dce2049a142bec6e78cda9d976eacf13a96aa483"
|
|
62
62
|
}
|
package/dist/chunk-4VJBTGFT.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var l=Object.create;var n=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var y=(r=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(r,{get:(a,e)=>(typeof require!="undefined"?require:a)[e]}):r)(function(r){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var U=(r,a)=>()=>(r&&(a=r(r=0)),a);var b=(r,a)=>()=>(a||r((a={exports:{}}).exports,a),a.exports),S=(r,a)=>{for(var e in a)n(r,e,{get:a[e],enumerable:!0})},f=(r,a,e,t)=>{if(a&&typeof a=="object"||typeof a=="function")for(let p of N(a))!R.call(r,p)&&p!==e&&n(r,p,{get:()=>a[p],enumerable:!(t=m(a,p))||t.enumerable});return r};var C=(r,a,e)=>(e=r!=null?l(I(r)):{},f(a||!r||!r.__esModule?n(e,"default",{value:r,enumerable:!0}):e,r)),v=r=>f(n({},"__esModule",{value:!0}),r);import{ApiClient as g}from"@uniformdev/context/api";var O="/",u=class extends g{constructor(e){super(e);this.getProjectMapDefinitions=async e=>{let t=this.createUrl("/api/v1/project-map",{projectId:e});return await this.apiClient(t)};this.getProjectMapDefinition=async e=>{let t=this.createUrl("/api/v1/project-map",{...e,projectMapId:e.projectMapId});return await this.apiClient(t)};this.upsertProjectMap=async e=>{let t=this.createUrl("/api/v1/project-map");return(await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectMap:e.projectMap})})).projectMapId};this.deleteProjectMap=async e=>{let t=this.createUrl("/api/v1/project-map");await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectMapId:e.projectMapId}),expectNoContent:!0})};this.upsertProjectMapNodes=async e=>{let t=this.createUrl("/api/v1/project-map-nodes");await this.apiClient(t,{method:"PUT",body:JSON.stringify({projectId:e.projectId,projectMapId:e.projectMapId,nodes:e.nodes.map(p=>({...p,node:{...this.cleanProjectMapNode(p.node)}}))}),expectNoContent:!0})};this.deleteProjectMapNode=async e=>{let t=this.createUrl("/api/v1/project-map-nodes");(!e.path||this.validatePath(e.path))&&await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectMapId:e.projectMapId}),expectNoContent:!0})};this.getSubtree=async e=>{var M;let t={};t.projectId=e.projectId,e.projectMapId?t.projectMapId=e.projectMapId:e.path&&this.validatePath(e.path)?t.path=e.path:e.compositionId&&(t.compositionId=e.compositionId),e.depth&&(t.depth=e.depth.toString()),e.expanded&&(t.expanded="true"),t.tree="true";let p=this.createUrl("/api/v1/project-map-nodes",t),h={...(await this.apiClient(p)).tree},o=[h];for(;o&&o.length>0;){let i=o.pop(),s;(M=i==null?void 0:i.children)==null||M.forEach(c=>{c.parent=j(i),c.previousSibling=j(s),s&&(s.nextSibling=j(c)),s=c,o.push(c)})}return h};this.getNodes=async e=>{let t={};t.projectId=e.projectId,e.projectMapId&&(t.projectMapId=e.projectMapId),e.id?t.id=e.id:e.path&&this.validatePath(e.path)?t.path=e.path:e.compositionId&&(t.compositionId=e.compositionId),e.limit&&(t.limit=e.limit.toString()),e.offset&&(t.offset=e.offset.toString()),e.expanded&&(t.expanded="true");let p=this.createUrl("/api/v1/project-map-nodes",t);return await this.apiClient(p)}}cleanProjectMapNode(e){var t,p,d;return{id:((d=(p=(t=e.id)==null?void 0:t.match(/^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i))==null?void 0:p.length)!=null?d:0)==1?e.id:void 0,path:e.path,name:e.name,type:e.type,compositionId:e.compositionId,description:e.description}}validatePath(e){let t=/[*%!&@]/g;if(e==null?void 0:e.match(t))throw"Path cannot contain reserved characters * % ! & @";return!0}},P=class extends u{constructor(a){super({...a,bypassCache:!0})}},j=r=>r?{...r,parent:void 0,children:void 0}:void 0;export{y as a,U as b,b as c,S as d,C as e,v as f,O as g,u as h,P as i};
|