@uniformdev/mesh-sdk 18.0.1-alpha.3 → 18.1.1-alpha.11
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/index.d.ts +627 -9
- package/dist/index.esm.js +90 -0
- package/dist/index.js +91 -0
- package/dist/index.mjs +90 -0
- package/package.json +9 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,630 @@
|
|
|
1
|
+
import { ApiClient, ClientOptions, ExceptProject } from '@uniformdev/context/api';
|
|
1
2
|
import { DataSource, RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, DataType as DataType$1, DataResourceVariables } from '@uniformdev/canvas';
|
|
2
3
|
import { DataType } from '@uniformdev/canvas/.';
|
|
3
4
|
import { Emitter } from 'mitt';
|
|
4
5
|
|
|
6
|
+
/**
|
|
7
|
+
* This file was auto-generated by openapi-typescript.
|
|
8
|
+
* Do not make direct changes to the file.
|
|
9
|
+
*/
|
|
10
|
+
interface paths$1 {
|
|
11
|
+
"/api/v1/integration-definitions": {
|
|
12
|
+
/** Gets a list of Mesh apps that are available for a Uniform team */
|
|
13
|
+
get: {
|
|
14
|
+
parameters: {
|
|
15
|
+
query: {
|
|
16
|
+
teamId: string;
|
|
17
|
+
includePublic?: boolean | null;
|
|
18
|
+
teamSpecificType?: boolean | null;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
responses: {
|
|
22
|
+
/** 200 response */
|
|
23
|
+
200: {
|
|
24
|
+
content: {
|
|
25
|
+
"application/json": {
|
|
26
|
+
results: {
|
|
27
|
+
type: string;
|
|
28
|
+
displayName: string;
|
|
29
|
+
logoIconUrl?: string;
|
|
30
|
+
badgeIconUrl?: string;
|
|
31
|
+
/** @enum {string} */
|
|
32
|
+
category?: "analytics" | "cdn" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "unknown";
|
|
33
|
+
public?: boolean;
|
|
34
|
+
baseLocationUrl?: string;
|
|
35
|
+
locations: {
|
|
36
|
+
install?: {
|
|
37
|
+
description?: string[];
|
|
38
|
+
informationUrl?: string;
|
|
39
|
+
canvasPackageUrl?: string;
|
|
40
|
+
};
|
|
41
|
+
settings?: {
|
|
42
|
+
url: string;
|
|
43
|
+
locations?: {
|
|
44
|
+
[key: string]: {
|
|
45
|
+
url: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
canvas?: {
|
|
50
|
+
parameterTypes: {
|
|
51
|
+
type: string;
|
|
52
|
+
displayName: string;
|
|
53
|
+
configureUrl?: string;
|
|
54
|
+
editorUrl: string;
|
|
55
|
+
configurationLocations?: {
|
|
56
|
+
[key: string]: {
|
|
57
|
+
url: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
editorLocations?: {
|
|
61
|
+
[key: string]: {
|
|
62
|
+
url: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
renderableInPropertyPanel?: boolean;
|
|
66
|
+
}[];
|
|
67
|
+
};
|
|
68
|
+
dataConnectors?: {
|
|
69
|
+
type: string;
|
|
70
|
+
displayName: string;
|
|
71
|
+
dataSourceEditorUrl?: string;
|
|
72
|
+
dataSourceEditorLocations?: {
|
|
73
|
+
[key: string]: {
|
|
74
|
+
url: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
dataArchetypes?: {
|
|
78
|
+
[key: string]: {
|
|
79
|
+
displayName: string;
|
|
80
|
+
typeEditorUrl?: string;
|
|
81
|
+
typeEditorLocations?: {
|
|
82
|
+
[key: string]: {
|
|
83
|
+
url: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
dataEditorUrl?: string;
|
|
87
|
+
dataEditorUrlLocations?: {
|
|
88
|
+
[key: string]: {
|
|
89
|
+
url: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
badgeIconUrl?: string;
|
|
95
|
+
}[];
|
|
96
|
+
};
|
|
97
|
+
}[];
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
400: external$1["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
|
102
|
+
401: external$1["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
|
103
|
+
403: external$1["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
|
104
|
+
429: external$1["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
|
105
|
+
500: external$1["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
/** Creates or updates a Mesh app definition on a team */
|
|
109
|
+
put: {
|
|
110
|
+
responses: {
|
|
111
|
+
/** Update success */
|
|
112
|
+
200: {
|
|
113
|
+
content: {
|
|
114
|
+
"application/json": {
|
|
115
|
+
type: string;
|
|
116
|
+
displayName: string;
|
|
117
|
+
logoIconUrl?: string;
|
|
118
|
+
badgeIconUrl?: string;
|
|
119
|
+
/** @enum {string} */
|
|
120
|
+
category?: "analytics" | "cdn" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "unknown";
|
|
121
|
+
public?: boolean;
|
|
122
|
+
baseLocationUrl?: string;
|
|
123
|
+
locations: {
|
|
124
|
+
install?: {
|
|
125
|
+
description?: string[];
|
|
126
|
+
informationUrl?: string;
|
|
127
|
+
canvasPackageUrl?: string;
|
|
128
|
+
};
|
|
129
|
+
settings?: {
|
|
130
|
+
url: string;
|
|
131
|
+
locations?: {
|
|
132
|
+
[key: string]: {
|
|
133
|
+
url: string;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
canvas?: {
|
|
138
|
+
parameterTypes: {
|
|
139
|
+
type: string;
|
|
140
|
+
displayName: string;
|
|
141
|
+
configureUrl?: string;
|
|
142
|
+
editorUrl: string;
|
|
143
|
+
configurationLocations?: {
|
|
144
|
+
[key: string]: {
|
|
145
|
+
url: string;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
editorLocations?: {
|
|
149
|
+
[key: string]: {
|
|
150
|
+
url: string;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
renderableInPropertyPanel?: boolean;
|
|
154
|
+
}[];
|
|
155
|
+
};
|
|
156
|
+
dataConnectors?: {
|
|
157
|
+
type: string;
|
|
158
|
+
displayName: string;
|
|
159
|
+
dataSourceEditorUrl?: string;
|
|
160
|
+
dataSourceEditorLocations?: {
|
|
161
|
+
[key: string]: {
|
|
162
|
+
url: string;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
dataArchetypes?: {
|
|
166
|
+
[key: string]: {
|
|
167
|
+
displayName: string;
|
|
168
|
+
typeEditorUrl?: string;
|
|
169
|
+
typeEditorLocations?: {
|
|
170
|
+
[key: string]: {
|
|
171
|
+
url: string;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
dataEditorUrl?: string;
|
|
175
|
+
dataEditorUrlLocations?: {
|
|
176
|
+
[key: string]: {
|
|
177
|
+
url: string;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
badgeIconUrl?: string;
|
|
183
|
+
}[];
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
400: external$1["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
|
189
|
+
401: external$1["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
|
190
|
+
403: external$1["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
|
191
|
+
429: external$1["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
|
192
|
+
500: external$1["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
|
193
|
+
};
|
|
194
|
+
requestBody: {
|
|
195
|
+
content: {
|
|
196
|
+
"application/json": {
|
|
197
|
+
/**
|
|
198
|
+
* Format: uuid
|
|
199
|
+
* @description The team ID
|
|
200
|
+
*/
|
|
201
|
+
teamId: string;
|
|
202
|
+
data: {
|
|
203
|
+
type: string;
|
|
204
|
+
displayName: string;
|
|
205
|
+
logoIconUrl?: string;
|
|
206
|
+
badgeIconUrl?: string;
|
|
207
|
+
/** @enum {string} */
|
|
208
|
+
category?: "analytics" | "cdn" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "unknown";
|
|
209
|
+
baseLocationUrl?: string;
|
|
210
|
+
locations: {
|
|
211
|
+
install?: {
|
|
212
|
+
description?: string[];
|
|
213
|
+
informationUrl?: string;
|
|
214
|
+
canvasPackageUrl?: string;
|
|
215
|
+
};
|
|
216
|
+
settings?: {
|
|
217
|
+
url: string;
|
|
218
|
+
locations?: {
|
|
219
|
+
[key: string]: {
|
|
220
|
+
url: string;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
canvas?: {
|
|
225
|
+
parameterTypes: {
|
|
226
|
+
type: string;
|
|
227
|
+
displayName: string;
|
|
228
|
+
configureUrl?: string;
|
|
229
|
+
editorUrl: string;
|
|
230
|
+
configurationLocations?: {
|
|
231
|
+
[key: string]: {
|
|
232
|
+
url: string;
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
editorLocations?: {
|
|
236
|
+
[key: string]: {
|
|
237
|
+
url: string;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
renderableInPropertyPanel?: boolean;
|
|
241
|
+
}[];
|
|
242
|
+
};
|
|
243
|
+
dataConnectors?: {
|
|
244
|
+
type: string;
|
|
245
|
+
displayName: string;
|
|
246
|
+
dataSourceEditorUrl?: string;
|
|
247
|
+
dataSourceEditorLocations?: {
|
|
248
|
+
[key: string]: {
|
|
249
|
+
url: string;
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
dataArchetypes?: {
|
|
253
|
+
[key: string]: {
|
|
254
|
+
displayName: string;
|
|
255
|
+
typeEditorUrl?: string;
|
|
256
|
+
typeEditorLocations?: {
|
|
257
|
+
[key: string]: {
|
|
258
|
+
url: string;
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
dataEditorUrl?: string;
|
|
262
|
+
dataEditorUrlLocations?: {
|
|
263
|
+
[key: string]: {
|
|
264
|
+
url: string;
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
badgeIconUrl?: string;
|
|
270
|
+
}[];
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
/** Removes a Mesh app definition from a team. Note that public integrations may not be deleted without contacting Uniform. */
|
|
278
|
+
delete: {
|
|
279
|
+
responses: {
|
|
280
|
+
/** Delete successful */
|
|
281
|
+
204: never;
|
|
282
|
+
400: external$1["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
|
283
|
+
401: external$1["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
|
284
|
+
403: external$1["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
|
285
|
+
/** Integration to delete was not found */
|
|
286
|
+
404: unknown;
|
|
287
|
+
429: external$1["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
|
288
|
+
500: external$1["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
|
289
|
+
};
|
|
290
|
+
requestBody: {
|
|
291
|
+
content: {
|
|
292
|
+
"application/json": {
|
|
293
|
+
/**
|
|
294
|
+
* Format: uuid
|
|
295
|
+
* @description The team ID
|
|
296
|
+
*/
|
|
297
|
+
teamId: string;
|
|
298
|
+
/** @description The integration type to remove */
|
|
299
|
+
type: string;
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
/** Handles preflight requests. This endpoint allows CORS. */
|
|
305
|
+
options: {
|
|
306
|
+
responses: {
|
|
307
|
+
/** ok */
|
|
308
|
+
204: never;
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
interface external$1 {
|
|
314
|
+
"swagger.yml": {
|
|
315
|
+
paths: {};
|
|
316
|
+
components: {
|
|
317
|
+
schemas: {
|
|
318
|
+
Error: {
|
|
319
|
+
/** @description Error message(s) that occurred while processing the request */
|
|
320
|
+
errorMessage?: string[] | string;
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
responses: {
|
|
324
|
+
/** Request input validation failed */
|
|
325
|
+
BadRequestError: {
|
|
326
|
+
content: {
|
|
327
|
+
"application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
/** API key or token was not valid */
|
|
331
|
+
UnauthorizedError: {
|
|
332
|
+
content: {
|
|
333
|
+
"application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
/** Permission was denied */
|
|
337
|
+
ForbiddenError: {
|
|
338
|
+
content: {
|
|
339
|
+
"application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
/** Resource not found */
|
|
343
|
+
NotFoundError: {
|
|
344
|
+
content: {
|
|
345
|
+
"application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
/** Too many requests in allowed time period */
|
|
349
|
+
RateLimitError: unknown;
|
|
350
|
+
/** Execution error occurred */
|
|
351
|
+
InternalServerError: unknown;
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
operations: {};
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* This file was auto-generated by openapi-typescript.
|
|
360
|
+
* Do not make direct changes to the file.
|
|
361
|
+
*/
|
|
362
|
+
interface paths {
|
|
363
|
+
"/api/v1/integration-installations": {
|
|
364
|
+
/** Gets a list of installed integrations for a Uniform Project */
|
|
365
|
+
get: {
|
|
366
|
+
parameters: {
|
|
367
|
+
query: {
|
|
368
|
+
projectId: string;
|
|
369
|
+
type?: string;
|
|
370
|
+
teamSpecificType?: boolean | null;
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
responses: {
|
|
374
|
+
/** 200 response */
|
|
375
|
+
200: {
|
|
376
|
+
content: {
|
|
377
|
+
"application/json": {
|
|
378
|
+
results: {
|
|
379
|
+
type: string;
|
|
380
|
+
data?: {
|
|
381
|
+
[key: string]: unknown;
|
|
382
|
+
};
|
|
383
|
+
}[];
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
400: external["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
|
388
|
+
401: external["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
|
389
|
+
403: external["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
|
390
|
+
429: external["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
|
391
|
+
500: external["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
/** Installs or updates an integration on a Uniform Project. If data is not provided, it will remain unmodified from any existing value. */
|
|
395
|
+
put: {
|
|
396
|
+
responses: {
|
|
397
|
+
/** Install or update success */
|
|
398
|
+
204: never;
|
|
399
|
+
400: external["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
|
400
|
+
401: external["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
|
401
|
+
403: external["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
|
402
|
+
429: external["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
|
403
|
+
500: external["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
|
404
|
+
};
|
|
405
|
+
requestBody: {
|
|
406
|
+
content: {
|
|
407
|
+
"application/json": {
|
|
408
|
+
/**
|
|
409
|
+
* Format: uuid
|
|
410
|
+
* @description The project ID
|
|
411
|
+
*/
|
|
412
|
+
projectId: string;
|
|
413
|
+
type: string;
|
|
414
|
+
data?: {
|
|
415
|
+
[key: string]: unknown;
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
/** Removes an integration from a project. */
|
|
422
|
+
delete: {
|
|
423
|
+
responses: {
|
|
424
|
+
/** Delete successful */
|
|
425
|
+
204: never;
|
|
426
|
+
400: external["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
|
427
|
+
401: external["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
|
428
|
+
403: external["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
|
429
|
+
/** Integration to delete was not found */
|
|
430
|
+
404: unknown;
|
|
431
|
+
429: external["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
|
432
|
+
500: external["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
|
433
|
+
};
|
|
434
|
+
requestBody: {
|
|
435
|
+
content: {
|
|
436
|
+
"application/json": {
|
|
437
|
+
/**
|
|
438
|
+
* Format: uuid
|
|
439
|
+
* @description The project ID
|
|
440
|
+
*/
|
|
441
|
+
projectId: string;
|
|
442
|
+
/** @description The integration type to remove */
|
|
443
|
+
type: string;
|
|
444
|
+
};
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
/** Handles preflight requests. This endpoint allows CORS. */
|
|
449
|
+
options: {
|
|
450
|
+
responses: {
|
|
451
|
+
/** ok */
|
|
452
|
+
204: never;
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
interface external {
|
|
458
|
+
"swagger.yml": {
|
|
459
|
+
paths: {};
|
|
460
|
+
components: {
|
|
461
|
+
schemas: {
|
|
462
|
+
Error: {
|
|
463
|
+
/** @description Error message(s) that occurred while processing the request */
|
|
464
|
+
errorMessage?: string[] | string;
|
|
465
|
+
};
|
|
466
|
+
};
|
|
467
|
+
responses: {
|
|
468
|
+
/** Request input validation failed */
|
|
469
|
+
BadRequestError: {
|
|
470
|
+
content: {
|
|
471
|
+
"application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
/** API key or token was not valid */
|
|
475
|
+
UnauthorizedError: {
|
|
476
|
+
content: {
|
|
477
|
+
"application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
/** Permission was denied */
|
|
481
|
+
ForbiddenError: {
|
|
482
|
+
content: {
|
|
483
|
+
"application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
/** Resource not found */
|
|
487
|
+
NotFoundError: {
|
|
488
|
+
content: {
|
|
489
|
+
"application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
|
|
490
|
+
};
|
|
491
|
+
};
|
|
492
|
+
/** Too many requests in allowed time period */
|
|
493
|
+
RateLimitError: unknown;
|
|
494
|
+
/** Execution error occurred */
|
|
495
|
+
InternalServerError: unknown;
|
|
496
|
+
};
|
|
497
|
+
};
|
|
498
|
+
operations: {};
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
type IntegrationDefinitionsApi = paths$1['/api/v1/integration-definitions'];
|
|
503
|
+
type IntegrationInstallationsApi = paths['/api/v1/integration-installations'];
|
|
504
|
+
/** Query parameter options for GET /api/v1/integration-definitions */
|
|
505
|
+
type IntegrationDefinitionGetParameters = IntegrationDefinitionsApi['get']['parameters']['query'];
|
|
506
|
+
/** The GET response from /api/v1/integration-definitions */
|
|
507
|
+
type IntegrationDefinitionGetResponse = IntegrationDefinitionsApi['get']['responses']['200']['content']['application/json'];
|
|
508
|
+
/** The PUT body for /api/v1/integration-definitions */
|
|
509
|
+
type IntegrationDefinitionPutParameters = IntegrationDefinitionsApi['put']['requestBody']['content']['application/json'];
|
|
510
|
+
/** The PUT response body for /api/v1/integration-definitions (has team-specific integration type) */
|
|
511
|
+
type IntegrationDefinitionPutResponse = IntegrationDefinitionsApi['put']['responses']['200']['content']['application/json'];
|
|
512
|
+
/** The DELETE body for /api/v1/integration-definitions */
|
|
513
|
+
type IntegrationDefinitionDeleteParameters = IntegrationDefinitionsApi['delete']['requestBody']['content']['application/json'];
|
|
514
|
+
/** Query parameter options for GET /api/v1/integration-installations */
|
|
515
|
+
type IntegrationInstallationGetParameters = IntegrationInstallationsApi['get']['parameters']['query'];
|
|
516
|
+
/** The GET response from /api/v1/integration-installations */
|
|
517
|
+
type IntegrationInstallationGetResponse = IntegrationInstallationsApi['get']['responses']['200']['content']['application/json'];
|
|
518
|
+
/** The PUT body for /api/v1/integration-installations */
|
|
519
|
+
type IntegrationInstallationPutParameters = IntegrationInstallationsApi['put']['requestBody']['content']['application/json'];
|
|
520
|
+
/** The DELETE body for /api/v1/integration-installations */
|
|
521
|
+
type IntegrationInstallationDeleteParameters = IntegrationInstallationsApi['delete']['requestBody']['content']['application/json'];
|
|
522
|
+
|
|
523
|
+
type DefClientOptions = Omit<ClientOptions, 'apiKey' | 'projectId'> & {
|
|
524
|
+
teamId: string;
|
|
525
|
+
};
|
|
526
|
+
/** API Client to manage the registration of custom Mesh applications */
|
|
527
|
+
declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
528
|
+
#private;
|
|
529
|
+
constructor(options: DefClientOptions);
|
|
530
|
+
/** Fetches all mesh apps for a team (and optionally also those shared across teams) */
|
|
531
|
+
get(options?: Omit<IntegrationDefinitionGetParameters, 'teamId'>): Promise<IntegrationDefinitionGetResponse>;
|
|
532
|
+
/** Creates or updates a mesh app definition on a team */
|
|
533
|
+
upsert(body: Omit<IntegrationDefinitionPutParameters, 'teamId'>): Promise<{
|
|
534
|
+
type: string;
|
|
535
|
+
displayName: string;
|
|
536
|
+
logoIconUrl?: string | undefined;
|
|
537
|
+
badgeIconUrl?: string | undefined;
|
|
538
|
+
category?: "analytics" | "cdn" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "unknown" | undefined;
|
|
539
|
+
public?: boolean | undefined;
|
|
540
|
+
baseLocationUrl?: string | undefined;
|
|
541
|
+
locations: {
|
|
542
|
+
install?: {
|
|
543
|
+
description?: string[] | undefined;
|
|
544
|
+
informationUrl?: string | undefined;
|
|
545
|
+
canvasPackageUrl?: string | undefined;
|
|
546
|
+
} | undefined;
|
|
547
|
+
settings?: {
|
|
548
|
+
url: string;
|
|
549
|
+
locations?: {
|
|
550
|
+
[key: string]: {
|
|
551
|
+
url: string;
|
|
552
|
+
};
|
|
553
|
+
} | undefined;
|
|
554
|
+
} | undefined;
|
|
555
|
+
canvas?: {
|
|
556
|
+
parameterTypes: {
|
|
557
|
+
type: string;
|
|
558
|
+
displayName: string;
|
|
559
|
+
configureUrl?: string | undefined;
|
|
560
|
+
editorUrl: string;
|
|
561
|
+
configurationLocations?: {
|
|
562
|
+
[key: string]: {
|
|
563
|
+
url: string;
|
|
564
|
+
};
|
|
565
|
+
} | undefined;
|
|
566
|
+
editorLocations?: {
|
|
567
|
+
[key: string]: {
|
|
568
|
+
url: string;
|
|
569
|
+
};
|
|
570
|
+
} | undefined;
|
|
571
|
+
renderableInPropertyPanel?: boolean | undefined;
|
|
572
|
+
}[];
|
|
573
|
+
} | undefined;
|
|
574
|
+
dataConnectors?: {
|
|
575
|
+
type: string;
|
|
576
|
+
displayName: string;
|
|
577
|
+
dataSourceEditorUrl?: string | undefined;
|
|
578
|
+
dataSourceEditorLocations?: {
|
|
579
|
+
[key: string]: {
|
|
580
|
+
url: string;
|
|
581
|
+
};
|
|
582
|
+
} | undefined;
|
|
583
|
+
dataArchetypes?: {
|
|
584
|
+
[key: string]: {
|
|
585
|
+
displayName: string;
|
|
586
|
+
typeEditorUrl?: string | undefined;
|
|
587
|
+
typeEditorLocations?: {
|
|
588
|
+
[key: string]: {
|
|
589
|
+
url: string;
|
|
590
|
+
};
|
|
591
|
+
} | undefined;
|
|
592
|
+
dataEditorUrl?: string | undefined;
|
|
593
|
+
dataEditorUrlLocations?: {
|
|
594
|
+
[key: string]: {
|
|
595
|
+
url: string;
|
|
596
|
+
};
|
|
597
|
+
} | undefined;
|
|
598
|
+
};
|
|
599
|
+
} | undefined;
|
|
600
|
+
badgeIconUrl?: string | undefined;
|
|
601
|
+
}[] | undefined;
|
|
602
|
+
};
|
|
603
|
+
}>;
|
|
604
|
+
/** Deletes a mesh app from a team */
|
|
605
|
+
remove(body: Omit<IntegrationDefinitionDeleteParameters, 'teamId'>): Promise<void>;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
/** API Client to manage the registration of custom Mesh applications */
|
|
609
|
+
declare class IntegrationInstallationClient extends ApiClient {
|
|
610
|
+
#private;
|
|
611
|
+
constructor(options: Omit<ClientOptions, 'apiKey'>);
|
|
612
|
+
/** Fetches all IntegrationInstallations for a project */
|
|
613
|
+
get(options?: ExceptProject<Omit<IntegrationInstallationGetParameters, 'type'>>): Promise<IntegrationInstallationGetResponse>;
|
|
614
|
+
/** Fetches all IntegrationInstallations for a project */
|
|
615
|
+
getOne(options?: ExceptProject<IntegrationInstallationGetParameters & {
|
|
616
|
+
type: string;
|
|
617
|
+
}>): Promise<IntegrationInstallationGetResponse['results'][0] | undefined>;
|
|
618
|
+
/** Updates or creates (based on id) a IntegrationInstallation */
|
|
619
|
+
upsert(body: ExceptProject<IntegrationInstallationPutParameters>): Promise<void>;
|
|
620
|
+
/** Deletes a IntegrationInstallation */
|
|
621
|
+
remove(body: ExceptProject<IntegrationInstallationDeleteParameters>): Promise<void>;
|
|
622
|
+
}
|
|
623
|
+
|
|
5
624
|
type DataSourceLocationValue = Pick<DataSource, 'baseUrl' | 'custom' | 'headers' | 'parameters' | 'variables'>;
|
|
6
625
|
type DataSourceLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
7
626
|
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
8
|
-
settings: TIntegrationConfiguration;
|
|
627
|
+
settings: TIntegrationConfiguration | undefined;
|
|
9
628
|
/** The Uniform project ID */
|
|
10
629
|
projectId: string;
|
|
11
630
|
};
|
|
@@ -18,13 +637,13 @@ type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfig
|
|
|
18
637
|
componentDefinitions: Record<string, ComponentDefinition | undefined>;
|
|
19
638
|
parameterDefinition: ComponentDefinitionParameter;
|
|
20
639
|
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
21
|
-
settings: TIntegrationConfiguration;
|
|
640
|
+
settings: TIntegrationConfiguration | undefined;
|
|
22
641
|
/** The Uniform project ID */
|
|
23
642
|
projectId: string;
|
|
24
643
|
};
|
|
25
|
-
type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TParamSetValue = TParamValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TParamValue, ParamTypeLocationMetadata<TParamConfiguration, TIntegrationConfiguration>, TParamSetValue, 'paramType'>;
|
|
644
|
+
type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TParamSetValue = TParamValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TParamValue | undefined, ParamTypeLocationMetadata<TParamConfiguration, TIntegrationConfiguration>, TParamSetValue, 'paramType'>;
|
|
26
645
|
|
|
27
|
-
type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, undefined, TSettingsType, 'settings'>;
|
|
646
|
+
type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType | undefined, undefined, TSettingsType, 'settings'>;
|
|
28
647
|
|
|
29
648
|
/**
|
|
30
649
|
* Defines methods used for interacting with a Mesh location
|
|
@@ -209,11 +828,10 @@ type DataTypeLocationValue = Pick<DataType$1, 'body' | 'method' | 'path' | 'cust
|
|
|
209
828
|
type DataConnectorInfo = {
|
|
210
829
|
type: string;
|
|
211
830
|
displayName: string;
|
|
212
|
-
installedIntegrationId: string;
|
|
213
831
|
};
|
|
214
832
|
type DataTypeLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
215
833
|
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
216
|
-
settings: TIntegrationConfiguration;
|
|
834
|
+
settings: TIntegrationConfiguration | undefined;
|
|
217
835
|
/** The Uniform project ID */
|
|
218
836
|
projectId: string;
|
|
219
837
|
/**
|
|
@@ -231,7 +849,7 @@ type DataTypeLocation = MeshLocationCore<DataTypeLocationValue, DataTypeLocation
|
|
|
231
849
|
type DataTypeInstanceLocationMetadata<TIntegrationConfiguration = unknown> = DataResourceLocationMetadata<TIntegrationConfiguration>;
|
|
232
850
|
type DataResourceLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
233
851
|
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
234
|
-
settings: TIntegrationConfiguration;
|
|
852
|
+
settings: TIntegrationConfiguration | undefined;
|
|
235
853
|
/** The current data resource's data type */
|
|
236
854
|
dataType: DataType$1;
|
|
237
855
|
/** The data type's archetype value. */
|
|
@@ -251,7 +869,7 @@ type DataTypeInstanceLocation = MeshLocationCore<DataResourceVariables, DataReso
|
|
|
251
869
|
|
|
252
870
|
type ParamTypeConfigLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
253
871
|
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
254
|
-
settings: TIntegrationConfiguration;
|
|
872
|
+
settings: TIntegrationConfiguration | undefined;
|
|
255
873
|
/** The Uniform project ID */
|
|
256
874
|
projectId: string;
|
|
257
875
|
};
|
|
@@ -352,4 +970,4 @@ declare function initializeUniformMeshSDK({ autoResizingDisabled, }?: {
|
|
|
352
970
|
autoResizingDisabled?: boolean;
|
|
353
971
|
}): Promise<UniformMeshSDK | undefined>;
|
|
354
972
|
|
|
355
|
-
export { CSSHeight, CloseDialogMessage, CloseLocationDialogOptions, DataConnectorInfo, DataResourceLocation, DataResourceLocationMetadata, DataSourceLocation, DataSourceLocationMetadata, DataSourceLocationValue, DataTypeInstanceLocation, DataTypeInstanceLocationMetadata, DataTypeLocation, DataTypeLocationMetadata, DataTypeLocationValue, DialogContext, DialogOptions, DialogParamValue, DialogParams, DialogResponseData, DialogResponseHandler, DialogResponseHandlers, DialogType, GetDataResourceLocation, GetDataResourceMessage, LocationDialogResponse, MeshContextData, MeshLocation, MeshLocationCore, MeshLocationTypes, OpenConfirmationDialogOptions, OpenConfirmationDialogResult, OpenDialogMessage, OpenDialogResult, OpenLocationDialogOptions, ParamTypeConfigLocation, ParamTypeConfigLocationMetadata, ParamTypeLocation, ParamTypeLocationMetadata, SdkWindow, SetLocationFunction, SetValueMessage, SetValueOptions, SettingsLocation, UniformMeshSDK, UniformMeshSDKEvents, ValidationResult, initializeUniformMeshSDK };
|
|
973
|
+
export { CSSHeight, CloseDialogMessage, CloseLocationDialogOptions, DataConnectorInfo, DataResourceLocation, DataResourceLocationMetadata, DataSourceLocation, DataSourceLocationMetadata, DataSourceLocationValue, DataTypeInstanceLocation, DataTypeInstanceLocationMetadata, DataTypeLocation, DataTypeLocationMetadata, DataTypeLocationValue, DialogContext, DialogOptions, DialogParamValue, DialogParams, DialogResponseData, DialogResponseHandler, DialogResponseHandlers, DialogType, GetDataResourceLocation, GetDataResourceMessage, IntegrationDefinitionClient, IntegrationDefinitionDeleteParameters, IntegrationDefinitionGetParameters, IntegrationDefinitionGetResponse, IntegrationDefinitionPutParameters, IntegrationDefinitionPutResponse, IntegrationInstallationClient, IntegrationInstallationDeleteParameters, IntegrationInstallationGetParameters, IntegrationInstallationGetResponse, IntegrationInstallationPutParameters, LocationDialogResponse, MeshContextData, MeshLocation, MeshLocationCore, MeshLocationTypes, OpenConfirmationDialogOptions, OpenConfirmationDialogResult, OpenDialogMessage, OpenDialogResult, OpenLocationDialogOptions, ParamTypeConfigLocation, ParamTypeConfigLocationMetadata, ParamTypeLocation, ParamTypeLocationMetadata, SdkWindow, SetLocationFunction, SetValueMessage, SetValueOptions, SettingsLocation, UniformMeshSDK, UniformMeshSDKEvents, ValidationResult, initializeUniformMeshSDK };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,3 +1,91 @@
|
|
|
1
|
+
var __accessCheck = (obj, member, msg) => {
|
|
2
|
+
if (!member.has(obj))
|
|
3
|
+
throw TypeError("Cannot " + msg);
|
|
4
|
+
};
|
|
5
|
+
var __privateGet = (obj, member, getter) => {
|
|
6
|
+
__accessCheck(obj, member, "read from private field");
|
|
7
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
8
|
+
};
|
|
9
|
+
var __privateAdd = (obj, member, value) => {
|
|
10
|
+
if (member.has(obj))
|
|
11
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
12
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
// src/clients/IntegrationDefinitionClient.ts
|
|
16
|
+
import { ApiClient } from "@uniformdev/context/api";
|
|
17
|
+
var _url;
|
|
18
|
+
var _IntegrationDefinitionClient = class extends ApiClient {
|
|
19
|
+
constructor(options) {
|
|
20
|
+
super(options);
|
|
21
|
+
}
|
|
22
|
+
async get(options) {
|
|
23
|
+
const { teamId } = this.options;
|
|
24
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url), { ...options, teamId });
|
|
25
|
+
return await this.apiClient(fetchUri);
|
|
26
|
+
}
|
|
27
|
+
async upsert(body) {
|
|
28
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url));
|
|
29
|
+
return await this.apiClient(fetchUri, {
|
|
30
|
+
method: "PUT",
|
|
31
|
+
body: JSON.stringify({ ...body, teamId: this.options.teamId })
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
async remove(body) {
|
|
35
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url));
|
|
36
|
+
await this.apiClient(fetchUri, {
|
|
37
|
+
method: "DELETE",
|
|
38
|
+
body: JSON.stringify({ ...body, teamId: this.options.teamId }),
|
|
39
|
+
expectNoContent: true
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
var IntegrationDefinitionClient = _IntegrationDefinitionClient;
|
|
44
|
+
_url = new WeakMap();
|
|
45
|
+
__privateAdd(IntegrationDefinitionClient, _url, "/api/v1/integration-definitions");
|
|
46
|
+
|
|
47
|
+
// src/clients/IntegrationInstallationClient.ts
|
|
48
|
+
import { ApiClient as ApiClient2 } from "@uniformdev/context/api";
|
|
49
|
+
var _url2;
|
|
50
|
+
var _IntegrationInstallationClient = class extends ApiClient2 {
|
|
51
|
+
constructor(options) {
|
|
52
|
+
super(options);
|
|
53
|
+
}
|
|
54
|
+
async get(options) {
|
|
55
|
+
const { projectId } = this.options;
|
|
56
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2), { ...options, projectId });
|
|
57
|
+
return await this.apiClient(fetchUri);
|
|
58
|
+
}
|
|
59
|
+
async getOne(options) {
|
|
60
|
+
const { projectId } = this.options;
|
|
61
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2), { ...options, projectId });
|
|
62
|
+
const response = await this.apiClient(fetchUri);
|
|
63
|
+
if (!response.results.length) {
|
|
64
|
+
return void 0;
|
|
65
|
+
}
|
|
66
|
+
return response.results[0];
|
|
67
|
+
}
|
|
68
|
+
async upsert(body) {
|
|
69
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2));
|
|
70
|
+
await this.apiClient(fetchUri, {
|
|
71
|
+
method: "PUT",
|
|
72
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
|
73
|
+
expectNoContent: true
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
async remove(body) {
|
|
77
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2));
|
|
78
|
+
await this.apiClient(fetchUri, {
|
|
79
|
+
method: "DELETE",
|
|
80
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
|
81
|
+
expectNoContent: true
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
var IntegrationInstallationClient = _IntegrationInstallationClient;
|
|
86
|
+
_url2 = new WeakMap();
|
|
87
|
+
__privateAdd(IntegrationInstallationClient, _url2, "/api/v1/integration-installations");
|
|
88
|
+
|
|
1
89
|
// src/sdk.ts
|
|
2
90
|
import mitt from "mitt";
|
|
3
91
|
|
|
@@ -601,5 +689,7 @@ async function initializeUniformMeshSDK({
|
|
|
601
689
|
}
|
|
602
690
|
}
|
|
603
691
|
export {
|
|
692
|
+
IntegrationDefinitionClient,
|
|
693
|
+
IntegrationInstallationClient,
|
|
604
694
|
initializeUniformMeshSDK
|
|
605
695
|
};
|
package/dist/index.js
CHANGED
|
@@ -22,14 +22,103 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
var __accessCheck = (obj, member, msg) => {
|
|
26
|
+
if (!member.has(obj))
|
|
27
|
+
throw TypeError("Cannot " + msg);
|
|
28
|
+
};
|
|
29
|
+
var __privateGet = (obj, member, getter) => {
|
|
30
|
+
__accessCheck(obj, member, "read from private field");
|
|
31
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
32
|
+
};
|
|
33
|
+
var __privateAdd = (obj, member, value) => {
|
|
34
|
+
if (member.has(obj))
|
|
35
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
36
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
37
|
+
};
|
|
25
38
|
|
|
26
39
|
// src/index.ts
|
|
27
40
|
var src_exports = {};
|
|
28
41
|
__export(src_exports, {
|
|
42
|
+
IntegrationDefinitionClient: () => IntegrationDefinitionClient,
|
|
43
|
+
IntegrationInstallationClient: () => IntegrationInstallationClient,
|
|
29
44
|
initializeUniformMeshSDK: () => initializeUniformMeshSDK
|
|
30
45
|
});
|
|
31
46
|
module.exports = __toCommonJS(src_exports);
|
|
32
47
|
|
|
48
|
+
// src/clients/IntegrationDefinitionClient.ts
|
|
49
|
+
var import_api = require("@uniformdev/context/api");
|
|
50
|
+
var _url;
|
|
51
|
+
var _IntegrationDefinitionClient = class extends import_api.ApiClient {
|
|
52
|
+
constructor(options) {
|
|
53
|
+
super(options);
|
|
54
|
+
}
|
|
55
|
+
async get(options) {
|
|
56
|
+
const { teamId } = this.options;
|
|
57
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url), { ...options, teamId });
|
|
58
|
+
return await this.apiClient(fetchUri);
|
|
59
|
+
}
|
|
60
|
+
async upsert(body) {
|
|
61
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url));
|
|
62
|
+
return await this.apiClient(fetchUri, {
|
|
63
|
+
method: "PUT",
|
|
64
|
+
body: JSON.stringify({ ...body, teamId: this.options.teamId })
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
async remove(body) {
|
|
68
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url));
|
|
69
|
+
await this.apiClient(fetchUri, {
|
|
70
|
+
method: "DELETE",
|
|
71
|
+
body: JSON.stringify({ ...body, teamId: this.options.teamId }),
|
|
72
|
+
expectNoContent: true
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
var IntegrationDefinitionClient = _IntegrationDefinitionClient;
|
|
77
|
+
_url = new WeakMap();
|
|
78
|
+
__privateAdd(IntegrationDefinitionClient, _url, "/api/v1/integration-definitions");
|
|
79
|
+
|
|
80
|
+
// src/clients/IntegrationInstallationClient.ts
|
|
81
|
+
var import_api2 = require("@uniformdev/context/api");
|
|
82
|
+
var _url2;
|
|
83
|
+
var _IntegrationInstallationClient = class extends import_api2.ApiClient {
|
|
84
|
+
constructor(options) {
|
|
85
|
+
super(options);
|
|
86
|
+
}
|
|
87
|
+
async get(options) {
|
|
88
|
+
const { projectId } = this.options;
|
|
89
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2), { ...options, projectId });
|
|
90
|
+
return await this.apiClient(fetchUri);
|
|
91
|
+
}
|
|
92
|
+
async getOne(options) {
|
|
93
|
+
const { projectId } = this.options;
|
|
94
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2), { ...options, projectId });
|
|
95
|
+
const response = await this.apiClient(fetchUri);
|
|
96
|
+
if (!response.results.length) {
|
|
97
|
+
return void 0;
|
|
98
|
+
}
|
|
99
|
+
return response.results[0];
|
|
100
|
+
}
|
|
101
|
+
async upsert(body) {
|
|
102
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2));
|
|
103
|
+
await this.apiClient(fetchUri, {
|
|
104
|
+
method: "PUT",
|
|
105
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
|
106
|
+
expectNoContent: true
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
async remove(body) {
|
|
110
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2));
|
|
111
|
+
await this.apiClient(fetchUri, {
|
|
112
|
+
method: "DELETE",
|
|
113
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
|
114
|
+
expectNoContent: true
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
var IntegrationInstallationClient = _IntegrationInstallationClient;
|
|
119
|
+
_url2 = new WeakMap();
|
|
120
|
+
__privateAdd(IntegrationInstallationClient, _url2, "/api/v1/integration-installations");
|
|
121
|
+
|
|
33
122
|
// src/sdk.ts
|
|
34
123
|
var import_mitt = __toESM(require("mitt"));
|
|
35
124
|
|
|
@@ -634,5 +723,7 @@ async function initializeUniformMeshSDK({
|
|
|
634
723
|
}
|
|
635
724
|
// Annotate the CommonJS export names for ESM import in node:
|
|
636
725
|
0 && (module.exports = {
|
|
726
|
+
IntegrationDefinitionClient,
|
|
727
|
+
IntegrationInstallationClient,
|
|
637
728
|
initializeUniformMeshSDK
|
|
638
729
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,91 @@
|
|
|
1
|
+
var __accessCheck = (obj, member, msg) => {
|
|
2
|
+
if (!member.has(obj))
|
|
3
|
+
throw TypeError("Cannot " + msg);
|
|
4
|
+
};
|
|
5
|
+
var __privateGet = (obj, member, getter) => {
|
|
6
|
+
__accessCheck(obj, member, "read from private field");
|
|
7
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
8
|
+
};
|
|
9
|
+
var __privateAdd = (obj, member, value) => {
|
|
10
|
+
if (member.has(obj))
|
|
11
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
12
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
// src/clients/IntegrationDefinitionClient.ts
|
|
16
|
+
import { ApiClient } from "@uniformdev/context/api";
|
|
17
|
+
var _url;
|
|
18
|
+
var _IntegrationDefinitionClient = class extends ApiClient {
|
|
19
|
+
constructor(options) {
|
|
20
|
+
super(options);
|
|
21
|
+
}
|
|
22
|
+
async get(options) {
|
|
23
|
+
const { teamId } = this.options;
|
|
24
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url), { ...options, teamId });
|
|
25
|
+
return await this.apiClient(fetchUri);
|
|
26
|
+
}
|
|
27
|
+
async upsert(body) {
|
|
28
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url));
|
|
29
|
+
return await this.apiClient(fetchUri, {
|
|
30
|
+
method: "PUT",
|
|
31
|
+
body: JSON.stringify({ ...body, teamId: this.options.teamId })
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
async remove(body) {
|
|
35
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url));
|
|
36
|
+
await this.apiClient(fetchUri, {
|
|
37
|
+
method: "DELETE",
|
|
38
|
+
body: JSON.stringify({ ...body, teamId: this.options.teamId }),
|
|
39
|
+
expectNoContent: true
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
var IntegrationDefinitionClient = _IntegrationDefinitionClient;
|
|
44
|
+
_url = new WeakMap();
|
|
45
|
+
__privateAdd(IntegrationDefinitionClient, _url, "/api/v1/integration-definitions");
|
|
46
|
+
|
|
47
|
+
// src/clients/IntegrationInstallationClient.ts
|
|
48
|
+
import { ApiClient as ApiClient2 } from "@uniformdev/context/api";
|
|
49
|
+
var _url2;
|
|
50
|
+
var _IntegrationInstallationClient = class extends ApiClient2 {
|
|
51
|
+
constructor(options) {
|
|
52
|
+
super(options);
|
|
53
|
+
}
|
|
54
|
+
async get(options) {
|
|
55
|
+
const { projectId } = this.options;
|
|
56
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2), { ...options, projectId });
|
|
57
|
+
return await this.apiClient(fetchUri);
|
|
58
|
+
}
|
|
59
|
+
async getOne(options) {
|
|
60
|
+
const { projectId } = this.options;
|
|
61
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2), { ...options, projectId });
|
|
62
|
+
const response = await this.apiClient(fetchUri);
|
|
63
|
+
if (!response.results.length) {
|
|
64
|
+
return void 0;
|
|
65
|
+
}
|
|
66
|
+
return response.results[0];
|
|
67
|
+
}
|
|
68
|
+
async upsert(body) {
|
|
69
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2));
|
|
70
|
+
await this.apiClient(fetchUri, {
|
|
71
|
+
method: "PUT",
|
|
72
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
|
73
|
+
expectNoContent: true
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
async remove(body) {
|
|
77
|
+
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2));
|
|
78
|
+
await this.apiClient(fetchUri, {
|
|
79
|
+
method: "DELETE",
|
|
80
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
|
81
|
+
expectNoContent: true
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
var IntegrationInstallationClient = _IntegrationInstallationClient;
|
|
86
|
+
_url2 = new WeakMap();
|
|
87
|
+
__privateAdd(IntegrationInstallationClient, _url2, "/api/v1/integration-installations");
|
|
88
|
+
|
|
1
89
|
// src/sdk.ts
|
|
2
90
|
import mitt from "mitt";
|
|
3
91
|
|
|
@@ -601,5 +689,7 @@ async function initializeUniformMeshSDK({
|
|
|
601
689
|
}
|
|
602
690
|
}
|
|
603
691
|
export {
|
|
692
|
+
IntegrationDefinitionClient,
|
|
693
|
+
IntegrationInstallationClient,
|
|
604
694
|
initializeUniformMeshSDK
|
|
605
695
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.1.1-alpha.11+c81a052e2",
|
|
4
4
|
"description": "Uniform Mesh Framework SDK",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,12 +15,14 @@
|
|
|
15
15
|
"types": "./dist/index.d.ts",
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"scripts": {
|
|
18
|
-
"build": "
|
|
19
|
-
"
|
|
18
|
+
"build": "run-s update-openapi build:js",
|
|
19
|
+
"build:js": "tsup",
|
|
20
|
+
"dev": "pnpm update-openapi && tsup --watch",
|
|
20
21
|
"clean": "rimraf dist",
|
|
21
22
|
"test": "jest --maxWorkers=1 --passWithNoTests",
|
|
22
23
|
"lint": "eslint \"src/**/*.{js,ts,tsx}\"",
|
|
23
|
-
"format": "prettier --write \"src/**/*.{js,ts,tsx}\""
|
|
24
|
+
"format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
|
|
25
|
+
"update-openapi": "tsx ./scripts/update-openapi.cts"
|
|
24
26
|
},
|
|
25
27
|
"files": [
|
|
26
28
|
"/dist"
|
|
@@ -29,8 +31,9 @@
|
|
|
29
31
|
"access": "public"
|
|
30
32
|
},
|
|
31
33
|
"dependencies": {
|
|
32
|
-
"@uniformdev/canvas": "18.
|
|
34
|
+
"@uniformdev/canvas": "18.1.1-alpha.11+c81a052e2",
|
|
35
|
+
"@uniformdev/context": "18.1.1-alpha.11+c81a052e2",
|
|
33
36
|
"mitt": "^3.0.0"
|
|
34
37
|
},
|
|
35
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "c81a052e2c13c6d3d786d7030f11a7724a52b2da"
|
|
36
39
|
}
|