@uniformdev/mesh-sdk 20.7.1-alpha.12 → 20.7.1-alpha.121
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/LICENSE.txt +1 -1
- package/dist/index.d.mts +205 -20
- package/dist/index.d.ts +205 -20
- package/dist/index.esm.js +21 -5
- package/dist/index.js +21 -5
- package/dist/index.mjs +21 -5
- package/package.json +8 -9
package/LICENSE.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
©
|
|
1
|
+
© 2025 Uniform Systems, Inc. All Rights Reserved.
|
|
2
2
|
See details of Uniform Systems, Inc. Master Subscription Agreement here: https://uniform.dev/eula
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiClient, ClientOptions, ExceptProject } from '@uniformdev/context/api';
|
|
2
|
-
import {
|
|
3
|
-
import { AssetParamValue, DataType, DataSource, DataSourceVariantsKeys, DataResourceVariables, RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, Locale, DataVariableDefinition, EntryData } from '@uniformdev/canvas';
|
|
2
|
+
import { AssetParamValue, DataType, DataSource, DataSourceVariantsKeys, DataResourceVariables, RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, DataVariableDefinition, Locale, EntryData } from '@uniformdev/canvas';
|
|
4
3
|
export { AssetParamValue, AssetParamValueItem } from '@uniformdev/canvas';
|
|
4
|
+
import { ProjectMapNode } from '@uniformdev/project-map';
|
|
5
5
|
import { AssetDefinitionType } from '@uniformdev/assets';
|
|
6
6
|
import { Emitter } from 'mitt';
|
|
7
7
|
|
|
@@ -65,7 +65,7 @@ interface paths$1 {
|
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
67
|
canvas?: {
|
|
68
|
-
parameterTypes
|
|
68
|
+
parameterTypes?: {
|
|
69
69
|
type: string;
|
|
70
70
|
displayName: string;
|
|
71
71
|
configureUrl?: string;
|
|
@@ -113,6 +113,21 @@ interface paths$1 {
|
|
|
113
113
|
entryPattern?: {
|
|
114
114
|
url: string;
|
|
115
115
|
};
|
|
116
|
+
} | {
|
|
117
|
+
id: string;
|
|
118
|
+
name: string;
|
|
119
|
+
url: string;
|
|
120
|
+
iconUrl?: string;
|
|
121
|
+
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
122
|
+
}[];
|
|
123
|
+
personalization?: {
|
|
124
|
+
selectionAlgorithms?: {
|
|
125
|
+
[key: string]: {
|
|
126
|
+
displayName: string;
|
|
127
|
+
description?: string;
|
|
128
|
+
criteriaEditorUrl?: string;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
116
131
|
};
|
|
117
132
|
};
|
|
118
133
|
dataConnectors?: {
|
|
@@ -224,15 +239,34 @@ interface paths$1 {
|
|
|
224
239
|
definition: {
|
|
225
240
|
name: string;
|
|
226
241
|
description: string;
|
|
227
|
-
parameters
|
|
242
|
+
parameters: {
|
|
228
243
|
[key: string]: unknown;
|
|
229
244
|
};
|
|
245
|
+
strict: boolean;
|
|
230
246
|
};
|
|
231
247
|
systemParameters?: "pageHtml"[];
|
|
232
248
|
includedAgents?: ("scout" | "sage")[];
|
|
233
249
|
}[];
|
|
234
250
|
};
|
|
235
251
|
};
|
|
252
|
+
tools?: {
|
|
253
|
+
id: string;
|
|
254
|
+
name: string;
|
|
255
|
+
url: string;
|
|
256
|
+
iconUrl?: string;
|
|
257
|
+
}[];
|
|
258
|
+
projectTools?: {
|
|
259
|
+
id: string;
|
|
260
|
+
name: string;
|
|
261
|
+
url: string;
|
|
262
|
+
iconUrl?: string;
|
|
263
|
+
}[];
|
|
264
|
+
dashboardTools?: {
|
|
265
|
+
id: string;
|
|
266
|
+
name: string;
|
|
267
|
+
url: string;
|
|
268
|
+
iconUrl?: string;
|
|
269
|
+
}[];
|
|
236
270
|
};
|
|
237
271
|
unstable_prompts?: {
|
|
238
272
|
/** Format: uuid */
|
|
@@ -309,7 +343,7 @@ interface paths$1 {
|
|
|
309
343
|
};
|
|
310
344
|
};
|
|
311
345
|
canvas?: {
|
|
312
|
-
parameterTypes
|
|
346
|
+
parameterTypes?: {
|
|
313
347
|
type: string;
|
|
314
348
|
displayName: string;
|
|
315
349
|
configureUrl?: string;
|
|
@@ -357,6 +391,21 @@ interface paths$1 {
|
|
|
357
391
|
entryPattern?: {
|
|
358
392
|
url: string;
|
|
359
393
|
};
|
|
394
|
+
} | {
|
|
395
|
+
id: string;
|
|
396
|
+
name: string;
|
|
397
|
+
url: string;
|
|
398
|
+
iconUrl?: string;
|
|
399
|
+
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
400
|
+
}[];
|
|
401
|
+
personalization?: {
|
|
402
|
+
selectionAlgorithms?: {
|
|
403
|
+
[key: string]: {
|
|
404
|
+
displayName: string;
|
|
405
|
+
description?: string;
|
|
406
|
+
criteriaEditorUrl?: string;
|
|
407
|
+
};
|
|
408
|
+
};
|
|
360
409
|
};
|
|
361
410
|
};
|
|
362
411
|
dataConnectors?: {
|
|
@@ -468,15 +517,34 @@ interface paths$1 {
|
|
|
468
517
|
definition: {
|
|
469
518
|
name: string;
|
|
470
519
|
description: string;
|
|
471
|
-
parameters
|
|
520
|
+
parameters: {
|
|
472
521
|
[key: string]: unknown;
|
|
473
522
|
};
|
|
523
|
+
strict: boolean;
|
|
474
524
|
};
|
|
475
525
|
systemParameters?: "pageHtml"[];
|
|
476
526
|
includedAgents?: ("scout" | "sage")[];
|
|
477
527
|
}[];
|
|
478
528
|
};
|
|
479
529
|
};
|
|
530
|
+
tools?: {
|
|
531
|
+
id: string;
|
|
532
|
+
name: string;
|
|
533
|
+
url: string;
|
|
534
|
+
iconUrl?: string;
|
|
535
|
+
}[];
|
|
536
|
+
projectTools?: {
|
|
537
|
+
id: string;
|
|
538
|
+
name: string;
|
|
539
|
+
url: string;
|
|
540
|
+
iconUrl?: string;
|
|
541
|
+
}[];
|
|
542
|
+
dashboardTools?: {
|
|
543
|
+
id: string;
|
|
544
|
+
name: string;
|
|
545
|
+
url: string;
|
|
546
|
+
iconUrl?: string;
|
|
547
|
+
}[];
|
|
480
548
|
};
|
|
481
549
|
unstable_prompts?: {
|
|
482
550
|
/** Format: uuid */
|
|
@@ -538,7 +606,7 @@ interface paths$1 {
|
|
|
538
606
|
};
|
|
539
607
|
};
|
|
540
608
|
canvas?: {
|
|
541
|
-
parameterTypes
|
|
609
|
+
parameterTypes?: {
|
|
542
610
|
type: string;
|
|
543
611
|
displayName: string;
|
|
544
612
|
configureUrl?: string;
|
|
@@ -586,6 +654,21 @@ interface paths$1 {
|
|
|
586
654
|
entryPattern?: {
|
|
587
655
|
url: string;
|
|
588
656
|
};
|
|
657
|
+
} | {
|
|
658
|
+
id: string;
|
|
659
|
+
name: string;
|
|
660
|
+
url: string;
|
|
661
|
+
iconUrl?: string;
|
|
662
|
+
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
663
|
+
}[];
|
|
664
|
+
personalization?: {
|
|
665
|
+
selectionAlgorithms?: {
|
|
666
|
+
[key: string]: {
|
|
667
|
+
displayName: string;
|
|
668
|
+
description?: string;
|
|
669
|
+
criteriaEditorUrl?: string;
|
|
670
|
+
};
|
|
671
|
+
};
|
|
589
672
|
};
|
|
590
673
|
};
|
|
591
674
|
dataConnectors?: {
|
|
@@ -697,15 +780,34 @@ interface paths$1 {
|
|
|
697
780
|
definition: {
|
|
698
781
|
name: string;
|
|
699
782
|
description: string;
|
|
700
|
-
parameters
|
|
783
|
+
parameters: {
|
|
701
784
|
[key: string]: unknown;
|
|
702
785
|
};
|
|
786
|
+
strict: boolean;
|
|
703
787
|
};
|
|
704
788
|
systemParameters?: "pageHtml"[];
|
|
705
789
|
includedAgents?: ("scout" | "sage")[];
|
|
706
790
|
}[];
|
|
707
791
|
};
|
|
708
792
|
};
|
|
793
|
+
tools?: {
|
|
794
|
+
id: string;
|
|
795
|
+
name: string;
|
|
796
|
+
url: string;
|
|
797
|
+
iconUrl?: string;
|
|
798
|
+
}[];
|
|
799
|
+
projectTools?: {
|
|
800
|
+
id: string;
|
|
801
|
+
name: string;
|
|
802
|
+
url: string;
|
|
803
|
+
iconUrl?: string;
|
|
804
|
+
}[];
|
|
805
|
+
dashboardTools?: {
|
|
806
|
+
id: string;
|
|
807
|
+
name: string;
|
|
808
|
+
url: string;
|
|
809
|
+
iconUrl?: string;
|
|
810
|
+
}[];
|
|
709
811
|
};
|
|
710
812
|
unstable_prompts?: {
|
|
711
813
|
/** Format: uuid */
|
|
@@ -921,7 +1023,6 @@ interface paths {
|
|
|
921
1023
|
* @description The project ID
|
|
922
1024
|
*/
|
|
923
1025
|
projectId: string;
|
|
924
|
-
/** @description Whether to match the passed type exactly or to treat the type as a prefix */
|
|
925
1026
|
exactType?: boolean | null;
|
|
926
1027
|
type: string;
|
|
927
1028
|
data?: {
|
|
@@ -964,7 +1065,6 @@ interface paths {
|
|
|
964
1065
|
projectId: string;
|
|
965
1066
|
/** @description The integration type to remove */
|
|
966
1067
|
type: string;
|
|
967
|
-
/** @description Whether to match the passed type exactly or to treat the type as a prefix */
|
|
968
1068
|
exactType?: boolean | null;
|
|
969
1069
|
};
|
|
970
1070
|
};
|
|
@@ -1130,7 +1230,7 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1130
1230
|
};
|
|
1131
1231
|
};
|
|
1132
1232
|
canvas?: {
|
|
1133
|
-
parameterTypes
|
|
1233
|
+
parameterTypes?: {
|
|
1134
1234
|
type: string;
|
|
1135
1235
|
displayName: string;
|
|
1136
1236
|
configureUrl?: string;
|
|
@@ -1173,6 +1273,21 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1173
1273
|
entryPattern?: {
|
|
1174
1274
|
url: string;
|
|
1175
1275
|
};
|
|
1276
|
+
} | {
|
|
1277
|
+
id: string;
|
|
1278
|
+
name: string;
|
|
1279
|
+
url: string;
|
|
1280
|
+
iconUrl?: string;
|
|
1281
|
+
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
1282
|
+
}[];
|
|
1283
|
+
personalization?: {
|
|
1284
|
+
selectionAlgorithms?: {
|
|
1285
|
+
[key: string]: {
|
|
1286
|
+
displayName: string;
|
|
1287
|
+
description?: string;
|
|
1288
|
+
criteriaEditorUrl?: string;
|
|
1289
|
+
};
|
|
1290
|
+
};
|
|
1176
1291
|
};
|
|
1177
1292
|
};
|
|
1178
1293
|
dataConnectors?: {
|
|
@@ -1275,15 +1390,34 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1275
1390
|
definition: {
|
|
1276
1391
|
name: string;
|
|
1277
1392
|
description: string;
|
|
1278
|
-
parameters
|
|
1393
|
+
parameters: {
|
|
1279
1394
|
[key: string]: unknown;
|
|
1280
1395
|
};
|
|
1396
|
+
strict: boolean;
|
|
1281
1397
|
};
|
|
1282
1398
|
systemParameters?: "pageHtml"[];
|
|
1283
1399
|
includedAgents?: ("scout" | "sage")[];
|
|
1284
1400
|
}[];
|
|
1285
1401
|
};
|
|
1286
1402
|
};
|
|
1403
|
+
tools?: {
|
|
1404
|
+
id: string;
|
|
1405
|
+
name: string;
|
|
1406
|
+
url: string;
|
|
1407
|
+
iconUrl?: string;
|
|
1408
|
+
}[];
|
|
1409
|
+
projectTools?: {
|
|
1410
|
+
id: string;
|
|
1411
|
+
name: string;
|
|
1412
|
+
url: string;
|
|
1413
|
+
iconUrl?: string;
|
|
1414
|
+
}[];
|
|
1415
|
+
dashboardTools?: {
|
|
1416
|
+
id: string;
|
|
1417
|
+
name: string;
|
|
1418
|
+
url: string;
|
|
1419
|
+
iconUrl?: string;
|
|
1420
|
+
}[];
|
|
1287
1421
|
};
|
|
1288
1422
|
unstable_prompts?: {
|
|
1289
1423
|
id: string;
|
|
@@ -1352,7 +1486,11 @@ type FunctionCallSystemParameter = (typeof functionCallSystemParameters)[number]
|
|
|
1352
1486
|
declare function parseFunctionCall<Parameters extends Record<string, string>, Settings = Record<string, string>>(request: Pick<Request, 'body'>): {
|
|
1353
1487
|
functionCall: {
|
|
1354
1488
|
arguments: Parameters;
|
|
1489
|
+
call_id: string;
|
|
1355
1490
|
name: string;
|
|
1491
|
+
type: "function_call";
|
|
1492
|
+
id?: string;
|
|
1493
|
+
status?: "in_progress" | "completed" | "incomplete";
|
|
1356
1494
|
};
|
|
1357
1495
|
settings: Settings;
|
|
1358
1496
|
systemParameters: Record<FunctionCallSystemParameter, string | undefined>;
|
|
@@ -1383,6 +1521,9 @@ type AssetParameterLocationMetadata<TIntegrationConfiguration = unknown> = Commo
|
|
|
1383
1521
|
type AssetLibraryLocation = MeshLocationCore<unknown, AssetLibraryLocationMetadata, unknown, 'assetLibrary'> & GetDataResourceLocation;
|
|
1384
1522
|
type AssetParameterLocation = MeshLocationCore<AssetParamValue, AssetParameterLocationMetadata, AssetParamValue, 'assetParameter'> & GetDataResourceLocation;
|
|
1385
1523
|
|
|
1524
|
+
type DashboardToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
|
|
1525
|
+
type DashboardToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, DashboardToolLocationMetadata<TIntegrationConfiguration>, TTool, 'dashboardTool'>;
|
|
1526
|
+
|
|
1386
1527
|
type DataTypeLocationValue = Pick<DataType, 'body' | 'method' | 'path' | 'custom' | 'headers' | 'parameters' | 'variables'>;
|
|
1387
1528
|
type DataConnectorInfo = {
|
|
1388
1529
|
type: string;
|
|
@@ -1428,7 +1569,9 @@ type DataSourceLocationMetadata<TIntegrationConfiguration = unknown> = CommonMet
|
|
|
1428
1569
|
type DataSourceLocation = MeshLocationCore<DataSourceLocationValue, DataSourceLocationMetadata, DataSourceLocationValue, 'dataSource'>;
|
|
1429
1570
|
|
|
1430
1571
|
type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
1431
|
-
rootNode: Omit<RootComponentInstance, 'slots' | '_data'
|
|
1572
|
+
rootNode: Omit<RootComponentInstance, 'slots' | '_data'> & {
|
|
1573
|
+
_editionId?: string;
|
|
1574
|
+
};
|
|
1432
1575
|
parameterConfiguration: TParamConfiguration;
|
|
1433
1576
|
component: Omit<ComponentInstance, 'slots'>;
|
|
1434
1577
|
componentDefinitions: Record<string, ComponentDefinition | undefined>;
|
|
@@ -1468,16 +1611,14 @@ type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TPa
|
|
|
1468
1611
|
editConnectedData: Awaited<ReturnType<typeof connectToParent>>['parent']['editConnectedData'];
|
|
1469
1612
|
};
|
|
1470
1613
|
|
|
1471
|
-
type SettingsLocationMetadata = CommonMetadata
|
|
1472
|
-
locales: Locale[];
|
|
1473
|
-
};
|
|
1614
|
+
type SettingsLocationMetadata = CommonMetadata;
|
|
1474
1615
|
type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, SettingsLocationMetadata, TSettingsType, 'settings'>;
|
|
1475
1616
|
|
|
1476
1617
|
/**
|
|
1477
1618
|
* Defines methods used for interacting with a Mesh location
|
|
1478
1619
|
* To receive useful typings, check the `type` property of the location to narrow the typing.
|
|
1479
1620
|
*/
|
|
1480
|
-
type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> | AssetLibraryLocation | AssetParameterLocation | DataSourceLocation | DataTypeLocation | DataResourceLocation | CanvasEditorToolsLocation | EmbeddedEditorLocation | AIGenerateLocation<TValue> | AIPromptMetadataLocation
|
|
1621
|
+
type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> | AssetLibraryLocation | AssetParameterLocation | DataSourceLocation | DataTypeLocation | DataResourceLocation | CanvasEditorToolsLocation | EmbeddedEditorLocation | AIGenerateLocation<TValue> | AIPromptMetadataLocation | PersonalizationCriteriaLocation<TValue> | DashboardToolLocation<TValue> | ProjectToolLocation<TValue>;
|
|
1481
1622
|
interface MeshContextData {
|
|
1482
1623
|
locationKey: string;
|
|
1483
1624
|
locationType: MeshLocationTypes;
|
|
@@ -1486,6 +1627,7 @@ interface MeshContextData {
|
|
|
1486
1627
|
locationMetadata: any;
|
|
1487
1628
|
uniformApiVersion: string;
|
|
1488
1629
|
dialogContext?: DialogContext;
|
|
1630
|
+
fullScreenHeight?: boolean;
|
|
1489
1631
|
}
|
|
1490
1632
|
interface DialogContext {
|
|
1491
1633
|
dialogId: string;
|
|
@@ -1584,6 +1726,13 @@ type OpenDialogMessage = {
|
|
|
1584
1726
|
dialogData: unknown;
|
|
1585
1727
|
options?: DialogOptions;
|
|
1586
1728
|
};
|
|
1729
|
+
type NavigateMessage = {
|
|
1730
|
+
path: string;
|
|
1731
|
+
options?: {
|
|
1732
|
+
projectId?: string;
|
|
1733
|
+
target?: '_blank';
|
|
1734
|
+
};
|
|
1735
|
+
};
|
|
1587
1736
|
type CloseDialogMessage = {
|
|
1588
1737
|
dialogId: string | undefined;
|
|
1589
1738
|
dialogType: DialogType;
|
|
@@ -1658,6 +1807,8 @@ declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, on
|
|
|
1658
1807
|
openDialog: (message: OpenDialogMessage) => Promise<Pick<DialogResponseData, "value" | "dialogId"> | undefined>;
|
|
1659
1808
|
closeDialog: (message: CloseDialogMessage) => Promise<void>;
|
|
1660
1809
|
getDataResource: <TExpectedResult>(message: GetDataResourceMessage) => Promise<TExpectedResult>;
|
|
1810
|
+
navigate: (message: NavigateMessage) => Promise<void>;
|
|
1811
|
+
reloadLocation: () => Promise<void>;
|
|
1661
1812
|
editConnectedData: (message: EditConnectedDataMessage) => Promise<EditConnectedDataResponse>;
|
|
1662
1813
|
};
|
|
1663
1814
|
}>;
|
|
@@ -1682,6 +1833,10 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1682
1833
|
* Each location has a specific type of metadata that it is provided, which is typed automatically when the location is known.
|
|
1683
1834
|
*/
|
|
1684
1835
|
metadata: TMetadata;
|
|
1836
|
+
/**
|
|
1837
|
+
* A router object that can be used to navigate parent frame (Uniform App) to other page within current project and other methods.
|
|
1838
|
+
*/
|
|
1839
|
+
router: MeshRouter;
|
|
1685
1840
|
/**
|
|
1686
1841
|
* Context of a location when it is rendering inside a dialog in the Uniform app.
|
|
1687
1842
|
* This is set when:
|
|
@@ -1699,6 +1854,23 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1699
1854
|
returnDialogValue: (value: unknown) => Promise<void>;
|
|
1700
1855
|
};
|
|
1701
1856
|
}
|
|
1857
|
+
type MeshRouter = {
|
|
1858
|
+
/**
|
|
1859
|
+
* Navigate parent frame (Uniform App) to a new path within current project.
|
|
1860
|
+
*
|
|
1861
|
+
* So router.navigate('/canvas/edit/{compositionId}') will navigate will open the composition editor for the given composition ID in the parent frame.
|
|
1862
|
+
* Be aware that most of the time it will close your mesh app, so you should use it with caution.
|
|
1863
|
+
*
|
|
1864
|
+
* @param path - The path to navigate to. You don't need to specify /projects/${projectId} as it is prepended automatically with the current project ID.
|
|
1865
|
+
* @param options - The options for the navigation.
|
|
1866
|
+
* @param options.projectId - You can specify project ID to navigate to. By default the current project ID is used.
|
|
1867
|
+
* @param options.target - Allows to open a new tab instead of navigating the current one.
|
|
1868
|
+
*/
|
|
1869
|
+
navigatePlatform: (path: string, options?: {
|
|
1870
|
+
projectId?: string;
|
|
1871
|
+
target?: '_blank';
|
|
1872
|
+
}) => void;
|
|
1873
|
+
};
|
|
1702
1874
|
/** Common metadata for all mesh locations */
|
|
1703
1875
|
type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unknown> = {
|
|
1704
1876
|
/** The current Uniform user context. Contains name, email and context to check for permissions */
|
|
@@ -1709,6 +1881,8 @@ type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unkn
|
|
|
1709
1881
|
dashboardOrigin: string;
|
|
1710
1882
|
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
1711
1883
|
settings: TIntegrationConfiguration;
|
|
1884
|
+
/** List if enabled Uniform Project locales */
|
|
1885
|
+
locales: Locale[];
|
|
1712
1886
|
} & ExtendedMetadata;
|
|
1713
1887
|
type MeshLocationUserPermissions =
|
|
1714
1888
|
/** Uniform Context:Enrichments:Create */
|
|
@@ -1777,6 +1951,10 @@ type MeshLocationUserPermissions =
|
|
|
1777
1951
|
| 'COMPOSITIONS_READ_DRAFT'
|
|
1778
1952
|
/** Uniform Canvas:Component Library:Manage|Create, update, and delete component library data */
|
|
1779
1953
|
| 'COMPOSITIONS_MANAGE_SCHEMA'
|
|
1954
|
+
/** Uniform Canvas:Content Types:Manage|Create, update, and delete content types */
|
|
1955
|
+
| 'ENTRIES_MANAGE_SCHEMA'
|
|
1956
|
+
/** Uniform Canvas:AI Prompts:Manage|Create, update, and delete AI prompts */
|
|
1957
|
+
| 'PROMPTS_MANAGE_SCHEMA'
|
|
1780
1958
|
/** UTM Mapper:Read|Read UTM mapper configuration */
|
|
1781
1959
|
| 'UTM_MAPPER_READ'
|
|
1782
1960
|
/** UTM Mapper:Read|Create, update and delete UTM mapper configuration */
|
|
@@ -1792,7 +1970,7 @@ type MeshLocationUserPermissions =
|
|
|
1792
1970
|
/**
|
|
1793
1971
|
* Known location types that can be passed to a mesh location
|
|
1794
1972
|
*/
|
|
1795
|
-
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata';
|
|
1973
|
+
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria' | 'dashboardTool' | 'projectTool';
|
|
1796
1974
|
type SetValueOptions = ValidationResult;
|
|
1797
1975
|
type SetValueMessage = {
|
|
1798
1976
|
uniformMeshLocationValue: unknown;
|
|
@@ -1834,7 +2012,6 @@ type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, Prompt
|
|
|
1834
2012
|
type CanvasEditorToolsLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
1835
2013
|
releaseId?: string;
|
|
1836
2014
|
state?: number;
|
|
1837
|
-
locales: Locale[];
|
|
1838
2015
|
}, TIntegrationConfiguration>;
|
|
1839
2016
|
type CanvasEditorToolsReferenceData = {
|
|
1840
2017
|
name: string;
|
|
@@ -1908,6 +2085,14 @@ type ParamTypeConfigLocationMetadata<TIntegrationConfiguration = unknown> = Comm
|
|
|
1908
2085
|
}, TIntegrationConfiguration>;
|
|
1909
2086
|
type ParamTypeConfigLocation<TParamValue = unknown, TIntegrationConfiguration = unknown> = MeshLocationCore<TParamValue | undefined, ParamTypeConfigLocationMetadata<TIntegrationConfiguration>, TParamValue, 'paramTypeConfig'>;
|
|
1910
2087
|
|
|
2088
|
+
/** @deprecated Experimental functionality is subject to change in minor versions. */
|
|
2089
|
+
type PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
|
|
2090
|
+
/** @deprecated Experimental functionality is subject to change in minor versions. */
|
|
2091
|
+
type PersonalizationCriteriaLocation<TCriteriaValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TCriteriaValue | undefined, PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration>, TCriteriaValue, 'personalizationCriteria'>;
|
|
2092
|
+
|
|
2093
|
+
type ProjectToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
|
|
2094
|
+
type ProjectToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, ProjectToolLocationMetadata<TIntegrationConfiguration>, TTool, 'projectTool'>;
|
|
2095
|
+
|
|
1911
2096
|
interface SdkWindow {
|
|
1912
2097
|
/** The current window object. */
|
|
1913
2098
|
instance: Window;
|
|
@@ -2011,4 +2196,4 @@ declare const hasPermissions: (permissions: MeshLocationUserPermissions | MeshLo
|
|
|
2011
2196
|
*/
|
|
2012
2197
|
declare const hasRole: (role: string, user: UniformUser) => boolean;
|
|
2013
2198
|
|
|
2014
|
-
export { type AIGenerateLocation, type AIGenerateLocationMetadata, type AIPromptMetadataLocation, type AssetLibraryLocation, type AssetLibraryLocationMetadata, type AssetParameterLocation, type AssetParameterLocationMetadata, type BindableTypes, type CSSHeight, type CanvasEditorEntityType, type CanvasEditorToolsData, type CanvasEditorToolsLocation, type CanvasEditorToolsLocationMetadata, type CloseDialogMessage, type CloseLocationDialogOptions, type CommonMetadata, type DataConnectorInfo, type DataResourceLocation, type DataResourceLocationMetadata, type DataSourceLocation, type DataSourceLocationMetadata, type DataSourceLocationValue, type DataTypeLocation, type DataTypeLocationMetadata, type DataTypeLocationValue, type DialogContext, type DialogOptions, type DialogParamValue, type DialogParams, type DialogResponseData, type DialogResponseHandler, type DialogResponseHandlers, type DialogType, type DynamicInput, type DynamicInputs, type EditConnectedDataMessage, type EditConnectedDataResponse, type EditConnectedDataResponseCancellationContext, type EmbeddedEditorLocation, type EmbeddedEditorLocationMetadata, type EmbeddedEditorLocationSetValue, type EmbeddedEditorLocationValue, type FunctionCallResponse, type FunctionCallSystemParameter, type GetDataResourceLocation, type GetDataResourceMessage, IntegrationDefinitionClient, type IntegrationDefinitionDeleteParameters, type IntegrationDefinitionGetParameters, type IntegrationDefinitionGetResponse, type IntegrationDefinitionPutParameters, type IntegrationDefinitionPutResponse, IntegrationInstallationClient, type IntegrationInstallationDeleteParameters, type IntegrationInstallationGetParameters, type IntegrationInstallationGetResponse, type IntegrationInstallationPutParameters, type LocationDialogResponse, type MeshContextData, type MeshLocation, type MeshLocationCore, type MeshLocationTypes, type MeshLocationUserPermissions, type MeshSDKEventInterface, type OpenConfirmationDialogOptions, type OpenConfirmationDialogResult, type OpenDialogMessage, type OpenDialogResult, type OpenLocationDialogOptions, type ParamTypeConfigLocation, type ParamTypeConfigLocationMetadata, type ParamTypeLocation, type ParamTypeLocationMetadata, type PromptSettingsLocationMetadata, type SdkWindow, type SetLocationFunction, type SetValueMessage, type SetValueOptions, type SettingsLocation, type SettingsLocationMetadata, type UniformMeshSDK, type UniformMeshSDKEvents, type UniformUser, type ValidationResult, functionCallSystemParameters, hasPermissions, hasRole, initializeUniformMeshSDK, parseFunctionCall };
|
|
2199
|
+
export { type AIGenerateLocation, type AIGenerateLocationMetadata, type AIPromptMetadataLocation, type AssetLibraryLocation, type AssetLibraryLocationMetadata, type AssetParameterLocation, type AssetParameterLocationMetadata, type BindableTypes, type CSSHeight, type CanvasEditorEntityType, type CanvasEditorToolsData, type CanvasEditorToolsLocation, type CanvasEditorToolsLocationMetadata, type CloseDialogMessage, type CloseLocationDialogOptions, type CommonMetadata, type DashboardToolLocation, type DashboardToolLocationMetadata, type DataConnectorInfo, type DataResourceLocation, type DataResourceLocationMetadata, type DataSourceLocation, type DataSourceLocationMetadata, type DataSourceLocationValue, type DataTypeLocation, type DataTypeLocationMetadata, type DataTypeLocationValue, type DialogContext, type DialogOptions, type DialogParamValue, type DialogParams, type DialogResponseData, type DialogResponseHandler, type DialogResponseHandlers, type DialogType, type DynamicInput, type DynamicInputs, type EditConnectedDataMessage, type EditConnectedDataResponse, type EditConnectedDataResponseCancellationContext, type EmbeddedEditorLocation, type EmbeddedEditorLocationMetadata, type EmbeddedEditorLocationSetValue, type EmbeddedEditorLocationValue, type FunctionCallResponse, type FunctionCallSystemParameter, type GetDataResourceLocation, type GetDataResourceMessage, IntegrationDefinitionClient, type IntegrationDefinitionDeleteParameters, type IntegrationDefinitionGetParameters, type IntegrationDefinitionGetResponse, type IntegrationDefinitionPutParameters, type IntegrationDefinitionPutResponse, IntegrationInstallationClient, type IntegrationInstallationDeleteParameters, type IntegrationInstallationGetParameters, type IntegrationInstallationGetResponse, type IntegrationInstallationPutParameters, type LocationDialogResponse, type MeshContextData, type MeshLocation, type MeshLocationCore, type MeshLocationTypes, type MeshLocationUserPermissions, type MeshRouter, type MeshSDKEventInterface, type NavigateMessage, type OpenConfirmationDialogOptions, type OpenConfirmationDialogResult, type OpenDialogMessage, type OpenDialogResult, type OpenLocationDialogOptions, type ParamTypeConfigLocation, type ParamTypeConfigLocationMetadata, type ParamTypeLocation, type ParamTypeLocationMetadata, type PersonalizationCriteriaLocation, type PersonalizationCriteriaLocationMetadata, type ProjectToolLocation, type ProjectToolLocationMetadata, type PromptSettingsLocationMetadata, type SdkWindow, type SetLocationFunction, type SetValueMessage, type SetValueOptions, type SettingsLocation, type SettingsLocationMetadata, type UniformMeshSDK, type UniformMeshSDKEvents, type UniformUser, type ValidationResult, functionCallSystemParameters, hasPermissions, hasRole, initializeUniformMeshSDK, parseFunctionCall };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiClient, ClientOptions, ExceptProject } from '@uniformdev/context/api';
|
|
2
|
-
import {
|
|
3
|
-
import { AssetParamValue, DataType, DataSource, DataSourceVariantsKeys, DataResourceVariables, RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, Locale, DataVariableDefinition, EntryData } from '@uniformdev/canvas';
|
|
2
|
+
import { AssetParamValue, DataType, DataSource, DataSourceVariantsKeys, DataResourceVariables, RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, DataVariableDefinition, Locale, EntryData } from '@uniformdev/canvas';
|
|
4
3
|
export { AssetParamValue, AssetParamValueItem } from '@uniformdev/canvas';
|
|
4
|
+
import { ProjectMapNode } from '@uniformdev/project-map';
|
|
5
5
|
import { AssetDefinitionType } from '@uniformdev/assets';
|
|
6
6
|
import { Emitter } from 'mitt';
|
|
7
7
|
|
|
@@ -65,7 +65,7 @@ interface paths$1 {
|
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
67
|
canvas?: {
|
|
68
|
-
parameterTypes
|
|
68
|
+
parameterTypes?: {
|
|
69
69
|
type: string;
|
|
70
70
|
displayName: string;
|
|
71
71
|
configureUrl?: string;
|
|
@@ -113,6 +113,21 @@ interface paths$1 {
|
|
|
113
113
|
entryPattern?: {
|
|
114
114
|
url: string;
|
|
115
115
|
};
|
|
116
|
+
} | {
|
|
117
|
+
id: string;
|
|
118
|
+
name: string;
|
|
119
|
+
url: string;
|
|
120
|
+
iconUrl?: string;
|
|
121
|
+
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
122
|
+
}[];
|
|
123
|
+
personalization?: {
|
|
124
|
+
selectionAlgorithms?: {
|
|
125
|
+
[key: string]: {
|
|
126
|
+
displayName: string;
|
|
127
|
+
description?: string;
|
|
128
|
+
criteriaEditorUrl?: string;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
116
131
|
};
|
|
117
132
|
};
|
|
118
133
|
dataConnectors?: {
|
|
@@ -224,15 +239,34 @@ interface paths$1 {
|
|
|
224
239
|
definition: {
|
|
225
240
|
name: string;
|
|
226
241
|
description: string;
|
|
227
|
-
parameters
|
|
242
|
+
parameters: {
|
|
228
243
|
[key: string]: unknown;
|
|
229
244
|
};
|
|
245
|
+
strict: boolean;
|
|
230
246
|
};
|
|
231
247
|
systemParameters?: "pageHtml"[];
|
|
232
248
|
includedAgents?: ("scout" | "sage")[];
|
|
233
249
|
}[];
|
|
234
250
|
};
|
|
235
251
|
};
|
|
252
|
+
tools?: {
|
|
253
|
+
id: string;
|
|
254
|
+
name: string;
|
|
255
|
+
url: string;
|
|
256
|
+
iconUrl?: string;
|
|
257
|
+
}[];
|
|
258
|
+
projectTools?: {
|
|
259
|
+
id: string;
|
|
260
|
+
name: string;
|
|
261
|
+
url: string;
|
|
262
|
+
iconUrl?: string;
|
|
263
|
+
}[];
|
|
264
|
+
dashboardTools?: {
|
|
265
|
+
id: string;
|
|
266
|
+
name: string;
|
|
267
|
+
url: string;
|
|
268
|
+
iconUrl?: string;
|
|
269
|
+
}[];
|
|
236
270
|
};
|
|
237
271
|
unstable_prompts?: {
|
|
238
272
|
/** Format: uuid */
|
|
@@ -309,7 +343,7 @@ interface paths$1 {
|
|
|
309
343
|
};
|
|
310
344
|
};
|
|
311
345
|
canvas?: {
|
|
312
|
-
parameterTypes
|
|
346
|
+
parameterTypes?: {
|
|
313
347
|
type: string;
|
|
314
348
|
displayName: string;
|
|
315
349
|
configureUrl?: string;
|
|
@@ -357,6 +391,21 @@ interface paths$1 {
|
|
|
357
391
|
entryPattern?: {
|
|
358
392
|
url: string;
|
|
359
393
|
};
|
|
394
|
+
} | {
|
|
395
|
+
id: string;
|
|
396
|
+
name: string;
|
|
397
|
+
url: string;
|
|
398
|
+
iconUrl?: string;
|
|
399
|
+
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
400
|
+
}[];
|
|
401
|
+
personalization?: {
|
|
402
|
+
selectionAlgorithms?: {
|
|
403
|
+
[key: string]: {
|
|
404
|
+
displayName: string;
|
|
405
|
+
description?: string;
|
|
406
|
+
criteriaEditorUrl?: string;
|
|
407
|
+
};
|
|
408
|
+
};
|
|
360
409
|
};
|
|
361
410
|
};
|
|
362
411
|
dataConnectors?: {
|
|
@@ -468,15 +517,34 @@ interface paths$1 {
|
|
|
468
517
|
definition: {
|
|
469
518
|
name: string;
|
|
470
519
|
description: string;
|
|
471
|
-
parameters
|
|
520
|
+
parameters: {
|
|
472
521
|
[key: string]: unknown;
|
|
473
522
|
};
|
|
523
|
+
strict: boolean;
|
|
474
524
|
};
|
|
475
525
|
systemParameters?: "pageHtml"[];
|
|
476
526
|
includedAgents?: ("scout" | "sage")[];
|
|
477
527
|
}[];
|
|
478
528
|
};
|
|
479
529
|
};
|
|
530
|
+
tools?: {
|
|
531
|
+
id: string;
|
|
532
|
+
name: string;
|
|
533
|
+
url: string;
|
|
534
|
+
iconUrl?: string;
|
|
535
|
+
}[];
|
|
536
|
+
projectTools?: {
|
|
537
|
+
id: string;
|
|
538
|
+
name: string;
|
|
539
|
+
url: string;
|
|
540
|
+
iconUrl?: string;
|
|
541
|
+
}[];
|
|
542
|
+
dashboardTools?: {
|
|
543
|
+
id: string;
|
|
544
|
+
name: string;
|
|
545
|
+
url: string;
|
|
546
|
+
iconUrl?: string;
|
|
547
|
+
}[];
|
|
480
548
|
};
|
|
481
549
|
unstable_prompts?: {
|
|
482
550
|
/** Format: uuid */
|
|
@@ -538,7 +606,7 @@ interface paths$1 {
|
|
|
538
606
|
};
|
|
539
607
|
};
|
|
540
608
|
canvas?: {
|
|
541
|
-
parameterTypes
|
|
609
|
+
parameterTypes?: {
|
|
542
610
|
type: string;
|
|
543
611
|
displayName: string;
|
|
544
612
|
configureUrl?: string;
|
|
@@ -586,6 +654,21 @@ interface paths$1 {
|
|
|
586
654
|
entryPattern?: {
|
|
587
655
|
url: string;
|
|
588
656
|
};
|
|
657
|
+
} | {
|
|
658
|
+
id: string;
|
|
659
|
+
name: string;
|
|
660
|
+
url: string;
|
|
661
|
+
iconUrl?: string;
|
|
662
|
+
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
663
|
+
}[];
|
|
664
|
+
personalization?: {
|
|
665
|
+
selectionAlgorithms?: {
|
|
666
|
+
[key: string]: {
|
|
667
|
+
displayName: string;
|
|
668
|
+
description?: string;
|
|
669
|
+
criteriaEditorUrl?: string;
|
|
670
|
+
};
|
|
671
|
+
};
|
|
589
672
|
};
|
|
590
673
|
};
|
|
591
674
|
dataConnectors?: {
|
|
@@ -697,15 +780,34 @@ interface paths$1 {
|
|
|
697
780
|
definition: {
|
|
698
781
|
name: string;
|
|
699
782
|
description: string;
|
|
700
|
-
parameters
|
|
783
|
+
parameters: {
|
|
701
784
|
[key: string]: unknown;
|
|
702
785
|
};
|
|
786
|
+
strict: boolean;
|
|
703
787
|
};
|
|
704
788
|
systemParameters?: "pageHtml"[];
|
|
705
789
|
includedAgents?: ("scout" | "sage")[];
|
|
706
790
|
}[];
|
|
707
791
|
};
|
|
708
792
|
};
|
|
793
|
+
tools?: {
|
|
794
|
+
id: string;
|
|
795
|
+
name: string;
|
|
796
|
+
url: string;
|
|
797
|
+
iconUrl?: string;
|
|
798
|
+
}[];
|
|
799
|
+
projectTools?: {
|
|
800
|
+
id: string;
|
|
801
|
+
name: string;
|
|
802
|
+
url: string;
|
|
803
|
+
iconUrl?: string;
|
|
804
|
+
}[];
|
|
805
|
+
dashboardTools?: {
|
|
806
|
+
id: string;
|
|
807
|
+
name: string;
|
|
808
|
+
url: string;
|
|
809
|
+
iconUrl?: string;
|
|
810
|
+
}[];
|
|
709
811
|
};
|
|
710
812
|
unstable_prompts?: {
|
|
711
813
|
/** Format: uuid */
|
|
@@ -921,7 +1023,6 @@ interface paths {
|
|
|
921
1023
|
* @description The project ID
|
|
922
1024
|
*/
|
|
923
1025
|
projectId: string;
|
|
924
|
-
/** @description Whether to match the passed type exactly or to treat the type as a prefix */
|
|
925
1026
|
exactType?: boolean | null;
|
|
926
1027
|
type: string;
|
|
927
1028
|
data?: {
|
|
@@ -964,7 +1065,6 @@ interface paths {
|
|
|
964
1065
|
projectId: string;
|
|
965
1066
|
/** @description The integration type to remove */
|
|
966
1067
|
type: string;
|
|
967
|
-
/** @description Whether to match the passed type exactly or to treat the type as a prefix */
|
|
968
1068
|
exactType?: boolean | null;
|
|
969
1069
|
};
|
|
970
1070
|
};
|
|
@@ -1130,7 +1230,7 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1130
1230
|
};
|
|
1131
1231
|
};
|
|
1132
1232
|
canvas?: {
|
|
1133
|
-
parameterTypes
|
|
1233
|
+
parameterTypes?: {
|
|
1134
1234
|
type: string;
|
|
1135
1235
|
displayName: string;
|
|
1136
1236
|
configureUrl?: string;
|
|
@@ -1173,6 +1273,21 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1173
1273
|
entryPattern?: {
|
|
1174
1274
|
url: string;
|
|
1175
1275
|
};
|
|
1276
|
+
} | {
|
|
1277
|
+
id: string;
|
|
1278
|
+
name: string;
|
|
1279
|
+
url: string;
|
|
1280
|
+
iconUrl?: string;
|
|
1281
|
+
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
1282
|
+
}[];
|
|
1283
|
+
personalization?: {
|
|
1284
|
+
selectionAlgorithms?: {
|
|
1285
|
+
[key: string]: {
|
|
1286
|
+
displayName: string;
|
|
1287
|
+
description?: string;
|
|
1288
|
+
criteriaEditorUrl?: string;
|
|
1289
|
+
};
|
|
1290
|
+
};
|
|
1176
1291
|
};
|
|
1177
1292
|
};
|
|
1178
1293
|
dataConnectors?: {
|
|
@@ -1275,15 +1390,34 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1275
1390
|
definition: {
|
|
1276
1391
|
name: string;
|
|
1277
1392
|
description: string;
|
|
1278
|
-
parameters
|
|
1393
|
+
parameters: {
|
|
1279
1394
|
[key: string]: unknown;
|
|
1280
1395
|
};
|
|
1396
|
+
strict: boolean;
|
|
1281
1397
|
};
|
|
1282
1398
|
systemParameters?: "pageHtml"[];
|
|
1283
1399
|
includedAgents?: ("scout" | "sage")[];
|
|
1284
1400
|
}[];
|
|
1285
1401
|
};
|
|
1286
1402
|
};
|
|
1403
|
+
tools?: {
|
|
1404
|
+
id: string;
|
|
1405
|
+
name: string;
|
|
1406
|
+
url: string;
|
|
1407
|
+
iconUrl?: string;
|
|
1408
|
+
}[];
|
|
1409
|
+
projectTools?: {
|
|
1410
|
+
id: string;
|
|
1411
|
+
name: string;
|
|
1412
|
+
url: string;
|
|
1413
|
+
iconUrl?: string;
|
|
1414
|
+
}[];
|
|
1415
|
+
dashboardTools?: {
|
|
1416
|
+
id: string;
|
|
1417
|
+
name: string;
|
|
1418
|
+
url: string;
|
|
1419
|
+
iconUrl?: string;
|
|
1420
|
+
}[];
|
|
1287
1421
|
};
|
|
1288
1422
|
unstable_prompts?: {
|
|
1289
1423
|
id: string;
|
|
@@ -1352,7 +1486,11 @@ type FunctionCallSystemParameter = (typeof functionCallSystemParameters)[number]
|
|
|
1352
1486
|
declare function parseFunctionCall<Parameters extends Record<string, string>, Settings = Record<string, string>>(request: Pick<Request, 'body'>): {
|
|
1353
1487
|
functionCall: {
|
|
1354
1488
|
arguments: Parameters;
|
|
1489
|
+
call_id: string;
|
|
1355
1490
|
name: string;
|
|
1491
|
+
type: "function_call";
|
|
1492
|
+
id?: string;
|
|
1493
|
+
status?: "in_progress" | "completed" | "incomplete";
|
|
1356
1494
|
};
|
|
1357
1495
|
settings: Settings;
|
|
1358
1496
|
systemParameters: Record<FunctionCallSystemParameter, string | undefined>;
|
|
@@ -1383,6 +1521,9 @@ type AssetParameterLocationMetadata<TIntegrationConfiguration = unknown> = Commo
|
|
|
1383
1521
|
type AssetLibraryLocation = MeshLocationCore<unknown, AssetLibraryLocationMetadata, unknown, 'assetLibrary'> & GetDataResourceLocation;
|
|
1384
1522
|
type AssetParameterLocation = MeshLocationCore<AssetParamValue, AssetParameterLocationMetadata, AssetParamValue, 'assetParameter'> & GetDataResourceLocation;
|
|
1385
1523
|
|
|
1524
|
+
type DashboardToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
|
|
1525
|
+
type DashboardToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, DashboardToolLocationMetadata<TIntegrationConfiguration>, TTool, 'dashboardTool'>;
|
|
1526
|
+
|
|
1386
1527
|
type DataTypeLocationValue = Pick<DataType, 'body' | 'method' | 'path' | 'custom' | 'headers' | 'parameters' | 'variables'>;
|
|
1387
1528
|
type DataConnectorInfo = {
|
|
1388
1529
|
type: string;
|
|
@@ -1428,7 +1569,9 @@ type DataSourceLocationMetadata<TIntegrationConfiguration = unknown> = CommonMet
|
|
|
1428
1569
|
type DataSourceLocation = MeshLocationCore<DataSourceLocationValue, DataSourceLocationMetadata, DataSourceLocationValue, 'dataSource'>;
|
|
1429
1570
|
|
|
1430
1571
|
type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
1431
|
-
rootNode: Omit<RootComponentInstance, 'slots' | '_data'
|
|
1572
|
+
rootNode: Omit<RootComponentInstance, 'slots' | '_data'> & {
|
|
1573
|
+
_editionId?: string;
|
|
1574
|
+
};
|
|
1432
1575
|
parameterConfiguration: TParamConfiguration;
|
|
1433
1576
|
component: Omit<ComponentInstance, 'slots'>;
|
|
1434
1577
|
componentDefinitions: Record<string, ComponentDefinition | undefined>;
|
|
@@ -1468,16 +1611,14 @@ type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TPa
|
|
|
1468
1611
|
editConnectedData: Awaited<ReturnType<typeof connectToParent>>['parent']['editConnectedData'];
|
|
1469
1612
|
};
|
|
1470
1613
|
|
|
1471
|
-
type SettingsLocationMetadata = CommonMetadata
|
|
1472
|
-
locales: Locale[];
|
|
1473
|
-
};
|
|
1614
|
+
type SettingsLocationMetadata = CommonMetadata;
|
|
1474
1615
|
type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, SettingsLocationMetadata, TSettingsType, 'settings'>;
|
|
1475
1616
|
|
|
1476
1617
|
/**
|
|
1477
1618
|
* Defines methods used for interacting with a Mesh location
|
|
1478
1619
|
* To receive useful typings, check the `type` property of the location to narrow the typing.
|
|
1479
1620
|
*/
|
|
1480
|
-
type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> | AssetLibraryLocation | AssetParameterLocation | DataSourceLocation | DataTypeLocation | DataResourceLocation | CanvasEditorToolsLocation | EmbeddedEditorLocation | AIGenerateLocation<TValue> | AIPromptMetadataLocation
|
|
1621
|
+
type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> | AssetLibraryLocation | AssetParameterLocation | DataSourceLocation | DataTypeLocation | DataResourceLocation | CanvasEditorToolsLocation | EmbeddedEditorLocation | AIGenerateLocation<TValue> | AIPromptMetadataLocation | PersonalizationCriteriaLocation<TValue> | DashboardToolLocation<TValue> | ProjectToolLocation<TValue>;
|
|
1481
1622
|
interface MeshContextData {
|
|
1482
1623
|
locationKey: string;
|
|
1483
1624
|
locationType: MeshLocationTypes;
|
|
@@ -1486,6 +1627,7 @@ interface MeshContextData {
|
|
|
1486
1627
|
locationMetadata: any;
|
|
1487
1628
|
uniformApiVersion: string;
|
|
1488
1629
|
dialogContext?: DialogContext;
|
|
1630
|
+
fullScreenHeight?: boolean;
|
|
1489
1631
|
}
|
|
1490
1632
|
interface DialogContext {
|
|
1491
1633
|
dialogId: string;
|
|
@@ -1584,6 +1726,13 @@ type OpenDialogMessage = {
|
|
|
1584
1726
|
dialogData: unknown;
|
|
1585
1727
|
options?: DialogOptions;
|
|
1586
1728
|
};
|
|
1729
|
+
type NavigateMessage = {
|
|
1730
|
+
path: string;
|
|
1731
|
+
options?: {
|
|
1732
|
+
projectId?: string;
|
|
1733
|
+
target?: '_blank';
|
|
1734
|
+
};
|
|
1735
|
+
};
|
|
1587
1736
|
type CloseDialogMessage = {
|
|
1588
1737
|
dialogId: string | undefined;
|
|
1589
1738
|
dialogType: DialogType;
|
|
@@ -1658,6 +1807,8 @@ declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, on
|
|
|
1658
1807
|
openDialog: (message: OpenDialogMessage) => Promise<Pick<DialogResponseData, "value" | "dialogId"> | undefined>;
|
|
1659
1808
|
closeDialog: (message: CloseDialogMessage) => Promise<void>;
|
|
1660
1809
|
getDataResource: <TExpectedResult>(message: GetDataResourceMessage) => Promise<TExpectedResult>;
|
|
1810
|
+
navigate: (message: NavigateMessage) => Promise<void>;
|
|
1811
|
+
reloadLocation: () => Promise<void>;
|
|
1661
1812
|
editConnectedData: (message: EditConnectedDataMessage) => Promise<EditConnectedDataResponse>;
|
|
1662
1813
|
};
|
|
1663
1814
|
}>;
|
|
@@ -1682,6 +1833,10 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1682
1833
|
* Each location has a specific type of metadata that it is provided, which is typed automatically when the location is known.
|
|
1683
1834
|
*/
|
|
1684
1835
|
metadata: TMetadata;
|
|
1836
|
+
/**
|
|
1837
|
+
* A router object that can be used to navigate parent frame (Uniform App) to other page within current project and other methods.
|
|
1838
|
+
*/
|
|
1839
|
+
router: MeshRouter;
|
|
1685
1840
|
/**
|
|
1686
1841
|
* Context of a location when it is rendering inside a dialog in the Uniform app.
|
|
1687
1842
|
* This is set when:
|
|
@@ -1699,6 +1854,23 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1699
1854
|
returnDialogValue: (value: unknown) => Promise<void>;
|
|
1700
1855
|
};
|
|
1701
1856
|
}
|
|
1857
|
+
type MeshRouter = {
|
|
1858
|
+
/**
|
|
1859
|
+
* Navigate parent frame (Uniform App) to a new path within current project.
|
|
1860
|
+
*
|
|
1861
|
+
* So router.navigate('/canvas/edit/{compositionId}') will navigate will open the composition editor for the given composition ID in the parent frame.
|
|
1862
|
+
* Be aware that most of the time it will close your mesh app, so you should use it with caution.
|
|
1863
|
+
*
|
|
1864
|
+
* @param path - The path to navigate to. You don't need to specify /projects/${projectId} as it is prepended automatically with the current project ID.
|
|
1865
|
+
* @param options - The options for the navigation.
|
|
1866
|
+
* @param options.projectId - You can specify project ID to navigate to. By default the current project ID is used.
|
|
1867
|
+
* @param options.target - Allows to open a new tab instead of navigating the current one.
|
|
1868
|
+
*/
|
|
1869
|
+
navigatePlatform: (path: string, options?: {
|
|
1870
|
+
projectId?: string;
|
|
1871
|
+
target?: '_blank';
|
|
1872
|
+
}) => void;
|
|
1873
|
+
};
|
|
1702
1874
|
/** Common metadata for all mesh locations */
|
|
1703
1875
|
type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unknown> = {
|
|
1704
1876
|
/** The current Uniform user context. Contains name, email and context to check for permissions */
|
|
@@ -1709,6 +1881,8 @@ type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unkn
|
|
|
1709
1881
|
dashboardOrigin: string;
|
|
1710
1882
|
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
1711
1883
|
settings: TIntegrationConfiguration;
|
|
1884
|
+
/** List if enabled Uniform Project locales */
|
|
1885
|
+
locales: Locale[];
|
|
1712
1886
|
} & ExtendedMetadata;
|
|
1713
1887
|
type MeshLocationUserPermissions =
|
|
1714
1888
|
/** Uniform Context:Enrichments:Create */
|
|
@@ -1777,6 +1951,10 @@ type MeshLocationUserPermissions =
|
|
|
1777
1951
|
| 'COMPOSITIONS_READ_DRAFT'
|
|
1778
1952
|
/** Uniform Canvas:Component Library:Manage|Create, update, and delete component library data */
|
|
1779
1953
|
| 'COMPOSITIONS_MANAGE_SCHEMA'
|
|
1954
|
+
/** Uniform Canvas:Content Types:Manage|Create, update, and delete content types */
|
|
1955
|
+
| 'ENTRIES_MANAGE_SCHEMA'
|
|
1956
|
+
/** Uniform Canvas:AI Prompts:Manage|Create, update, and delete AI prompts */
|
|
1957
|
+
| 'PROMPTS_MANAGE_SCHEMA'
|
|
1780
1958
|
/** UTM Mapper:Read|Read UTM mapper configuration */
|
|
1781
1959
|
| 'UTM_MAPPER_READ'
|
|
1782
1960
|
/** UTM Mapper:Read|Create, update and delete UTM mapper configuration */
|
|
@@ -1792,7 +1970,7 @@ type MeshLocationUserPermissions =
|
|
|
1792
1970
|
/**
|
|
1793
1971
|
* Known location types that can be passed to a mesh location
|
|
1794
1972
|
*/
|
|
1795
|
-
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata';
|
|
1973
|
+
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria' | 'dashboardTool' | 'projectTool';
|
|
1796
1974
|
type SetValueOptions = ValidationResult;
|
|
1797
1975
|
type SetValueMessage = {
|
|
1798
1976
|
uniformMeshLocationValue: unknown;
|
|
@@ -1834,7 +2012,6 @@ type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, Prompt
|
|
|
1834
2012
|
type CanvasEditorToolsLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
1835
2013
|
releaseId?: string;
|
|
1836
2014
|
state?: number;
|
|
1837
|
-
locales: Locale[];
|
|
1838
2015
|
}, TIntegrationConfiguration>;
|
|
1839
2016
|
type CanvasEditorToolsReferenceData = {
|
|
1840
2017
|
name: string;
|
|
@@ -1908,6 +2085,14 @@ type ParamTypeConfigLocationMetadata<TIntegrationConfiguration = unknown> = Comm
|
|
|
1908
2085
|
}, TIntegrationConfiguration>;
|
|
1909
2086
|
type ParamTypeConfigLocation<TParamValue = unknown, TIntegrationConfiguration = unknown> = MeshLocationCore<TParamValue | undefined, ParamTypeConfigLocationMetadata<TIntegrationConfiguration>, TParamValue, 'paramTypeConfig'>;
|
|
1910
2087
|
|
|
2088
|
+
/** @deprecated Experimental functionality is subject to change in minor versions. */
|
|
2089
|
+
type PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
|
|
2090
|
+
/** @deprecated Experimental functionality is subject to change in minor versions. */
|
|
2091
|
+
type PersonalizationCriteriaLocation<TCriteriaValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TCriteriaValue | undefined, PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration>, TCriteriaValue, 'personalizationCriteria'>;
|
|
2092
|
+
|
|
2093
|
+
type ProjectToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
|
|
2094
|
+
type ProjectToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, ProjectToolLocationMetadata<TIntegrationConfiguration>, TTool, 'projectTool'>;
|
|
2095
|
+
|
|
1911
2096
|
interface SdkWindow {
|
|
1912
2097
|
/** The current window object. */
|
|
1913
2098
|
instance: Window;
|
|
@@ -2011,4 +2196,4 @@ declare const hasPermissions: (permissions: MeshLocationUserPermissions | MeshLo
|
|
|
2011
2196
|
*/
|
|
2012
2197
|
declare const hasRole: (role: string, user: UniformUser) => boolean;
|
|
2013
2198
|
|
|
2014
|
-
export { type AIGenerateLocation, type AIGenerateLocationMetadata, type AIPromptMetadataLocation, type AssetLibraryLocation, type AssetLibraryLocationMetadata, type AssetParameterLocation, type AssetParameterLocationMetadata, type BindableTypes, type CSSHeight, type CanvasEditorEntityType, type CanvasEditorToolsData, type CanvasEditorToolsLocation, type CanvasEditorToolsLocationMetadata, type CloseDialogMessage, type CloseLocationDialogOptions, type CommonMetadata, type DataConnectorInfo, type DataResourceLocation, type DataResourceLocationMetadata, type DataSourceLocation, type DataSourceLocationMetadata, type DataSourceLocationValue, type DataTypeLocation, type DataTypeLocationMetadata, type DataTypeLocationValue, type DialogContext, type DialogOptions, type DialogParamValue, type DialogParams, type DialogResponseData, type DialogResponseHandler, type DialogResponseHandlers, type DialogType, type DynamicInput, type DynamicInputs, type EditConnectedDataMessage, type EditConnectedDataResponse, type EditConnectedDataResponseCancellationContext, type EmbeddedEditorLocation, type EmbeddedEditorLocationMetadata, type EmbeddedEditorLocationSetValue, type EmbeddedEditorLocationValue, type FunctionCallResponse, type FunctionCallSystemParameter, type GetDataResourceLocation, type GetDataResourceMessage, IntegrationDefinitionClient, type IntegrationDefinitionDeleteParameters, type IntegrationDefinitionGetParameters, type IntegrationDefinitionGetResponse, type IntegrationDefinitionPutParameters, type IntegrationDefinitionPutResponse, IntegrationInstallationClient, type IntegrationInstallationDeleteParameters, type IntegrationInstallationGetParameters, type IntegrationInstallationGetResponse, type IntegrationInstallationPutParameters, type LocationDialogResponse, type MeshContextData, type MeshLocation, type MeshLocationCore, type MeshLocationTypes, type MeshLocationUserPermissions, type MeshSDKEventInterface, type OpenConfirmationDialogOptions, type OpenConfirmationDialogResult, type OpenDialogMessage, type OpenDialogResult, type OpenLocationDialogOptions, type ParamTypeConfigLocation, type ParamTypeConfigLocationMetadata, type ParamTypeLocation, type ParamTypeLocationMetadata, type PromptSettingsLocationMetadata, type SdkWindow, type SetLocationFunction, type SetValueMessage, type SetValueOptions, type SettingsLocation, type SettingsLocationMetadata, type UniformMeshSDK, type UniformMeshSDKEvents, type UniformUser, type ValidationResult, functionCallSystemParameters, hasPermissions, hasRole, initializeUniformMeshSDK, parseFunctionCall };
|
|
2199
|
+
export { type AIGenerateLocation, type AIGenerateLocationMetadata, type AIPromptMetadataLocation, type AssetLibraryLocation, type AssetLibraryLocationMetadata, type AssetParameterLocation, type AssetParameterLocationMetadata, type BindableTypes, type CSSHeight, type CanvasEditorEntityType, type CanvasEditorToolsData, type CanvasEditorToolsLocation, type CanvasEditorToolsLocationMetadata, type CloseDialogMessage, type CloseLocationDialogOptions, type CommonMetadata, type DashboardToolLocation, type DashboardToolLocationMetadata, type DataConnectorInfo, type DataResourceLocation, type DataResourceLocationMetadata, type DataSourceLocation, type DataSourceLocationMetadata, type DataSourceLocationValue, type DataTypeLocation, type DataTypeLocationMetadata, type DataTypeLocationValue, type DialogContext, type DialogOptions, type DialogParamValue, type DialogParams, type DialogResponseData, type DialogResponseHandler, type DialogResponseHandlers, type DialogType, type DynamicInput, type DynamicInputs, type EditConnectedDataMessage, type EditConnectedDataResponse, type EditConnectedDataResponseCancellationContext, type EmbeddedEditorLocation, type EmbeddedEditorLocationMetadata, type EmbeddedEditorLocationSetValue, type EmbeddedEditorLocationValue, type FunctionCallResponse, type FunctionCallSystemParameter, type GetDataResourceLocation, type GetDataResourceMessage, IntegrationDefinitionClient, type IntegrationDefinitionDeleteParameters, type IntegrationDefinitionGetParameters, type IntegrationDefinitionGetResponse, type IntegrationDefinitionPutParameters, type IntegrationDefinitionPutResponse, IntegrationInstallationClient, type IntegrationInstallationDeleteParameters, type IntegrationInstallationGetParameters, type IntegrationInstallationGetResponse, type IntegrationInstallationPutParameters, type LocationDialogResponse, type MeshContextData, type MeshLocation, type MeshLocationCore, type MeshLocationTypes, type MeshLocationUserPermissions, type MeshRouter, type MeshSDKEventInterface, type NavigateMessage, type OpenConfirmationDialogOptions, type OpenConfirmationDialogResult, type OpenDialogMessage, type OpenDialogResult, type OpenLocationDialogOptions, type ParamTypeConfigLocation, type ParamTypeConfigLocationMetadata, type ParamTypeLocation, type ParamTypeLocationMetadata, type PersonalizationCriteriaLocation, type PersonalizationCriteriaLocationMetadata, type ProjectToolLocation, type ProjectToolLocationMetadata, type PromptSettingsLocationMetadata, type SdkWindow, type SetLocationFunction, type SetValueMessage, type SetValueOptions, type SettingsLocation, type SettingsLocationMetadata, type UniformMeshSDK, type UniformMeshSDKEvents, type UniformUser, type ValidationResult, functionCallSystemParameters, hasPermissions, hasRole, initializeUniformMeshSDK, parseFunctionCall };
|
package/dist/index.esm.js
CHANGED
|
@@ -131,7 +131,7 @@ var getLogger = (prefix, debug) => {
|
|
|
131
131
|
};
|
|
132
132
|
|
|
133
133
|
// src/temp/version.ts
|
|
134
|
-
var UNIFORM_MESH_SDK_VERSION = "20.
|
|
134
|
+
var UNIFORM_MESH_SDK_VERSION = "20.46.0";
|
|
135
135
|
|
|
136
136
|
// src/framepost/constants.ts
|
|
137
137
|
var DEFAULT_REQUEST_TIMEOUT = 5e3;
|
|
@@ -518,6 +518,12 @@ async function connectToParent({
|
|
|
518
518
|
timeout: 3e4
|
|
519
519
|
});
|
|
520
520
|
},
|
|
521
|
+
navigate: async (message) => {
|
|
522
|
+
await client.request("navigate", message);
|
|
523
|
+
},
|
|
524
|
+
reloadLocation: async () => {
|
|
525
|
+
await client.request("reload");
|
|
526
|
+
},
|
|
521
527
|
editConnectedData: async (message) => {
|
|
522
528
|
return await client.request(
|
|
523
529
|
"editConnectedData",
|
|
@@ -546,9 +552,11 @@ var createSdkWindow = ({
|
|
|
546
552
|
}
|
|
547
553
|
const windowInstance = window;
|
|
548
554
|
const updateHeight = (height) => {
|
|
549
|
-
if (height
|
|
550
|
-
oldHeight
|
|
551
|
-
|
|
555
|
+
if (height) {
|
|
556
|
+
if (height !== oldHeight) {
|
|
557
|
+
oldHeight = height;
|
|
558
|
+
onHeightChange == null ? void 0 : onHeightChange(height);
|
|
559
|
+
}
|
|
552
560
|
return;
|
|
553
561
|
}
|
|
554
562
|
let maxBottom = windowInstance.document.documentElement.getBoundingClientRect().height;
|
|
@@ -619,6 +627,7 @@ var createSdkWindow = ({
|
|
|
619
627
|
childList: true,
|
|
620
628
|
subtree: true
|
|
621
629
|
});
|
|
630
|
+
updateHeight();
|
|
622
631
|
},
|
|
623
632
|
disableAutoResizing: () => {
|
|
624
633
|
observer == null ? void 0 : observer.disconnect();
|
|
@@ -702,6 +711,10 @@ async function initializeUniformMeshSDK({
|
|
|
702
711
|
getCurrentLocation: () => {
|
|
703
712
|
const location = {
|
|
704
713
|
getDataResource: parent.getDataResource,
|
|
714
|
+
router: {
|
|
715
|
+
navigatePlatform: (path, options) => parent.navigate({ path, options })
|
|
716
|
+
// reloadLocation: parent.reloadLocation,
|
|
717
|
+
},
|
|
705
718
|
editConnectedData,
|
|
706
719
|
type: contextData.locationType,
|
|
707
720
|
isReadOnly: contextData.isReadOnly,
|
|
@@ -732,7 +745,10 @@ async function initializeUniformMeshSDK({
|
|
|
732
745
|
// then we disable autoResizing for the dialog location.
|
|
733
746
|
// Otherwise, autoResizing will likely "overwrite" the specified `contentHeight` value, making
|
|
734
747
|
// developers very sad and confused. No one wants a sad and confused developer.
|
|
735
|
-
autoResizingDisabled
|
|
748
|
+
// Another case for explicit autoResizingDisabled flag is Full Screen Height from the parent (e.g. asset library location),
|
|
749
|
+
// so by default it will be stretch to the maximum height of the parent.
|
|
750
|
+
// Can still be manually enabled by calling sdk.currentWindow?.enableAutoResizing() in mesh app.
|
|
751
|
+
autoResizingDisabled: ((_a = contextData.dialogContext) == null ? void 0 : _a.contentHeight) || contextData.fullScreenHeight ? true : autoResizingDisabled
|
|
736
752
|
}),
|
|
737
753
|
version: contextData.uniformApiVersion,
|
|
738
754
|
openLocationDialog: async ({
|
package/dist/index.js
CHANGED
|
@@ -172,7 +172,7 @@ var getLogger = (prefix, debug) => {
|
|
|
172
172
|
};
|
|
173
173
|
|
|
174
174
|
// src/temp/version.ts
|
|
175
|
-
var UNIFORM_MESH_SDK_VERSION = "20.
|
|
175
|
+
var UNIFORM_MESH_SDK_VERSION = "20.46.0";
|
|
176
176
|
|
|
177
177
|
// src/framepost/constants.ts
|
|
178
178
|
var DEFAULT_REQUEST_TIMEOUT = 5e3;
|
|
@@ -559,6 +559,12 @@ async function connectToParent({
|
|
|
559
559
|
timeout: 3e4
|
|
560
560
|
});
|
|
561
561
|
},
|
|
562
|
+
navigate: async (message) => {
|
|
563
|
+
await client.request("navigate", message);
|
|
564
|
+
},
|
|
565
|
+
reloadLocation: async () => {
|
|
566
|
+
await client.request("reload");
|
|
567
|
+
},
|
|
562
568
|
editConnectedData: async (message) => {
|
|
563
569
|
return await client.request(
|
|
564
570
|
"editConnectedData",
|
|
@@ -587,9 +593,11 @@ var createSdkWindow = ({
|
|
|
587
593
|
}
|
|
588
594
|
const windowInstance = window;
|
|
589
595
|
const updateHeight = (height) => {
|
|
590
|
-
if (height
|
|
591
|
-
oldHeight
|
|
592
|
-
|
|
596
|
+
if (height) {
|
|
597
|
+
if (height !== oldHeight) {
|
|
598
|
+
oldHeight = height;
|
|
599
|
+
onHeightChange == null ? void 0 : onHeightChange(height);
|
|
600
|
+
}
|
|
593
601
|
return;
|
|
594
602
|
}
|
|
595
603
|
let maxBottom = windowInstance.document.documentElement.getBoundingClientRect().height;
|
|
@@ -660,6 +668,7 @@ var createSdkWindow = ({
|
|
|
660
668
|
childList: true,
|
|
661
669
|
subtree: true
|
|
662
670
|
});
|
|
671
|
+
updateHeight();
|
|
663
672
|
},
|
|
664
673
|
disableAutoResizing: () => {
|
|
665
674
|
observer == null ? void 0 : observer.disconnect();
|
|
@@ -743,6 +752,10 @@ async function initializeUniformMeshSDK({
|
|
|
743
752
|
getCurrentLocation: () => {
|
|
744
753
|
const location = {
|
|
745
754
|
getDataResource: parent.getDataResource,
|
|
755
|
+
router: {
|
|
756
|
+
navigatePlatform: (path, options) => parent.navigate({ path, options })
|
|
757
|
+
// reloadLocation: parent.reloadLocation,
|
|
758
|
+
},
|
|
746
759
|
editConnectedData,
|
|
747
760
|
type: contextData.locationType,
|
|
748
761
|
isReadOnly: contextData.isReadOnly,
|
|
@@ -773,7 +786,10 @@ async function initializeUniformMeshSDK({
|
|
|
773
786
|
// then we disable autoResizing for the dialog location.
|
|
774
787
|
// Otherwise, autoResizing will likely "overwrite" the specified `contentHeight` value, making
|
|
775
788
|
// developers very sad and confused. No one wants a sad and confused developer.
|
|
776
|
-
autoResizingDisabled
|
|
789
|
+
// Another case for explicit autoResizingDisabled flag is Full Screen Height from the parent (e.g. asset library location),
|
|
790
|
+
// so by default it will be stretch to the maximum height of the parent.
|
|
791
|
+
// Can still be manually enabled by calling sdk.currentWindow?.enableAutoResizing() in mesh app.
|
|
792
|
+
autoResizingDisabled: ((_a = contextData.dialogContext) == null ? void 0 : _a.contentHeight) || contextData.fullScreenHeight ? true : autoResizingDisabled
|
|
777
793
|
}),
|
|
778
794
|
version: contextData.uniformApiVersion,
|
|
779
795
|
openLocationDialog: async ({
|
package/dist/index.mjs
CHANGED
|
@@ -131,7 +131,7 @@ var getLogger = (prefix, debug) => {
|
|
|
131
131
|
};
|
|
132
132
|
|
|
133
133
|
// src/temp/version.ts
|
|
134
|
-
var UNIFORM_MESH_SDK_VERSION = "20.
|
|
134
|
+
var UNIFORM_MESH_SDK_VERSION = "20.46.0";
|
|
135
135
|
|
|
136
136
|
// src/framepost/constants.ts
|
|
137
137
|
var DEFAULT_REQUEST_TIMEOUT = 5e3;
|
|
@@ -518,6 +518,12 @@ async function connectToParent({
|
|
|
518
518
|
timeout: 3e4
|
|
519
519
|
});
|
|
520
520
|
},
|
|
521
|
+
navigate: async (message) => {
|
|
522
|
+
await client.request("navigate", message);
|
|
523
|
+
},
|
|
524
|
+
reloadLocation: async () => {
|
|
525
|
+
await client.request("reload");
|
|
526
|
+
},
|
|
521
527
|
editConnectedData: async (message) => {
|
|
522
528
|
return await client.request(
|
|
523
529
|
"editConnectedData",
|
|
@@ -546,9 +552,11 @@ var createSdkWindow = ({
|
|
|
546
552
|
}
|
|
547
553
|
const windowInstance = window;
|
|
548
554
|
const updateHeight = (height) => {
|
|
549
|
-
if (height
|
|
550
|
-
oldHeight
|
|
551
|
-
|
|
555
|
+
if (height) {
|
|
556
|
+
if (height !== oldHeight) {
|
|
557
|
+
oldHeight = height;
|
|
558
|
+
onHeightChange == null ? void 0 : onHeightChange(height);
|
|
559
|
+
}
|
|
552
560
|
return;
|
|
553
561
|
}
|
|
554
562
|
let maxBottom = windowInstance.document.documentElement.getBoundingClientRect().height;
|
|
@@ -619,6 +627,7 @@ var createSdkWindow = ({
|
|
|
619
627
|
childList: true,
|
|
620
628
|
subtree: true
|
|
621
629
|
});
|
|
630
|
+
updateHeight();
|
|
622
631
|
},
|
|
623
632
|
disableAutoResizing: () => {
|
|
624
633
|
observer == null ? void 0 : observer.disconnect();
|
|
@@ -702,6 +711,10 @@ async function initializeUniformMeshSDK({
|
|
|
702
711
|
getCurrentLocation: () => {
|
|
703
712
|
const location = {
|
|
704
713
|
getDataResource: parent.getDataResource,
|
|
714
|
+
router: {
|
|
715
|
+
navigatePlatform: (path, options) => parent.navigate({ path, options })
|
|
716
|
+
// reloadLocation: parent.reloadLocation,
|
|
717
|
+
},
|
|
705
718
|
editConnectedData,
|
|
706
719
|
type: contextData.locationType,
|
|
707
720
|
isReadOnly: contextData.isReadOnly,
|
|
@@ -732,7 +745,10 @@ async function initializeUniformMeshSDK({
|
|
|
732
745
|
// then we disable autoResizing for the dialog location.
|
|
733
746
|
// Otherwise, autoResizing will likely "overwrite" the specified `contentHeight` value, making
|
|
734
747
|
// developers very sad and confused. No one wants a sad and confused developer.
|
|
735
|
-
autoResizingDisabled
|
|
748
|
+
// Another case for explicit autoResizingDisabled flag is Full Screen Height from the parent (e.g. asset library location),
|
|
749
|
+
// so by default it will be stretch to the maximum height of the parent.
|
|
750
|
+
// Can still be manually enabled by calling sdk.currentWindow?.enableAutoResizing() in mesh app.
|
|
751
|
+
autoResizingDisabled: ((_a = contextData.dialogContext) == null ? void 0 : _a.contentHeight) || contextData.fullScreenHeight ? true : autoResizingDisabled
|
|
736
752
|
}),
|
|
737
753
|
version: contextData.uniformApiVersion,
|
|
738
754
|
openLocationDialog: async ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk",
|
|
3
|
-
"version": "20.7.1-alpha.
|
|
3
|
+
"version": "20.7.1-alpha.121+a4f284458c",
|
|
4
4
|
"description": "Uniform Mesh Framework SDK",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,11 +21,10 @@
|
|
|
21
21
|
"build:setversion": "tsx ./scripts/set-version.ts",
|
|
22
22
|
"dev": "pnpm update-openapi && pnpm build:setversion && tsup --watch",
|
|
23
23
|
"clean": "rimraf dist",
|
|
24
|
-
"test": "jest --maxWorkers=1 --passWithNoTests",
|
|
25
24
|
"lint": "eslint \"src/**/*.{js,ts,tsx}\"",
|
|
26
25
|
"format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
|
|
27
26
|
"update-openapi": "tsx ./scripts/update-openapi.cts",
|
|
28
|
-
"document": "api-extractor run --local"
|
|
27
|
+
"document:prebuild": "api-extractor run --local"
|
|
29
28
|
},
|
|
30
29
|
"files": [
|
|
31
30
|
"/dist"
|
|
@@ -34,16 +33,16 @@
|
|
|
34
33
|
"access": "public"
|
|
35
34
|
},
|
|
36
35
|
"dependencies": {
|
|
37
|
-
"@uniformdev/assets": "20.7.1-alpha.
|
|
38
|
-
"@uniformdev/canvas": "20.7.1-alpha.
|
|
39
|
-
"@uniformdev/context": "20.7.1-alpha.
|
|
40
|
-
"@uniformdev/project-map": "20.7.1-alpha.
|
|
36
|
+
"@uniformdev/assets": "20.7.1-alpha.121+a4f284458c",
|
|
37
|
+
"@uniformdev/canvas": "20.7.1-alpha.121+a4f284458c",
|
|
38
|
+
"@uniformdev/context": "20.7.1-alpha.121+a4f284458c",
|
|
39
|
+
"@uniformdev/project-map": "20.7.1-alpha.121+a4f284458c",
|
|
41
40
|
"imagesloaded": "^5.0.0",
|
|
42
41
|
"mitt": "^3.0.1"
|
|
43
42
|
},
|
|
44
43
|
"devDependencies": {
|
|
45
44
|
"@types/imagesloaded": "^4.1.2",
|
|
46
|
-
"openai": "
|
|
45
|
+
"openai": "4.94.0"
|
|
47
46
|
},
|
|
48
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "a4f284458cffb24442299a5210bdad47c05aada3"
|
|
49
48
|
}
|